default radio state tweak, minor bug fixes

This commit is contained in:
tmj-fstate
2020-10-17 22:56:01 +02:00
parent ef200df575
commit af3a724ede
4 changed files with 6 additions and 5 deletions

View File

@@ -2702,6 +2702,7 @@ bool TController::PrepareEngine()
if (AIControllFlag) {
// część wykonawcza dla sterowania przez komputer
mvOccupied->BatterySwitch( true );
mvOccupied->Radio = true;
if( ( mvControlling->EngineType == TEngineType::DieselElectric )
|| ( mvControlling->EngineType == TEngineType::DieselEngine ) ) {
mvControlling->OilPumpSwitch( true );
@@ -2945,6 +2946,7 @@ bool TController::ReleaseEngine() {
mvOccupied->IncManualBrakeLevel( ManualBrakePosNo );
}
// switch off remaining power
mvOccupied->Radio = false;
mvOccupied->BatterySwitch( false );
}
}

View File

@@ -1034,7 +1034,7 @@ public:
start_t BatteryStart = start_t::manual;
bool EpFuse = true; /*Czy sa zalavzone baterie*/
bool Signalling = false; /*Czy jest zalaczona sygnalizacja hamowania ostatniego wagonu*/
bool Radio = true; /*Czy jest zalaczony radiotelefon*/
bool Radio = false; /*Czy jest zalaczony radiotelefon*/
float NominalBatteryVoltage = 0.f; /*Winger - baterie w elektrykach*/
TDimension Dim; /*wymiary*/
double Cx = 0.0; /*wsp. op. aerodyn.*/

View File

@@ -590,15 +590,13 @@ dictionary_source *TTrain::GetTrainState() {
dict->insert( "manual_brake", ( mvOccupied->ManualBrakePos > 0 ) );
bool const bEP = ( mvControlled->LocHandle->GetCP() > 0.2 ) || ( fEIMParams[ 0 ][ 5 ] > 0.01 );
dict->insert( "dir_brake", bEP );
bool bPN;
bool bPN { false };
if( ( typeid( *mvOccupied->Hamulec ) == typeid( TLSt ) )
|| ( typeid( *mvOccupied->Hamulec ) == typeid( TEStED ) ) ) {
TBrake* temp_ham = mvOccupied->Hamulec.get();
bPN = ( static_cast<TLSt*>( temp_ham )->GetEDBCP() > 0.2 );
}
else
bPN = false;
dict->insert( "indir_brake", bPN );
dict->insert( "brake_delay_flag", mvOccupied->BrakeDelayFlag );
dict->insert( "brake_op_mode_flag", mvOccupied->BrakeOpModeFlag );

View File

@@ -740,7 +740,8 @@ eu07_application::init_glfw() {
monitor = glfwGetPrimaryMonitor();
glfwWindowHint( GLFW_AUTO_ICONIFY, GLFW_FALSE );
if( Global.iMultisampling > 0 ) {
glfwWindowHint( GLFW_FLOATING, GLFW_FALSE );
if( ( Global.iMultisampling > 0 ) && ( Global.gfx_skippipeline ) ) {
glfwWindowHint( GLFW_SAMPLES, 1 << Global.iMultisampling );
}