Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rc414ee882e06359e06b48b1939a90784ae028aa5 -r766708fceb0bdf1af8c7897df29d4f5036bfd3db --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision c414ee882e06359e06b48b1939a90784ae028aa5) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 766708fceb0bdf1af8c7897df29d4f5036bfd3db) @@ -571,7 +571,7 @@ * tared after draining * @return TRUE if msg successfully queued for transmit, FALSE if not *************************************************************************/ -BOOL sendDGDrainCommand( DRAIN_RESERVOIR_CMD_PAYLOAD_T *payload ) +BOOL sendDGDrainCommand( DRAIN_RESERVOIR_CMD_PAYLOAD_T *drainCmdPtr ) { BOOL result; MESSAGE_T msg; @@ -582,7 +582,7 @@ msg.hdr.msgID = MSG_ID_DG_DRAIN_CMD; msg.hdr.payloadLen = sizeof( DRAIN_RESERVOIR_CMD_PAYLOAD_T ); - memcpy( payloadPtr, payload, sizeof( DRAIN_RESERVOIR_CMD_PAYLOAD_T ) ); + memcpy( payloadPtr, drainCmdPtr, 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 ); @@ -1402,14 +1402,12 @@ *************************************************************************/ void handleLoadCellReadingsFromDG( MESSAGE_T *message ) { - BOOL result = FALSE; - if ( message->hdr.payloadLen == sizeof(LOAD_CELL_READINGS_PAYLOAD_T) ) { LOAD_CELL_READINGS_PAYLOAD_T payload; memcpy( &payload, message->payload, sizeof(LOAD_CELL_READINGS_PAYLOAD_T) ); - result = setNewLoadCellReadings( payload.res1PrimaryLoadCell, payload.res1BackupLoadCell, payload.res2PrimaryLoadCell, payload.res2BackupLoadCell ); + setNewLoadCellReadings( payload.res1PrimaryLoadCell, payload.res1BackupLoadCell, payload.res2PrimaryLoadCell, payload.res2BackupLoadCell ); } // TODO - what to do if invalid payload length? // TODO - how to know if DG stops sending these? @@ -2069,10 +2067,6 @@ setDGOpMode( mode, subMode ); checkInFromDG(); // TODO - here until we implement DG check-in w/ HD broadcast } - else - { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_DG, FALSE ); - } } /*********************************************************************//**