Index: firmware/App/Monitors/Pressures.c =================================================================== diff -u -r62c699be7f5a8ef2c373da54d6d887ee62e3b96a -r9f3f6f601dba9f278440bba6beba5ea19cadb3a9 --- firmware/App/Monitors/Pressures.c (.../Pressures.c) (revision 62c699be7f5a8ef2c373da54d6d887ee62e3b96a) +++ firmware/App/Monitors/Pressures.c (.../Pressures.c) (revision 9f3f6f601dba9f278440bba6beba5ea19cadb3a9) @@ -8,7 +8,7 @@ * @file Pressures.c * * @author (last) Varshini Nagabooshanam -* @date (last) 04-Feb-2026 +* @date (last) 06-Mar-2026 * * @author (original) Sean Nash * @date (original) 24-Sep-2024 @@ -1215,7 +1215,41 @@ return result; } +/*********************************************************************//** +* @brief +* The pressureLimitHandleWidenRequest function validates pressure limit +* widening request received from the UI. +* @details \b Message \b Received: MSG_ID_UI_PRESSURE_LIMIT_WIDEN_REQUEST +* @details \b Message \b Sent: MSG_ID_TD_PRESSURE_LIMIT_WIDEN_RESPONSE +* @details \b Inputs: none +* @details \b Outputs: pressure limits widened and stabilization restarted +* @param message set message from UI +* @return TRUE if request is valid, FALSE if not +*************************************************************************/ +BOOL pressureLimitHandleWidenRequest( MESSAGE_T *message ) +{ + BOOL result = FALSE; + REQUEST_REJECT_REASON_CODE_T rejReason = REQUEST_REJECT_REASON_INVALID_REQUEST_FORMAT; + UI_RESPONSE_PAYLOAD_T response; + // Verify message payload length + if ( message->hdr.payloadLen == 0 ) + { + // Initiate pressure stabilization + signalInitiatePressureStabilization( USE_NORMAL_STABILIZATION_PERIOD ); + result = TRUE; + rejReason = REQUEST_REJECT_REASON_NONE; + } + + // Respond to request + response.accepted = result; + response.rejectionReason = rejReason; + sendMessage( MSG_ID_TD_PRESSURE_LIMIT_WIDEN_RESPONSE, COMM_BUFFER_OUT_CAN_TD_2_UI, (U08*)(&response), sizeof( UI_RESPONSE_PAYLOAD_T ) ); + + return result; +} + + /************************************************************************* * TEST SUPPORT FUNCTIONS *************************************************************************/