Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rd3b7ae356aae29c99cb039713a2e120fdbce5a9c -rba15d3e6250e8cd3cd3ef39cb64a93f91c3caba2 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision d3b7ae356aae29c99cb039713a2e120fdbce5a9c) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision ba15d3e6250e8cd3cd3ef39cb64a93f91c3caba2) @@ -452,7 +452,7 @@ // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_HD_PRESSURE_LIMITS_CHANGE_RESPONSE; + msg.hdr.msgID = MSG_ID_HD_HEPARIN_PAUSE_RESUME_RESPONSE; msg.hdr.payloadLen = sizeof( U32 ) * 2; memcpy( payloadPtr, &accepted, sizeof( U32 ) ); @@ -1920,14 +1920,14 @@ /*********************************************************************//** * @brief - * The handleUIStartTreatmentMsg function handles a treatment start/cancel + * The handleInitiateTreatmentRequest function handles a treatment initiate/cancel * message from the UI. * @details Inputs: none * @details Outputs: message handled * @param message a pointer to the message to handle * @return none *************************************************************************/ -void handleUIStartTreatmentMsg( MESSAGE_T *message ) +void handleInitiateTreatmentRequest( MESSAGE_T *message ) { BOOL result = FALSE; @@ -1937,17 +1937,13 @@ memcpy( &cmd, message->payload, sizeof(U32) ); - if ( 0 == cmd ) // Initiate treatment (go to treatment params mode) + if ( 0 == cmd ) // Cancel treatment (return from aborted treatment params mode) { - result = signalUserStartingTreatment(); - } - else if ( 1 == cmd ) // Cancel treatment (return from aborted treatment params mode) - { result = signalUserCancelTreatment(); } - else if ( 2 == cmd ) // Start treatment + else if ( 1 == cmd ) // Initiate treatment (go to treatment params mode) { - result = signalUserBeginningTreatment(); + result = signalUserStartingTreatment(); } } @@ -1956,6 +1952,27 @@ /*********************************************************************//** * @brief + * The handleStartTreatmentRequest function handles a treatment start + * message from the UI. + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleStartTreatmentRequest( MESSAGE_T *message ) +{ + BOOL result = FALSE; + + if ( 0 == message->hdr.payloadLen ) + { + result = signalUserBeginningTreatment(); + } + + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, result ); +} + +/*********************************************************************//** + * @brief * The sendTreatmentStartResponseMsg function constructs a treatment start * request response message to the UI and queues the msg for transmit on * the appropriate CAN channel.