Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rbb114842e73659f097bb8b8ec0d670bfa4f8cb73 -r53281f1ea1e79cbd6eb8720851af78f2cb543624 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision bb114842e73659f097bb8b8ec0d670bfa4f8cb73) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 53281f1ea1e79cbd6eb8720851af78f2cb543624) @@ -1593,12 +1593,73 @@ return result; } +/*********************************************************************//** + * @brief + * The broadcastNoCartSelfTestTime function sends out the no cartridge self-test + * progress data. + * @details Inputs: none + * @details Outputs: no cartridge self-test time data msg constructed and queued + * @param timeout no cartridge self-test timeout (in sec) + * @param countdown no cartridge self-test timeout count down (in sec) + * @return TRUE if msg successfully queued for transmit, FALSE if not + *************************************************************************/ +BOOL broadcastNoCartSelfTestTime( 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_NO_CART_SELF_TEST_PROGRESS; + msg.hdr.payloadLen = sizeof( U32 ) + sizeof( U32 ); + + memcpy( payloadPtr, &timeout, sizeof( U32 ) ); + payloadPtr += sizeof( U32 ); + memcpy( payloadPtr, &countdown, 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 broadcastDrySelfTestTime function sends out the dry self-test progress data. + * @details Inputs: none + * @details Outputs: dry self-test time data msg constructed and queued + * @param timeout dry self-test timeout (in sec) + * @param countdown dry self-test timeout count down (in sec) + * @return TRUE if msg successfully queued for transmit, FALSE if not + *************************************************************************/ +BOOL broadcastDrySelfTestTime( 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_DRY_SELF_TEST_PROGRESS; + msg.hdr.payloadLen = sizeof( U32 ) + sizeof( U32 ); + + memcpy( payloadPtr, &timeout, sizeof( U32 ) ); + payloadPtr += sizeof( U32 ); + memcpy( payloadPtr, &countdown, 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 broadcastAirTrapData function constructs an HD air trap data msg to \n + * The broadcastPrimeData function constructs a priming status data msg to \n * be broadcast and queues the msg for transmit on the appropriate CAN channel. * @details Inputs: none - * @details Outputs: air trap data msg constructed and queued + * @details Outputs: priming data msg constructed and queued * @param primeDataPtr prime data record pointer * @return TRUE if msg successfully queued for transmit, FALSE if not *************************************************************************/