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

control for alerter, doors, vehicle lights. support for multiple logs. fixes for relaytype 45, 46

This commit is contained in:
tmj-fstate
2017-04-13 15:56:28 +02:00
parent 1034fb8aa9
commit fafb7a63c3
18 changed files with 1951 additions and 1194 deletions

View File

@@ -91,6 +91,9 @@ const int k_Fuse = 26;
const int k_MaxCurrent = 29;
const int k_CurrentAutoRelay = 30;
const int k_BrakeProfile = 31;
*/
{ user_command::alerteracknowledge, command_target::vehicle },
/*
const int k_Czuwak = 32;
const int k_Horn = 33;
const int k_Horn2 = 34;
@@ -118,10 +121,10 @@ const int k_DeCouple = 45;
const int k_ProgramQuit = 46;
// const int k_ProgramPause= 47;
const int k_ProgramHelp = 48;
const int k_OpenLeft = 49;
const int k_OpenRight = 50;
const int k_CloseLeft = 51;
const int k_CloseRight = 52;
*/
{ user_command::doortoggleleft, command_target::vehicle },
{ user_command::doortoggleright, command_target::vehicle },
/*
const int k_DepartureSignal = 53;
*/
{ user_command::pantographtogglefront, command_target::vehicle },
@@ -129,9 +132,18 @@ const int k_DepartureSignal = 53;
/*
const int k_Heating = 58;
// const int k_FreeFlyMode= 59;
const int k_LeftSign = 60;
const int k_UpperSign = 61;
const int k_RightSign = 62;
*/
{ user_command::headlighttoggleleft, command_target::vehicle },
{ user_command::headlighttoggleright, command_target::vehicle },
{ user_command::headlighttoggleupper, command_target::vehicle },
{ user_command::redmarkertoggleleft, command_target::vehicle },
{ user_command::redmarkertoggleright, command_target::vehicle },
{ user_command::headlighttogglerearleft, command_target::vehicle },
{ user_command::headlighttogglerearright, command_target::vehicle },
{ user_command::headlighttogglerearupper, command_target::vehicle },
{ user_command::redmarkertogglerearleft, command_target::vehicle },
{ user_command::redmarkertogglerearright, command_target::vehicle },
/*
const int k_SmallCompressor = 63;
const int k_StLinOff = 64;
const int k_CurrentNext = 65;
@@ -189,6 +201,9 @@ const int k_Fuse = 26;
const int k_MaxCurrent = 29;
const int k_CurrentAutoRelay = 30;
const int k_BrakeProfile = 31;
*/
"alerteracknowledge",
/*
const int k_Czuwak = 32;
const int k_Horn = 33;
const int k_Horn2 = 34;
@@ -216,10 +231,10 @@ const int k_DeCouple = 45;
const int k_ProgramQuit = 46;
// const int k_ProgramPause= 47;
const int k_ProgramHelp = 48;
const int k_OpenLeft = 49;
const int k_OpenRight = 50;
const int k_CloseLeft = 51;
const int k_CloseRight = 52;
*/
"doortoggleleft",
"doortoggleright",
/*
const int k_DepartureSignal = 53;
*/
"pantographtogglefront",
@@ -227,9 +242,18 @@ const int k_DepartureSignal = 53;
/*
const int k_Heating = 58;
// const int k_FreeFlyMode= 59;
const int k_LeftSign = 60;
const int k_UpperSign = 61;
const int k_RightSign = 62;
*/
"headlighttoggleleft",
"headlighttoggleright",
"headlighttoggleupper",
"redmarkertoggleleft",
"redmarkertoggleright",
"headlighttogglerearleft",
"headlighttogglerearright",
"headlighttogglerearupper",
"redmarkertogglerearleft",
"redmarkertogglerearright",
/*
const int k_SmallCompressor = 63;
const int k_StLinOff = 64;
const int k_CurrentNext = 65;
@@ -258,8 +282,9 @@ command_relay::post( user_command const Command, std::uint64_t const Param1, std
return;
}
if( ( lookup->second == command_target::vehicle )
&& ( true == FreeFlyModeFlag ) ) {
// don't pass vehicle commands if the user isn't in one
&& ( true == FreeFlyModeFlag )
&& ( false == DebugModeFlag ) ) {
// don't pass vehicle commands if the user isn't in one, unless we're in debug mode
return;
}