diff --git a/DynObj.cpp b/DynObj.cpp index eb7989e5..938fc8f4 100644 --- a/DynObj.cpp +++ b/DynObj.cpp @@ -2463,30 +2463,45 @@ bool TDynamicObject::Update(double dt, double dt1) // if // ((!MoverParameters->PantCompFlag)&&(MoverParameters->CompressedVolume>=2.8)) // MoverParameters->PantVolume=MoverParameters->CompressedVolume; - if( MoverParameters->PantPress < ( MoverParameters->TrainType == dt_EZT ? 2.5 : 3.5 ) ) { + + if( MoverParameters->PantPress < MoverParameters->EnginePowerSource.CollectorParameters.MinPress ) { // 3.5 wg http://www.transportszynowy.pl/eu06-07pneumat.php - // Ra 2013-12: Niebugocław mówi, że w EZT podnoszą się przy 2.5 if( true == MoverParameters->PantPressSwitchActive ) { // opuszczenie pantografów przy niskim ciśnieniu +/* + // NOTE: disabled, the pantographs drop by themseleves when the pantograph tank pressure gets low enough MoverParameters->PantFront( false, ( MoverParameters->TrainType == dt_EZT ? command_range::unit : command_range::local ) ); MoverParameters->PantRear( false, ( MoverParameters->TrainType == dt_EZT ? command_range::unit : command_range::local ) ); - // pressure switch safety measure -- open the line breaker, unless there's alternate source of traction voltage - if( MoverParameters->GetTrainsetVoltage() < 0.5 * MoverParameters->EnginePowerSource.MaxVoltage ) { - // TODO: check whether line breaker should be open EMU-wide - MoverParameters->MainSwitch( false, ( MoverParameters->TrainType == dt_EZT ? command_range::unit : command_range::local ) ); +*/ + if( MoverParameters->TrainType != dt_EZT ) { + // pressure switch safety measure -- open the line breaker, unless there's alternate source of traction voltage + if( MoverParameters->GetTrainsetVoltage() < 0.5 * MoverParameters->EnginePowerSource.MaxVoltage ) { + // TODO: check whether line breaker should be open EMU-wide + MoverParameters->MainSwitch( false, ( MoverParameters->TrainType == dt_EZT ? command_range::unit : command_range::local ) ); + } + } + else { + // specialized variant for EMU -- pwr system disables converter and heating, + // and prevents their activation until pressure switch is set again + MoverParameters->PantPressLockActive = true; + // TODO: separate 'heating allowed' from actual heating flag, so we can disable it here without messing up heating toggle + MoverParameters->ConverterSwitch( false, command_range::unit ); } // mark the pressure switch as spent MoverParameters->PantPressSwitchActive = false; } } else { - // prime the pressure switch - // TODO: check what decides whether the pressure switch is active, prototypically - MoverParameters->PantPressSwitchActive = true; + if( MoverParameters->PantPress >= 4.6 ) { + // prime the pressure switch + MoverParameters->PantPressSwitchActive = true; + // turn off the subsystems lock + MoverParameters->PantPressLockActive = false; - if( MoverParameters->PantPress >= 4.8 ) { - // Winger - automatyczne wylaczanie malej sprezarki - MoverParameters->PantCompFlag = false; + if( MoverParameters->PantPress >= 4.8 ) { + // Winger - automatyczne wylaczanie malej sprezarki + MoverParameters->PantCompFlag = false; + } } } /* diff --git a/McZapkie/MOVER.h b/McZapkie/MOVER.h index e8a509f1..62ee65ad 100644 --- a/McZapkie/MOVER.h +++ b/McZapkie/MOVER.h @@ -922,7 +922,8 @@ public: double RventRot = 0.0; /*!s obroty wentylatorow rozruchowych*/ bool UnBrake = false; /*w EZT - nacisniete odhamowywanie*/ double PantPress = 0.0; /*Cisnienie w zbiornikach pantografow*/ - bool PantPressSwitchActive{ false }; // state of the pantograph pressure switch. gets primed when the pantograph is up + bool PantPressSwitchActive{ false }; // state of the pantograph pressure switch. gets primed at defined pressure level in pantograph air system + bool PantPressLockActive{ false }; // pwr system state flag. fires when pressure switch activates by pantograph pressure dropping below defined level bool s_CAtestebrake = false; //hunter-091012: zmienna dla testu ca /*-zmienne dla lokomotywy spalinowej z przekladnia mechaniczna*/ @@ -1096,8 +1097,8 @@ public: /*--funkcje dla lokomotyw*/ bool DirectionBackward(void);/*! kierunek ruchu*/ bool MainSwitch( bool const State, int const Notify = command_range::consist );/*! wylacznik glowny*/ - bool ConverterSwitch(bool State);/*! wl/wyl przetwornicy*/ - bool CompressorSwitch(bool State);/*! wl/wyl sprezarki*/ + bool ConverterSwitch( bool State, int const Notify = command_range::consist );/*! wl/wyl przetwornicy*/ + bool CompressorSwitch( bool State, int const Notify = command_range::consist );/*! wl/wyl sprezarki*/ /*-funkcje typowe dla lokomotywy elektrycznej*/ void ConverterCheck(); // przetwornica diff --git a/McZapkie/Mover.cpp b/McZapkie/Mover.cpp index 2e088303..9ef812d2 100644 --- a/McZapkie/Mover.cpp +++ b/McZapkie/Mover.cpp @@ -737,6 +737,11 @@ void TMoverParameters::UpdatePantVolume(double dt) } if (!PantCompFlag && (PantVolume > 0.1)) PantVolume -= dt * 0.0003; // nieszczelności: 0.0003=0.3l/s +/* + // NOTE: disabled as this is redundant with check done in dynobj.update() + // TODO: determine if this isn't a mistake -- + // though unlikely it's possible this is emulation of a different circuit than the pantograph pressure switch, with similar function? + // TBD, TODO: alternatively, move the dynobj.update() subroutine here, as it doesn't touch elements outside of the mover object if( Mains ) { // nie wchodzić w funkcję bez potrzeby if( EngineType == ElectricSeriesMotor ) { @@ -750,14 +755,15 @@ void TMoverParameters::UpdatePantVolume(double dt) EventFlag = true; } } -/* + // NOTE: disabled, the flag gets set in dynobj.update() when the pantograph actually drops // mark the pressure switch as spent, regardless whether line breaker actually opened PantPressSwitchActive = false; -*/ + } } } +*/ /* // NOTE: pantograph tank pressure sharing experimentally disabled for more accurate simulation if (TrainType != dt_EZT) // w EN57 pompuje się tylko w silnikowym @@ -1521,6 +1527,7 @@ double TMoverParameters::ShowEngineRotation(int VehN) void TMoverParameters::ConverterCheck() { // sprawdzanie przetwornicy if( ( ConverterAllow ) + && ( false == PantPressLockActive ) && ( ( Mains ) || ( GetTrainsetVoltage() > 0.5 * EnginePowerSource.MaxVoltage ) ) ) { ConverterFlag = true; @@ -2273,9 +2280,8 @@ bool TMoverParameters::AntiSlippingButton(void) // ************************************************************************************************* bool TMoverParameters::MainSwitch( bool const State, int const Notify ) { - bool MS; + bool MS = false; // Ra: przeniesione z końca - MS = false; // Ra: przeniesione z końca if ((Mains != State) && (MainCtrlPosNo > 0)) { if ((State == false) || @@ -2314,16 +2320,6 @@ bool TMoverParameters::MainSwitch( bool const State, int const Notify ) } if (((TrainType == dt_EZT) && (!State))) ConvOvldFlag = true; - // if (State=false) then //jeśli wyłączony - // begin - // SetFlag(SoundFlag,sound_relay); //hunter-091012: przeniesione do Train.cpp, zeby sie - // nie zapetlal - // if (SecuritySystem.Status<>12) then - // SecuritySystem.Status:=0; //deaktywacja czuwaka; Ra: a nie baterią? - // end - // else - // if (SecuritySystem.Status<>12) then - // SecuritySystem.Status:=s_waiting; //aktywacja czuwaka } } // else MainSwitch:=false; @@ -2334,9 +2330,10 @@ bool TMoverParameters::MainSwitch( bool const State, int const Notify ) // Q: 20160713 // włączenie / wyłączenie przetwornicy // ************************************************************************************************* -bool TMoverParameters::ConverterSwitch(bool State) +bool TMoverParameters::ConverterSwitch( bool State, int const Notify ) { bool CS = false; // Ra: normalnie chyba false? + if (ConverterAllow != State) { ConverterAllow = State; @@ -2344,10 +2341,24 @@ bool TMoverParameters::ConverterSwitch(bool State) if (CompressorPower == 2) CompressorAllow = ConverterAllow; } - if (ConverterAllow == true) - SendCtrlToNext("ConverterSwitch", 1, CabNo); - else - SendCtrlToNext("ConverterSwitch", 0, CabNo); + if( ConverterAllow == true ) { + if( Notify != command_range::local ) { + SendCtrlToNext( + "ConverterSwitch", 1, CabNo, + ( Notify == command_range::unit ? + ctrain_controll | ctrain_depot : + ctrain_controll ) ); + } + } + else { + if( Notify != command_range::local ) { + SendCtrlToNext( + "ConverterSwitch", 0, CabNo, + ( Notify == command_range::unit ? + ctrain_controll | ctrain_depot : + ctrain_controll ) ); + } + } return CS; } @@ -2356,7 +2367,7 @@ bool TMoverParameters::ConverterSwitch(bool State) // Q: 20160713 // włączenie / wyłączenie sprężarki // ************************************************************************************************* -bool TMoverParameters::CompressorSwitch(bool State) +bool TMoverParameters::CompressorSwitch( bool State, int const Notify ) { bool CS = false; // Ra: normalnie chyba tak? // if State=true then @@ -2367,10 +2378,24 @@ bool TMoverParameters::CompressorSwitch(bool State) CompressorAllow = State; CS = true; } - if (CompressorAllow == true) - SendCtrlToNext("CompressorSwitch", 1, CabNo); - else - SendCtrlToNext("CompressorSwitch", 0, CabNo); + if( CompressorAllow == true ) { + if( Notify != command_range::local ) { + SendCtrlToNext( + "CompressorSwitch", 1, CabNo, + ( Notify == command_range::unit ? + ctrain_controll | ctrain_depot : + ctrain_controll ) ); + } + } + else { + if( Notify != command_range::local ) { + SendCtrlToNext( + "CompressorSwitch", 0, CabNo, + ( Notify == command_range::unit ? + ctrain_controll | ctrain_depot : + ctrain_controll ) ); + } + } return CS; } @@ -7246,8 +7271,8 @@ void TMoverParameters::LoadFIZ_PowerParamsDecode( TPowerParameters &Powerparamet extract_value( collectorparameters.MaxV, "MaxVoltage", Line, "" ); collectorparameters.OVP = //przekaźnik nadnapięciowy extract_value( "OverVoltProt", Line ) == "Yes" ? - 1 : - 0; + 1 : + 0; //napięcie rozłączające WS collectorparameters.MinV = 0.5 * collectorparameters.MaxV; //gdyby parametr nie podany extract_value( collectorparameters.MinV, "MinV", Line, "" ); @@ -7255,7 +7280,7 @@ void TMoverParameters::LoadFIZ_PowerParamsDecode( TPowerParameters &Powerparamet collectorparameters.InsetV = 0.6 * collectorparameters.MaxV; //gdyby parametr nie podany extract_value( collectorparameters.InsetV, "InsetV", Line, "" ); //ciśnienie rozłączające WS - extract_value( collectorparameters.MinPress, "MinPress", Line, "2.0" ); //domyślnie 2 bary do załączenia WS + extract_value( collectorparameters.MinPress, "MinPress", Line, "3.5" ); //domyślnie 2 bary do załączenia WS //maksymalne ciśnienie za reduktorem collectorparameters.MaxPress = 5.0 + 0.001 * ( Random( 50 ) - Random( 50 ) ); extract_value( collectorparameters.MaxPress, "MaxPress", Line, "" ); diff --git a/Train.cpp b/Train.cpp index a8a19ab0..0667248e 100644 --- a/Train.cpp +++ b/Train.cpp @@ -1212,41 +1212,20 @@ void TTrain::OnCommand_pantographtogglefront( TTrain *Train, command_data const if( Command.action == GLFW_PRESS ) { // only reacting to press, so the switch doesn't flip back and forth if key is held down - if( false == ( Train->mvOccupied->ActiveCab == 1 ? Train->mvControlled->PantFrontUp : Train->mvControlled->PantRearUp ) ) { + if( false == Train->mvControlled->PantFrontUp ) { // turn on... - if( Train->mvOccupied->ActiveCab == 1 ) { - // przedni gdy w kabinie 1 - Train->mvControlled->PantFrontSP = false; - if( Train->mvControlled->PantFront( true ) ) { - if( Train->mvControlled->PantFrontStart != 1 ) { - // sound feedback - Train->play_sound( Train->dsbSwitch ); - // visual feedback - if( Train->ggPantFrontButton.SubModel ) { - Train->ggPantFrontButton.UpdateValue( 1.0 ); - } - if( Train->ggPantFrontButtonOff.SubModel != nullptr ) { - // pantograph control can have two-button setup - Train->ggPantFrontButtonOff.UpdateValue( 0.0 ); - } + Train->mvControlled->PantFrontSP = false; + if( Train->mvControlled->PantFront( true ) ) { + if( Train->mvControlled->PantFrontStart != 1 ) { + // sound feedback + Train->play_sound( Train->dsbSwitch ); + // visual feedback + if( Train->ggPantFrontButton.SubModel ) { + Train->ggPantFrontButton.UpdateValue( 1.0 ); } - } - } - else { - // rear otherwise - Train->mvControlled->PantRearSP = false; - if( Train->mvControlled->PantRear( true ) ) { - if( Train->mvControlled->PantRearStart != 1 ) { - // sound feedback - Train->play_sound( Train->dsbSwitch ); - // visual feedback - if( Train->ggPantFrontButton.SubModel ) { - Train->ggPantFrontButton.UpdateValue( 1.0 ); - } - if( Train->ggPantFrontButtonOff.SubModel != nullptr ) { - // pantograph control can have two-button setup - Train->ggPantFrontButtonOff.UpdateValue( 0.0 ); - } + if( Train->ggPantFrontButtonOff.SubModel != nullptr ) { + // pantograph control can have two-button setup + Train->ggPantFrontButtonOff.UpdateValue( 0.0 ); } } } @@ -1261,32 +1240,15 @@ void TTrain::OnCommand_pantographtogglefront( TTrain *Train, command_data const return; } - if( Train->mvOccupied->ActiveCab == 1 ) { - // przedni gdy w kabinie 1 - Train->mvControlled->PantFrontSP = false; - if( false == Train->mvControlled->PantFront( false ) ) { - if( Train->mvControlled->PantFrontStart != 0 ) { - // sound feedback - Train->play_sound( Train->dsbSwitch ); - // visual feedback - Train->ggPantFrontButton.UpdateValue( 0.0 ); - // pantograph control can have two-button setup - Train->ggPantFrontButtonOff.UpdateValue( 1.0 ); - } - } - } - else { - // rear otherwise - Train->mvControlled->PantRearSP = false; - if( false == Train->mvControlled->PantRear( false ) ) { - if( Train->mvControlled->PantRearStart != 0 ) { - // sound feedback - Train->play_sound( Train->dsbSwitch ); - // visual feedback - Train->ggPantFrontButton.UpdateValue( 0.0 ); - // pantograph control can have two-button setup - Train->ggPantFrontButtonOff.UpdateValue( 1.0 ); - } + Train->mvControlled->PantFrontSP = false; + if( false == Train->mvControlled->PantFront( false ) ) { + if( Train->mvControlled->PantFrontStart != 0 ) { + // sound feedback + Train->play_sound( Train->dsbSwitch ); + // visual feedback + Train->ggPantFrontButton.UpdateValue( 0.0 ); + // pantograph control can have two-button setup + Train->ggPantFrontButtonOff.UpdateValue( 1.0 ); } } } @@ -1315,41 +1277,20 @@ void TTrain::OnCommand_pantographtogglerear( TTrain *Train, command_data const & if( Command.action == GLFW_PRESS ) { // only reacting to press, so the switch doesn't flip back and forth if key is held down - if( false == ( Train->mvOccupied->ActiveCab == 1 ? Train->mvControlled->PantRearUp : Train->mvControlled->PantFrontUp ) ) { + if( false == Train->mvControlled->PantRearUp ) { // turn on... - if( Train->mvOccupied->ActiveCab == 1 ) { - // rear if in front cab - Train->mvControlled->PantRearSP = false; - if( Train->mvControlled->PantRear( true ) ) { - if( Train->mvControlled->PantRearStart != 1 ) { - // sound feedback - Train->play_sound( Train->dsbSwitch ); - // visual feedback - if( Train->ggPantRearButton.SubModel ) { - Train->ggPantRearButton.UpdateValue( 1.0 ); - } - if( Train->ggPantRearButtonOff.SubModel != nullptr ) { - // pantograph control can have two-button setup - Train->ggPantRearButtonOff.UpdateValue( 0.0 ); - } + Train->mvControlled->PantRearSP = false; + if( Train->mvControlled->PantRear( true ) ) { + if( Train->mvControlled->PantRearStart != 1 ) { + // sound feedback + Train->play_sound( Train->dsbSwitch ); + // visual feedback + if( Train->ggPantRearButton.SubModel ) { + Train->ggPantRearButton.UpdateValue( 1.0 ); } - } - } - else { - // front otherwise - Train->mvControlled->PantFrontSP = false; - if( Train->mvControlled->PantFront( true ) ) { - if( Train->mvControlled->PantFrontStart != 1 ) { - // sound feedback - Train->play_sound( Train->dsbSwitch ); - // visual feedback - if( Train->ggPantRearButton.SubModel ) { - Train->ggPantRearButton.UpdateValue( 1.0 ); - } - if( Train->ggPantRearButtonOff.SubModel != nullptr ) { - // pantograph control can have two-button setup - Train->ggPantRearButtonOff.UpdateValue( 0.0 ); - } + if( Train->ggPantRearButtonOff.SubModel != nullptr ) { + // pantograph control can have two-button setup + Train->ggPantRearButtonOff.UpdateValue( 0.0 ); } } } @@ -1364,32 +1305,15 @@ void TTrain::OnCommand_pantographtogglerear( TTrain *Train, command_data const & return; } - if( Train->mvOccupied->ActiveCab == 1 ) { - // rear if in front cab - Train->mvControlled->PantRearSP = false; - if( false == Train->mvControlled->PantRear( false ) ) { - if( Train->mvControlled->PantRearStart != 0 ) { - // sound feedback - Train->play_sound( Train->dsbSwitch ); - // visual feedback - Train->ggPantRearButton.UpdateValue( 0.0 ); - // pantograph control can have two-button setup - Train->ggPantRearButtonOff.UpdateValue( 1.0 ); - } - } - } - else { - // front otherwise - Train->mvControlled->PantFrontSP = false; - if( false == Train->mvControlled->PantFront( false ) ) { - if( Train->mvControlled->PantFrontStart != 0 ) { - // sound feedback - Train->play_sound( Train->dsbSwitch ); - // visual feedback - Train->ggPantRearButton.UpdateValue( 0.0 ); - // pantograph control can have two-button setup - Train->ggPantRearButtonOff.UpdateValue( 1.0 ); - } + Train->mvControlled->PantRearSP = false; + if( false == Train->mvControlled->PantRear( false ) ) { + if( Train->mvControlled->PantRearStart != 0 ) { + // sound feedback + Train->play_sound( Train->dsbSwitch ); + // visual feedback + Train->ggPantRearButton.UpdateValue( 0.0 ); + // pantograph control can have two-button setup + Train->ggPantRearButtonOff.UpdateValue( 1.0 ); } } } @@ -1563,11 +1487,13 @@ void TTrain::OnCommand_linebreakertoggle( TTrain *Train, command_data const &Com // TODO: consider whether it makes sense for diesel engines and such Train->fMainRelayTimer += 0.33f; // Command.time_delta * 5.0; } +/* if( Train->mvControlled->Mains != true ) { // hunter-080812: poprawka Train->mvControlled->ConverterSwitch( false ); Train->mvControlled->CompressorSwitch( false ); } +*/ if( Train->fMainRelayTimer > Train->mvControlled->InitialCtrlDelay ) { // wlaczanie WSa z opoznieniem Train->m_linebreakerstate = 2; @@ -3067,16 +2993,19 @@ void TTrain::OnKeyDown(int cKey) } else if (cKey == Global::Keys[k_CabForward]) { - if (!CabChange(1)) - if (TestFlag(DynamicObject->MoverParameters->Couplers[0].CouplingFlag, - ctrain_passenger)) - { // przejscie do nastepnego pojazdu + if( !CabChange( 1 ) ) { + if( TestFlag( DynamicObject->MoverParameters->Couplers[ 0 ].CouplingFlag, + ctrain_passenger ) ) { // przejscie do nastepnego pojazdu Global::changeDynObj = DynamicObject->PrevConnected; Global::changeDynObj->MoverParameters->ActiveCab = DynamicObject->PrevConnectedNo ? -1 : 1; } + } +/* + NOTE: disabled to allow 'prototypical' 'tricking' pantograph compressor to run unattended if (DynamicObject->MoverParameters->ActiveCab) mvControlled->PantCompFlag = false; // wyjście z maszynowego wyłącza sprężarkę +*/ } else if (cKey == Global::Keys[k_CabBackward]) { @@ -3088,9 +3017,12 @@ void TTrain::OnKeyDown(int cKey) Global::changeDynObj->MoverParameters->ActiveCab = DynamicObject->NextConnectedNo ? -1 : 1; } +/* + NOTE: disabled to allow 'prototypical' 'tricking' pantograph compressor to run unattended if (DynamicObject->MoverParameters->ActiveCab) mvControlled->PantCompFlag = false; // wyjście z maszynowego wyłącza sprężarkę pomocniczą +*/ } else if (cKey == Global::Keys[k_Couple]) { // ABu051104: male zmiany, zeby mozna bylo laczyc odlegle wagony @@ -3736,7 +3668,8 @@ bool TTrain::Update( double const Deltatime ) // przy dowolnym ustawieniu kierunkowego // Ra: to już jest w T_MoverParameters::TractionForce(), ale zależy od // kierunku - if( mvControlled->EngineType == ElectricSeriesMotor ) { + if( ( mvControlled->Mains ) + && ( mvControlled->EngineType == ElectricSeriesMotor ) ) { if( std::max( mvControlled->GetTrainsetVoltage(), std::fabs( mvControlled->RunningTraction.TractionVoltage ) ) < 0.5 * mvControlled->EnginePowerSource.MaxVoltage ) { // TODO: check whether it should affect entire consist for EMU // TODO: check whether it should happen if there's power supplied alternatively through hvcouplers @@ -4365,7 +4298,11 @@ bool TTrain::Update( double const Deltatime ) if (mvControlled->Battery || mvControlled->ConverterFlag) { - btLampkaWylSzybki.Turn( ( m_linebreakerstate > 0 ? true : false ) ); + btLampkaWylSzybki.Turn( + ( ( (m_linebreakerstate > 0) + || (true == mvControlled->Mains) ) ? + true : + false ) ); // hunter-261211: jakis stary kod (i niezgodny z prawda), // zahaszowalem i poprawilem @@ -5286,6 +5223,8 @@ bool TTrain::Update( double const Deltatime ) false) // nie wyłączać, gdy AI mvControlled->PantCompFlag = false; // wyłączona, gdy nie trzymamy klawisza #else +/* + // NOTE: disabled to allow 'prototypical' 'tricking' pantograph compressor into running unattended if( ( ( DynamicObject->Mechanik != nullptr ) && ( false == DynamicObject->Mechanik->AIControllFlag ) ) && ( mvControlled->TrainType == dt_EZT ? @@ -5295,6 +5234,7 @@ bool TTrain::Update( double const Deltatime ) // NOTE: this will break in multiplayer setups, do a proper tracking of pantograph user then mvControlled->PantCompFlag = false; } +*/ #endif if (Console::Pressed(Global::Keys[k_Univ2])) { @@ -6661,31 +6601,23 @@ void TTrain::set_cab_controls() { // pantographs if( mvOccupied->PantSwitchType != "impulse" ) { ggPantFrontButton.PutValue( - ( mvOccupied->ActiveCab == 1 ? - mvControlled->PantFrontUp : - mvControlled->PantRearUp ) ? - 1.0 : - 0.0 ); + ( mvControlled->PantFrontUp ? + 1.0 : + 0.0 ) ); ggPantFrontButtonOff.PutValue( - ( mvOccupied->ActiveCab == 1 ? - mvControlled->PantFrontUp : - mvControlled->PantRearUp ) ? - 0.0 : - 1.0 ); + ( mvControlled->PantFrontUp ? + 0.0 : + 1.0 ) ); } if( mvOccupied->PantSwitchType != "impulse" ) { ggPantRearButton.PutValue( - ( mvOccupied->ActiveCab == 1 ? - mvControlled->PantRearUp : - mvControlled->PantFrontUp ) ? - 1.0 : - 0.0 ); + ( mvControlled->PantRearUp ? + 1.0 : + 0.0 ) ); ggPantRearButtonOff.PutValue( - ( mvOccupied->ActiveCab == 1 ? - mvControlled->PantRearUp : - mvControlled->PantFrontUp ) ? - 0.0 : - 1.0 ); + ( mvControlled->PantRearUp ? + 0.0 : + 1.0 ) ); } // converter if( mvOccupied->ConvSwitchType != "impulse" ) { diff --git a/World.cpp b/World.cpp index 28555df2..372527d7 100644 --- a/World.cpp +++ b/World.cpp @@ -1844,11 +1844,11 @@ TWorld::Update_UI() { #endif // equipment flags uitextline3 = ""; - uitextline3 += ( tmp->MoverParameters->Battery ? "B" : "b" ); - uitextline3 += ( tmp->MoverParameters->Mains ? "M" : "m" ); - uitextline3 += ( tmp->MoverParameters->PantRearUp ? ( tmp->MoverParameters->PantPressSwitchActive ? "O" : "o" ) : "." );; - uitextline3 += ( tmp->MoverParameters->PantFrontUp ? ( tmp->MoverParameters->PantPressSwitchActive ? "P" : "p" ) : "." );; - uitextline3 += ( tmp->MoverParameters->PantPressSwitchActive ? "!" : "." ); + uitextline3 += ( tmp->MoverParameters->Battery ? "B" : "." ); + uitextline3 += ( tmp->MoverParameters->Mains ? "M" : "." ); + uitextline3 += ( tmp->MoverParameters->PantRearUp ? ( tmp->MoverParameters->PantRearVolt > 0.0 ? "O" : "o" ) : "." );; + uitextline3 += ( tmp->MoverParameters->PantFrontUp ? ( tmp->MoverParameters->PantFrontVolt > 0.0 ? "P" : "p" ) : "." );; + uitextline3 += ( tmp->MoverParameters->PantPressLockActive ? "!" : ( tmp->MoverParameters->PantPressSwitchActive ? "*" : "." ) ); uitextline3 += ( tmp->MoverParameters->ConverterAllow ? ( tmp->MoverParameters->ConverterFlag ? "X" : "x" ) : "." ); uitextline3 += ( tmp->MoverParameters->ConvOvldFlag ? "!" : "." ); uitextline3 += ( tmp->MoverParameters->CompressorAllow ? ( tmp->MoverParameters->CompressorFlag ? "C" : "c" ) : "." );