18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-25 00:49:13 +01:00

feat: universal controller power demand in steps (UCList CtrlValStep)

The 6Dg sets its power demand in 5% steps, while the universal controller
(EIMCtrlType 3) ramped it continuously. A new optional UCList header key,
CtrlValStep (e.g. 0.05), makes the setting move in whole steps: one at once
when the controller is moved onto a raising or lowering position, then one
each time SpeedUp / SpeedDown covers a step, stopping at the position's set
value. Without the key (default 0) nothing changes.

Data (SVN, optional, after this): add CtrlValStep=0.05 to the UCList: line
of dynamic/pkp/6dg_v1/6dg.fiz (its variants include it).

(eu07/maszyna#412)
This commit is contained in:
jerrrrycho
2026-11-07 19:30:10 +01:00
parent 939e42b611
commit 0095551350
3 changed files with 184 additions and 5 deletions

View File

@@ -1727,6 +1727,10 @@ class TMoverParameters
bool UniCtrlIntegratedBrakeCtrl = false; /*zintegrowany nastawnik JH obsluguje hamowanie*/
bool UniCtrlIntegratedLocalBrakeCtrl = false; /*zintegrowany nastawnik JH obsluguje hamowanie hamulcem pomocniczym*/
int UniCtrlNoPowerPos{0}; // cached highesr position not generating traction force
// UCList CtrlValStep: the universal controller (EIMCtrlType 3) changes its setting in steps of this size (e.g. 0.05 for the
// 5% steps of the 6Dg), one at once when moved to a raising or lowering position, then one each time its SpeedUp / SpeedDown
// covers a step; 0 (the default) changes it continuously
double UniCtrlValStep{0.0};
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
/*-sekcja parametrow dla lokomotywy elektrycznej*/
@@ -2199,6 +2203,7 @@ class TMoverParameters
double eimic = 0; /*aktualna pozycja zintegrowanego sterowania jazda i hamowaniem*/
double eimic_analog = 0; /*pozycja zadajnika analogowa*/
double eimic_real = 0; /*faktycznie uzywana pozycja zintegrowanego sterowania jazda i hamowaniem*/
double eimic_step_progress{0.0}; // the part of the next UniCtrlValStep the controller has covered so far
double eim_localbrake = 0; /*nastawa hamowania dodatkowego pneumatycznego lokomotywy*/
int EIMCtrlType = 0; /*rodzaj wariantu zadajnika jazdy*/
bool SpeedCtrlTypeTime = false; /*czy tempomat sterowany czasowo*/