Index: firmware/App/Services/SystemCommDD.c =================================================================== diff -u -rf7c714a1a09b10d85a8b013712532d37b4d7b97a -rd741f651b63edc7695b2be2178c9e5c44aaed1f3 --- firmware/App/Services/SystemCommDD.c (.../SystemCommDD.c) (revision f7c714a1a09b10d85a8b013712532d37b4d7b97a) +++ firmware/App/Services/SystemCommDD.c (.../SystemCommDD.c) (revision d741f651b63edc7695b2be2178c9e5c44aaed1f3) @@ -23,8 +23,6 @@ #include "sys_dma.h" #include "Comm.h" -//#include "DrainPump.h" -//#include "Heaters.h" #include "Interrupts.h" #include "OperationModes.h" #include "Messaging.h" @@ -46,7 +44,6 @@ #define MAX_FPGA_CLOCK_SPEED_ERRORS 3 ///< maximum number of FPGA clock speed errors within window period before alarm #define MAX_FPGA_CLOCK_SPEED_ERROR_WINDOW_MS (10 * SEC_PER_MIN * MS_PER_SECOND) ///< FPGA clock speed error window - // ********** private data ********** /// Array of out-going CAN buffers. @@ -96,7 +93,6 @@ // initialize FPGA clock speed error time windowed count initTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_CLOCK_SPEED_ERROR, MAX_FPGA_CLOCK_SPEED_ERRORS, MAX_FPGA_CLOCK_SPEED_ERROR_WINDOW_MS); - } /*********************************************************************//** @@ -178,6 +174,8 @@ * The getInBufferID function gets the buffer ID for a given buffer index. * @details \b Inputs: CAN_IN_BUFFERS[] * @details \b Outputs: none + * @details \b Alarm: ALARM_ID_DD_SOFTWARE_FAULT when invalid CAN Input + * buffer is seen. * @param idx incoming buffer index (e.g. 0 indicates first incoming buffer) * @return buffer id associated with given incoming buffer index *************************************************************************/ @@ -192,7 +190,7 @@ } else { - // TODO - s/w fault + SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, SW_FAULT_ID_CAN_IN_INVALID_BUFFER ) } return result; @@ -223,6 +221,8 @@ * The getOutBufferID function gets the buffer ID for a given buffer index. * @details \b Inputs: CAN_OUT_BUFFERS[] * @details \b Outputs: none + * @details \b Alarm: ALARM_ID_DD_SOFTWARE_FAULT when invalid CAN Output + * buffer is seen. * @param idx outgoing buffer index (e.g. 0 indicates first outgoing buffer) * @return buffer id associated with given outgoing buffer index *************************************************************************/ @@ -237,7 +237,7 @@ } else { - // TODO - s/w fault + SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, SW_FAULT_ID_CAN_OUT_INVALID_BUFFER ) } return result;