Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rc672f41061bcd500d6593655641cb27ce3ae58fc -r85ab84d9a0668e1e3976b00eb29e79c38c81b651 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision c672f41061bcd500d6593655641cb27ce3ae58fc) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 85ab84d9a0668e1e3976b00eb29e79c38c81b651) @@ -566,10 +566,12 @@ * and queues the msg for transmit on the appropriate CAN channel. * @details Inputs: none * @details Outputs: DG drain command msg constructed and queued. - * @param drainToVolumeMl volume (in mL) to drain the inactive reservoir to + * @param drainToVolumeMl volume (in mL) to drain the inactive reservoir to + * @param tareLoadCells set to TRUE if inactive reservoir load cells should be + * tared after draining * @return TRUE if msg successfully queued for transmit, FALSE if not *************************************************************************/ -BOOL sendDGDrainCommand( U32 drainToVolumeMl ) +BOOL sendDGDrainCommand( DRAIN_RESERVOIR_CMD_PAYLOAD_T *payload ) { BOOL result; MESSAGE_T msg; @@ -578,9 +580,9 @@ // create a message record blankMessage( &msg ); msg.hdr.msgID = MSG_ID_DG_DRAIN_CMD; - msg.hdr.payloadLen = sizeof( U32 ); + msg.hdr.payloadLen = sizeof( DRAIN_RESERVOIR_CMD_PAYLOAD_T ); - memcpy( payloadPtr, &drainToVolumeMl, sizeof( U32 ) ); + memcpy( payloadPtr, payload, sizeof( DRAIN_RESERVOIR_CMD_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_2_DG, ACK_REQUIRED );