Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rc46815918e7cf33e8736f180094843758f1e21b2 -rf66a94fdd645d2146e828fd760960849d1ac05c6 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision c46815918e7cf33e8736f180094843758f1e21b2) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision f66a94fdd645d2146e828fd760960849d1ac05c6) @@ -1222,6 +1222,36 @@ /***********************************************************************//** * @brief + * The broadcastRecircData function constructs a treatment re-circ data msg to + * be broadcast and queues the msg for transmit on the appropriate CAN channel. + * @details Inputs: none + * @details Outputs: treatment re-circ data msg constructed and queued + * @param timeout re-circulation timeout (in sec) + * @param countdown re-circulation timeout count down (in sec) + * @return TRUE if msg successfully queued for transmit, FALSE if not + *************************************************************************/ +BOOL broadcastRecircData( U32 timeout, U32 countdown ) +{ + BOOL result; + MESSAGE_T msg; + U08 *payloadPtr = msg.payload; + + // Create a message record + blankMessage( &msg ); + msg.hdr.msgID = MSG_ID_HD_RECIRC_PROGRESS; + msg.hdr.payloadLen = sizeof( U32 ); + + memcpy( payloadPtr, &timeout, sizeof( U32 ) ); + + // 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_HD_BROADCAST, ACK_NOT_REQUIRED ); + + return result; + +} + +/***********************************************************************//** + * @brief * The broadcastBloodPrimeData function constructs a blood prime data msg to * be broadcast and queues the msg for transmit on the appropriate CAN channel. * @details Inputs: none