mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-08 21:00:03 +01:00
Broadcast radio receiver in the cab
Plays internet radio streams (http, mp3) through a positional emitter in the cab, with analog tuning, inter-station noise and two speaker profiles. Stations are listed in fmradio.txt, cab controls are defined with fmradio entries in the .mmd file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -405,6 +405,13 @@ commanddescription_sequence Commands_descriptions = {
|
||||
{"wiperswitchincrease", command_target::vehicle, command_mode::oneoff},
|
||||
{"wiperswitchdecrease", command_target::vehicle, command_mode::oneoff},
|
||||
{"lightsset", command_target::vehicle, command_mode::oneoff},
|
||||
{"fmradiotoggle", command_target::vehicle, command_mode::oneoff},
|
||||
{"fmradiovolumeincrease", command_target::vehicle, command_mode::oneoff},
|
||||
{"fmradiovolumedecrease", command_target::vehicle, command_mode::oneoff},
|
||||
{"fmradiovolumeset", command_target::vehicle, command_mode::oneoff},
|
||||
{"fmradiotuneincrease", command_target::vehicle, command_mode::oneoff},
|
||||
{"fmradiotunedecrease", command_target::vehicle, command_mode::oneoff},
|
||||
{"fmradiotuneset", command_target::vehicle, command_mode::oneoff},
|
||||
};
|
||||
|
||||
// Maps of command and coresponding strings
|
||||
@@ -789,6 +796,13 @@ std::unordered_map<std::string, user_command> const commandMap = {
|
||||
{"wiperswitchincrease", user_command::wiperswitchincrease},
|
||||
{"wiperswitchdecrease", user_command::wiperswitchdecrease},
|
||||
{"lightsset", user_command::lightsset},
|
||||
{"fmradiotoggle", user_command::fmradiotoggle},
|
||||
{"fmradiovolumeincrease", user_command::fmradiovolumeincrease},
|
||||
{"fmradiovolumedecrease", user_command::fmradiovolumedecrease},
|
||||
{"fmradiovolumeset", user_command::fmradiovolumeset},
|
||||
{"fmradiotuneincrease", user_command::fmradiotuneincrease},
|
||||
{"fmradiotunedecrease", user_command::fmradiotunedecrease},
|
||||
{"fmradiotuneset", user_command::fmradiotuneset},
|
||||
{"none", user_command::none}};
|
||||
|
||||
} // namespace simulation
|
||||
|
||||
@@ -403,6 +403,13 @@ enum class user_command
|
||||
wiperswitchincrease,
|
||||
wiperswitchdecrease,
|
||||
lightsset,
|
||||
fmradiotoggle,
|
||||
fmradiovolumeincrease,
|
||||
fmradiovolumedecrease,
|
||||
fmradiovolumeset,
|
||||
fmradiotuneincrease,
|
||||
fmradiotunedecrease,
|
||||
fmradiotuneset,
|
||||
none = -1
|
||||
};
|
||||
|
||||
|
||||
@@ -816,6 +816,15 @@ drivermouse_input::default_bindings() {
|
||||
{ "radiovolumenext_sw:",{
|
||||
radiovolumeincrease,
|
||||
none } },
|
||||
{ "fmradio_sw:",{
|
||||
fmradiotoggle,
|
||||
none } },
|
||||
{ "fmradiovolume_sw:",{
|
||||
fmradiovolumeincrease,
|
||||
fmradiovolumedecrease } },
|
||||
{ "fmradiotune_sw:",{
|
||||
fmradiotuneincrease,
|
||||
fmradiotunedecrease } },
|
||||
{ "pantfront_sw:", {
|
||||
pantographtogglefront,
|
||||
none } },
|
||||
|
||||
Reference in New Issue
Block a user