Skip to content

Commit

Permalink
Correct smoker startup behavior in some circumstances.
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenPanzerProject committed Jan 27, 2020
1 parent 7021552 commit d884c81
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions OpenPanzerTCB/Smoker.ino
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ void DisableSmoker()
{
if (SmokerEnabled)
{
// If they disable while the engine is running, we need to auto turn it off
if (EngineRunning) ShutdownSmoker(TransmissionEngaged);

// Disable smoker
SmokerEnabled = false;
if (DEBUG) { DebugSerial->println(F("Smoker disabled")); }

// Also, if they disable while the engine is running, we need to auto turn it off
if (EngineRunning) ShutdownSmoker(TransmissionEngaged);
}
}

Expand All @@ -58,7 +59,7 @@ void StopSmoker(void)
}
void StartSmoker(boolean engaged)
{
if (eeprom.ramcopy.SmokerControlAuto)
if (eeprom.ramcopy.SmokerControlAuto && SmokerEnabled)
{
Smoker->Startup(engaged);
}
Expand Down

0 comments on commit d884c81

Please sign in to comment.