Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rbc2f07d1ccac37e4cb18a21bfe096db94e72a151 -rad272a524906daa67d4de0aa41ac401dd33afc8f --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision bc2f07d1ccac37e4cb18a21bfe096db94e72a151) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision ad272a524906daa67d4de0aa41ac401dd33afc8f) @@ -596,14 +596,12 @@ // Create a message record blankMessage( &msg ); msg.hdr.msgID = MSG_ID_DG_SERVICE_SCHEDULE_DATA; - msg.hdr.payloadLen = sizeof( U32 ) + sizeof( U32 ); + msg.hdr.payloadLen = sizeof( DG_SERVICE_RECORD_T ); if ( 0 == message->hdr.payloadLen ) { // Fill message payload - memcpy( payloadPtr, &service.lastServiceEpochDate, sizeof( U32 ) ); - payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, &service.serviceIntervalSeconds, sizeof( U32 ) ); + memcpy( payloadPtr, &service, sizeof( DG_SERVICE_RECORD_T ) ); } // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer @@ -1841,15 +1839,40 @@ memcpy( &result, message->payload, sizeof(U32) ); - setChemicalDisinfectFlushSampleResult( result ); + setROPermeateSampleDispenseRequest( result ); status = TRUE; } sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_DG_2_HD, status ); } +/*********************************************************************//** + * @brief + * The handleSendROPermeateSampleDispenseReadyToHD function handles sending + * RO permeate sample dispense ready to HD + * @details Inputs: none + * @details Outputs: none + * @return none + *************************************************************************/ +void handleSendROPermeateSampleDispenseReadyToHD( void ) +{ + MESSAGE_T msg; + U08 *payloadPtr = msg.payload; + U32 dispenseReady = 1; + // Create a message record + blankMessage( &msg ); + msg.hdr.msgID = MSG_ID_DG_SEND_RO_PERMEATE_SAMPLE_DISPENSE_READY_TO_HD; + msg.hdr.payloadLen = sizeof( U32 ); + + memcpy( payloadPtr, &dispenseReady, sizeof( U32 ) ); + + // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer + serializeMessage( msg, COMM_BUFFER_OUT_CAN_DG_BROADCAST, ACK_REQUIRED ); +} + + // *********************************************************************** // **************** Message Handling Helper Functions ******************** // ***********************************************************************