Index: firmware/App/Services/SystemCommRO.c =================================================================== diff -u -r533272e6ef2873fcfe7a41338a6c88c7a601605d -r129a1c2f4343bc85efdb4767c2dec35e4ba8ce98 --- firmware/App/Services/SystemCommRO.c (.../SystemCommRO.c) (revision 533272e6ef2873fcfe7a41338a6c88c7a601605d) +++ firmware/App/Services/SystemCommRO.c (.../SystemCommRO.c) (revision 129a1c2f4343bc85efdb4767c2dec35e4ba8ce98) @@ -21,9 +21,7 @@ // ********** private definitions ********** -#define UI_COMM_TIMEOUT_IN_MS 7500 // TODO remove? ///< Maximum time (in ms) that UI is allowed to wait before checking in with HD. -#define UI_COMM_SERVICE_MODE_TIMEOUT_IN_MS (2 * SEC_PER_MIN * MS_PER_SECOND) // TODO remove? ///< Maximum time (in ms) that UI is allowed to wait before checking in with HD when in service mode. -#define DG_COMM_TIMEOUT_IN_MS 1000 // TODO remove? ///< DG has not checked in for this much time +#define DG_COMM_TIMEOUT_IN_MS 1000 ///< DD has not checked in for this much time #define MAX_COMM_CRC_FAILURES 5 ///< Maximum number of CRC errors within window period before alarm #define MAX_COMM_CRC_FAILURE_WINDOW_MS (10 * SEC_PER_MIN * MS_PER_SECOND) ///< CRC error window @@ -55,7 +53,7 @@ // ********** private data ********** -static volatile BOOL tdIsOnlyCANNode = TRUE; ///< Flag indicating whether HD is alone on CAN bus. +static volatile BOOL roIsOnlyCANNode = TRUE; ///< Flag indicating whether RO is alone on CAN bus. static volatile BOOL ddIsCommunicating = FALSE; ///< Has DD sent a message since last check static U32 timeOfLastDDCheckIn = 0; ///< Last time DD checked in static volatile BOOL uiIsCommunicating = FALSE; ///< Has UI sent a message since last check @@ -67,8 +65,8 @@ /*********************************************************************//** * @brief - * The initSystemCommTD function initializes the system communication unit - * for the TD firmware. + * The initSystemCommRO function initializes the system communication unit + * for the RO firmware. * @details \b Inputs: none * @details \b Outputs: SystemComm unit initialized. * @return none @@ -147,7 +145,7 @@ *************************************************************************/ BOOL isOnlyCANNode( void ) { - return tdIsOnlyCANNode; + return roIsOnlyCANNode; } /*********************************************************************//** @@ -161,7 +159,7 @@ *************************************************************************/ void setOnlyCANNode( BOOL only ) { - tdIsOnlyCANNode = only; + roIsOnlyCANNode = only; } /*********************************************************************//** @@ -196,23 +194,12 @@ if ( TRUE == uiDidCommunicate ) { RO_OP_MODE_T opMode = getCurrentOperationMode(); - U32 uiTO_MS = ( MODE_SERV == opMode ? UI_COMM_SERVICE_MODE_TIMEOUT_IN_MS : UI_COMM_TIMEOUT_IN_MS ); - if ( TRUE == didTimeout( timeOfLastUICheckIn, uiTO_MS ) ) - { -#ifndef _RELEASE_ -// if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_UI_COMM_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) -#endif - { - activateAlarmNoData( ALARM_ID_TD_UI_COMM_TIMEOUT ); - } - } - if ( TRUE == didTimeout( timeOfLastDDCheckIn, DG_COMM_TIMEOUT_IN_MS ) ) { #ifndef RUN_WITHOUT_DD // Only alarm on DG comm loss while in the treatment workflow - if ( MODE_PRET == opMode || MODE_TREA == opMode || MODE_POST == opMode ) + /*if ( RO_MODE_PRET == opMode || RO_MODE_TREA == opMode || RO_MODE_POST == opMode ) { activateAlarmNoData( ALARM_ID_TD_DD_COMM_TIMEOUT ); // we don't want to keep thinking DG is in a useful mode - set it to fault mode until DG is able to report its' true mode status @@ -223,6 +210,7 @@ clearAlarmCondition( ALARM_ID_TD_DD_COMM_TIMEOUT ); } ddIsCommunicating = FALSE; + */ #endif } }