Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r667b78a4ba1b948d4977b9b55234acf8d670f2d9 -r52763239a17119a1ffab1fb53e8eedf992ae800c --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 667b78a4ba1b948d4977b9b55234acf8d670f2d9) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 52763239a17119a1ffab1fb53e8eedf992ae800c) @@ -616,6 +616,35 @@ /*********************************************************************//** * @brief + * The broadcastROPumpData function sends out RO pump data. + * @details Inputs: none + * @details Outputs: RO pump data msg constructed and queued + * @param tgtPressure target pressure for RO pump in PSI + * @param measFlow measure RO flow rate in LPM + * @param setPWM set PWM duty cycle in % + * @return TRUE if msg successfully queued for transmit, FALSE if not + *************************************************************************/ +BOOL broadcastDialysateFlowData( const DIALYSATE_FLOW_METER_DATA_T * const flowData ) +{ + BOOL result; + MESSAGE_T msg; + U08 *payloadPtr = msg.payload; + + // create a message record + blankMessage( &msg ); + msg.hdr.msgID = MSG_ID_DG_DIALYSATE_FLOW_METER_DATA; + msg.hdr.payloadLen = sizeof( DIALYSATE_FLOW_METER_DATA_T ); + + memcpy( payloadPtr, flowData, sizeof( DIALYSATE_FLOW_METER_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 ); + + return result; +} + +/*********************************************************************//** + * @brief * The broadcastConcentratePumpData function sends out concentrate pumps' data. * @details Inputs: none * @details Outputs: concentrate pump data msg constructed and queued