18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-19 21:34:58 +01:00

Merge pull request #280 from MaSzyna-EU07/feat/radio-fuse

Radio fuse: a cut-off in the radio's power supply (eu07/maszyna#438)
This commit is contained in:
2026-11-09 12:53:14 +00:00
committed by GitHub
16 changed files with 198 additions and 27 deletions

View File

@@ -1624,6 +1624,9 @@ class TMoverParameters
double EpForce = 0.0; /*Poziom zadanej sily EP*/
bool Signalling = false; /*Czy jest zalaczona sygnalizacja hamowania ostatniego wagonu*/
bool Radio = false; /*Czy jest zalaczony radiotelefon*/
// the cut-off in the radio's power supply: a fuse in the cabinet, a lever on the desk or the switch on the radio's power
// supply (eu07/maszyna#438). Closed unless the driver opens it, so vehicles without such a switch work as before
bool RadioFuse = true;
float NominalBatteryVoltage = 0.f; /*Winger - baterie w elektrykach*/
TDimension Dim; /*wymiary*/
double Cx = 0.0; /*wsp. op. aerodyn.*/
@@ -2549,10 +2552,10 @@ class TMoverParameters
auto const oilmanual{OilPump.start_type != start_t::automatic};
return (fuelmanual || oilmanual) && (false == fuelmanual || FuelPump.is_enabled) && (false == oilmanual || OilPump.is_enabled);
}
// whether the radio is switched on and has the low voltage to work
// whether the radio is switched on, its power supply isn't cut off and it has the low voltage to work
bool RadioPowered() const
{
return Radio && (Power24vIsAvailable || Power110vIsAvailable);
return Radio && RadioFuse && (Power24vIsAvailable || Power110vIsAvailable);
}
/*obrot kol uwzgledniajacy poslizg*/
double ComputeRotatingWheel(double WForce, double dt, double n) const;

View File

@@ -3146,7 +3146,7 @@ void TMoverParameters::SecuritySystemCheck(double dt)
bool isPower = Power24vIsAvailable || Power110vIsAvailable;
SecuritySystem.update(dt, Vel, isPower, CabActive);
if (!Battery || !Radio)
if (!Battery || !Radio || !RadioFuse)
{ // wyłączenie baterii deaktywuje sprzęt
RadiostopSwitch(false);
}