aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-11-03 11:05:41 +0200
committerShlomo Hecht <shlomo@twine-s.com>2019-11-03 11:05:41 +0200
commit732d7aaededc72fd28eca57e5a5ffb89ab29a9ef (patch)
tree13db6b044ccdae6a93d79d9ce59cee7f3f405928 /Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c
parentef601f78d1e17cefc5bb4df82b4108d93cdea9dc (diff)
downloadTango-732d7aaededc72fd28eca57e5a5ffb89ab29a9ef.tar.gz
Tango-732d7aaededc72fd28eca57e5a5ffb89ab29a9ef.zip
add job end error codes. turn off safety alarms when cleared.improve idle/power on/off sequences
Diffstat (limited to 'Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c')
-rw-r--r--Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c
index 67e86397c..285c6ee74 100644
--- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c
+++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c
@@ -89,6 +89,7 @@ uint32_t PowerOffInit(void)
PowerOffMachineState++;
StopInitSequence();
setmachineActive(true);
+ PowerIdleOutOfIdleState();
PowerOffInProcess = true;
PowerOffControlId = AddControlCallback("PowerOff", PowerOffScheduler, eOneSecond, TemplateDataReadCBFunction,0,0, 0 );
SetMachineStatus(MACHINE_STATE__PowerOff);
@@ -114,7 +115,7 @@ uint32_t PowerOffHeadCleanCallback(uint32_t DispenserId, uint32_t ReadValue)
SafeRemoveControlCallback(PowerOffHeadCleanControlId, PowerOffHeadCleanCallback );
PowerOffHeadCleanControlId = 0xFF;
PowerOffMachineState++;
-
+ SetMachineStatus(MACHINE_STATE__PowerOff);
}
return OK;
}
@@ -139,6 +140,7 @@ uint32_t PowerOffHeadClean(void)
{
LOG_ERROR(0,"Clean job failed");
PowerOffMachineState++;
+ SetMachineStatus(MACHINE_STATE__PowerOff);
}
// if ( PowerOffHeadCleanControlId == 0xFF)
// return ERROR;
@@ -311,6 +313,7 @@ uint32_t PowerOffStopRunningJob(void)
if (JobIsActive())
{
REPORT_MSG (PowerOffMachineState, "Stop running job");
+ JobEndReason = JOB_ABORTED_BY_USER;
AbortJob("Power off pressed");
}
PowerOffMachineState++;