Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r894d80dda120f7b319c212dd1857f203daa27b07 -ra5723df5741ceaf13cd6cf9cab50a55bfea15501 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 894d80dda120f7b319c212dd1857f203daa27b07) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision a5723df5741ceaf13cd6cf9cab50a55bfea15501) @@ -53,10 +53,6 @@ // ********** private definitions ********** -#ifdef DEBUG_ENABLED - #define DEBUG_EVENT_MAX_TEXT_LEN 40 -#endif - #define MAX_MSGS_BLOCKED_FOR_XMIT 8 ///< Maximum number of messages to block transmission for. #pragma pack(push,1) @@ -415,15 +411,15 @@ { BOOL result = FALSE; - if ( message->hdr.payloadLen == sizeof( TARGET_TEMPS_PAYLOAD_T ) ) + if ( message->hdr.payloadLen == sizeof( DG_CMD_DIALYSATE_HEATING_PARAMS_T ) ) { - TARGET_TEMPS_PAYLOAD_T payload; + DG_CMD_DIALYSATE_HEATING_PARAMS_T payload; result = TRUE; - memcpy( &payload, message->payload, sizeof( TARGET_TEMPS_PAYLOAD_T ) ); - setHeaterTargetTemperature( DG_PRIMARY_HEATER, payload.targetPrimaryHeaterTemp ); - setHeaterTargetTemperature( DG_TRIMMER_HEATER, payload.targetTrimmerHeaterTemp ); + memcpy( &payload, message->payload, sizeof( DG_CMD_DIALYSATE_HEATING_PARAMS_T ) ); + setDialysateHeatingParameters( payload ); } + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_DG_2_HD, result ); } @@ -594,7 +590,6 @@ return result; } - /*********************************************************************//** * @brief * The sendDGSystemRecord function sends out the DG system record. @@ -1065,56 +1060,6 @@ * TEST SUPPORT FUNCTIONS *************************************************************************/ -#ifdef DEBUG_ENABLED - /*********************************************************************//** - * @brief - * The sendDebugData function sends debug data out to the PC port. - * @details - * @details Inputs: none - * @details Outputs: PC serial port - * @param dbgData Pointer to debug data - * @param len number of bytes of debug data - * @return TRUE if debug data was successfully queued for transmit, FALSE if not - *************************************************************************/ - BOOL sendDebugData( U08 *dbgData, U32 len ) - { - BOOL result; - - // add serialized message data to appropriate comm buffer - result = addToCommBuffer( COMM_BUFFER_OUT_UART_PC, dbgData, len ); - - return result; - } - - /*********************************************************************//** - * @brief - * The sendDebugDataToUI function sends debug string to the UI for logging. - * @details - * @details Inputs: none - * @details Outputs: Message constructed and queued for transmit - * @param str Pointer to debug string - * @return none - *************************************************************************/ - void sendDebugDataToUI( U08 *str ) - { - MESSAGE_T msg; - U32 txtLen = strlen( (char*)str ); - U08 *payloadPtr = msg.payload; - - // create a message record - blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_DG_DEBUG_EVENT; - msg.hdr.payloadLen = DEBUG_EVENT_MAX_TEXT_LEN + 1; // add 1 byte for null terminator - if ( txtLen <= DEBUG_EVENT_MAX_TEXT_LEN ) - { - memcpy( payloadPtr, str, txtLen + 1 ); - - // serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer - serializeMessage( msg, COMM_BUFFER_OUT_CAN_DG_2_UI, ACK_NOT_REQUIRED ); - } - } -#endif - /*********************************************************************//** * @brief * The isTestingActivated function determines whether a tester has successfully