mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-23 00:29:19 +02:00
Improve pantograph selector
- A new parameter has been added to .fiz file format, in the Switches: section: - PantographPresetDefault [0] - The 0-based index of a pantograph preset that should be chosen upon the vehicle creation. 0 by default mimicks the current behavior. - Fixed the selected pantograph configuration not being respected until the configuration has been changed.
This commit is contained in:
@@ -1205,6 +1205,7 @@ public:
|
||||
bool UniCtrlIntegratedLocalBrakeCtrl = false; /*zintegrowany nastawnik JH obsluguje hamowanie hamulcem pomocniczym*/
|
||||
int UniCtrlNoPowerPos{ 0 }; // cached highesr position not generating traction force
|
||||
std::pair<std::string, std::array<int, 2>> PantsPreset { "0132", { 0, 0 } }; // pantograph preset switches; .first holds possible setups as chars, .second holds currently selected preset in each cab
|
||||
int PantsPresetDefault = 0; // default pantograph preset, this is not updated during simulation
|
||||
|
||||
/*-sekcja parametrow dla lokomotywy elektrycznej*/
|
||||
TSchemeTable RList; /*lista rezystorow rozruchowych i polaczen silnikow, dla dizla: napelnienia*/
|
||||
|
||||
@@ -11100,6 +11100,7 @@ void TMoverParameters::LoadFIZ_Switches( std::string const &Input ) {
|
||||
std::remove( std::begin( presets ), std::end( presets ), '|' ),
|
||||
std::end( presets ) );
|
||||
}
|
||||
extract_value( PantsPresetDefault, "PantographPresetDefault", Input, "" );
|
||||
}
|
||||
|
||||
void TMoverParameters::LoadFIZ_MotorParamTable( std::string const &Input ) {
|
||||
|
||||
Reference in New Issue
Block a user