Index: firmware/App/Controllers/AirPump.c =================================================================== diff -u -r64d2b855d4021c416d7db207d89f61d92d14a32a -r59db8aee013909ad99e034b638b27e16a2d88df7 --- firmware/App/Controllers/AirPump.c (.../AirPump.c) (revision 64d2b855d4021c416d7db207d89f61d92d14a32a) +++ firmware/App/Controllers/AirPump.c (.../AirPump.c) (revision 59db8aee013909ad99e034b638b27e16a2d88df7) @@ -153,9 +153,6 @@ *************************************************************************/ void execAirPumpController( void ) { - // update the speed every tick - currentAirPumpRPM = getAirPumpMotorRPM(); - switch( currentAirPumpState ) { case AIR_PUMP_STATE_INIT: @@ -177,7 +174,8 @@ // Check stall condition checkAirPumpStallCondition(); - + // update the speed every tick + currentAirPumpRPM = getAirPumpMotorRPM(); publishAirPumpData(); } @@ -320,7 +318,7 @@ * @brief * The testSetAirPump function sets the air pump to a given power level. * @details \b Inputs: none - * @details \b Outputs: currentAirPumpMotorPowerLevel + * @details \b Outputs: none * @param message set message from Dialin which includes the state to set * the air pump to. * @return TRUE if set request is successful, FALSE if not Index: firmware/App/Controllers/AirTrap.c =================================================================== diff -u -r28741ce21fea6cf6bbcb59c691c56629e4d061b6 -r59db8aee013909ad99e034b638b27e16a2d88df7 --- firmware/App/Controllers/AirTrap.c (.../AirTrap.c) (revision 28741ce21fea6cf6bbcb59c691c56629e4d061b6) +++ firmware/App/Controllers/AirTrap.c (.../AirTrap.c) (revision 59db8aee013909ad99e034b638b27e16a2d88df7) @@ -96,8 +96,8 @@ static BOOL airTrapHasDetectedFaultMode; ///< Flag indicates air trap unit has handled transition to fault mode. -static U32 airTrapLowerEventCount; ///< Air trap lower event count flag -static U32 airTrapLowerEventStartTime; ///< Air trap lower event start time flag +static U32 airTrapLowerEventCount; ///< Air trap lower event count +static U32 airTrapLowerEventStartTime; ///< Air trap lower event start time // ********** private function prototypes ********** @@ -257,7 +257,8 @@ * @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 @@ -291,7 +292,8 @@ } } // 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 ) ) ) + 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 ) } @@ -403,8 +405,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 ) Index: firmware/App/Drivers/GLXferPump.c =================================================================== diff -u -r10ef92168d2a6ac1ca4b2c9b83f2e85463a0674f -r59db8aee013909ad99e034b638b27e16a2d88df7 --- firmware/App/Drivers/GLXferPump.c (.../GLXferPump.c) (revision 10ef92168d2a6ac1ca4b2c9b83f2e85463a0674f) +++ firmware/App/Drivers/GLXferPump.c (.../GLXferPump.c) (revision 59db8aee013909ad99e034b638b27e16a2d88df7) @@ -72,12 +72,12 @@ *************************************************************************/ void setAirPumpMotorPower( F32 power ) { - U08 scalarPower = scalarPowerLevel = convertPercentageToScalar( power ); + scalarPowerLevel = convertPercentageToScalar( power ); // if state is changing, set the air pump to the given on/off state and send event if ( power != currentAirPumpMotorPowerLevel ) { - setH12AirPumpMotorPowerLevel( scalarPower ); + setH12AirPumpMotorPowerLevel( scalarPowerLevel ); SEND_EVENT_WITH_2_F32_DATA( TD_EVENT_AIR_PUMP_ON_OFF, currentAirPumpMotorPowerLevel, power ); currentAirPumpMotorPowerLevel = power; }