cooling fans state indicator, minor diesel engine logic tweaks

This commit is contained in:
tmj-fstate
2019-03-17 19:08:53 +01:00
parent 8d67338950
commit 04db86baa6
5 changed files with 25 additions and 9 deletions

View File

@@ -5507,7 +5507,12 @@ bool TTrain::Update( double const Deltatime )
}
if (ggIgnitionKey.SubModel)
{
ggIgnitionKey.UpdateValue(mvControlled->dizel_startup);
ggIgnitionKey.UpdateValue(
( mvControlled->Mains )
|| ( mvControlled->dizel_startup )
|| ( fMainRelayTimer > 0.f )
|| ( ggMainButton.GetDesiredValue() > 0.95 )
|| ( ggMainOnButton.GetDesiredValue() > 0.95 ) );
ggIgnitionKey.Update();
}
}
@@ -5718,6 +5723,7 @@ bool TTrain::Update( double const Deltatime )
// others
btLampkaMalfunction.Turn( mvControlled->dizel_heat.PA );
btLampkaMotorBlowers.Turn( ( mvControlled->MotorBlowers[ end::front ].is_active ) && ( mvControlled->MotorBlowers[ end::rear ].is_active ) );
btLampkaCoolingFans.Turn( mvControlled->RventRot > 1.0 );
// universal devices state indicators
for( auto idx = 0; idx < btUniversals.size(); ++idx ) {
btUniversals[ idx ].Turn( ggUniversals[ idx ].GetValue() > 0.5 );
@@ -5778,6 +5784,7 @@ bool TTrain::Update( double const Deltatime )
// others
btLampkaMalfunction.Turn( false );
btLampkaMotorBlowers.Turn( false );
btLampkaCoolingFans.Turn( false );
// universal devices state indicators
for( auto &universal : btUniversals ) {
universal.Turn( false );
@@ -7415,6 +7422,7 @@ void TTrain::clear_cab_controls()
btLampkaMalfunction.Clear();
btLampkaMalfunctionB.Clear();
btLampkaMotorBlowers.Clear();
btLampkaCoolingFans.Clear();
ggLeftLightButton.Clear();
ggRightLightButton.Clear();
@@ -7759,6 +7767,7 @@ bool TTrain::initialize_button(cParser &Parser, std::string const &Label, int co
{ "i-highcurrent:", btLampkaWysRozr },
{ "i-vent_trim:", btLampkaWentZaluzje },
{ "i-motorblowers:", btLampkaMotorBlowers },
{ "i-coolingfans:", btLampkaCoolingFans },
{ "i-trainheating:", btLampkaOgrzewanieSkladu },
{ "i-security_aware:", btLampkaCzuwaka },
{ "i-security_cabsignal:", btLampkaSHP },