diff options
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
3 files changed, 23 insertions, 4 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c index 554e4d1ef..d5c186893 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c @@ -1407,6 +1407,8 @@ uint32_t ThreadLoadingReport(void) if (ThreadLoadingToken[0] == 0) return OK; + if (LoadStages == THREAD_LOAD_INIT) + return OK; if (MessageState == 0) { @@ -1485,7 +1487,7 @@ uint32_t ThreadLoadingRestartReport(void) //sending after a failure in the final response.has_state = true; response.state = THREAD_LOADING_STATE__ReadyForLoading; response.errorreason = DefaultErrSrt; - Report("ThreadLoadingReport",__FILE__,MessageState,response.state,RpWarning,(int)LoadStages,0); + Report("ThreadLoadingRestartReport",__FILE__,MessageState,response.state,RpWarning,(int)LoadStages,0); //------------------------------------------------------------------------------------------- responseContainer = createContainer(MESSAGE_TYPE__StartThreadLoadingResponse, ThreadLoadingToken, false, &response, &start_thread_loading_response__pack, &start_thread_loading_response__get_packed_size); responseContainer.has_continuous = true; diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h index c3f181b52..5d69e2980 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h @@ -88,7 +88,7 @@ uint32_t StartThreadLoadingFunc(MessageContainer* requestContainer); uint32_t ContinueThreadLoadingFunc(MessageContainer* requestContainer); uint32_t StopThreadLoadingFunc(MessageContainer* requestContainer); uint32_t TryThreadLoadingFunc(MessageContainer* requestContainer); - +void ThreadCheckArcHeadCovers(void); uint32_t Thread_Load_End(void); #endif diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index d7bfb1b6e..4f77104d4 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -1142,6 +1142,14 @@ uint32_t ThreadPrepareState(void *JobDetails) } } } + if ((Head_Type == HEAD_TYPE_ARC) && (JoggingJobActive == false)) { + if (FPGA_Read_limit_Switches(I2C_HEADCARD_COVER_LS_ARC) != LIMIT) { + ReportWithPackageFilter(ThreadFilter,"Dyeing head arc is open!!!",__FILE__,__LINE__,0,RpError,LIMIT,0); + } + if (FPGA_Read_limit_Switches(I2C_HEADCARD_COVER_LS_TUNNEL_ARC) != LIMIT) { + ReportWithPackageFilter(ThreadFilter,"Dyeing head arc tunnel is open!!!",__FILE__,__LINE__,0,RpError,LIMIT,0); + } + } // if ((FPGA_Read_limit_Switches(Motor_Id_to_LS_IdUp[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID]) == LIMIT)&&(JoggingJobActive == false)) if ((FPGA_Read_limit_Switches(Motor_Id_to_LS_IdDown[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID]) != LIMIT)&&(JoggingJobActive == false)) { @@ -1616,8 +1624,17 @@ char Endstr[150]; return OK; } - - +void ThreadCheckArcHeadCovers(void) +{ + if ((Head_Type == HEAD_TYPE_ARC) && (JoggingJobActive == false)) { + if (FPGA_Read_limit_Switches(I2C_HEADCARD_COVER_LS_ARC) != LIMIT) { + ReportWithPackageFilter(ThreadFilter,"Dyeing head arc is open!!!",__FILE__,__LINE__,0,RpError,LIMIT,0); + } + if (FPGA_Read_limit_Switches(I2C_HEADCARD_COVER_LS_TUNNEL_ARC) != LIMIT) { + ReportWithPackageFilter(ThreadFilter,"Dyeing head arc tunnel is open!!!",__FILE__,__LINE__,0,RpError,LIMIT,0); + } + } +} //******************************************************************************************************************** void ThreadStartPrinting(void) |
