Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r04db56ac0f515f35b7f236d607bfb6f7585f55fb -r2f2d0ccadd8a09037eb3d0dd144549b2c8c8129b --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 04db56ac0f515f35b7f236d607bfb6f7585f55fb) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 2f2d0ccadd8a09037eb3d0dd144549b2c8c8129b) @@ -736,10 +736,9 @@ /*********************************************************************//** * @brief - * The broadcastUVReactorsData function sends out UV reactors data. - * @details - * Inputs : none - * Outputs : UV reactors data msg constructed and queued + * The broadcastUVReactorsData function sends out the UV reactors data. + * @details Inputs: none + * @details Outputs: UV reactors data msg constructed and queued * @param UV reactors msg constructed and queued * @return TRUE if msg successfully queued for transmit, FALSE if not *************************************************************************/ @@ -764,10 +763,10 @@ /*********************************************************************//** * @brief - * The broadcastThermistorsData function sends out thermistors data. + * The broadcastThermistorsData function sends out the thermistors data. * @details - * Inputs : none - * Outputs : thermistors data msg constructed and queued + * @details Inputs: none + * @details Outputs: thermistors data msg constructed and queued * @param UV reactors msg constructed and queued * @return TRUE if msg successfully queued for transmit, FALSE if not *************************************************************************/ @@ -789,6 +788,33 @@ return result; } + +/*********************************************************************//** + * @brief + * The broadcastFansData function sends out the fans data. + * @details Inputs: none + * @details Outputs: fans data msg constructed and queued + * @param fans msg constructed and queued + * @return TRUE if msg successfully queued for transmit, FALSE if not + *************************************************************************/ +BOOL broadcastFansData( FANS_DATA_T *fansData ) +{ + BOOL result; + MESSAGE_T msg; + U08 *payloadPtr = msg.payload; + + // create a message record + blankMessage( &msg ); + msg.hdr.msgID = MSG_ID_DG_FANS_DATA; + msg.hdr.payloadLen = sizeof( FANS_DATA_T ); + + memcpy( payloadPtr, fansData, sizeof( FANS_DATA_T ) ); + + // serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer + result = serializeMessage( msg, COMM_BUFFER_OUT_CAN_DG_BROADCAST, ACK_NOT_REQUIRED ); + + return result; +} // *********************************************************************** // **************** Message Handling Helper Functions ********************