mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 20:59:19 +02:00
Merge pull request #23 from marcinn/feature/add-missing-enable-disable-commands
Add useful enable and disable commands
This commit is contained in:
375
Train.cpp
375
Train.cpp
@@ -246,6 +246,8 @@ TTrain::commandhandler_map const TTrain::m_commandhandlers = {
|
|||||||
{ user_command::manualbrakeincrease, &TTrain::OnCommand_manualbrakeincrease },
|
{ user_command::manualbrakeincrease, &TTrain::OnCommand_manualbrakeincrease },
|
||||||
{ user_command::manualbrakedecrease, &TTrain::OnCommand_manualbrakedecrease },
|
{ user_command::manualbrakedecrease, &TTrain::OnCommand_manualbrakedecrease },
|
||||||
{ user_command::alarmchaintoggle, &TTrain::OnCommand_alarmchaintoggle },
|
{ user_command::alarmchaintoggle, &TTrain::OnCommand_alarmchaintoggle },
|
||||||
|
{ user_command::alarmchainenable, &TTrain::OnCommand_alarmchainenable},
|
||||||
|
{ user_command::alarmchaindisable, &TTrain::OnCommand_alarmchaindisable},
|
||||||
{ user_command::wheelspinbrakeactivate, &TTrain::OnCommand_wheelspinbrakeactivate },
|
{ user_command::wheelspinbrakeactivate, &TTrain::OnCommand_wheelspinbrakeactivate },
|
||||||
{ user_command::sandboxactivate, &TTrain::OnCommand_sandboxactivate },
|
{ user_command::sandboxactivate, &TTrain::OnCommand_sandboxactivate },
|
||||||
{ user_command::autosandboxtoggle, &TTrain::OnCommand_autosandboxtoggle },
|
{ user_command::autosandboxtoggle, &TTrain::OnCommand_autosandboxtoggle },
|
||||||
@@ -365,10 +367,20 @@ TTrain::commandhandler_map const TTrain::m_commandhandlers = {
|
|||||||
{ user_command::redmarkerenableright, &TTrain::OnCommand_redmarkerenableright },
|
{ user_command::redmarkerenableright, &TTrain::OnCommand_redmarkerenableright },
|
||||||
{ user_command::redmarkerdisableright, &TTrain::OnCommand_redmarkerdisableright },
|
{ user_command::redmarkerdisableright, &TTrain::OnCommand_redmarkerdisableright },
|
||||||
{ user_command::headlighttogglerearleft, &TTrain::OnCommand_headlighttogglerearleft },
|
{ user_command::headlighttogglerearleft, &TTrain::OnCommand_headlighttogglerearleft },
|
||||||
|
{ user_command::headlightenablerearleft, &TTrain::OnCommand_headlightenablerearleft },
|
||||||
|
{ user_command::headlightdisablerearleft, &TTrain::OnCommand_headlightdisablerearleft },
|
||||||
{ user_command::headlighttogglerearright, &TTrain::OnCommand_headlighttogglerearright },
|
{ user_command::headlighttogglerearright, &TTrain::OnCommand_headlighttogglerearright },
|
||||||
|
{ user_command::headlightenablerearright, &TTrain::OnCommand_headlightenablerearright },
|
||||||
|
{ user_command::headlightdisablerearright, &TTrain::OnCommand_headlightdisablerearright },
|
||||||
{ user_command::headlighttogglerearupper, &TTrain::OnCommand_headlighttogglerearupper },
|
{ user_command::headlighttogglerearupper, &TTrain::OnCommand_headlighttogglerearupper },
|
||||||
|
{ user_command::headlightenablerearupper, &TTrain::OnCommand_headlightenablerearupper },
|
||||||
|
{ user_command::headlightdisablerearupper, &TTrain::OnCommand_headlightdisablerearupper },
|
||||||
{ user_command::redmarkertogglerearleft, &TTrain::OnCommand_redmarkertogglerearleft },
|
{ user_command::redmarkertogglerearleft, &TTrain::OnCommand_redmarkertogglerearleft },
|
||||||
|
{ user_command::redmarkerenablerearleft, &TTrain::OnCommand_redmarkerenablerearleft },
|
||||||
|
{ user_command::redmarkerdisablerearleft, &TTrain::OnCommand_redmarkerdisablerearleft },
|
||||||
{ user_command::redmarkertogglerearright, &TTrain::OnCommand_redmarkertogglerearright },
|
{ user_command::redmarkertogglerearright, &TTrain::OnCommand_redmarkertogglerearright },
|
||||||
|
{ user_command::redmarkerenablerearright, &TTrain::OnCommand_redmarkerenablerearright },
|
||||||
|
{ user_command::redmarkerdisablerearright, &TTrain::OnCommand_redmarkerdisablerearright },
|
||||||
{ user_command::redmarkerstoggle, &TTrain::OnCommand_redmarkerstoggle },
|
{ user_command::redmarkerstoggle, &TTrain::OnCommand_redmarkerstoggle },
|
||||||
{ user_command::endsignalstoggle, &TTrain::OnCommand_endsignalstoggle },
|
{ user_command::endsignalstoggle, &TTrain::OnCommand_endsignalstoggle },
|
||||||
{ user_command::headlightsdimtoggle, &TTrain::OnCommand_headlightsdimtoggle },
|
{ user_command::headlightsdimtoggle, &TTrain::OnCommand_headlightsdimtoggle },
|
||||||
@@ -387,7 +399,11 @@ TTrain::commandhandler_map const TTrain::m_commandhandlers = {
|
|||||||
{ user_command::instrumentlightenable, &TTrain::OnCommand_instrumentlightenable },
|
{ user_command::instrumentlightenable, &TTrain::OnCommand_instrumentlightenable },
|
||||||
{ user_command::instrumentlightdisable, &TTrain::OnCommand_instrumentlightdisable },
|
{ user_command::instrumentlightdisable, &TTrain::OnCommand_instrumentlightdisable },
|
||||||
{ user_command::dashboardlighttoggle, &TTrain::OnCommand_dashboardlighttoggle },
|
{ user_command::dashboardlighttoggle, &TTrain::OnCommand_dashboardlighttoggle },
|
||||||
|
{ user_command::dashboardlightenable, &TTrain::OnCommand_dashboardlightenable },
|
||||||
|
{ user_command::dashboardlightdisable, &TTrain::OnCommand_dashboardlightdisable },
|
||||||
{ user_command::timetablelighttoggle, &TTrain::OnCommand_timetablelighttoggle },
|
{ user_command::timetablelighttoggle, &TTrain::OnCommand_timetablelighttoggle },
|
||||||
|
{ user_command::timetablelightenable, &TTrain::OnCommand_timetablelightenable },
|
||||||
|
{ user_command::timetablelightdisable, &TTrain::OnCommand_timetablelightdisable },
|
||||||
{ user_command::doorlocktoggle, &TTrain::OnCommand_doorlocktoggle },
|
{ user_command::doorlocktoggle, &TTrain::OnCommand_doorlocktoggle },
|
||||||
{ user_command::doortoggleleft, &TTrain::OnCommand_doortoggleleft },
|
{ user_command::doortoggleleft, &TTrain::OnCommand_doortoggleleft },
|
||||||
{ user_command::doortoggleright, &TTrain::OnCommand_doortoggleright },
|
{ user_command::doortoggleright, &TTrain::OnCommand_doortoggleright },
|
||||||
@@ -414,9 +430,13 @@ TTrain::commandhandler_map const TTrain::m_commandhandlers = {
|
|||||||
{ user_command::hornhighactivate, &TTrain::OnCommand_hornhighactivate },
|
{ user_command::hornhighactivate, &TTrain::OnCommand_hornhighactivate },
|
||||||
{ user_command::whistleactivate, &TTrain::OnCommand_whistleactivate },
|
{ user_command::whistleactivate, &TTrain::OnCommand_whistleactivate },
|
||||||
{ user_command::radiotoggle, &TTrain::OnCommand_radiotoggle },
|
{ user_command::radiotoggle, &TTrain::OnCommand_radiotoggle },
|
||||||
|
{ user_command::radioenable, &TTrain::OnCommand_radioenable },
|
||||||
|
{ user_command::radiodisable, &TTrain::OnCommand_radiodisable },
|
||||||
{ user_command::radiochannelincrease, &TTrain::OnCommand_radiochannelincrease },
|
{ user_command::radiochannelincrease, &TTrain::OnCommand_radiochannelincrease },
|
||||||
{ user_command::radiochanneldecrease, &TTrain::OnCommand_radiochanneldecrease },
|
{ user_command::radiochanneldecrease, &TTrain::OnCommand_radiochanneldecrease },
|
||||||
{ user_command::radiostopsend, &TTrain::OnCommand_radiostopsend },
|
{ user_command::radiostopsend, &TTrain::OnCommand_radiostopsend },
|
||||||
|
{ user_command::radiostopenable, &TTrain::OnCommand_radiostopenable },
|
||||||
|
{ user_command::radiostopdisable, &TTrain::OnCommand_radiostopdisable },
|
||||||
{ user_command::radiostoptest, &TTrain::OnCommand_radiostoptest },
|
{ user_command::radiostoptest, &TTrain::OnCommand_radiostoptest },
|
||||||
{ user_command::radiocall3send, &TTrain::OnCommand_radiocall3send },
|
{ user_command::radiocall3send, &TTrain::OnCommand_radiocall3send },
|
||||||
{ user_command::radiovolumeincrease, &TTrain::OnCommand_radiovolumeincrease },
|
{ user_command::radiovolumeincrease, &TTrain::OnCommand_radiovolumeincrease },
|
||||||
@@ -1812,20 +1832,36 @@ void TTrain::OnCommand_alarmchaintoggle( TTrain *Train, command_data const &Comm
|
|||||||
if( Command.action == GLFW_PRESS ) {
|
if( Command.action == GLFW_PRESS ) {
|
||||||
|
|
||||||
if( false == Train->mvOccupied->AlarmChainFlag ) {
|
if( false == Train->mvOccupied->AlarmChainFlag ) {
|
||||||
// pull
|
OnCommand_alarmchainenable(Train, Command);
|
||||||
Train->mvOccupied->AlarmChainSwitch( true );
|
|
||||||
// visual feedback
|
|
||||||
Train->ggAlarmChain.UpdateValue( 1.0 );
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// release
|
OnCommand_alarmchaindisable(Train, Command);
|
||||||
Train->mvOccupied->AlarmChainSwitch( false );
|
|
||||||
// visual feedback
|
|
||||||
Train->ggAlarmChain.UpdateValue( 0.0 );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TTrain::OnCommand_alarmchainenable(TTrain *Train, command_data const &Command)
|
||||||
|
{
|
||||||
|
if (Command.action == GLFW_PRESS) {
|
||||||
|
|
||||||
|
// pull
|
||||||
|
Train->mvOccupied->AlarmChainSwitch(true);
|
||||||
|
// visual feedback
|
||||||
|
Train->ggAlarmChain.UpdateValue(1.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TTrain::OnCommand_alarmchaindisable(TTrain *Train, command_data const &Command) {
|
||||||
|
if (Command.action == GLFW_PRESS) {
|
||||||
|
|
||||||
|
// release
|
||||||
|
Train->mvOccupied->AlarmChainSwitch(false);
|
||||||
|
// visual feedback
|
||||||
|
Train->ggAlarmChain.UpdateValue(0.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void TTrain::OnCommand_wheelspinbrakeactivate( TTrain *Train, command_data const &Command ) {
|
void TTrain::OnCommand_wheelspinbrakeactivate( TTrain *Train, command_data const &Command ) {
|
||||||
|
|
||||||
// TODO: proper control deviced definition for the interiors, that doesn't hinge of presence of 3d submodels
|
// TODO: proper control deviced definition for the interiors, that doesn't hinge of presence of 3d submodels
|
||||||
@@ -4443,23 +4479,74 @@ void TTrain::OnCommand_headlighttogglerearleft( TTrain *Train, command_data cons
|
|||||||
end::rear :
|
end::rear :
|
||||||
end::front ) };
|
end::front ) };
|
||||||
// only reacting to press, so the switch doesn't flip back and forth if key is held down
|
// only reacting to press, so the switch doesn't flip back and forth if key is held down
|
||||||
|
if( ( Train->mvOccupied->iLights[ vehicleotherend ] & light::headlight_right ) == 0 ) {
|
||||||
|
OnCommand_headlightenablerearleft(Train, Command);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
OnCommand_headlightdisablerearleft(Train, Command);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TTrain::OnCommand_headlightenablerearleft( TTrain *Train, command_data const &Command ) {
|
||||||
|
if( Train->mvOccupied->LightsPosNo > 0 ) {
|
||||||
|
// lights are controlled by preset selector
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( Command.action == GLFW_PRESS ) {
|
||||||
|
auto const vehicleotherend { (
|
||||||
|
Train->cab_to_end() == end::front ?
|
||||||
|
end::rear :
|
||||||
|
end::front ) };
|
||||||
|
// already enabled
|
||||||
if( ( Train->mvOccupied->iLights[ vehicleotherend ] & light::headlight_right ) == 0 ) {
|
if( ( Train->mvOccupied->iLights[ vehicleotherend ] & light::headlight_right ) == 0 ) {
|
||||||
// turn on
|
// turn on
|
||||||
Train->mvOccupied->iLights[ vehicleotherend ] ^= light::headlight_right;
|
Train->mvOccupied->iLights[ vehicleotherend ] ^= light::headlight_right;
|
||||||
// visual feedback
|
// visual feedback
|
||||||
Train->ggRearLeftLightButton.UpdateValue( 1.0, Train->dsbSwitch );
|
Train->ggRearLeftLightButton.UpdateValue( 1.0, Train->dsbSwitch );
|
||||||
}
|
}
|
||||||
else {
|
}
|
||||||
//turn off
|
}
|
||||||
Train->mvOccupied->iLights[ vehicleotherend ] ^= light::headlight_right;
|
|
||||||
// visual feedback
|
void TTrain::OnCommand_headlightdisablerearleft( TTrain *Train, command_data const &Command ) {
|
||||||
Train->ggRearLeftLightButton.UpdateValue( 0.0, Train->dsbSwitch );
|
if( Train->mvOccupied->LightsPosNo > 0 ) {
|
||||||
}
|
// lights are controlled by preset selector
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if( Command.action == GLFW_PRESS ) {
|
||||||
|
auto const vehicleotherend { (
|
||||||
|
Train->cab_to_end() == end::front ?
|
||||||
|
end::rear :
|
||||||
|
end::front ) };
|
||||||
|
// already disabled
|
||||||
|
if( ( Train->mvOccupied->iLights[ vehicleotherend ] & light::headlight_right ) == 0 ) {return;}
|
||||||
|
|
||||||
|
//turn off
|
||||||
|
Train->mvOccupied->iLights[ vehicleotherend ] ^= light::headlight_right;
|
||||||
|
// visual feedback
|
||||||
|
Train->ggRearLeftLightButton.UpdateValue( 0.0, Train->dsbSwitch );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TTrain::OnCommand_headlighttogglerearright( TTrain *Train, command_data const &Command ) {
|
void TTrain::OnCommand_headlighttogglerearright( TTrain *Train, command_data const &Command ) {
|
||||||
|
if( Command.action == GLFW_PRESS ) {
|
||||||
|
// NOTE: we toggle the light on opposite side, as 'rear right' is 'front left' on the rear end etc
|
||||||
|
auto const vehicleotherend { (
|
||||||
|
Train->cab_to_end() == end::front ?
|
||||||
|
end::rear :
|
||||||
|
end::front ) };
|
||||||
|
// only reacting to press, so the switch doesn't flip back and forth if key is held down
|
||||||
|
if( ( Train->mvOccupied->iLights[ vehicleotherend ] & light::headlight_left ) == 0 ) {
|
||||||
|
OnCommand_headlightenablerearright(Train, Command);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
OnCommand_headlightdisablerearright(Train, Command);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TTrain::OnCommand_headlightenablerearright( TTrain *Train, command_data const &Command ) {
|
||||||
if( Train->mvOccupied->LightsPosNo > 0 ) {
|
if( Train->mvOccupied->LightsPosNo > 0 ) {
|
||||||
// lights are controlled by preset selector
|
// lights are controlled by preset selector
|
||||||
return;
|
return;
|
||||||
@@ -4471,19 +4558,35 @@ void TTrain::OnCommand_headlighttogglerearright( TTrain *Train, command_data con
|
|||||||
Train->cab_to_end() == end::front ?
|
Train->cab_to_end() == end::front ?
|
||||||
end::rear :
|
end::rear :
|
||||||
end::front ) };
|
end::front ) };
|
||||||
// only reacting to press, so the switch doesn't flip back and forth if key is held down
|
|
||||||
if( ( Train->mvOccupied->iLights[ vehicleotherend ] & light::headlight_left ) == 0 ) {
|
if( ( Train->mvOccupied->iLights[ vehicleotherend ] & light::headlight_left ) == 0 ) {
|
||||||
// turn on
|
// turn on
|
||||||
Train->mvOccupied->iLights[ vehicleotherend ] ^= light::headlight_left;
|
Train->mvOccupied->iLights[ vehicleotherend ] ^= light::headlight_left;
|
||||||
// visual feedback
|
// visual feedback
|
||||||
Train->ggRearRightLightButton.UpdateValue( 1.0, Train->dsbSwitch );
|
Train->ggRearRightLightButton.UpdateValue( 1.0, Train->dsbSwitch );
|
||||||
}
|
}
|
||||||
else {
|
}
|
||||||
//turn off
|
}
|
||||||
Train->mvOccupied->iLights[ vehicleotherend ] ^= light::headlight_left;
|
|
||||||
// visual feedback
|
void TTrain::OnCommand_headlightdisablerearright( TTrain *Train, command_data const &Command ) {
|
||||||
Train->ggRearRightLightButton.UpdateValue( 0.0, Train->dsbSwitch );
|
if( Train->mvOccupied->LightsPosNo > 0 ) {
|
||||||
}
|
// lights are controlled by preset selector
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( Command.action == GLFW_PRESS ) {
|
||||||
|
// NOTE: we toggle the light on opposite side, as 'rear right' is 'front left' on the rear end etc
|
||||||
|
auto const vehicleotherend { (
|
||||||
|
Train->cab_to_end() == end::front ?
|
||||||
|
end::rear :
|
||||||
|
end::front ) };
|
||||||
|
// already disabled
|
||||||
|
if( ( Train->mvOccupied->iLights[ vehicleotherend ] & light::headlight_left ) == 0 ) { return; }
|
||||||
|
|
||||||
|
//turn off
|
||||||
|
Train->mvOccupied->iLights[ vehicleotherend ] ^= light::headlight_left;
|
||||||
|
// visual feedback
|
||||||
|
Train->ggRearRightLightButton.UpdateValue( 0.0, Train->dsbSwitch );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4494,6 +4597,28 @@ void TTrain::OnCommand_headlighttogglerearupper( TTrain *Train, command_data con
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( Command.action == GLFW_PRESS ) {
|
||||||
|
// only reacting to press, so the switch doesn't flip back and forth if key is held down
|
||||||
|
auto const vehicleotherend { (
|
||||||
|
Train->cab_to_end() == end::front ?
|
||||||
|
end::rear :
|
||||||
|
end::front ) };
|
||||||
|
if( ( Train->mvOccupied->iLights[ vehicleotherend ] & light::headlight_upper ) == 0 ) {
|
||||||
|
OnCommand_headlightenablerearupper(Train, Command);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
OnCommand_headlightdisablerearupper(Train, Command);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TTrain::OnCommand_headlightenablerearupper( TTrain *Train, command_data const &Command ) {
|
||||||
|
|
||||||
|
if( Train->mvOccupied->LightsPosNo > 0 ) {
|
||||||
|
// lights are controlled by preset selector
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if( Command.action == GLFW_PRESS ) {
|
if( Command.action == GLFW_PRESS ) {
|
||||||
// only reacting to press, so the switch doesn't flip back and forth if key is held down
|
// only reacting to press, so the switch doesn't flip back and forth if key is held down
|
||||||
auto const vehicleotherend { (
|
auto const vehicleotherend { (
|
||||||
@@ -4506,16 +4631,50 @@ void TTrain::OnCommand_headlighttogglerearupper( TTrain *Train, command_data con
|
|||||||
// visual feedback
|
// visual feedback
|
||||||
Train->ggRearUpperLightButton.UpdateValue( 1.0, Train->dsbSwitch );
|
Train->ggRearUpperLightButton.UpdateValue( 1.0, Train->dsbSwitch );
|
||||||
}
|
}
|
||||||
else {
|
}
|
||||||
//turn off
|
}
|
||||||
Train->mvOccupied->iLights[ vehicleotherend ] ^= light::headlight_upper;
|
|
||||||
// visual feedback
|
void TTrain::OnCommand_headlightdisablerearupper( TTrain *Train, command_data const &Command ) {
|
||||||
Train->ggRearUpperLightButton.UpdateValue( 0.0, Train->dsbSwitch );
|
|
||||||
}
|
if( Train->mvOccupied->LightsPosNo > 0 ) {
|
||||||
|
// lights are controlled by preset selector
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( Command.action == GLFW_PRESS ) {
|
||||||
|
// only reacting to press, so the switch doesn't flip back and forth if key is held down
|
||||||
|
auto const vehicleotherend { (
|
||||||
|
Train->cab_to_end() == end::front ?
|
||||||
|
end::rear :
|
||||||
|
end::front ) };
|
||||||
|
// already disabled?
|
||||||
|
if( ( Train->mvOccupied->iLights[ vehicleotherend ] & light::headlight_upper ) == 0 ) { return ; }
|
||||||
|
|
||||||
|
//turn off
|
||||||
|
Train->mvOccupied->iLights[ vehicleotherend ] ^= light::headlight_upper;
|
||||||
|
// visual feedback
|
||||||
|
Train->ggRearUpperLightButton.UpdateValue( 0.0, Train->dsbSwitch );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TTrain::OnCommand_redmarkertogglerearleft( TTrain *Train, command_data const &Command ) {
|
void TTrain::OnCommand_redmarkertogglerearleft( TTrain *Train, command_data const &Command ) {
|
||||||
|
if( Command.action == GLFW_PRESS ) {
|
||||||
|
// NOTE: we toggle the light on opposite side, as 'rear right' is 'front left' on the rear end etc
|
||||||
|
auto const vehicleotherend { (
|
||||||
|
Train->cab_to_end() == end::front ?
|
||||||
|
end::rear :
|
||||||
|
end::front ) };
|
||||||
|
// only reacting to press, so the switch doesn't flip back and forth if key is held down
|
||||||
|
if( ( Train->mvOccupied->iLights[ vehicleotherend ] & light::redmarker_right ) == 0 ) {
|
||||||
|
OnCommand_redmarkerenablerearleft(Train, Command);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
OnCommand_redmarkerdisablerearleft(Train, Command);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TTrain::OnCommand_redmarkerenablerearleft( TTrain *Train, command_data const &Command ) {
|
||||||
|
|
||||||
if( Train->mvOccupied->LightsPosNo > 0 ) {
|
if( Train->mvOccupied->LightsPosNo > 0 ) {
|
||||||
// lights are controlled by preset selector
|
// lights are controlled by preset selector
|
||||||
@@ -4528,19 +4687,33 @@ void TTrain::OnCommand_redmarkertogglerearleft( TTrain *Train, command_data cons
|
|||||||
Train->cab_to_end() == end::front ?
|
Train->cab_to_end() == end::front ?
|
||||||
end::rear :
|
end::rear :
|
||||||
end::front ) };
|
end::front ) };
|
||||||
// only reacting to press, so the switch doesn't flip back and forth if key is held down
|
|
||||||
if( ( Train->mvOccupied->iLights[ vehicleotherend ] & light::redmarker_right ) == 0 ) {
|
if( ( Train->mvOccupied->iLights[ vehicleotherend ] & light::redmarker_right ) == 0 ) {
|
||||||
// turn on
|
// turn on
|
||||||
Train->mvOccupied->iLights[ vehicleotherend ] ^= light::redmarker_right;
|
Train->mvOccupied->iLights[ vehicleotherend ] ^= light::redmarker_right;
|
||||||
// visual feedback
|
// visual feedback
|
||||||
Train->ggRearLeftEndLightButton.UpdateValue( 1.0, Train->dsbSwitch );
|
Train->ggRearLeftEndLightButton.UpdateValue( 1.0, Train->dsbSwitch );
|
||||||
}
|
}
|
||||||
else {
|
}
|
||||||
//turn off
|
}
|
||||||
Train->mvOccupied->iLights[ vehicleotherend ] ^= light::redmarker_right;
|
|
||||||
// visual feedback
|
void TTrain::OnCommand_redmarkerdisablerearleft( TTrain *Train, command_data const &Command ) {
|
||||||
Train->ggRearLeftEndLightButton.UpdateValue( 0.0, Train->dsbSwitch );
|
|
||||||
}
|
if( Train->mvOccupied->LightsPosNo > 0 ) {
|
||||||
|
// lights are controlled by preset selector
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( Command.action == GLFW_PRESS ) {
|
||||||
|
// NOTE: we toggle the light on opposite side, as 'rear right' is 'front left' on the rear end etc
|
||||||
|
auto const vehicleotherend { (
|
||||||
|
Train->cab_to_end() == end::front ?
|
||||||
|
end::rear :
|
||||||
|
end::front ) };
|
||||||
|
if( ( Train->mvOccupied->iLights[ vehicleotherend ] & light::redmarker_right ) == 0 ) { return; }
|
||||||
|
//turn off
|
||||||
|
Train->mvOccupied->iLights[ vehicleotherend ] ^= light::redmarker_right;
|
||||||
|
// visual feedback
|
||||||
|
Train->ggRearLeftEndLightButton.UpdateValue( 0.0, Train->dsbSwitch );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4558,18 +4731,55 @@ void TTrain::OnCommand_redmarkertogglerearright( TTrain *Train, command_data con
|
|||||||
end::rear :
|
end::rear :
|
||||||
end::front ) };
|
end::front ) };
|
||||||
// only reacting to press, so the switch doesn't flip back and forth if key is held down
|
// only reacting to press, so the switch doesn't flip back and forth if key is held down
|
||||||
|
if( ( Train->mvOccupied->iLights[ vehicleotherend ] & light::redmarker_left ) == 0 ) {
|
||||||
|
OnCommand_redmarkerenablerearright(Train, Command);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
OnCommand_redmarkerdisablerearright(Train, Command);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TTrain::OnCommand_redmarkerenablerearright( TTrain *Train, command_data const &Command ) {
|
||||||
|
|
||||||
|
if( Train->mvOccupied->LightsPosNo > 0 ) {
|
||||||
|
// lights are controlled by preset selector
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( Command.action == GLFW_PRESS ) {
|
||||||
|
// NOTE: we toggle the light on opposite side, as 'rear right' is 'front left' on the rear end etc
|
||||||
|
auto const vehicleotherend { (
|
||||||
|
Train->cab_to_end() == end::front ?
|
||||||
|
end::rear :
|
||||||
|
end::front ) };
|
||||||
if( ( Train->mvOccupied->iLights[ vehicleotherend ] & light::redmarker_left ) == 0 ) {
|
if( ( Train->mvOccupied->iLights[ vehicleotherend ] & light::redmarker_left ) == 0 ) {
|
||||||
// turn on
|
// turn on
|
||||||
Train->mvOccupied->iLights[ vehicleotherend ] ^= light::redmarker_left;
|
Train->mvOccupied->iLights[ vehicleotherend ] ^= light::redmarker_left;
|
||||||
// visual feedback
|
// visual feedback
|
||||||
Train->ggRearRightEndLightButton.UpdateValue( 1.0, Train->dsbSwitch );
|
Train->ggRearRightEndLightButton.UpdateValue( 1.0, Train->dsbSwitch );
|
||||||
}
|
}
|
||||||
else {
|
}
|
||||||
//turn off
|
}
|
||||||
Train->mvOccupied->iLights[ vehicleotherend ] ^= light::redmarker_left;
|
|
||||||
// visual feedback
|
void TTrain::OnCommand_redmarkerdisablerearright( TTrain *Train, command_data const &Command ) {
|
||||||
Train->ggRearRightEndLightButton.UpdateValue( 0.0, Train->dsbSwitch );
|
|
||||||
}
|
if( Train->mvOccupied->LightsPosNo > 0 ) {
|
||||||
|
// lights are controlled by preset selector
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( Command.action == GLFW_PRESS ) {
|
||||||
|
// NOTE: we toggle the light on opposite side, as 'rear right' is 'front left' on the rear end etc
|
||||||
|
auto const vehicleotherend { (
|
||||||
|
Train->cab_to_end() == end::front ?
|
||||||
|
end::rear :
|
||||||
|
end::front ) };
|
||||||
|
if( ( Train->mvOccupied->iLights[ vehicleotherend ] & light::redmarker_left ) == 0 ) { return; }
|
||||||
|
//turn off
|
||||||
|
Train->mvOccupied->iLights[ vehicleotherend ] ^= light::redmarker_left;
|
||||||
|
// visual feedback
|
||||||
|
Train->ggRearRightEndLightButton.UpdateValue( 0.0, Train->dsbSwitch );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4938,6 +5148,15 @@ void TTrain::OnCommand_instrumentlightdisable( TTrain *Train, command_data const
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TTrain::OnCommand_dashboardlighttoggle( TTrain *Train, command_data const &Command ) {
|
void TTrain::OnCommand_dashboardlighttoggle( TTrain *Train, command_data const &Command ) {
|
||||||
|
if( false == Train->DashboardLightActive ) {
|
||||||
|
OnCommand_dashboardlightenable(Train, Command);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
OnCommand_dashboardlightdisable(Train, Command);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TTrain::OnCommand_dashboardlightenable( TTrain *Train, command_data const &Command ) {
|
||||||
// only reacting to press, so the switch doesn't flip back and forth if key is held down
|
// only reacting to press, so the switch doesn't flip back and forth if key is held down
|
||||||
if( Command.action != GLFW_PRESS ) { return; }
|
if( Command.action != GLFW_PRESS ) { return; }
|
||||||
|
|
||||||
@@ -4953,7 +5172,19 @@ void TTrain::OnCommand_dashboardlighttoggle( TTrain *Train, command_data const &
|
|||||||
// visual feedback
|
// visual feedback
|
||||||
Train->ggDashboardLightButton.UpdateValue( 1.0, Train->dsbSwitch );
|
Train->ggDashboardLightButton.UpdateValue( 1.0, Train->dsbSwitch );
|
||||||
}
|
}
|
||||||
else {
|
}
|
||||||
|
|
||||||
|
void TTrain::OnCommand_dashboardlightdisable( TTrain *Train, command_data const &Command ) {
|
||||||
|
// only reacting to press, so the switch doesn't flip back and forth if key is held down
|
||||||
|
if( Command.action != GLFW_PRESS ) { return; }
|
||||||
|
|
||||||
|
if( Train->ggDashboardLightButton.SubModel == nullptr ) {
|
||||||
|
// TODO: proper control deviced definition for the interiors, that doesn't hinge of presence of 3d submodels
|
||||||
|
WriteLog( "Dashboard Light switch is missing, or wasn't defined" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( Train->DashboardLightActive ) {
|
||||||
//turn off
|
//turn off
|
||||||
Train->DashboardLightActive = false;
|
Train->DashboardLightActive = false;
|
||||||
// visual feedback
|
// visual feedback
|
||||||
@@ -4965,6 +5196,18 @@ void TTrain::OnCommand_timetablelighttoggle( TTrain *Train, command_data const &
|
|||||||
// only reacting to press, so the switch doesn't flip back and forth if key is held down
|
// only reacting to press, so the switch doesn't flip back and forth if key is held down
|
||||||
if( Command.action != GLFW_PRESS ) { return; }
|
if( Command.action != GLFW_PRESS ) { return; }
|
||||||
|
|
||||||
|
if( false == Train->TimetableLightActive ) {
|
||||||
|
OnCommand_timetablelightenable(Train, Command);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
OnCommand_timetablelightdisable(Train, Command);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TTrain::OnCommand_timetablelightenable( TTrain *Train, command_data const &Command ) {
|
||||||
|
// only reacting to press, so the switch doesn't flip back and forth if key is held down
|
||||||
|
if( Command.action != GLFW_PRESS ) { return; }
|
||||||
|
|
||||||
if( Train->ggTimetableLightButton.SubModel == nullptr ) {
|
if( Train->ggTimetableLightButton.SubModel == nullptr ) {
|
||||||
// TODO: proper control deviced definition for the interiors, that doesn't hinge of presence of 3d submodels
|
// TODO: proper control deviced definition for the interiors, that doesn't hinge of presence of 3d submodels
|
||||||
WriteLog( "Timetable Light switch is missing, or wasn't defined" );
|
WriteLog( "Timetable Light switch is missing, or wasn't defined" );
|
||||||
@@ -4977,7 +5220,18 @@ void TTrain::OnCommand_timetablelighttoggle( TTrain *Train, command_data const &
|
|||||||
// visual feedback
|
// visual feedback
|
||||||
Train->ggTimetableLightButton.UpdateValue( 1.0, Train->dsbSwitch );
|
Train->ggTimetableLightButton.UpdateValue( 1.0, Train->dsbSwitch );
|
||||||
}
|
}
|
||||||
else {
|
}
|
||||||
|
|
||||||
|
void TTrain::OnCommand_timetablelightdisable( TTrain *Train, command_data const &Command ) {
|
||||||
|
// only reacting to press, so the switch doesn't flip back and forth if key is held down
|
||||||
|
if( Command.action != GLFW_PRESS ) { return; }
|
||||||
|
|
||||||
|
if( Train->ggTimetableLightButton.SubModel == nullptr ) {
|
||||||
|
// TODO: proper control deviced definition for the interiors, that doesn't hinge of presence of 3d submodels
|
||||||
|
WriteLog( "Timetable Light switch is missing, or wasn't defined" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if( Train->TimetableLightActive ) {
|
||||||
//turn off
|
//turn off
|
||||||
Train->TimetableLightActive = false;
|
Train->TimetableLightActive = false;
|
||||||
// visual feedback
|
// visual feedback
|
||||||
@@ -6193,7 +6447,6 @@ void TTrain::OnCommand_whistleactivate( TTrain *Train, command_data const &Comma
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TTrain::OnCommand_radiotoggle( TTrain *Train, command_data const &Command ) {
|
void TTrain::OnCommand_radiotoggle( TTrain *Train, command_data const &Command ) {
|
||||||
|
|
||||||
if( Command.action != GLFW_PRESS ) { return; }
|
if( Command.action != GLFW_PRESS ) { return; }
|
||||||
|
|
||||||
// NOTE: we ignore the lack of 3d model to allow system reset after receiving radio-stop signal
|
// NOTE: we ignore the lack of 3d model to allow system reset after receiving radio-stop signal
|
||||||
@@ -6205,10 +6458,26 @@ void TTrain::OnCommand_radiotoggle( TTrain *Train, command_data const &Command )
|
|||||||
// only reacting to press, so the sound can loop uninterrupted
|
// only reacting to press, so the sound can loop uninterrupted
|
||||||
if( false == Train->mvOccupied->Radio ) {
|
if( false == Train->mvOccupied->Radio ) {
|
||||||
// turn on
|
// turn on
|
||||||
Train->mvOccupied->Radio = true;
|
OnCommand_radioenable(Train, Command);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// turn off
|
// turn off
|
||||||
|
OnCommand_radiodisable(Train, Command);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TTrain::OnCommand_radioenable( TTrain *Train, command_data const &Command ) {
|
||||||
|
if( Command.action != GLFW_PRESS ) { return; }
|
||||||
|
|
||||||
|
if( false == Train->mvOccupied->Radio ) {
|
||||||
|
Train->mvOccupied->Radio = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TTrain::OnCommand_radiodisable( TTrain *Train, command_data const &Command ) {
|
||||||
|
if( Command.action != GLFW_PRESS ) { return; }
|
||||||
|
|
||||||
|
if(Train->mvOccupied->Radio ) {
|
||||||
Train->mvOccupied->Radio = false;
|
Train->mvOccupied->Radio = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6257,6 +6526,24 @@ void TTrain::OnCommand_radiostopsend( TTrain *Train, command_data const &Command
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TTrain::OnCommand_radiostopenable( TTrain *Train, command_data const &Command ) {
|
||||||
|
if( Command.action == GLFW_PRESS && Train->ggRadioStop.GetValue() == 0 ) {
|
||||||
|
if( ( true == Train->mvOccupied->Radio )
|
||||||
|
&& ( Train->mvOccupied->Power24vIsAvailable || Train->mvOccupied->Power110vIsAvailable ) ) {
|
||||||
|
simulation::Region->RadioStop( Train->Dynamic()->GetPosition() );
|
||||||
|
}
|
||||||
|
// visual feedback
|
||||||
|
Train->ggRadioStop.UpdateValue( 1.0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TTrain::OnCommand_radiostopdisable( TTrain *Train, command_data const &Command ) {
|
||||||
|
if( Command.action == GLFW_PRESS && Train->ggRadioStop.GetValue() > 0 ) {
|
||||||
|
// visual feedback
|
||||||
|
Train->ggRadioStop.UpdateValue( 0.0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void TTrain::OnCommand_radiostoptest( TTrain *Train, command_data const &Command ) {
|
void TTrain::OnCommand_radiostoptest( TTrain *Train, command_data const &Command ) {
|
||||||
|
|
||||||
if( Command.action == GLFW_PRESS ) {
|
if( Command.action == GLFW_PRESS ) {
|
||||||
|
|||||||
20
Train.h
20
Train.h
@@ -265,6 +265,8 @@ class TTrain {
|
|||||||
static void OnCommand_manualbrakeincrease( TTrain *Train, command_data const &Command );
|
static void OnCommand_manualbrakeincrease( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_manualbrakedecrease( TTrain *Train, command_data const &Command );
|
static void OnCommand_manualbrakedecrease( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_alarmchaintoggle( TTrain *Train, command_data const &Command );
|
static void OnCommand_alarmchaintoggle( TTrain *Train, command_data const &Command );
|
||||||
|
static void OnCommand_alarmchainenable(TTrain *Train, command_data const &Command);
|
||||||
|
static void OnCommand_alarmchaindisable(TTrain *Train, command_data const &Command);
|
||||||
static void OnCommand_wheelspinbrakeactivate( TTrain *Train, command_data const &Command );
|
static void OnCommand_wheelspinbrakeactivate( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_sandboxactivate( TTrain *Train, command_data const &Command );
|
static void OnCommand_sandboxactivate( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_autosandboxtoggle(TTrain *Train, command_data const &Command);
|
static void OnCommand_autosandboxtoggle(TTrain *Train, command_data const &Command);
|
||||||
@@ -386,10 +388,20 @@ class TTrain {
|
|||||||
static void OnCommand_redmarkerenableright( TTrain *Train, command_data const &Command );
|
static void OnCommand_redmarkerenableright( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_redmarkerdisableright( TTrain *Train, command_data const &Command );
|
static void OnCommand_redmarkerdisableright( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_headlighttogglerearleft( TTrain *Train, command_data const &Command );
|
static void OnCommand_headlighttogglerearleft( TTrain *Train, command_data const &Command );
|
||||||
|
static void OnCommand_headlightenablerearleft( TTrain *Train, command_data const &Command );
|
||||||
|
static void OnCommand_headlightdisablerearleft( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_headlighttogglerearright( TTrain *Train, command_data const &Command );
|
static void OnCommand_headlighttogglerearright( TTrain *Train, command_data const &Command );
|
||||||
|
static void OnCommand_headlightenablerearright( TTrain *Train, command_data const &Command );
|
||||||
|
static void OnCommand_headlightdisablerearright( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_headlighttogglerearupper( TTrain *Train, command_data const &Command );
|
static void OnCommand_headlighttogglerearupper( TTrain *Train, command_data const &Command );
|
||||||
|
static void OnCommand_headlightenablerearupper( TTrain *Train, command_data const &Command );
|
||||||
|
static void OnCommand_headlightdisablerearupper( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_redmarkertogglerearleft( TTrain *Train, command_data const &Command );
|
static void OnCommand_redmarkertogglerearleft( TTrain *Train, command_data const &Command );
|
||||||
|
static void OnCommand_redmarkerenablerearleft( TTrain *Train, command_data const &Command );
|
||||||
|
static void OnCommand_redmarkerdisablerearleft( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_redmarkertogglerearright( TTrain *Train, command_data const &Command );
|
static void OnCommand_redmarkertogglerearright( TTrain *Train, command_data const &Command );
|
||||||
|
static void OnCommand_redmarkerenablerearright( TTrain *Train, command_data const &Command );
|
||||||
|
static void OnCommand_redmarkerdisablerearright( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_redmarkerstoggle( TTrain *Train, command_data const &Command );
|
static void OnCommand_redmarkerstoggle( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_endsignalstoggle( TTrain *Train, command_data const &Command );
|
static void OnCommand_endsignalstoggle( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_headlightsdimtoggle( TTrain *Train, command_data const &Command );
|
static void OnCommand_headlightsdimtoggle( TTrain *Train, command_data const &Command );
|
||||||
@@ -408,7 +420,11 @@ class TTrain {
|
|||||||
static void OnCommand_instrumentlightenable( TTrain *Train, command_data const &Command );
|
static void OnCommand_instrumentlightenable( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_instrumentlightdisable( TTrain *Train, command_data const &Command );
|
static void OnCommand_instrumentlightdisable( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_dashboardlighttoggle( TTrain *Train, command_data const &Command );
|
static void OnCommand_dashboardlighttoggle( TTrain *Train, command_data const &Command );
|
||||||
|
static void OnCommand_dashboardlightenable( TTrain *Train, command_data const &Command );
|
||||||
|
static void OnCommand_dashboardlightdisable( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_timetablelighttoggle( TTrain *Train, command_data const &Command );
|
static void OnCommand_timetablelighttoggle( TTrain *Train, command_data const &Command );
|
||||||
|
static void OnCommand_timetablelightenable( TTrain *Train, command_data const &Command );
|
||||||
|
static void OnCommand_timetablelightdisable( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_doorlocktoggle( TTrain *Train, command_data const &Command );
|
static void OnCommand_doorlocktoggle( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_doortoggleleft( TTrain *Train, command_data const &Command );
|
static void OnCommand_doortoggleleft( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_doortoggleright( TTrain *Train, command_data const &Command );
|
static void OnCommand_doortoggleright( TTrain *Train, command_data const &Command );
|
||||||
@@ -436,9 +452,13 @@ class TTrain {
|
|||||||
static void OnCommand_hornhighactivate( TTrain *Train, command_data const &Command );
|
static void OnCommand_hornhighactivate( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_whistleactivate( TTrain *Train, command_data const &Command );
|
static void OnCommand_whistleactivate( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_radiotoggle( TTrain *Train, command_data const &Command );
|
static void OnCommand_radiotoggle( TTrain *Train, command_data const &Command );
|
||||||
|
static void OnCommand_radioenable( TTrain *Train, command_data const &Command );
|
||||||
|
static void OnCommand_radiodisable( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_radiochannelincrease( TTrain *Train, command_data const &Command );
|
static void OnCommand_radiochannelincrease( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_radiochanneldecrease( TTrain *Train, command_data const &Command );
|
static void OnCommand_radiochanneldecrease( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_radiostopsend( TTrain *Train, command_data const &Command );
|
static void OnCommand_radiostopsend( TTrain *Train, command_data const &Command );
|
||||||
|
static void OnCommand_radiostopenable( TTrain *Train, command_data const &Command );
|
||||||
|
static void OnCommand_radiostopdisable( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_radiostoptest( TTrain *Train, command_data const &Command );
|
static void OnCommand_radiostoptest( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_radiocall3send( TTrain *Train, command_data const &Command );
|
static void OnCommand_radiocall3send( TTrain *Train, command_data const &Command );
|
||||||
static void OnCommand_radiovolumeincrease(TTrain *Train, command_data const &Command);
|
static void OnCommand_radiovolumeincrease(TTrain *Train, command_data const &Command);
|
||||||
|
|||||||
20
command.cpp
20
command.cpp
@@ -62,6 +62,8 @@ commanddescription_sequence Commands_descriptions = {
|
|||||||
{ "manualbrakeincrease", command_target::vehicle, command_mode::oneoff },
|
{ "manualbrakeincrease", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "manualbrakedecrease", command_target::vehicle, command_mode::oneoff },
|
{ "manualbrakedecrease", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "alarmchaintoggle", command_target::vehicle, command_mode::oneoff },
|
{ "alarmchaintoggle", command_target::vehicle, command_mode::oneoff },
|
||||||
|
{ "alarmchainenable", command_target::vehicle, command_mode::oneoff},
|
||||||
|
{ "alarmchaindisable", command_target::vehicle, command_mode::oneoff},
|
||||||
{ "wheelspinbrakeactivate", command_target::vehicle, command_mode::oneoff },
|
{ "wheelspinbrakeactivate", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "sandboxactivate", command_target::vehicle, command_mode::oneoff },
|
{ "sandboxactivate", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "autosandboxtoggle", command_target::vehicle, command_mode::oneoff },
|
{ "autosandboxtoggle", command_target::vehicle, command_mode::oneoff },
|
||||||
@@ -134,9 +136,13 @@ commanddescription_sequence Commands_descriptions = {
|
|||||||
{ "hornhighactivate", command_target::vehicle, command_mode::oneoff },
|
{ "hornhighactivate", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "whistleactivate", command_target::vehicle, command_mode::oneoff },
|
{ "whistleactivate", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "radiotoggle", command_target::vehicle, command_mode::oneoff },
|
{ "radiotoggle", command_target::vehicle, command_mode::oneoff },
|
||||||
|
{ "radioenable", command_target::vehicle, command_mode::oneoff },
|
||||||
|
{ "radiodisable", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "radiochannelincrease", command_target::vehicle, command_mode::oneoff },
|
{ "radiochannelincrease", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "radiochanneldecrease", command_target::vehicle, command_mode::oneoff },
|
{ "radiochanneldecrease", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "radiostopsend", command_target::vehicle, command_mode::oneoff },
|
{ "radiostopsend", command_target::vehicle, command_mode::oneoff },
|
||||||
|
{ "radiostopenable", command_target::vehicle, command_mode::oneoff },
|
||||||
|
{ "radiostopdisable", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "radiostoptest", command_target::vehicle, command_mode::oneoff },
|
{ "radiostoptest", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "radiocall3send", command_target::vehicle, command_mode::oneoff },
|
{ "radiocall3send", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "radiovolumeincrease", command_target::vehicle, command_mode::oneoff },
|
{ "radiovolumeincrease", command_target::vehicle, command_mode::oneoff },
|
||||||
@@ -216,10 +222,20 @@ commanddescription_sequence Commands_descriptions = {
|
|||||||
{ "redmarkerenableright", command_target::vehicle, command_mode::oneoff },
|
{ "redmarkerenableright", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "redmarkerdisableright", command_target::vehicle, command_mode::oneoff },
|
{ "redmarkerdisableright", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "headlighttogglerearleft", command_target::vehicle, command_mode::oneoff },
|
{ "headlighttogglerearleft", command_target::vehicle, command_mode::oneoff },
|
||||||
|
{ "headlightenablerearleft", command_target::vehicle, command_mode::oneoff },
|
||||||
|
{ "headlightdisablerearleft", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "headlighttogglerearright", command_target::vehicle, command_mode::oneoff },
|
{ "headlighttogglerearright", command_target::vehicle, command_mode::oneoff },
|
||||||
|
{ "headlightenablerearright", command_target::vehicle, command_mode::oneoff },
|
||||||
|
{ "headlightdisablerearright", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "headlighttogglerearupper", command_target::vehicle, command_mode::oneoff },
|
{ "headlighttogglerearupper", command_target::vehicle, command_mode::oneoff },
|
||||||
|
{ "headlightenablerearupper", command_target::vehicle, command_mode::oneoff },
|
||||||
|
{ "headlightdisablerearupper", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "redmarkertogglerearleft", command_target::vehicle, command_mode::oneoff },
|
{ "redmarkertogglerearleft", command_target::vehicle, command_mode::oneoff },
|
||||||
|
{ "redmarkerenablerearleft", command_target::vehicle, command_mode::oneoff },
|
||||||
|
{ "redmarkerdisablerearleft", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "redmarkertogglerearright", command_target::vehicle, command_mode::oneoff },
|
{ "redmarkertogglerearright", command_target::vehicle, command_mode::oneoff },
|
||||||
|
{ "redmarkerenablerearright", command_target::vehicle, command_mode::oneoff },
|
||||||
|
{ "redmarkerdisablerearright", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "redmarkerstoggle", command_target::vehicle, command_mode::oneoff },
|
{ "redmarkerstoggle", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "endsignalstoggle", command_target::vehicle, command_mode::oneoff },
|
{ "endsignalstoggle", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "headlightsdimtoggle", command_target::vehicle, command_mode::oneoff },
|
{ "headlightsdimtoggle", command_target::vehicle, command_mode::oneoff },
|
||||||
@@ -241,7 +257,11 @@ commanddescription_sequence Commands_descriptions = {
|
|||||||
{ "instrumentlightenable", command_target::vehicle, command_mode::oneoff },
|
{ "instrumentlightenable", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "instrumentlightdisable", command_target::vehicle, command_mode::oneoff },
|
{ "instrumentlightdisable", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "dashboardlighttoggle", command_target::vehicle, command_mode::oneoff },
|
{ "dashboardlighttoggle", command_target::vehicle, command_mode::oneoff },
|
||||||
|
{ "dashboardlightenable", command_target::vehicle, command_mode::oneoff },
|
||||||
|
{ "dashboardlightdisable", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "timetablelighttoggle", command_target::vehicle, command_mode::oneoff },
|
{ "timetablelighttoggle", command_target::vehicle, command_mode::oneoff },
|
||||||
|
{ "timetablelightenable", command_target::vehicle, command_mode::oneoff },
|
||||||
|
{ "timetablelightdisable", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "generictoggle0", command_target::vehicle, command_mode::oneoff },
|
{ "generictoggle0", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "generictoggle1", command_target::vehicle, command_mode::oneoff },
|
{ "generictoggle1", command_target::vehicle, command_mode::oneoff },
|
||||||
{ "generictoggle2", command_target::vehicle, command_mode::oneoff },
|
{ "generictoggle2", command_target::vehicle, command_mode::oneoff },
|
||||||
|
|||||||
20
command.h
20
command.h
@@ -55,6 +55,8 @@ enum class user_command {
|
|||||||
manualbrakeincrease,
|
manualbrakeincrease,
|
||||||
manualbrakedecrease,
|
manualbrakedecrease,
|
||||||
alarmchaintoggle,
|
alarmchaintoggle,
|
||||||
|
alarmchainenable,
|
||||||
|
alarmchaindisable,
|
||||||
wheelspinbrakeactivate,
|
wheelspinbrakeactivate,
|
||||||
sandboxactivate,
|
sandboxactivate,
|
||||||
autosandboxtoggle,
|
autosandboxtoggle,
|
||||||
@@ -127,9 +129,13 @@ enum class user_command {
|
|||||||
hornhighactivate,
|
hornhighactivate,
|
||||||
whistleactivate,
|
whistleactivate,
|
||||||
radiotoggle,
|
radiotoggle,
|
||||||
|
radioenable,
|
||||||
|
radiodisable,
|
||||||
radiochannelincrease,
|
radiochannelincrease,
|
||||||
radiochanneldecrease,
|
radiochanneldecrease,
|
||||||
radiostopsend,
|
radiostopsend,
|
||||||
|
radiostopenable,
|
||||||
|
radiostopdisable,
|
||||||
radiostoptest,
|
radiostoptest,
|
||||||
radiocall3send,
|
radiocall3send,
|
||||||
radiovolumeincrease,
|
radiovolumeincrease,
|
||||||
@@ -211,10 +217,20 @@ enum class user_command {
|
|||||||
redmarkerenableright,
|
redmarkerenableright,
|
||||||
redmarkerdisableright,
|
redmarkerdisableright,
|
||||||
headlighttogglerearleft,
|
headlighttogglerearleft,
|
||||||
|
headlightenablerearleft,
|
||||||
|
headlightdisablerearleft,
|
||||||
headlighttogglerearright,
|
headlighttogglerearright,
|
||||||
|
headlightenablerearright,
|
||||||
|
headlightdisablerearright,
|
||||||
headlighttogglerearupper,
|
headlighttogglerearupper,
|
||||||
|
headlightenablerearupper,
|
||||||
|
headlightdisablerearupper,
|
||||||
redmarkertogglerearleft,
|
redmarkertogglerearleft,
|
||||||
|
redmarkerenablerearleft,
|
||||||
|
redmarkerdisablerearleft,
|
||||||
redmarkertogglerearright,
|
redmarkertogglerearright,
|
||||||
|
redmarkerenablerearright,
|
||||||
|
redmarkerdisablerearright,
|
||||||
redmarkerstoggle,
|
redmarkerstoggle,
|
||||||
endsignalstoggle,
|
endsignalstoggle,
|
||||||
headlightsdimtoggle,
|
headlightsdimtoggle,
|
||||||
@@ -236,7 +252,11 @@ enum class user_command {
|
|||||||
instrumentlightenable,
|
instrumentlightenable,
|
||||||
instrumentlightdisable,
|
instrumentlightdisable,
|
||||||
dashboardlighttoggle,
|
dashboardlighttoggle,
|
||||||
|
dashboardlightenable,
|
||||||
|
dashboardlightdisable,
|
||||||
timetablelighttoggle,
|
timetablelighttoggle,
|
||||||
|
timetablelightenable,
|
||||||
|
timetablelightdisable,
|
||||||
generictoggle0,
|
generictoggle0,
|
||||||
generictoggle1,
|
generictoggle1,
|
||||||
generictoggle2,
|
generictoggle2,
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ driverkeyboard_input::default_bindings() {
|
|||||||
{ user_command::manualbrakeincrease, GLFW_KEY_KP_1 | keymodifier::control },
|
{ user_command::manualbrakeincrease, GLFW_KEY_KP_1 | keymodifier::control },
|
||||||
{ user_command::manualbrakedecrease, GLFW_KEY_KP_7 | keymodifier::control },
|
{ user_command::manualbrakedecrease, GLFW_KEY_KP_7 | keymodifier::control },
|
||||||
{ user_command::alarmchaintoggle, GLFW_KEY_B | keymodifier::shift | keymodifier::control },
|
{ user_command::alarmchaintoggle, GLFW_KEY_B | keymodifier::shift | keymodifier::control },
|
||||||
|
// alarmchainenable,
|
||||||
|
// alarmchaindisable,
|
||||||
{ user_command::wheelspinbrakeactivate, GLFW_KEY_KP_ENTER },
|
{ user_command::wheelspinbrakeactivate, GLFW_KEY_KP_ENTER },
|
||||||
{ user_command::sandboxactivate, GLFW_KEY_S | keymodifier::shift },
|
{ user_command::sandboxactivate, GLFW_KEY_S | keymodifier::shift },
|
||||||
// autosandboxtoggle,
|
// autosandboxtoggle,
|
||||||
@@ -135,9 +137,13 @@ driverkeyboard_input::default_bindings() {
|
|||||||
{ user_command::hornhighactivate, GLFW_KEY_S },
|
{ user_command::hornhighactivate, GLFW_KEY_S },
|
||||||
{ user_command::whistleactivate, GLFW_KEY_Z },
|
{ user_command::whistleactivate, GLFW_KEY_Z },
|
||||||
{ user_command::radiotoggle, GLFW_KEY_R | keymodifier::control },
|
{ user_command::radiotoggle, GLFW_KEY_R | keymodifier::control },
|
||||||
|
// radioenable
|
||||||
|
// radiodisable
|
||||||
{ user_command::radiochannelincrease, GLFW_KEY_EQUAL },
|
{ user_command::radiochannelincrease, GLFW_KEY_EQUAL },
|
||||||
{ user_command::radiochanneldecrease, GLFW_KEY_MINUS },
|
{ user_command::radiochanneldecrease, GLFW_KEY_MINUS },
|
||||||
{ user_command::radiostopsend, GLFW_KEY_PAUSE | keymodifier::shift | keymodifier::control },
|
{ user_command::radiostopsend, GLFW_KEY_PAUSE | keymodifier::shift | keymodifier::control },
|
||||||
|
// radiostopenable
|
||||||
|
// radiostopdisable
|
||||||
{ user_command::radiostoptest, GLFW_KEY_R | keymodifier::shift | keymodifier::control },
|
{ user_command::radiostoptest, GLFW_KEY_R | keymodifier::shift | keymodifier::control },
|
||||||
{ user_command::radiocall3send, GLFW_KEY_BACKSPACE },
|
{ user_command::radiocall3send, GLFW_KEY_BACKSPACE },
|
||||||
// radiovolumeincrease,
|
// radiovolumeincrease,
|
||||||
@@ -216,10 +222,20 @@ driverkeyboard_input::default_bindings() {
|
|||||||
// redmarkerenableright,
|
// redmarkerenableright,
|
||||||
// redmarkerdisableright,
|
// redmarkerdisableright,
|
||||||
{ user_command::headlighttogglerearleft, GLFW_KEY_Y | keymodifier::control },
|
{ user_command::headlighttogglerearleft, GLFW_KEY_Y | keymodifier::control },
|
||||||
|
// headlightenablerearleft
|
||||||
|
// headlightdisablerearleft
|
||||||
{ user_command::headlighttogglerearright, GLFW_KEY_I | keymodifier::control },
|
{ user_command::headlighttogglerearright, GLFW_KEY_I | keymodifier::control },
|
||||||
|
// headlightenablerearright
|
||||||
|
// headlightdisablerearright
|
||||||
{ user_command::headlighttogglerearupper, GLFW_KEY_U | keymodifier::control },
|
{ user_command::headlighttogglerearupper, GLFW_KEY_U | keymodifier::control },
|
||||||
|
// headlightenablerearupper
|
||||||
|
// headlightdisablerearupper
|
||||||
{ user_command::redmarkertogglerearleft, GLFW_KEY_Y | keymodifier::control | keymodifier::shift },
|
{ user_command::redmarkertogglerearleft, GLFW_KEY_Y | keymodifier::control | keymodifier::shift },
|
||||||
|
// redmarkerenablerearleft
|
||||||
|
// redmarkerdisablerearleft
|
||||||
{ user_command::redmarkertogglerearright, GLFW_KEY_I | keymodifier::control | keymodifier::shift },
|
{ user_command::redmarkertogglerearright, GLFW_KEY_I | keymodifier::control | keymodifier::shift },
|
||||||
|
// redmarkerenablerearright
|
||||||
|
// redmarkerdisablerearright
|
||||||
{ user_command::redmarkerstoggle, GLFW_KEY_E | keymodifier::shift },
|
{ user_command::redmarkerstoggle, GLFW_KEY_E | keymodifier::shift },
|
||||||
{ user_command::endsignalstoggle, GLFW_KEY_E },
|
{ user_command::endsignalstoggle, GLFW_KEY_E },
|
||||||
{ user_command::headlightsdimtoggle, GLFW_KEY_L | keymodifier::control },
|
{ user_command::headlightsdimtoggle, GLFW_KEY_L | keymodifier::control },
|
||||||
@@ -241,7 +257,11 @@ driverkeyboard_input::default_bindings() {
|
|||||||
// instrumentlightenable,
|
// instrumentlightenable,
|
||||||
// instrumentlightdisable,
|
// instrumentlightdisable,
|
||||||
{ user_command::dashboardlighttoggle, GLFW_KEY_SEMICOLON | keymodifier::shift },
|
{ user_command::dashboardlighttoggle, GLFW_KEY_SEMICOLON | keymodifier::shift },
|
||||||
|
// dashboardlightenable
|
||||||
|
// dashboardlightdisable
|
||||||
{ user_command::timetablelighttoggle, GLFW_KEY_APOSTROPHE | keymodifier::shift },
|
{ user_command::timetablelighttoggle, GLFW_KEY_APOSTROPHE | keymodifier::shift },
|
||||||
|
// timetablelightenable
|
||||||
|
// timetablelightdisable
|
||||||
{ user_command::generictoggle0, GLFW_KEY_0 },
|
{ user_command::generictoggle0, GLFW_KEY_0 },
|
||||||
{ user_command::generictoggle1, GLFW_KEY_1 },
|
{ user_command::generictoggle1, GLFW_KEY_1 },
|
||||||
{ user_command::generictoggle2, GLFW_KEY_2 },
|
{ user_command::generictoggle2, GLFW_KEY_2 },
|
||||||
|
|||||||
@@ -550,6 +550,12 @@ drivermouse_input::default_bindings() {
|
|||||||
{ "alarmchain:", {
|
{ "alarmchain:", {
|
||||||
user_command::alarmchaintoggle,
|
user_command::alarmchaintoggle,
|
||||||
user_command::none } },
|
user_command::none } },
|
||||||
|
{ "alarmchainon:", {
|
||||||
|
user_command::alarmchainenable,
|
||||||
|
user_command::none} },
|
||||||
|
{ "alarmchainoff:", {
|
||||||
|
user_command::alarmchainenable,
|
||||||
|
user_command::none} },
|
||||||
{ "brakeprofile_sw:", {
|
{ "brakeprofile_sw:", {
|
||||||
user_command::brakeactingspeedincrease,
|
user_command::brakeactingspeedincrease,
|
||||||
user_command::brakeactingspeeddecrease } },
|
user_command::brakeactingspeeddecrease } },
|
||||||
@@ -770,6 +776,12 @@ drivermouse_input::default_bindings() {
|
|||||||
{ "radio_sw:", {
|
{ "radio_sw:", {
|
||||||
user_command::radiotoggle,
|
user_command::radiotoggle,
|
||||||
user_command::none } },
|
user_command::none } },
|
||||||
|
{ "radioon_sw:", {
|
||||||
|
user_command::radioenable,
|
||||||
|
user_command::none } },
|
||||||
|
{ "radiooff_sw:", {
|
||||||
|
user_command::radiodisable,
|
||||||
|
user_command::none } },
|
||||||
{ "radiochannel_sw:", {
|
{ "radiochannel_sw:", {
|
||||||
user_command::radiochannelincrease,
|
user_command::radiochannelincrease,
|
||||||
user_command::radiochanneldecrease } },
|
user_command::radiochanneldecrease } },
|
||||||
@@ -782,6 +794,12 @@ drivermouse_input::default_bindings() {
|
|||||||
{ "radiostop_sw:", {
|
{ "radiostop_sw:", {
|
||||||
user_command::radiostopsend,
|
user_command::radiostopsend,
|
||||||
user_command::none } },
|
user_command::none } },
|
||||||
|
{ "radiostopon_sw:", {
|
||||||
|
user_command::radiostopenable,
|
||||||
|
user_command::none } },
|
||||||
|
{ "radiostopoff_sw:", {
|
||||||
|
user_command::radiostopdisable,
|
||||||
|
user_command::none } },
|
||||||
{ "radiotest_sw:", {
|
{ "radiotest_sw:", {
|
||||||
user_command::radiostoptest,
|
user_command::radiostoptest,
|
||||||
user_command::none } },
|
user_command::none } },
|
||||||
@@ -851,9 +869,21 @@ drivermouse_input::default_bindings() {
|
|||||||
{ "dashboardlight_sw:", {
|
{ "dashboardlight_sw:", {
|
||||||
user_command::dashboardlighttoggle,
|
user_command::dashboardlighttoggle,
|
||||||
user_command::none } },
|
user_command::none } },
|
||||||
|
{ "dashboardlighton_sw:", {
|
||||||
|
user_command::dashboardlightenable,
|
||||||
|
user_command::none } },
|
||||||
|
{ "dashboardlightoff_sw:", {
|
||||||
|
user_command::dashboardlightdisable,
|
||||||
|
user_command::none } },
|
||||||
{ "timetablelight_sw:", {
|
{ "timetablelight_sw:", {
|
||||||
user_command::timetablelighttoggle,
|
user_command::timetablelighttoggle,
|
||||||
user_command::none } },
|
user_command::none } },
|
||||||
|
{ "timetablelighton_sw:", {
|
||||||
|
user_command::timetablelightenable,
|
||||||
|
user_command::none } },
|
||||||
|
{ "timetablelightoff_sw:", {
|
||||||
|
user_command::timetablelightdisable,
|
||||||
|
user_command::none } },
|
||||||
{ "cablight_sw:", {
|
{ "cablight_sw:", {
|
||||||
user_command::interiorlighttoggle,
|
user_command::interiorlighttoggle,
|
||||||
user_command::none } },
|
user_command::none } },
|
||||||
|
|||||||
@@ -434,6 +434,12 @@ std::unordered_map<std::string, vr_openvr::button_bindings> vr_openvr::m_buttonb
|
|||||||
{ "alarmchain:", {
|
{ "alarmchain:", {
|
||||||
user_command::alarmchaintoggle,
|
user_command::alarmchaintoggle,
|
||||||
user_command::none } },
|
user_command::none } },
|
||||||
|
{ "alarmchainon:", {
|
||||||
|
user_command::alarmchainenable,
|
||||||
|
user_command::none} },
|
||||||
|
{ "alarmchainoff:", {
|
||||||
|
user_command::alarmchainenable,
|
||||||
|
user_command::none} },
|
||||||
{ "brakeprofile_sw:", {
|
{ "brakeprofile_sw:", {
|
||||||
user_command::brakeactingspeedincrease,
|
user_command::brakeactingspeedincrease,
|
||||||
user_command::brakeactingspeeddecrease } },
|
user_command::brakeactingspeeddecrease } },
|
||||||
@@ -651,6 +657,12 @@ std::unordered_map<std::string, vr_openvr::button_bindings> vr_openvr::m_buttonb
|
|||||||
{ "radio_sw:", {
|
{ "radio_sw:", {
|
||||||
user_command::radiotoggle,
|
user_command::radiotoggle,
|
||||||
user_command::none } },
|
user_command::none } },
|
||||||
|
{ "radioon_sw:", {
|
||||||
|
user_command::radioenable,
|
||||||
|
user_command::none } },
|
||||||
|
{ "radiooff_sw:", {
|
||||||
|
user_command::radiodisable,
|
||||||
|
user_command::none } },
|
||||||
{ "radiochannel_sw:", {
|
{ "radiochannel_sw:", {
|
||||||
user_command::radiochannelincrease,
|
user_command::radiochannelincrease,
|
||||||
user_command::radiochanneldecrease } },
|
user_command::radiochanneldecrease } },
|
||||||
@@ -663,6 +675,12 @@ std::unordered_map<std::string, vr_openvr::button_bindings> vr_openvr::m_buttonb
|
|||||||
{ "radiostop_sw:", {
|
{ "radiostop_sw:", {
|
||||||
user_command::radiostopsend,
|
user_command::radiostopsend,
|
||||||
user_command::none } },
|
user_command::none } },
|
||||||
|
{ "radiostopon_sw:", {
|
||||||
|
user_command::radiostopenable,
|
||||||
|
user_command::none } },
|
||||||
|
{ "radiostopoff_sw:", {
|
||||||
|
user_command::radiostopdisable,
|
||||||
|
user_command::none } },
|
||||||
{ "radiotest_sw:", {
|
{ "radiotest_sw:", {
|
||||||
user_command::radiostoptest,
|
user_command::radiostoptest,
|
||||||
user_command::none } },
|
user_command::none } },
|
||||||
@@ -729,9 +747,21 @@ std::unordered_map<std::string, vr_openvr::button_bindings> vr_openvr::m_buttonb
|
|||||||
{ "dashboardlight_sw:", {
|
{ "dashboardlight_sw:", {
|
||||||
user_command::dashboardlighttoggle,
|
user_command::dashboardlighttoggle,
|
||||||
user_command::none } },
|
user_command::none } },
|
||||||
|
{ "dashboardlighton_sw:", {
|
||||||
|
user_command::dashboardlightenable,
|
||||||
|
user_command::none } },
|
||||||
|
{ "dashboardlightoff_sw:", {
|
||||||
|
user_command::dashboardlightdisable,
|
||||||
|
user_command::none } },
|
||||||
{ "timetablelight_sw:", {
|
{ "timetablelight_sw:", {
|
||||||
user_command::timetablelighttoggle,
|
user_command::timetablelighttoggle,
|
||||||
user_command::none } },
|
user_command::none } },
|
||||||
|
{ "timetablelighton_sw:", {
|
||||||
|
user_command::timetablelightenable,
|
||||||
|
user_command::none } },
|
||||||
|
{ "timetablelightoff_sw:", {
|
||||||
|
user_command::timetablelightdisable,
|
||||||
|
user_command::none } },
|
||||||
{ "cablight_sw:", {
|
{ "cablight_sw:", {
|
||||||
user_command::interiorlighttoggle,
|
user_command::interiorlighttoggle,
|
||||||
user_command::none } },
|
user_command::none } },
|
||||||
@@ -942,4 +972,3 @@ std::unordered_map<std::string, vr_openvr::button_bindings> vr_openvr::m_buttonb
|
|||||||
};
|
};
|
||||||
|
|
||||||
bool vr_openvr::backend_register = vr_interface_factory::get_instance()->register_backend("openvr", vr_openvr::create_func);
|
bool vr_openvr::backend_register = vr_interface_factory::get_instance()->register_backend("openvr", vr_openvr::create_func);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user