diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2020-10-14 14:50:51 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2020-10-14 14:50:51 +0300 |
| commit | 4f6c4ab918bb92b91051633eab83c3b1b5e8b4dc (patch) | |
| tree | 783c3dafa5e563c85162fb3338e3e80d5854d94e /Software/Embedded_SW/Embedded/StateMachines/Initialization | |
| parent | 7e83c1a8c4d78a6a53825bed9bb2c40e00926bbf (diff) | |
| download | Tango-4f6c4ab918bb92b91051633eab83c3b1b5e8b4dc.tar.gz Tango-4f6c4ab918bb92b91051633eab83c3b1b5e8b4dc.zip | |
winder prepare failure fix. cancel cleaning job on power down.
Diffstat (limited to 'Software/Embedded_SW/Embedded/StateMachines/Initialization')
| -rw-r--r-- | Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c | 13 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c index 8f6f2a781..d3ef81a50 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c @@ -71,6 +71,12 @@ bool PowerOffInProcess = false; #define POWER_OFF_TEMP_THRESHOLD 5000 //50 celsious int32_t PowerOffTemperatureThreshold = POWER_OFF_TEMP_THRESHOLD; +bool PowerOffDisableCleaning = false; +void setPowerOffDisableCleaning (bool value) +{ + PowerOffDisableCleaning = value; + REPORT_MSG(PowerOffDisableCleaning, "Set PowerOffDisableCleaning"); +} bool PowerOffInProcessGetState(void) { return PowerOffInProcess; @@ -140,6 +146,13 @@ uint32_t PowerOffHeadClean(void) //TBD if (AutoHoming_Config >= AutoHoming_PowerOff ) AutoHoming_Config = AutoHoming_JobEnd_PowerOn_off; + if (PowerOffDisableCleaning == true) + { + LOG_ERROR(0,"Clean job skipped!!!!!!!"); + PowerOffMachineState++; + SetMachineStatus(MACHINE_STATE__PowerOff); + return OK; + } if (ThreadCleaningJob(50) == OK) { if (PowerOffHeadCleanControlId != 0xFF) diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.h b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.h index 5f347c5ba..10dd4c71e 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.h +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.h @@ -35,6 +35,7 @@ void PowerOffSetTemperatureThreshold (int32_t temperature); //celsius temperatur bool PowerOffInProcessGetState(void); uint32_t PowerOffHeatersOff(void); +void setPowerOffDisableCleaning (bool value); uint32_t PowerDownUpdateFunc(MessageContainer* requestContainer); uint32_t AbortPowerDownFunc(MessageContainer* requestContainer); |
