Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r833f85644d027627769a92126402be2e0f4e69af -r1ededb9ae1cbc2c14a09fd2a4370f060569de158 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 833f85644d027627769a92126402be2e0f4e69af) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 1ededb9ae1cbc2c14a09fd2a4370f060569de158) @@ -8,7 +8,7 @@ * @file SystemCommMessages.c * * @author (last) Michael Garthwaite -* @date (last) 15-Aug-2023 +* @date (last) 17-Aug-2023 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -1719,6 +1719,30 @@ /*********************************************************************//** * @brief + * The sendDGParkConcentratePumpsCommand function constructs a DG concetentrate + * pumps park request msg to the DG and queues the msg for transmit on the appropriate CAN channel. + * @details Inputs: none + * @details Outputs: DG park concentrate pumps command msg constructed and queued.. + * @return TRUE if msg successfully queued for transmit, FALSE if not + *************************************************************************/ +BOOL sendDGParkConcentratePumpsCommand( void ) +{ + BOOL result; + MESSAGE_T msg; + + // Create a message record + blankMessage( &msg ); + msg.hdr.msgID = MSG_ID_DG_PARK_CONCENTRATE_PUMPS_CMD_REQUEST; + msg.hdr.payloadLen = 0; + + // 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_2_DG, ACK_REQUIRED ); + + return result; +} + +/*********************************************************************//** + * @brief * The sendDGStartFlushModeCommand function constructs a DG start/stop * flush mode command message and queues the msg for transmit on the * appropriate CAN channel. @@ -8424,4 +8448,36 @@ sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); } +/*********************************************************************//** + * @brief + * The handleTestHDPendingACKOverrideRequest function handles a + * request to override pending ACKs. + * @details Inputs: none + * @details Outputs: message handled + * @param message : a pointer to the message to handle + * @return none + *************************************************************************/ +void handleTestHDPendingACKOverrideRequest( MESSAGE_T *message ) +{ + TEST_OVERRIDE_PAYLOAD_T payload; + BOOL result = FALSE; + + // Verify payload length + if ( sizeof( TEST_OVERRIDE_PAYLOAD_T ) == message->hdr.payloadLen ) + { + memcpy( &payload, message->payload, sizeof( TEST_OVERRIDE_PAYLOAD_T ) ); + if ( FALSE == payload.reset ) + { + result = testSetPendingACKOverride( payload.state.u32 ); + } + else + { + result = testResetPendingACKOverride(); + } + } + + // Respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + /**@}*/