Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rc61acc968c77e85a31addacee80afb15285eae44 -r63062ac38e905678faa6660652ada4a38a0e3b10 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision c61acc968c77e85a31addacee80afb15285eae44) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 63062ac38e905678faa6660652ada4a38a0e3b10) @@ -7,8 +7,8 @@ * * @file SystemCommMessages.c * -* @author (last) Dara Navaei -* @date (last) 04-Jan-2022 +* @author (last) Hung Nguyen +* @date (last) 15-Feb-2022 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -5498,6 +5498,38 @@ } /*********************************************************************//** + * @brief + * The handleTestSyringePumpHeprinBolusTargetRateOverrideRequest function handles a + * request to override the syringe pump heprin bolus target rate. + * @details Inputs: none + * @details Outputs: message handled + * @param message : a pointer to the message to handle + * @return none + *************************************************************************/ +void handleTestSyringePumpHeprinBolusTargetRateOverrideRequest( MESSAGE_T *message ) +{ + TEST_OVERRIDE_PAYLOAD_T payload; + BOOL result = FALSE; + + // Verify payload length + if ( sizeof(TEST_OVERRIDE_PAYLOAD_T) == message->hdr.payloadLen ) + { + memcpy( &payload, message->payload, sizeof(TEST_OVERRIDE_PAYLOAD_T) ); + if ( FALSE == payload.reset ) + { + result = testSetHeprinBolusTargetRateOverride( payload.state.f32 ); + } + else + { + result = testResetHeprinBolusTargetRateOverride(); + } + } + + // Respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + +/*********************************************************************//** * @brief * The handleSetHDSystemRecord function handles a request to set the HD * system data record.