cancel cyclic mode upon error fail
This commit is contained in:
parent
d6bba90c84
commit
dca26680b4
|
@ -797,12 +797,24 @@ void loop()
|
||||||
|
|
||||||
ScreenManager.reqUpdate();
|
ScreenManager.reqUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(bHasHtrData) {
|
if(bHasHtrData) {
|
||||||
|
// apply exponential mean to the anlogue readings for some smoothing
|
||||||
updateFilteredData();
|
updateFilteredData();
|
||||||
FuelGauge.Integrate(HeaterFrame2.getPump_Actual());
|
|
||||||
}
|
// integrate fuel pump activity for fuel gauge
|
||||||
if(INBOUNDS(HeaterFrame2.getRunState(), 1, 5)) { // check for Low Voltage Cutout
|
FuelGauge.Integrate(getHeaterInfo().getPump_Actual());
|
||||||
SmartError.checkVolts(FilteredSamples.FastipVolts.getValue(), FilteredSamples.FastGlowAmps.getValue());
|
|
||||||
|
// test for low volts shutdown during normal run
|
||||||
|
if(INBOUNDS(getHeaterInfo().getRunState(), 1, 5)) { // check for Low Voltage Cutout
|
||||||
|
SmartError.checkVolts(FilteredSamples.FastipVolts.getValue(), FilteredSamples.FastGlowAmps.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
// trap being in state 0 with a heater error - cancel user on memory to avoid unexpected cyclic restarts
|
||||||
|
if(RTC_Store.getCyclicEngaged() && (getHeaterInfo().getRunState() == 0) && (getHeaterInfo().getErrState() > 1)) {
|
||||||
|
DebugPort.println("Forcing cyclic cancel due to error induced shutdown");
|
||||||
|
RTC_Store.setCyclicEngaged(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
updateJSONclients(bReportJSONData);
|
updateJSONclients(bReportJSONData);
|
||||||
CommState.set(CommStates::Idle);
|
CommState.set(CommStates::Idle);
|
||||||
|
@ -1500,15 +1512,16 @@ float getFanSpeed()
|
||||||
|
|
||||||
void updateFilteredData()
|
void updateFilteredData()
|
||||||
{
|
{
|
||||||
FilteredSamples.ipVolts.update(HeaterFrame2.getVoltage_Supply());
|
FilteredSamples.ipVolts.update(getHeaterInfo().getBattVoltage());
|
||||||
FilteredSamples.GlowVolts.update(HeaterFrame2.getGlowPlug_Voltage());
|
FilteredSamples.GlowVolts.update(getHeaterInfo().getGlow_Voltage());
|
||||||
FilteredSamples.GlowAmps.update(HeaterFrame2.getGlowPlug_Current());
|
FilteredSamples.GlowAmps.update(getHeaterInfo().getGlow_Current());
|
||||||
FilteredSamples.Fan.update(HeaterFrame2.getFan_Actual());
|
FilteredSamples.Fan.update(getHeaterInfo().getFan_Actual());
|
||||||
FilteredSamples.FastipVolts.update(HeaterFrame2.getVoltage_Supply());
|
FilteredSamples.FastipVolts.update(getHeaterInfo().getBattVoltage());
|
||||||
FilteredSamples.FastGlowAmps.update(HeaterFrame2.getGlowPlug_Current());
|
FilteredSamples.FastGlowAmps.update(getHeaterInfo().getGlow_Current());
|
||||||
}
|
}
|
||||||
|
|
||||||
int sysUptime()
|
int sysUptime()
|
||||||
{
|
{
|
||||||
return Clock.get().secondstime() - BootTime;
|
return Clock.get().secondstime() - BootTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -797,12 +797,24 @@ void loop()
|
||||||
|
|
||||||
ScreenManager.reqUpdate();
|
ScreenManager.reqUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(bHasHtrData) {
|
if(bHasHtrData) {
|
||||||
|
// apply exponential mean to the anlogue readings for some smoothing
|
||||||
updateFilteredData();
|
updateFilteredData();
|
||||||
FuelGauge.Integrate(HeaterFrame2.getPump_Actual());
|
|
||||||
}
|
// integrate fuel pump activity for fuel gauge
|
||||||
if(INBOUNDS(HeaterFrame2.getRunState(), 1, 5)) { // check for Low Voltage Cutout
|
FuelGauge.Integrate(getHeaterInfo().getPump_Actual());
|
||||||
SmartError.checkVolts(FilteredSamples.FastipVolts.getValue(), FilteredSamples.FastGlowAmps.getValue());
|
|
||||||
|
// test for low volts shutdown during normal run
|
||||||
|
if(INBOUNDS(getHeaterInfo().getRunState(), 1, 5)) { // check for Low Voltage Cutout
|
||||||
|
SmartError.checkVolts(FilteredSamples.FastipVolts.getValue(), FilteredSamples.FastGlowAmps.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
// trap being in state 0 with a heater error - cancel user on memory to avoid unexpected cyclic restarts
|
||||||
|
if(RTC_Store.getCyclicEngaged() && (getHeaterInfo().getRunState() == 0) && (getHeaterInfo().getErrState() > 1)) {
|
||||||
|
DebugPort.println("Forcing cyclic cancel due to error induced shutdown");
|
||||||
|
RTC_Store.setCyclicEngaged(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
updateJSONclients(bReportJSONData);
|
updateJSONclients(bReportJSONData);
|
||||||
CommState.set(CommStates::Idle);
|
CommState.set(CommStates::Idle);
|
||||||
|
@ -1500,15 +1512,16 @@ float getFanSpeed()
|
||||||
|
|
||||||
void updateFilteredData()
|
void updateFilteredData()
|
||||||
{
|
{
|
||||||
FilteredSamples.ipVolts.update(HeaterFrame2.getVoltage_Supply());
|
FilteredSamples.ipVolts.update(getHeaterInfo().getBattVoltage());
|
||||||
FilteredSamples.GlowVolts.update(HeaterFrame2.getGlowPlug_Voltage());
|
FilteredSamples.GlowVolts.update(getHeaterInfo().getGlow_Voltage());
|
||||||
FilteredSamples.GlowAmps.update(HeaterFrame2.getGlowPlug_Current());
|
FilteredSamples.GlowAmps.update(getHeaterInfo().getGlow_Current());
|
||||||
FilteredSamples.Fan.update(HeaterFrame2.getFan_Actual());
|
FilteredSamples.Fan.update(getHeaterInfo().getFan_Actual());
|
||||||
FilteredSamples.FastipVolts.update(HeaterFrame2.getVoltage_Supply());
|
FilteredSamples.FastipVolts.update(getHeaterInfo().getBattVoltage());
|
||||||
FilteredSamples.FastGlowAmps.update(HeaterFrame2.getGlowPlug_Current());
|
FilteredSamples.FastGlowAmps.update(getHeaterInfo().getGlow_Current());
|
||||||
}
|
}
|
||||||
|
|
||||||
int sysUptime()
|
int sysUptime()
|
||||||
{
|
{
|
||||||
return Clock.get().secondstime() - BootTime;
|
return Clock.get().secondstime() - BootTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -120,6 +120,11 @@ struct sHomeMenuActions {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct sHourMeter {
|
||||||
|
unsigned long RunTime;
|
||||||
|
unsigned long GlowTime;
|
||||||
|
};
|
||||||
|
|
||||||
struct sCyclicThermostat {
|
struct sCyclicThermostat {
|
||||||
int8_t Stop;
|
int8_t Stop;
|
||||||
int8_t Start;
|
int8_t Start;
|
||||||
|
|
Loading…
Reference in a new issue