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

default radio state tweak, minor bug fixes

This commit is contained in:
tmj-fstate
2020-10-17 22:56:01 +02:00
parent ef200df575
commit af3a724ede
4 changed files with 6 additions and 5 deletions

View File

@@ -590,15 +590,13 @@ dictionary_source *TTrain::GetTrainState() {
dict->insert( "manual_brake", ( mvOccupied->ManualBrakePos > 0 ) );
bool const bEP = ( mvControlled->LocHandle->GetCP() > 0.2 ) || ( fEIMParams[ 0 ][ 5 ] > 0.01 );
dict->insert( "dir_brake", bEP );
bool bPN;
bool bPN { false };
if( ( typeid( *mvOccupied->Hamulec ) == typeid( TLSt ) )
|| ( typeid( *mvOccupied->Hamulec ) == typeid( TEStED ) ) ) {
TBrake* temp_ham = mvOccupied->Hamulec.get();
bPN = ( static_cast<TLSt*>( temp_ham )->GetEDBCP() > 0.2 );
}
else
bPN = false;
dict->insert( "indir_brake", bPN );
dict->insert( "brake_delay_flag", mvOccupied->BrakeDelayFlag );
dict->insert( "brake_op_mode_flag", mvOccupied->BrakeOpModeFlag );