Added cab control for BrakeOpModeFlag

This commit is contained in:
Królik Uszasty
2018-09-23 16:55:28 +02:00
committed by tmj-fstate
parent 8b4be0a645
commit 001d202055
2 changed files with 10 additions and 0 deletions

View File

@@ -5494,6 +5494,7 @@ bool TTrain::Update( double const Deltatime )
ggBrakeProfileCtrl.Update();
ggBrakeProfileG.Update();
ggBrakeProfileR.Update();
ggBrakeOperationModeCtrl.Update();
ggMaxCurrentCtrl.Update();
// NBMX wrzesien 2003 - drzwi
ggDoorLeftButton.Update();
@@ -6715,6 +6716,7 @@ void TTrain::clear_cab_controls()
ggBrakeProfileCtrl.Clear();
ggBrakeProfileG.Clear();
ggBrakeProfileR.Clear();
ggBrakeOperationModeCtrl.Clear();
ggMaxCurrentCtrl.Clear();
ggMainOffButton.Clear();
ggMainOnButton.Clear();
@@ -7081,6 +7083,12 @@ void TTrain::set_cab_controls() {
1.0 :
0.0 );
}
if (ggBrakeOperationModeCtrl.SubModel != nullptr) {
ggBrakeOperationModeCtrl.PutValue(
(mvOccupied->BrakeOpModeFlag > 0 ?
log2(mvOccupied->BrakeOpModeFlag) :
0));
}
// alarm chain
ggAlarmChain.PutValue(
mvControlled->AlarmChainFlag ?
@@ -7272,6 +7280,7 @@ bool TTrain::initialize_gauge(cParser &Parser, std::string const &Label, int con
{ "brakeprofile_sw:", ggBrakeProfileCtrl },
{ "brakeprofileg_sw:", ggBrakeProfileG },
{ "brakeprofiler_sw:", ggBrakeProfileR },
{ "brakeopmode_sw:", ggBrakeOperationModeCtrl },
{ "maxcurrent_sw:", ggMaxCurrentCtrl },
{ "main_off_bt:", ggMainOffButton },
{ "main_on_bt:", ggMainOnButton },