mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-20 19:44:58 +01:00
Merge pull request #269 from MaSzyna-EU07/fix/diesel-smoke-after-ignition
Diesel exhaust smoke only once the engine fires (eu07/maszyna#523)
This commit is contained in:
@@ -8019,6 +8019,9 @@ bool TMoverParameters::dizel_Update(double dt)
|
||||
WaterHeaterCheck(dt);
|
||||
OilPumpCheck(dt);
|
||||
FuelPumpCheck(dt);
|
||||
// the engine being started fires once the starter has turned it a while; one stopped meanwhile starts over
|
||||
dizel_FiringCountdown = (Mains ? std::max(0.0, dizel_FiringCountdown - dt) : 0.0);
|
||||
|
||||
if (true == dizel_startup && true == dizel_StartupCheck())
|
||||
{
|
||||
dizel_ignition = true;
|
||||
@@ -8033,6 +8036,7 @@ bool TMoverParameters::dizel_Update(double dt)
|
||||
LastSwitchingTime = 0;
|
||||
Mains = true;
|
||||
dizel_spinup = true;
|
||||
dizel_FiringCountdown = dizel_SmokeDelay;
|
||||
enrot = std::max(enrot,
|
||||
0.35 * ( // TODO: dac zaleznie od temperatury i baterii
|
||||
EngineType == TEngineType::DieselEngine ? dizel_nmin : DElist[0].RPM / 60.0));
|
||||
@@ -11671,6 +11675,9 @@ void TMoverParameters::LoadFIZ_Engine(std::string const &Input)
|
||||
// oil pump
|
||||
extract_value(OilPump.pressure_minimum, "OilMinPressure", Input, "");
|
||||
extract_value(OilPump.pressure_maximum, "OilMaxPressure", Input, "");
|
||||
// the time the starter turns the engine before it fires and smokes (eu07/maszyna#523)
|
||||
extract_value(dizel_SmokeDelay, "SmokeDelay", Input, "0");
|
||||
dizel_SmokeDelay = std::max(0.0, dizel_SmokeDelay);
|
||||
// engine cooling factore
|
||||
extract_value(dizel_heat.kw, "HeatKW", Input, "");
|
||||
extract_value(dizel_heat.kv, "HeatKV", Input, "");
|
||||
|
||||
Reference in New Issue
Block a user