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

Battery button impulse behavior

This commit is contained in:
2025-02-16 23:07:36 +01:00
parent b252d4aacd
commit 7d27e6ce33
4 changed files with 163 additions and 33 deletions

View File

@@ -1139,6 +1139,9 @@ class TMoverParameters
int UniversalBrakeButtonFlag[3] = {0, 0, 0}; /* mozliwe działania przycisków hamulcowych */
int UniversalResetButtonFlag[3] = {0, 0, 0}; // customizable reset buttons assignments
int TurboTest = 0;
bool isBatteryButtonImpulse = false; // czy przelacznik baterii traktowac jako pojedynczy przycisk
bool shouldHoldBatteryButton = false; // czy nalezy przytrzymac przycisk baterii aby wlaczyc/wylaczyc baterie
float BatteryButtonHoldTime = 1.f; // minimalny czas przytrzymania przycisku baterii
double MaxBrakeForce = 0.0; /*maksymalna sila nacisku hamulca*/
double MaxBrakePress[5]; // pomocniczy, proz, sred, lad, pp
double P2FTrans = 0.0;

View File

@@ -10631,6 +10631,9 @@ void TMoverParameters::LoadFIZ_Cntrl( std::string const &line ) {
extract_value(isDoubleClickForMeasureNeeded, "DCMB", line, "");
extract_value(DistanceCounterDoublePressPeriod, "DCDPP", line, "");
extract_value(isBatteryButtonImpulse, "IBTB", line, "");
extract_value(shouldHoldBatteryButton, "SBBBH", line, "");
extract_value(BatteryButtonHoldTime, "BBHT", line, "");
std::map<std::string, start_t> starts {
{ "Disabled", start_t::disabled },