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

build 200104. minor bug fixes, gfx renderer diagnostics enhancement

This commit is contained in:
tmj-fstate
2020-01-04 15:33:57 +01:00
parent 14699a96de
commit 93ef01142c
16 changed files with 166 additions and 63 deletions

View File

@@ -2189,6 +2189,7 @@ int TMoverParameters::MainCtrlNoPowerPos() const {
switch( EIMCtrlType ) {
case 1: { return 3; }
case 2: { return 3; }
case 3: { return 3; }
default: { return 0; }
}
}
@@ -10775,14 +10776,24 @@ bool TMoverParameters::RunCommand( std::string Command, double CValue1, double C
if (Command == "MainCtrl")
{
if (MainCtrlPosNo >= floor(CValue1))
MainCtrlPos = static_cast<int>(floor(CValue1));
if( MainCtrlPosNo >= floor( CValue1 ) ) {
MainCtrlPos = static_cast<int>( floor( CValue1 ) );
if( DelayCtrlFlag ) {
if( ( LastRelayTime >= InitialCtrlDelay ) && ( MainCtrlPos == 1 ) )
LastRelayTime = 0;
}
else if( LastRelayTime > CtrlDelay )
LastRelayTime = 0;
}
OK = SendCtrlToNext(Command, CValue1, CValue2, Couplertype);
}
else if (Command == "ScndCtrl")
{
if (ScndCtrlPosNo >= floor(CValue1))
ScndCtrlPos = static_cast<int>(floor(CValue1));
if( ScndCtrlPosNo >= floor( CValue1 ) ) {
ScndCtrlPos = static_cast<int>( floor( CValue1 ) );
if( LastRelayTime > CtrlDelay )
LastRelayTime = 0;
}
OK = SendCtrlToNext( Command, CValue1, CValue2, Couplertype );
}
/* else if command='BrakeCtrl' then