Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rf3680ff380d9543102406833a48da5a2d20e6029 -re65a2e67337ef5fff12de02db85ba101305fb006 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision f3680ff380d9543102406833a48da5a2d20e6029) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision e65a2e67337ef5fff12de02db85ba101305fb006) @@ -1098,7 +1098,8 @@ * broadcast message and queues the msg for transmit on the appropriate CAN channel. * @details Inputs: none * @details Outputs: HD operation mode msg constructed and queued - * @param mode current HD operation mode + * @param mode current HD operation mode + * @param subMode current HD operation sub-mode * @return TRUE if msg successfully queued for transmit, FALSE if not *************************************************************************/ BOOL broadcastHDOperationMode( U32 mode, U32 subMode ) @@ -1128,6 +1129,7 @@ * be broadcast and queues the msg for transmit on the appropriate CAN channel. * @details Inputs: none * @details Outputs: HD valves msg constructed and queued + * @param valveData valve data record * @return TRUE if msg successfully queued for transmit, FALSE if not *************************************************************************/ BOOL broadcastHDValves( HD_VALVE_DATA_T *valveData ) @@ -1155,6 +1157,7 @@ * be broadcast and queues the msg for transmit on the appropriate CAN channel. * @details Inputs: none * @details Outputs: saline bolus data msg constructed and queued + * @param data saline bolus data record * @return TRUE if msg successfully queued for transmit, FALSE if not *************************************************************************/ BOOL broadcastSalineBolusData( SALINE_BOLUS_DATA_PAYLOAD_T data ) @@ -1182,6 +1185,8 @@ * 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 + * @param lowerLevel air trap lower level data + * @param upperLevel air trap upper level data * @return TRUE if msg successfully queued for transmit, FALSE if not *************************************************************************/ BOOL broadcastAirTrapData( AIR_TRAP_LEVELS_T lowerLevel, AIR_TRAP_LEVELS_T upperLevel ) @@ -1207,6 +1212,34 @@ return result; } +/***********************************************************************//** + * @brief + * The broadcastAirTrapData function constructs an HD air trap 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 + * @param primeDataPtr prime data record pointer + * @return TRUE if msg successfully queued for transmit, FALSE if not + *************************************************************************/ +BOOL broadcastPrimeData( PRIMING_DATA_PAYLOAD_T *primeDataPtr ) +{ + BOOL result; + MESSAGE_T msg; + U08 *payloadPtr = msg.payload; + + // Create a message record + blankMessage( &msg ); + msg.hdr.msgID = MSG_ID_HD_PRIMING_STATUS_DATA; + msg.hdr.payloadLen = sizeof( PRIMING_DATA_PAYLOAD_T ); + + memcpy( payloadPtr, primeDataPtr, sizeof( PRIMING_DATA_PAYLOAD_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_HD_BROADCAST, ACK_NOT_REQUIRED ); + + return result; +} + #ifdef EMC_TEST_BUILD BOOL broadcastCANErrorCount( U32 count ) {