Index: firmware/App/Controllers/AirTrap.c =================================================================== diff -u -r6ce3614af20c9f80e259f030d75c106266a4e32b -r80a7440462a8f87ee11ed62371baba2d87bb6d89 --- firmware/App/Controllers/AirTrap.c (.../AirTrap.c) (revision 6ce3614af20c9f80e259f030d75c106266a4e32b) +++ firmware/App/Controllers/AirTrap.c (.../AirTrap.c) (revision 80a7440462a8f87ee11ed62371baba2d87bb6d89) @@ -7,8 +7,8 @@ * * @file AirTrap.c * -* @author (last) Sameer Kalliadan Poyil -* @date (last) 23-Mar-2026 +* @author (last) Varshini Nagabooshanam +* @date (last) 18-Jun-2026 * * @author (original) Sean Nash * @date (original) 24-Oct-2024 @@ -47,6 +47,9 @@ #define AIR_TRAP_ILLEGAL_LEVELS_TIMEOUT_MS ( 2 * MS_PER_SECOND ) ///< Air trap illegal values timeout (in ms) #define DATA_PUBLISH_COUNTER_START_COUNT 7 ///< Data publish counter start count. +#define AIR_TRAP_REPEATED_LOWER_EVENT_LIMIT 5 ///< Air trap repeated lower event limit +#define AIR_TRAP_REPEATED_LOWER_EVENTS_TIMEOUT_MS ( 300 * MS_PER_SECOND ) ///< Air trap repeated lower events timeout period (in ms). Maximum 5 air trap lower events are allowed within 5 minutes. + /// Air pump on delay after fill adjustment static const U32 AIR_PUMP_ON_DELAY_ADJUST_AFTER_FILL = ( AIR_PUMP_ON_DELAY_TIME_MS - ( 1 * MS_PER_SECOND ) ); @@ -93,6 +96,9 @@ static BOOL airTrapHasDetectedFaultMode; ///< Flag indicates air trap unit has handled transition to fault mode. +static U32 airTrapLowerEventCount; ///< Air trap lower event count +static U32 airTrapLowerEventStartTime; ///< Air trap lower event start time + // ********** private function prototypes ********** static AIR_TRAP_STATE_T handleAirTrapManualControlState( void ); @@ -139,6 +145,8 @@ airTrapLowerDelayStartTime = 0; airTrapLowerStartTime = 0; airTrapHasDetectedFaultMode = FALSE; + airTrapLowerEventCount = 0; + airTrapLowerEventStartTime = 0; } /*********************************************************************//** @@ -249,10 +257,12 @@ * @brief * The execAirTrapMonitorTreatment function executes the air trap monitor * for treatment mode. - * @details \b Alarm: ALARM_ID_TD_AIR_TRAP_FILL_DURING_TREATMENT if air trap + * @details \b Alarm: ALARM_ID_TD_REPEATED_AIR_TRAP_LOWER_EVENTS, + * ALARM_ID_TD_AIR_TRAP_FILL_DURING_TREATMENT, if air trap * fill exceeds maximum allowed time to complete. - * @details \b Inputs: airTrapControllerState, fillStartTime - * @details \b Outputs: none + * @details \b Inputs: airTrapControllerState, fillStartTime, + * airTrapLowerEventCount, airTrapLowerEventStartTime + * @details \b Outputs: airTrapLowerEventCount, airTrapLowerEventStartTime * @return none *************************************************************************/ void execAirTrapMonitorTreatment( void ) @@ -282,6 +292,17 @@ } } } + // Check repeated air trap lower events alarm + if ( ( airTrapLowerEventCount >= AIR_TRAP_REPEATED_LOWER_EVENT_LIMIT ) && + ( FALSE == didTimeout( airTrapLowerEventStartTime, AIR_TRAP_REPEATED_LOWER_EVENTS_TIMEOUT_MS ) ) ) + { + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_TD_REPEATED_AIR_TRAP_LOWER_EVENTS, airTrapLowerEventCount, 0 ) + } + else if ( TRUE == didTimeout( airTrapLowerEventStartTime, AIR_TRAP_REPEATED_LOWER_EVENTS_TIMEOUT_MS ) ) + { + airTrapLowerEventCount = 0; + airTrapLowerEventStartTime = 0; + } } /*********************************************************************//** @@ -385,8 +406,8 @@ * The handleAirTrapClosedState function handles the closed state of the * air trap. * @details \b Message \b Sent: MSG_ID_TD_EVENT if starting a level change. - * @details \b Inputs: pendingStopAirTrapController - * @details \b Outputs: none + * @details \b Inputs: pendingStopAirTrapController, airTrapLowerEventCount + * @details \b Outputs: airTrapLowerEventStartTime, airTrapLowerEventCount * @return next state *************************************************************************/ static AIR_TRAP_STATE_T handleAirTrapClosedState( void ) @@ -423,6 +444,12 @@ SEND_EVENT_WITH_2_U32_DATA( TD_EVENT_AIR_TRAP_LOWER, ON, 0 ); + if ( 0 == airTrapLowerEventCount ) + { + airTrapLowerEventStartTime = getMSTimerCount(); + } + airTrapLowerEventCount++; + result = AIR_TRAP_LOWER_LEVEL_STATE; } } Index: firmware/App/Drivers/GLXferPump.c =================================================================== diff -u -r3e6b89e98c3725c7afd94a3c37fe3efce3fde65f -r80a7440462a8f87ee11ed62371baba2d87bb6d89 --- firmware/App/Drivers/GLXferPump.c (.../GLXferPump.c) (revision 3e6b89e98c3725c7afd94a3c37fe3efce3fde65f) +++ firmware/App/Drivers/GLXferPump.c (.../GLXferPump.c) (revision 80a7440462a8f87ee11ed62371baba2d87bb6d89) @@ -7,8 +7,8 @@ * * @file GLXferPump.c * -* @author (last) Sameer Kalliadan Poyil -* @date (last) 28-Feb-2026 +* @author (last) Varshini Nagabooshanam +* @date (last) 18-Jun-2026 * * @author (original) Sean Nash * @date (original) 19-Sep-2024 @@ -36,7 +36,7 @@ // ********** private data ********** -static F32 currentAirPumpMotorPowerLevel; ///< Current air pump motor state: 0=off, 1..255=power level. +static F32 currentAirPumpMotorPowerLevel; ///< Current air pump motor power level state: 0=off, 1..255=power level. // ********** private function prototypes ********** Index: firmware/App/Services/FpgaTD.c =================================================================== diff -u -r9b73ea7e6bae0b28591b132cd832c6a41633fc81 -r80a7440462a8f87ee11ed62371baba2d87bb6d89 --- firmware/App/Services/FpgaTD.c (.../FpgaTD.c) (revision 9b73ea7e6bae0b28591b132cd832c6a41633fc81) +++ firmware/App/Services/FpgaTD.c (.../FpgaTD.c) (revision 80a7440462a8f87ee11ed62371baba2d87bb6d89) @@ -8,7 +8,7 @@ * @file FpgaTD.c * * @author (last) Varshini Nagabooshanam -* @date (last) 22-May-2026 +* @date (last) 15-Jun-2026 * * @author (original) Sean Nash * @date (original) 01-Aug-2024 @@ -1292,18 +1292,6 @@ /*********************************************************************//** * @brief - * The getAirPumpRPM function reads the air pump RPM from FPGA. - * @details \b Inputs: fpgaSensorReadings - * @details \b Outputs: none - * @return air pump RPM value - *************************************************************************/ -U16 getAirPumpRPM( void ) -{ - return fpgaSensorReadings.h12Speed; -} - -/*********************************************************************//** - * @brief * The checkFPGACommFailure function increments the FPGA comm failure * windowed timer and returns whether or not the number of failures in * the window have been reached. Index: firmware/App/Services/FpgaTD.h =================================================================== diff -u -re36419ec3d1b64f3831b631d57f30ce4018646c5 -r80a7440462a8f87ee11ed62371baba2d87bb6d89 --- firmware/App/Services/FpgaTD.h (.../FpgaTD.h) (revision e36419ec3d1b64f3831b631d57f30ce4018646c5) +++ firmware/App/Services/FpgaTD.h (.../FpgaTD.h) (revision 80a7440462a8f87ee11ed62371baba2d87bb6d89) @@ -8,7 +8,7 @@ * @file FpgaTD.h * * @author (last) Varshini Nagabooshanam -* @date (last) 22-May-2026 +* @date (last) 15-Jun-2026 * * @author (original) Sean Nash * @date (original) 01-Aug-2024 @@ -146,7 +146,6 @@ U16 getFPGABoardTemperature( void ); U32 getFPGAPBAADCTemperature( void ); U16 getFPGAInletFan1TogglePeriod( void ); -U16 getAirPumpRPM( void ); BOOL getH9FrontDoorClosedStatus( void ); U32 getFPGAEjectorRetractOpticalSensor( void );