Index: firmware/App/Controllers/DGInterface.c =================================================================== diff -u -r633861a3e472c1a288fa10a52ec0f7e7153e4dce -rb32dd9e582f74d0ddc106a0d0b1efa8974c08c4d --- firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 633861a3e472c1a288fa10a52ec0f7e7153e4dce) +++ firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision b32dd9e582f74d0ddc106a0d0b1efa8974c08c4d) @@ -922,7 +922,27 @@ return hasCommandResp; } +/*********************************************************************//** + * @brief + * The checkDGRestart function checks to see if DG has restarted after started + * by HD and triggers appropriate alarm. + * @details Inputs: dgStarted + * @details Outputs: triggers a fault alarm if DG restarted + * @return none + *************************************************************************/ +void checkDGRestart( void ) +{ + if ( TRUE == dgStarted ) + { + if ( ( DG_MODE_FAUL != dgCurrentOpMode ) && ( DG_MODE_CIRC != dgCurrentOpMode ) && + ( DG_MODE_FILL != dgCurrentOpMode ) && ( DG_MODE_DRAI != dgCurrentOpMode ) ) + { + activateAlarmNoData( ALARM_ID_DG_RESTARTED_FAULT ); + } + } +} + /************************************************************************* * TEST SUPPORT FUNCTIONS *************************************************************************/ Index: firmware/App/Controllers/DGInterface.h =================================================================== diff -u -r633861a3e472c1a288fa10a52ec0f7e7153e4dce -rb32dd9e582f74d0ddc106a0d0b1efa8974c08c4d --- firmware/App/Controllers/DGInterface.h (.../DGInterface.h) (revision 633861a3e472c1a288fa10a52ec0f7e7153e4dce) +++ firmware/App/Controllers/DGInterface.h (.../DGInterface.h) (revision b32dd9e582f74d0ddc106a0d0b1efa8974c08c4d) @@ -156,6 +156,8 @@ void handleDGCommandResponse( DG_CMD_RESPONSE_T *dgCmdRespPtr ); BOOL getDGCommandResponse( U32 commandID, DG_CMD_RESPONSE_T *cmdRespPtr ); + +void checkDGRestart( void ); BOOL testSetDialOutLoadCellWeightOverride( U32 sensor, F32 value ); BOOL testResetDialOutLoadCellWeightOverride( U32 sensor ); Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -red3e4d4180a4c0f08af285426c247aadfc685847 -rb32dd9e582f74d0ddc106a0d0b1efa8974c08c4d --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision ed3e4d4180a4c0f08af285426c247aadfc685847) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision b32dd9e582f74d0ddc106a0d0b1efa8974c08c4d) @@ -191,7 +191,12 @@ void checkInFromDG( void ) { dgIsCommunicating = TRUE; - timeOfLastDGCheckIn = getMSTimerCount(); + timeOfLastDGCheckIn = getMSTimerCount(); + + if ( TRUE == isAlarmActive( ALARM_ID_DG_COMM_TIMEOUT ) ) + { + clearAlarm( ALARM_ID_DG_COMM_TIMEOUT ); + } } /*********************************************************************//** @@ -933,6 +938,7 @@ } if ( TRUE == didTimeout( timeOfLastDGCheckIn, DG_COMM_TIMEOUT_IN_MS ) ) { + activateAlarmNoData( ALARM_ID_DG_COMM_TIMEOUT ); dgIsCommunicating = FALSE; } } Index: firmware/App/Tasks/TaskGeneral.c =================================================================== diff -u -r766708fceb0bdf1af8c7897df29d4f5036bfd3db -rb32dd9e582f74d0ddc106a0d0b1efa8974c08c4d --- firmware/App/Tasks/TaskGeneral.c (.../TaskGeneral.c) (revision 766708fceb0bdf1af8c7897df29d4f5036bfd3db) +++ firmware/App/Tasks/TaskGeneral.c (.../TaskGeneral.c) (revision b32dd9e582f74d0ddc106a0d0b1efa8974c08c4d) @@ -55,6 +55,9 @@ // Check in with watchdog manager checkInWithWatchdogMgmt( TASK_GENERAL ); // Do this first to keep timing consistent with watchdog management + + // Check if DG restarted + checkDGRestart(); // Manage data received from other sub-systems execSystemCommRx();