diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-07-15 15:17:46 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-07-15 15:17:46 +0300 |
| commit | 2cee68f95ca7cb2dd1ebad34fd80cc583a08c02e (patch) | |
| tree | 127b949cc836bd7d70bc1deeb8970383b63ae46d /Software/Embedded_SW/Embedded/StateMachines | |
| parent | 3a674ea0ef5c71843bd876da3bb5e0b0f535110e (diff) | |
| download | Tango-2cee68f95ca7cb2dd1ebad34fd80cc583a08c02e.tar.gz Tango-2cee68f95ca7cb2dd1ebad34fd80cc583a08c02e.zip | |
coordinate between heaters process and job progress (semaphors might be needed)
Diffstat (limited to 'Software/Embedded_SW/Embedded/StateMachines')
| -rw-r--r-- | Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c | 9 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c index 429d81f46..f135cec56 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c @@ -131,7 +131,15 @@ static ReturnCode ValidateState(void *JobDetails) return retcode; } +//******************************************************************************************************************** +bool GetHeatersPrepareWaiting(void) +{ + if (PrepareWaiting[Module_Heaters] == ModuleWaiting) + return true; + else + return false; +} //******************************************************************************************************************** static ReturnCode PrepareState(void *JobDetails) { @@ -194,6 +202,7 @@ uint32_t PrepareReady(int ModuleId, ModuleStateEnum result) if (PrepareWaiting[ModuleId] != ModuleWaiting) { LOG_ERROR (ModuleId, "Message from unrelated module!!"); + return ERROR; } PrepareWaiting[ModuleId] = result; diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h b/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h index 8bdecbaa1..4d5c9ac6f 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h @@ -144,5 +144,6 @@ uint32_t DistanceToSpoolReady(int ModuleId, ModuleStateEnum result); uint32_t PrintingHWConfiguration(void *Configuration); uint32_t EndState(void *JobDetails, char *Message); +bool GetHeatersPrepareWaiting(void); #endif /* STATEMACHINES_PRINTSTM_H_ */ |
