Index: firmware/App/Monitors/Pressures.c =================================================================== diff -u -rbdfb6a7f371e1ac57304c10a9f543509b5751aa9 -r20f69d01f2a252eeef3d936dc0983491eb2e7a3d --- firmware/App/Monitors/Pressures.c (.../Pressures.c) (revision bdfb6a7f371e1ac57304c10a9f543509b5751aa9) +++ firmware/App/Monitors/Pressures.c (.../Pressures.c) (revision 20f69d01f2a252eeef3d936dc0983491eb2e7a3d) @@ -8,7 +8,7 @@ * @file Pressures.c * * @author (last) Varshini Nagabooshanam -* @date (last) 04-Feb-2026 +* @date (last) 13-Mar-2026 * * @author (original) Sean Nash * @date (original) 24-Sep-2024 @@ -590,7 +590,6 @@ F32 tmpPres = getTMPPressure(); F32 fpgaBaroPresPSI = getPressure( H23_PRES ); - // Filter inline pressure readings filterInlinePressureReadings( fpgaArtPres, fpgaVenPres, tmpPres); // Filter the baro pressure @@ -1216,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 *************************************************************************/