Index: firmware/App/Controllers/Fans.c =================================================================== diff -u -r4df8828df03ee996540084c57f9b46c0febc1e03 -rd0f8958c30ff294da7e5088b89226f0ac30f3a36 --- firmware/App/Controllers/Fans.c (.../Fans.c) (revision 4df8828df03ee996540084c57f9b46c0febc1e03) +++ firmware/App/Controllers/Fans.c (.../Fans.c) (revision d0f8958c30ff294da7e5088b89226f0ac30f3a36) @@ -18,6 +18,7 @@ #include // For fabs #include "etpwm.h" +#include "Battery.h" #include "Fans.h" #include "FPGA.h" #include "PersistentAlarm.h" @@ -412,11 +413,14 @@ F32 fansMinAllowedRPM = fansNominalRPM - ( fansNominalRPM * FANS_MIN_RPM_OUT_OF_RANGE_TOL ); F32 fansMaxAllowedRPM = fansNominalRPM + ( fansNominalRPM * FANS_MAX_RPM_OUT_OF_RANGE_TOL ); - // Loop through the fans and make sure the each of them have RPM in range - for ( fan = FAN_INLET_1; fan < NUM_OF_FANS_NAMES; fan++ ) + if ( isACPowerLost() != TRUE ) { - rpm = getMeasuredFanRPM( fan ); - isFanRPMOutOfRange |= ( ( rpm < fansMinAllowedRPM ) || ( rpm > fansMaxAllowedRPM ) ? TRUE : FALSE ); + // Loop through the fans and make sure the each of them have RPM in range + for ( fan = FAN_INLET_1; fan < NUM_OF_FANS_NAMES; fan++ ) + { + rpm = getMeasuredFanRPM( fan ); + isFanRPMOutOfRange |= ( ( rpm < fansMinAllowedRPM ) || ( rpm > fansMaxAllowedRPM ) ? TRUE : FALSE ); + } } // If the fans alarm has been raised already, do not raise again