Index: firmware/App/Services/Messaging.c =================================================================== diff -u -rde6b47e92a4bffac2ae7238aba9d522bda3ae4df -rf1b7fd13c6136989018e0907d037ab1c713620c6 --- firmware/App/Services/Messaging.c (.../Messaging.c) (revision de6b47e92a4bffac2ae7238aba9d522bda3ae4df) +++ firmware/App/Services/Messaging.c (.../Messaging.c) (revision f1b7fd13c6136989018e0907d037ab1c713620c6) @@ -141,6 +141,7 @@ { MSG_ID_FFU_SIGNAL_TD_UPDATE_AVAILABLE, &handleUpdateAvailable }, { MSG_ID_UI_FLUID_BOLUS_REQUEST, &handleFluidBolusRequest }, { MSG_ID_UI_GENERIC_CONFIRMATION_RESULT_RESPONSE, &handleUIConfirmationResponse }, + { MSG_ID_UI_DISINFECT_REQUEST, &handleUIDisinfectRequest }, { MSG_ID_TD_SOFTWARE_RESET_REQUEST, &testTDSoftwareResetRequest }, { MSG_ID_TD_BUBBLE_OVERRIDE_REQUEST, &testBubbleDetectOverride }, { MSG_ID_TD_BUBBLE_PUBLISH_INTERVAL_OVERRIDE_REQUEST, &testBubblesDataPublishIntervalOverride }, @@ -785,6 +786,58 @@ /*********************************************************************//** * @brief + * The handleUIDisinfectRequest function handles a disinfect/flush user + * action command message from the UI. + * @details \b Inputs: none + * @details \b Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleUIDisinfectRequest( MESSAGE_T *message ) +{ + BOOL result = FALSE; + + if ( message->hdr.payloadLen == sizeof(U32) ) + { + U32 cmd; + + memcpy( &cmd, message->payload, sizeof(U32) ); + + if ( DD_DISINFECT_FLUSH_STATE == cmd ) // Command 0 = Flush + { + result = signalUserInitiateFlushMode(); + } +// else if ( DD_DISINFECT_HEAT_STATE_ACTIVE_COOL == cmd ) // Command 1 = Heat disinfect active cool +// { +// result = signalUserInitiateHeatDisinfectActiveCoolMode(); +// } +// else if ( DD_DISINFECT_CHEM_STATE == cmd ) // Command 2 = chemical disinfect +// { +// result = signalUserInitiateChemicalDisinfectMode(); +// } +// else if ( DD_DISINFECT_CHEM_FLUSH_STATE == cmd ) // Command 3 = chemical disinfect flush +// { +// result = signalUserInitiateChemicalDisinfectFlushMode(); +// } +// else if ( DD_DISINFECT_RO_PERMEATE_SAMPLE_STATE == cmd ) // Command 4 = RO permeate sample +// { +// result = signalUserInitiateROPermeateSampleMode(); +// } +// else if ( DD_DISINFECT_HEAT_STATE_PASSIVE_COOL == cmd ) // Command 5 = Heat disinfect passive coode +// { +// result = signalUserInitiateHeatDisinfectPassiveCoolMode(); +// } +// else if ( DD_DISINFECT_ACTIVE_COOL == cmd ) // Command 6 = Active cool +// { +// result = signalUserInitiateActiveCoolMode(); +// } + } + + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_TD_2_UI, result ); +} + +/*********************************************************************//** + * @brief * The sendPOSTTestResult function sends the result of a single TD POST * test to the UI. * @details \b Message \b Sent: MSG_ID_TD_POST_SINGLE_TEST_RESULT