Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r3f4105248e6c49ab487ec065f9a4843d72a16a2a -rddcaa054bec161fc48d07b86c3e2550c5bb15fbe --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 3f4105248e6c49ab487ec065f9a4843d72a16a2a) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision ddcaa054bec161fc48d07b86c3e2550c5bb15fbe) @@ -7,8 +7,8 @@ * * @file SystemCommMessages.c * -* @author (last) Vinayakam Mani -* @date (last) 30-Aug-2023 +* @author (last) Sean Nash +* @date (last) 30-Sep-2023 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -31,6 +31,7 @@ #include "ModeStandby.h" #include "ModeInitPOST.h" #include "OperationModes.h" +#include "Reservoirs.h" #include "RTC.h" #include "SampleWater.h" #include "SafetyShutdown.h" @@ -5444,7 +5445,7 @@ sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); } -/************************************************************************* +/*********************************************************************//** * @brief * The handleSetSwitchesStatusOverrideRequest function handles a * request to override the status of a switch in HD. @@ -5476,7 +5477,7 @@ sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); } -/************************************************************************* +/*********************************************************************//** * @brief * The handleTestSwitchesPublishIntervalOverrideRequest function handles a * request to override the the switches data publish interval. @@ -8479,4 +8480,36 @@ sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); } +/*********************************************************************//** + * @brief + * The handleTestHDRecirulationPctOverrideRequest function handles a + * request to override recirulation percentage. + * @details Inputs: none + * @details Outputs: message handled + * @param message : a pointer to the message to handle + * @return none + *************************************************************************/ +void handleTestHDRecirulationPctOverrideRequest( 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 = testSetRecirculationLevelPctOverride( payload.state.f32 ); + } + else + { + result = testResetRecirculationLevelPctOverride(); + } + } + + // Respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + /**@}*/