Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r3d131237935eb36e56e0d057a713430e31dc6405 -rc0160362dc799802ec589d5b6cf4c2bd1face77e --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 3d131237935eb36e56e0d057a713430e31dc6405) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision c0160362dc799802ec589d5b6cf4c2bd1face77e) @@ -22,10 +22,8 @@ #include "Accel.h" #include "ConcentratePumps.h" #include "ConductivitySensors.h" -#include "DrainPump.h" #include "FPGA.h" #include "Heaters.h" -#include "LoadCell.h" #include "ModeFlush.h" #include "ModeStandby.h" #include "ModeRecirculate.h" @@ -34,7 +32,6 @@ #include "OperationModes.h" #include "Pressures.h" #include "Reservoirs.h" -#include "ROPump.h" #include "RTC.h" #include "SystemComm.h" #include "SafetyShutdown.h" @@ -385,31 +382,22 @@ * The broadcastLoadCellData function sends out load cell data. * @details Inputs: none * @details Outputs: load cell data msg constructed and queued - * @param loadCellA1 load cell A 1 data in grams - * @param loadCellA2 load cell A 2 data in grams - * @param loadCellB1 load cell B 1 data in grams - * @param loadCellB2 load cell B 2 data in grams + * @param loadCell which is the loadcells data structure pointer * @return TRUE if msg successfully queued for transmit, FALSE if not *************************************************************************/ -BOOL broadcastLoadCellData( F32 loadCellA1, F32 loadCellA2, F32 loadCellB1, F32 loadCellB2 ) +BOOL broadcastLoadCellData( LOAD_CELL_DATA_T *loadCell ) { BOOL result; MESSAGE_T msg; U08 *payloadPtr = msg.payload; - LOAD_CELL_DATA_T payload; // create a message record blankMessage( &msg ); msg.hdr.msgID = MSG_ID_LOAD_CELL_READINGS; msg.hdr.payloadLen = sizeof( LOAD_CELL_DATA_T ); - payload.loadCellA1inGram = loadCellA1; - payload.loadCellA2inGram = loadCellA2; - payload.loadCellB1inGram = loadCellB1; - payload.loadCellB2inGram = loadCellB2; + memcpy( payloadPtr, loadCell, sizeof( LOAD_CELL_DATA_T ) ); - memcpy( payloadPtr, &payload, sizeof( LOAD_CELL_DATA_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_DG_BROADCAST, ACK_NOT_REQUIRED );