16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-23 06:19:18 +02:00

control pressure switch, ground relay state exposed to uart interface, independent brake ai logic tweaks

This commit is contained in:
tmj-fstate
2020-04-21 16:04:22 +02:00
parent f2c1a4dc96
commit f7d2b8bb7f
11 changed files with 104 additions and 41 deletions

View File

@@ -3092,6 +3092,16 @@ bool TController::DecBrake()
return OK; return OK;
}; };
bool TController::ZeroLocalBrake() {
if( mvOccupied->UniCtrlIntegratedLocalBrakeCtrl ) {
return DecBrakeEIM();
}
else {
return mvOccupied->DecLocalBrakeLevel( 2 );
}
}
bool TController::DecBrakeEIM() bool TController::DecBrakeEIM()
{ // zmniejszenie siły hamowania { // zmniejszenie siły hamowania
bool OK = false; bool OK = false;
@@ -3170,9 +3180,10 @@ bool TController::IncSpeed()
if (iOverheadZero) // jazda bezprądowa z poziomu toru ustawia bity if (iOverheadZero) // jazda bezprądowa z poziomu toru ustawia bity
return false; // to nici z ruszania return false; // to nici z ruszania
} }
if (!mvControlling->FuseFlag) //&&mvControlling->StLinFlag) //yBARC if ((!mvControlling->FuseFlag)
if ((mvControlling->IsMainCtrlNoPowerPos()) || &&(!mvControlling->ControlPressureSwitch)) {
(mvControlling->StLinFlag)) // youBy polecił dodać 2012-09-08 v367 if ((mvControlling->IsMainCtrlNoPowerPos())
|| (mvControlling->StLinFlag)) { // youBy polecił dodać 2012-09-08 v367
// na pozycji 0 przejdzie, a na pozostałych będzie czekać, aż się załączą liniowe (zgaśnie DelayCtrlFlag) // na pozycji 0 przejdzie, a na pozostałych będzie czekać, aż się załączą liniowe (zgaśnie DelayCtrlFlag)
if (Ready || (iDrivigFlags & movePress)) { if (Ready || (iDrivigFlags & movePress)) {
// use series mode: // use series mode:
@@ -3193,8 +3204,8 @@ bool TController::IncSpeed()
( mvControlling->Imax > mvControlling->ImaxLo ) ( mvControlling->Imax > mvControlling->ImaxLo )
|| ( fVoltage < useseriesmodevoltage ) || ( fVoltage < useseriesmodevoltage )
|| ( ( true == sufficienttractionforce ) || ( ( true == sufficienttractionforce )
&& ( true == sufficientacceleration ) && ( true == sufficientacceleration )
&& ( mvOccupied->Vel <= ( IsCargoTrain ? 35 : 25 ) + ( seriesmodefieldshunting ? 5 : 0 ) - ( ( fAccGravity < -0.025 ) ? 10 : 0 ) ) ) ); && ( mvOccupied->Vel <= ( IsCargoTrain ? 35 : 25 ) + ( seriesmodefieldshunting ? 5 : 0 ) - ( ( fAccGravity < -0.025 ) ? 10 : 0 ) ) ) );
// when not in series mode use the first available parallel mode configuration until 50/60 km/h for passenger/cargo train // when not in series mode use the first available parallel mode configuration until 50/60 km/h for passenger/cargo train
// (if there's only one parallel mode configuration it'll be used regardless of current speed) // (if there's only one parallel mode configuration it'll be used regardless of current speed)
auto const usefieldshunting = ( auto const usefieldshunting = (
@@ -3267,10 +3278,11 @@ bool TController::IncSpeed()
OK = false; OK = false;
} }
} }
}
}
mvControlling->AutoRelayCheck(); // sprawdzenie logiki sterowania mvControlling->AutoRelayCheck(); // sprawdzenie logiki sterowania
break; break;
case TEngineType::Dumb: case TEngineType::Dumb:
case TEngineType::DieselElectric:
if (!mvControlling->FuseFlag) if (!mvControlling->FuseFlag)
if (Ready || (iDrivigFlags & movePress)) //{(BrakePress<=0.01*MaxBrakePress)} if (Ready || (iDrivigFlags & movePress)) //{(BrakePress<=0.01*MaxBrakePress)}
{ {
@@ -3281,6 +3293,23 @@ bool TController::IncSpeed()
OK = mvControlling->IncScndCtrl(1); OK = mvControlling->IncScndCtrl(1);
} }
break; break;
case TEngineType::DieselElectric:
if ((!mvControlling->FuseFlag)
&&(!mvControlling->ControlPressureSwitch)) {
if ((mvControlling->IsMainCtrlNoPowerPos()) ||
(mvControlling->StLinFlag)) { // youBy polecił dodać 2012-09-08 v367
// na pozycji 0 przejdzie, a na pozostałych będzie czekać, aż się załączą liniowe (zgaśnie DelayCtrlFlag)
if (Ready || (iDrivigFlags & movePress)) //{(BrakePress<=0.01*MaxBrakePress)}
{
OK = IncSpeedEIM();
if( !OK )
OK = mvControlling->IncMainCtrl(1);
if (!OK)
OK = mvControlling->IncScndCtrl(1);
}
}
}
break;
case TEngineType::ElectricInductionMotor: case TEngineType::ElectricInductionMotor:
if (!mvControlling->FuseFlag) if (!mvControlling->FuseFlag)
if (Ready || (iDrivigFlags & movePress) || (mvOccupied->ShuntMode)) //{(BrakePress<=0.01*MaxBrakePress)} if (Ready || (iDrivigFlags & movePress) || (mvOccupied->ShuntMode)) //{(BrakePress<=0.01*MaxBrakePress)}
@@ -3619,7 +3648,14 @@ void TController::SpeedSet()
} }
break; break;
case TEngineType::Dumb: case TEngineType::Dumb:
break;
case TEngineType::DieselElectric: case TEngineType::DieselElectric:
if( ( false == mvControlling->StLinFlag )
&& ( mvControlling->MainCtrlPowerPos() > 1 ) ) {
// styczniki liniowe rozłączone yBARC
ZeroSpeed();
}
break;
case TEngineType::ElectricInductionMotor: case TEngineType::ElectricInductionMotor:
break; break;
case TEngineType::DieselEngine: case TEngineType::DieselEngine:
@@ -3726,6 +3762,7 @@ void TController::SetTimeControllers()
//2. Check the type of Secondary Brake Handle //2. Check the type of Secondary Brake Handle
//3. Check the type od EIMCtrlType //3. Check the type od EIMCtrlType
/*
if (mvOccupied->EIMCtrlType > 0) if (mvOccupied->EIMCtrlType > 0)
{ {
if (mvOccupied->EIMCtrlType == 1) //traxx if (mvOccupied->EIMCtrlType == 1) //traxx
@@ -3737,6 +3774,12 @@ void TController::SetTimeControllers()
if (mvOccupied->LocalBrakePosA > 0.95) mvOccupied->MainCtrlPos = 1; if (mvOccupied->LocalBrakePosA > 0.95) mvOccupied->MainCtrlPos = 1;
} }
} }
*/
if( ( mvOccupied->UniCtrlIntegratedLocalBrakeCtrl )
&& ( mvOccupied->LocalBrakePosA > 0.95 ) ) {
while( IncBrakeEIM() ) { ; }
}
//4. Check Speed Control System //4. Check Speed Control System
if (mvOccupied->EngineType == TEngineType::ElectricInductionMotor && mvOccupied->ScndCtrlPosNo > 1 && mvOccupied->SpeedCtrlTypeTime) if (mvOccupied->EngineType == TEngineType::ElectricInductionMotor && mvOccupied->ScndCtrlPosNo > 1 && mvOccupied->SpeedCtrlTypeTime)
{ {
@@ -5492,9 +5535,7 @@ TController::UpdateSituation(double dt) {
if( iVehicleCount >= 0 ) { if( iVehicleCount >= 0 ) {
// zmieni się po odczepieniu // zmieni się po odczepieniu
WriteLog( mvOccupied->Name + " dociskanie..." ); WriteLog( mvOccupied->Name + " dociskanie..." );
while( mvOccupied->DecLocalBrakeLevel( 1 ) ) { // dociśnij sklad ZeroLocalBrake();
;
}
IncSpeed(); IncSpeed();
} }
WriteLog(mvOccupied->Name + " odczepianie w kierunku " + std::to_string(mvOccupied->DirAbsolute)); WriteLog(mvOccupied->Name + " odczepianie w kierunku " + std::to_string(mvOccupied->DirAbsolute));
@@ -6233,6 +6274,15 @@ TController::UpdateSituation(double dt) {
if( ( AccDesired > -0.03 ) if( ( AccDesired > -0.03 )
&& ( false == mvOccupied->Hamulec->Releaser() ) ) { && ( false == mvOccupied->Hamulec->Releaser() ) ) {
if( mvOccupied->PipePress < 3.0 ) { if( mvOccupied->PipePress < 3.0 ) {
ZeroSpeed(); // some vehicles may require master controller in neutral position
// some vehicles require brake handle to be moved to specific position
if( mvOccupied->HandleUnlock != -3 ) {
while( ( BrakeCtrlPosition >= mvOccupied->HandleUnlock )
&& ( BrakeLevelAdd( -1 ) ) ) {
// all work is done in the header
;
}
}
mvOccupied->BrakeReleaser( 1 ); mvOccupied->BrakeReleaser( 1 );
} }
if( ( mvOccupied->BrakePress > 0.4 ) if( ( mvOccupied->BrakePress > 0.4 )
@@ -6492,7 +6542,7 @@ TController::UpdateSituation(double dt) {
if( mvOccupied->LocalBrake != TLocalBrake::ManualBrake ) { if( mvOccupied->LocalBrake != TLocalBrake::ManualBrake ) {
// do it only if the vehicle actually has the independent brake // do it only if the vehicle actually has the independent brake
if( mvOccupied->BrakeCtrlPos == mvOccupied->Handle->GetPos( bh_RP ) ) { if( mvOccupied->BrakeCtrlPos == mvOccupied->Handle->GetPos( bh_RP ) ) {
if( mvOccupied->LocalBrakePosA == 0.0 ) { if( mvOccupied->LocalBrakePosA < 1.0 ) {
// dodatkowy na pozycję 1 // dodatkowy na pozycję 1
mvOccupied->IncLocalBrakeLevel( LocalBrakePosNo ); mvOccupied->IncLocalBrakeLevel( LocalBrakePosNo );
} }

View File

@@ -227,6 +227,7 @@ private:
void SetDriverPsyche(); void SetDriverPsyche();
bool IncBrake(); bool IncBrake();
bool DecBrake(); bool DecBrake();
bool ZeroLocalBrake();
bool IncSpeed(); bool IncSpeed();
bool DecSpeed(bool force = false); bool DecSpeed(bool force = false);
void ZeroSpeed( bool const Enforce = false ); void ZeroSpeed( bool const Enforce = false );

View File

@@ -3079,9 +3079,10 @@ bool TDynamicObject::Update(double dt, double dt1)
MEDLogTime = 0; MEDLogTime = 0;
} }
auto FzadED { 0.0 }; auto FzadED { 0.0 };
if( ( MoverParameters->EpFuse && (MoverParameters->BrakeHandle != TBrakeHandle::MHZ_EN57)) if( ( LBR > MoverParameters->MED_MinBrakeReqED )
|| ( ( MoverParameters->BrakeHandle == TBrakeHandle::MHZ_EN57 ) && ( MoverParameters->BrakeHandle == TBrakeHandle::MHZ_EN57 ?
&& ( MoverParameters->BrakeOpModeFlag & bom_MED ) ) ) { ( ( MoverParameters->BrakeOpModeFlag & bom_MED ) != 0 ) :
MoverParameters->EpFuse ) ) {
FzadED = std::min( Fzad, FmaxED ); FzadED = std::min( Fzad, FmaxED );
} }
if (MoverParameters->EIMCtrlType == 2 && MoverParameters->MainCtrlPos < 2 && MoverParameters->eimic > -0.999) if (MoverParameters->EIMCtrlType == 2 && MoverParameters->MainCtrlPos < 2 && MoverParameters->eimic > -0.999)

View File

@@ -86,7 +86,7 @@ struct global_settings {
std::string Period{}; // time of the day, based on sun position std::string Period{}; // time of the day, based on sun position
bool FullPhysics{ true }; // full calculations performed for each simulation step bool FullPhysics{ true }; // full calculations performed for each simulation step
bool bnewAirCouplers{ true }; bool bnewAirCouplers{ true };
float fMoveLight{ -1.f }; // numer dnia w roku albo -1 float fMoveLight{ 0.f }; // numer dnia w roku albo -1
bool FakeLight{ false }; // toggle between fixed and dynamic daylight bool FakeLight{ false }; // toggle between fixed and dynamic daylight
double fTimeSpeed{ 1.0 }; // przyspieszenie czasu, zmienna do testów double fTimeSpeed{ 1.0 }; // przyspieszenie czasu, zmienna do testów
double fLatitudeDeg{ 52.0 }; // szerokość geograficzna double fLatitudeDeg{ 52.0 }; // szerokość geograficzna

View File

@@ -339,8 +339,6 @@ enum TCompressorList // lista parametrów w programatorze sprężarek
cl_MaxFactor = 3 // mnożnik progu wyłącznika ciśnieniowego cl_MaxFactor = 3 // mnożnik progu wyłącznika ciśnieniowego
}; };
/*ogolne*/
/*lokacja*/
struct TLocation struct TLocation
{ {
double X; double X;
@@ -1255,6 +1253,7 @@ public:
bool MED_EPVC = 0; // czy korekcja sily hamowania EP, gdy nie ma dostepnego ED bool MED_EPVC = 0; // czy korekcja sily hamowania EP, gdy nie ma dostepnego ED
double MED_EPVC_Time = 7; // czas korekcji sily hamowania EP, gdy nie ma dostepnego ED double MED_EPVC_Time = 7; // czas korekcji sily hamowania EP, gdy nie ma dostepnego ED
bool MED_Ncor = 0; // czy korekcja sily hamowania z uwzglednieniem nacisku bool MED_Ncor = 0; // czy korekcja sily hamowania z uwzglednieniem nacisku
double MED_MinBrakeReqED = 0;
int DCEMUED_CC { 0 }; //na którym sprzęgu sprawdzać działanie ED int DCEMUED_CC { 0 }; //na którym sprzęgu sprawdzać działanie ED
double DCEMUED_EP_max_Vel{ 0.0 }; //maksymalna prędkość, przy której działa EP przy włączonym ED w jednostce (dla tocznych) double DCEMUED_EP_max_Vel{ 0.0 }; //maksymalna prędkość, przy której działa EP przy włączonym ED w jednostce (dla tocznych)
@@ -1425,7 +1424,8 @@ public:
double MainsInitTime{ 0.0 }; // config, initialization time (in seconds) of the main circuit after it receives power, before it can be closed double MainsInitTime{ 0.0 }; // config, initialization time (in seconds) of the main circuit after it receives power, before it can be closed
double MainsInitTimeCountdown{ 0.0 }; // current state of main circuit initialization, remaining time (in seconds) until it's ready double MainsInitTimeCountdown{ 0.0 }; // current state of main circuit initialization, remaining time (in seconds) until it's ready
bool LineBreakerClosesAtNoPowerPosOnly{ false }; bool LineBreakerClosesAtNoPowerPosOnly{ false };
bool HasPressureSwitch{ true }; bool ControlPressureSwitch{ false }; // activates if the main pipe and/or brake cylinder pressure aren't within operational levels
bool HasControlPressureSwitch{ true };
int MainCtrlPos = 0; /*polozenie glownego nastawnika*/ int MainCtrlPos = 0; /*polozenie glownego nastawnika*/
int ScndCtrlPos = 0; /*polozenie dodatkowego nastawnika*/ int ScndCtrlPos = 0; /*polozenie dodatkowego nastawnika*/
int LightsPos = 0; /*polozenie przelacznika wielopozycyjnego swiatel*/ int LightsPos = 0; /*polozenie przelacznika wielopozycyjnego swiatel*/

View File

@@ -3641,7 +3641,15 @@ bool TMoverParameters::AntiSlippingBrake(void)
bool TMoverParameters::BrakeReleaser(int state) bool TMoverParameters::BrakeReleaser(int state)
{ {
bool OK = true; //false tylko jeśli nie uda się wysłać, GF 20161124 bool OK = true; //false tylko jeśli nie uda się wysłać, GF 20161124
Hamulec->Releaser(state); if( state != 0 ) {
// additional limitations imposed by pressure switch
if( ( false == ControlPressureSwitch ) || ( true == IsMainCtrlNoPowerPos() ) ) {
Hamulec->Releaser( state );
}
}
else {
Hamulec->Releaser( state );
}
if (CabActive != 0) // rekurencyjne wysłanie do następnego if (CabActive != 0) // rekurencyjne wysłanie do następnego
OK = SendCtrlToNext("BrakeReleaser", state, CabActive); OK = SendCtrlToNext("BrakeReleaser", state, CabActive);
return OK; return OK;
@@ -3671,9 +3679,7 @@ bool TMoverParameters::UniversalBrakeButton(int button, int state)
if ( TestFlag ( UniversalBrakeButtonFlag[0] & UniversalBrakeButtonFlag[1] & UniversalBrakeButtonFlag[2], if ( TestFlag ( UniversalBrakeButtonFlag[0] & UniversalBrakeButtonFlag[1] & UniversalBrakeButtonFlag[2],
TUniversalBrake::ub_Release ) ) TUniversalBrake::ub_Release ) )
{ {
Hamulec->Releaser( int ( TestFlag ( flag, TUniversalBrake::ub_Release ) )); BrakeReleaser( TestFlag( flag, TUniversalBrake::ub_Release ) ? 1 : 0 );
if (CabActive != 0) // rekurencyjne wysłanie do następnego
OK = SendCtrlToNext("BrakeReleaser", state, CabActive);
} }
return OK; return OK;
} }
@@ -5003,7 +5009,7 @@ double TMoverParameters::TractionForce( double dt ) {
if (EIMCtrlType > 0) //sterowanie cyfrowe if (EIMCtrlType > 0) //sterowanie cyfrowe
tmp = (DElist[0].RPM + ((DElist[MainCtrlPosNo].RPM - DElist[0].RPM) * std::max(0.0,eimic_real))) / 60.0; tmp = (DElist[0].RPM + ((DElist[MainCtrlPosNo].RPM - DElist[0].RPM) * std::max(0.0,eimic_real))) / 60.0;
else else
tmp = DElist[ MainCtrlPos ].RPM / 60.0; tmp = DElist[ ( ControlPressureSwitch ? MainCtrlNoPowerPos() : MainCtrlPos ) ].RPM / 60.0;
if( ( true == HeatingAllow ) if( ( true == HeatingAllow )
&& ( HeatingPower > 0 ) && ( HeatingPower > 0 )
@@ -6629,13 +6635,12 @@ bool TMoverParameters::AutoRelayCheck(void)
bool TMoverParameters::MotorConnectorsCheck() { bool TMoverParameters::MotorConnectorsCheck() {
// hunter-111211: wylacznik cisnieniowy // hunter-111211: wylacznik cisnieniowy
auto const pressureswitch { ControlPressureSwitch = (
( TrainType != dt_EZT ) ( HasControlPressureSwitch )
&& ( HasPressureSwitch )
&& ( ( BrakePress > 2.0 ) && ( ( BrakePress > 2.0 )
|| ( PipePress < 3.6 ) ) }; || ( PipePress < 3.6 ) ) );
if( pressureswitch ) { return false; } if( true == ControlPressureSwitch ) { return false; }
auto const connectorsoff { auto const connectorsoff {
( false == Mains ) ( false == Mains )
@@ -9985,7 +9990,7 @@ void TMoverParameters::LoadFIZ_Blending(std::string const &line) {
extract_value(MED_amax, "MED_amax", line, "9.81"); extract_value(MED_amax, "MED_amax", line, "9.81");
extract_value(MED_EPVC, "MED_EPVC", line, ""); extract_value(MED_EPVC, "MED_EPVC", line, "");
extract_value(MED_Ncor, "MED_Ncor", line, ""); extract_value(MED_Ncor, "MED_Ncor", line, "");
extract_value(MED_MinBrakeReqED, "MED_MinBrakeReqED", line, "");
} }
void TMoverParameters::LoadFIZ_DCEMUED(std::string const &line) { void TMoverParameters::LoadFIZ_DCEMUED(std::string const &line) {
@@ -10324,7 +10329,7 @@ void TMoverParameters::LoadFIZ_Engine( std::string const &Input ) {
extract_value( MotorBlowers[ end::front ].speed, "MotorBlowersSpeed", Input, "" ); extract_value( MotorBlowers[ end::front ].speed, "MotorBlowersSpeed", Input, "" );
MotorBlowers[ end::rear ] = MotorBlowers[ end::front ]; MotorBlowers[ end::rear ] = MotorBlowers[ end::front ];
// pressure switch // pressure switch
extract_value( HasPressureSwitch, "PressureSwitch", Input, "" ); extract_value( HasControlPressureSwitch, "PressureSwitch", Input, ( TrainType != dt_EZT ? "yes" : "no" ) );
} }
void TMoverParameters::LoadFIZ_Switches( std::string const &Input ) { void TMoverParameters::LoadFIZ_Switches( std::string const &Input ) {

View File

@@ -685,6 +685,7 @@ TTrain::get_state() const {
btLampkaRadioStop.GetValue(), btLampkaRadioStop.GetValue(),
btLampkaOpory.GetValue(), btLampkaOpory.GetValue(),
btLampkaWylSzybki.GetValue(), btLampkaWylSzybki.GetValue(),
btLampkaPrzekRozn.GetValue(),
btLampkaNadmSil.GetValue(), btLampkaNadmSil.GetValue(),
btLampkaStyczn.GetValue(), btLampkaStyczn.GetValue(),
btLampkaPoslizg.GetValue(), btLampkaPoslizg.GetValue(),
@@ -2402,10 +2403,13 @@ void TTrain::change_pantograph_selection( int const Change ) {
void TTrain::OnCommand_pantographcompressorvalvetoggle( TTrain *Train, command_data const &Command ) { void TTrain::OnCommand_pantographcompressorvalvetoggle( TTrain *Train, command_data const &Command ) {
if( ( Train->ggPantCompressorValve.SubModel == nullptr ) auto const valveispresent {
&& ( Train->mvControlled->TrainType == dt_EZT ? ( Train->ggPantCompressorValve.SubModel != nullptr )
( Train->mvControlled != Train->mvOccupied ) : || ( ( Train->iCabn == 0 )
( Train->iCabn != 0 ) ) ) { && ( Train->mvControlled == Train->mvOccupied ) ) };
if( false == valveispresent )
{
// tylko w maszynowym, unless actual device is present // tylko w maszynowym, unless actual device is present
return; return;
} }
@@ -6424,12 +6428,12 @@ bool TTrain::Update( double const Deltatime )
|| ( mvControlled->MainCtrlActualPos == 0 ) ); // do EU04 || ( mvControlled->MainCtrlActualPos == 0 ) ); // do EU04
btLampkaStyczn.Turn( btLampkaStyczn.Turn(
( ( mvControlled->StLinFlag ) || ( mvControlled->BrakePress > 2.0 ) || ( mvControlled->PipePress < 3.6 ) ) ? ( ( mvControlled->StLinFlag ) || ( mvControlled->ControlPressureSwitch ) ) ?
false : false :
( mvControlled->BrakePress < 1.0 ) ); // mozna prowadzic rozruch ( mvControlled->BrakePress < 1.0 ) ); // mozna prowadzic rozruch
btLampkaPrzekRozn.Turn( btLampkaPrzekRozn.Turn(
( ( mvControlled->GroundRelay ) || ( mvControlled->BrakePress > 2.0 ) || ( mvControlled->PipePress < 3.6 ) ) ? ( ( mvControlled->GroundRelay ) || ( mvControlled->ControlPressureSwitch ) ) ?
false : false :
( mvControlled->BrakePress < 1.0 ) ); // relay is off and needs a reset ( mvControlled->BrakePress < 1.0 ) ); // relay is off and needs a reset
@@ -6656,8 +6660,7 @@ bool TTrain::Update( double const Deltatime )
|| ( mover->MainCtrlActualPos == 0 ) ); // do EU04 || ( mover->MainCtrlActualPos == 0 ) ); // do EU04
if( ( mover->StLinFlag ) if( ( mover->StLinFlag )
|| ( mover->BrakePress > 2.0 ) || ( mover->ControlPressureSwitch ) ) {
|| ( mover->PipePress < 3.6 ) ) {
btLampkaStycznB.Turn( false ); btLampkaStycznB.Turn( false );
} }
else if( mover->BrakePress < 1.0 ) { else if( mover->BrakePress < 1.0 ) {

View File

@@ -84,6 +84,7 @@ class TTrain {
std::uint8_t radio_stop; std::uint8_t radio_stop;
std::uint8_t motor_resistors; std::uint8_t motor_resistors;
std::uint8_t line_breaker; std::uint8_t line_breaker;
std::uint8_t ground_relay;
std::uint8_t motor_overload; std::uint8_t motor_overload;
std::uint8_t motor_connectors; std::uint8_t motor_connectors;
std::uint8_t wheelslip; std::uint8_t wheelslip;

View File

@@ -663,8 +663,6 @@ debug_panel::update_section_vehicle( std::vector<text_line> &Output ) {
locale::strings[ locale::string::debug_vehicle_devicespower ].c_str(), locale::strings[ locale::string::debug_vehicle_devicespower ].c_str(),
// devices // devices
( mover.Battery ? 'B' : '.' ), ( mover.Battery ? 'B' : '.' ),
( mover.Mains ? 'M' : '.' ),
( mover.FuseFlag ? '!' : '.' ),
( mover.PantsValve.is_active ? '+' : '.' ), ( mover.PantsValve.is_active ? '+' : '.' ),
( mover.Pantographs[ end::rear ].valve.is_active ? 'O' : ( mover.Pantographs[ end::rear ].valve.is_enabled ? 'o' : '.' ) ), ( mover.Pantographs[ end::rear ].valve.is_active ? 'O' : ( mover.Pantographs[ end::rear ].valve.is_enabled ? 'o' : '.' ) ),
( mover.Pantographs[ end::front ].valve.is_active ? 'P' : ( mover.Pantographs[ end::front ].valve.is_enabled ? 'p' : '.' ) ), ( mover.Pantographs[ end::front ].valve.is_active ? 'P' : ( mover.Pantographs[ end::front ].valve.is_enabled ? 'p' : '.' ) ),
@@ -673,10 +671,13 @@ debug_panel::update_section_vehicle( std::vector<text_line> &Output ) {
( true == mover.WaterHeater.is_damaged ? '!' : ( mover.WaterHeater.is_active ? 'H' : ( false == mover.WaterHeater.breaker ? '-' : ( mover.WaterHeater.is_enabled ? 'h' : '.' ) ) ) ), ( true == mover.WaterHeater.is_damaged ? '!' : ( mover.WaterHeater.is_active ? 'H' : ( false == mover.WaterHeater.breaker ? '-' : ( mover.WaterHeater.is_enabled ? 'h' : '.' ) ) ) ),
( mover.FuelPump.is_active ? 'F' : ( mover.FuelPump.is_enabled ? 'f' : '.' ) ), ( mover.FuelPump.is_active ? 'F' : ( mover.FuelPump.is_enabled ? 'f' : '.' ) ),
( mover.OilPump.is_active ? 'O' : ( mover.OilPump.is_enabled ? 'o' : '.' ) ), ( mover.OilPump.is_active ? 'O' : ( mover.OilPump.is_enabled ? 'o' : '.' ) ),
( mover.Mains ? 'M' : '.' ),
( mover.FuseFlag ? '!' : '.' ),
( false == mover.ConverterAllowLocal ? '-' : ( mover.ConverterAllow ? ( mover.ConverterFlag ? 'X' : 'x' ) : '.' ) ), ( false == mover.ConverterAllowLocal ? '-' : ( mover.ConverterAllow ? ( mover.ConverterFlag ? 'X' : 'x' ) : '.' ) ),
( mover.ConvOvldFlag ? '!' : '.' ), ( mover.ConvOvldFlag ? '!' : '.' ),
( mover.CompressorFlag ? 'C' : ( false == mover.CompressorAllowLocal ? '-' : ( ( mover.CompressorAllow || mover.CompressorStart == start_t::automatic ) ? 'c' : '.' ) ) ), ( mover.CompressorFlag ? 'C' : ( false == mover.CompressorAllowLocal ? '-' : ( ( mover.CompressorAllow || mover.CompressorStart == start_t::automatic ) ? 'c' : '.' ) ) ),
( mover.CompressorGovernorLock ? '!' : '.' ), ( mover.CompressorGovernorLock ? '!' : '.' ),
( mover.StLinSwitchOff ? '-' : ( mover.ControlPressureSwitch ? '!' : ( mover.StLinFlag ? '+' : '.' ) ) ),
( mover.Heating ? 'H' : ( mover.HeatingAllow ? 'h' : '.' ) ), ( mover.Heating ? 'H' : ( mover.HeatingAllow ? 'h' : '.' ) ),
std::string( isplayervehicle ? locale::strings[ locale::string::debug_vehicle_radio ] + ( mover.Radio ? std::to_string( m_input.train->RadioChannel() ) : "-" ) : "" ).c_str(), std::string( isplayervehicle ? locale::strings[ locale::string::debug_vehicle_radio ] + ( mover.Radio ? std::to_string( m_input.train->RadioChannel() ) : "-" ) : "" ).c_str(),
std::string( isdieselenginepowered ? locale::strings[ locale::string::debug_vehicle_oilpressure ] + to_string( mover.OilPump.pressure, 2 ) : "" ).c_str(), std::string( isdieselenginepowered ? locale::strings[ locale::string::debug_vehicle_oilpressure ] + to_string( mover.OilPump.pressure, 2 ) : "" ).c_str(),

View File

@@ -70,7 +70,7 @@ init() {
"Name: %s%s\nLoad: %.0f %s\nStatus: %s%s\nCouplers:\n front: %s\n rear: %s", "Name: %s%s\nLoad: %.0f %s\nStatus: %s%s\nCouplers:\n front: %s\n rear: %s",
", owned by: ", ", owned by: ",
"none", "none",
"Devices: %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%s%s\nPower transfers: %.0f@%.0f%s%s[%.0f]%s%s%.0f@%.0f", "Devices: %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%s%s\nPower transfers: %.0f@%.0f%s%s[%.0f]%s%s%.0f@%.0f",
" radio: ", " radio: ",
" oil pressure: ", " oil pressure: ",
"Controllers:\n master: %d(%d), secondary: %s\nEngine output: %.1f, current: %.0f\nRevolutions:\n engine: %.0f, motors: %.0f\n engine fans: %.0f, motor fans: %.0f+%.0f, cooling fans: %.0f+%.0f", "Controllers:\n master: %d(%d), secondary: %s\nEngine output: %.1f, current: %.0f\nRevolutions:\n engine: %.0f, motors: %.0f\n engine fans: %.0f, motor fans: %.0f+%.0f, cooling fans: %.0f+%.0f",
@@ -271,7 +271,7 @@ init() {
"Nazwa: %s%s\nLadunek: %.0f %s\nStatus: %s%s\nSprzegi:\n przedni: %s\n tylny: %s", "Nazwa: %s%s\nLadunek: %.0f %s\nStatus: %s%s\nSprzegi:\n przedni: %s\n tylny: %s",
", wlasciciel: ", ", wlasciciel: ",
"wolny", "wolny",
"Urzadzenia: %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%s%s\nTransfer pradow: %.0f@%.0f%s%s[%.0f]%s%s%.0f@%.0f", "Urzadzenia: %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%s%s\nTransfer pradow: %.0f@%.0f%s%s[%.0f]%s%s%.0f@%.0f",
" radio: ", " radio: ",
" cisn.oleju: ", " cisn.oleju: ",
"Nastawniki:\n glowny: %d(%d), dodatkowy: %s\nMoc silnika: %.1f, prad silnika: %.0f\nObroty:\n silnik: %.0f, motory: %.0f\n went.silnika: %.0f, went.motorow: %.0f+%.0f, went.chlodnicy: %.0f+%.0f", "Nastawniki:\n glowny: %d(%d), dodatkowy: %s\nMoc silnika: %.1f, prad silnika: %.0f\nObroty:\n silnik: %.0f, motory: %.0f\n went.silnika: %.0f, went.motorow: %.0f+%.0f, went.chlodnicy: %.0f+%.0f",

View File

@@ -370,6 +370,7 @@ void uart_input::poll()
(uint8_t)( (uint8_t)(
trainstate.motor_connectors << 0 trainstate.motor_connectors << 0
| trainstate.converter_overload << 2 | trainstate.converter_overload << 2
| trainstate.ground_relay << 3
| trainstate.motor_overload << 4 | trainstate.motor_overload << 4
| trainstate.line_breaker << 5 | trainstate.line_breaker << 5
| trainstate.compressor_overload << 6), | trainstate.compressor_overload << 6),