Index: firmware/App/Controllers/AirTrap.c =================================================================== diff -u -r0a03f6a5d73875b033bf509114949555031cfe2d -rabe621833357fb15d824f474903da284f0e69f00 --- firmware/App/Controllers/AirTrap.c (.../AirTrap.c) (revision 0a03f6a5d73875b033bf509114949555031cfe2d) +++ firmware/App/Controllers/AirTrap.c (.../AirTrap.c) (revision abe621833357fb15d824f474903da284f0e69f00) @@ -72,11 +72,12 @@ } AIR_TRAP_STATE_T; /// Quadratic coefficients ax2 + bx + c -typedef struct { - F32 a; ///< Coefficient for Quadratic term - F32 b; ///< Coefficient for linear term - F32 c; ///< Constant term -}QUADRATIC_COEFFICIENTS_T; +typedef struct +{ + F32 a; ///< Coefficient for Quadratic term + F32 b; ///< Coefficient for linear term + F32 c; ///< Constant term +} QUADRATIC_COEFFICIENTS_T; // ********** private data ********** @@ -232,7 +233,7 @@ // Check for illegal levels alarm // TODO:to change later the blood set installed status - if ( STATE_CLOSED == getSwitchState( H9_SWCH ) ) // determine whether a blood set is installed - if not installed, do not trigger illegal levels alarm + if ( STATE_OPEN == getSwitchState( H9_SWCH ) ) // determine whether a blood set is installed - if not installed, do not trigger illegal levels alarm { // If the pump track on open, zero the persistent counter to not check the air trap illegal level alarm checkPersistentAlarm( ALARM_ID_TD_AIR_TRAP_ILLEGAL_LEVELS, FALSE, 0.0, 0.0 ); @@ -350,8 +351,8 @@ F32 getCalculatedAirPumpDutyCycle( void ) { F32 h14Pressure = getLongFilteredVenousPressure(); - /// LDT-2384 test formula for air trap lower events for air pump duty cycle based on venous pressure - /// air pump duty cycle (% PWM) = 0.0002x^2 + 0.0925x + 25.467, where x is long filtered H14 venous pressure in mmHg before air trap lower event + // LDT-2384 test formula for air trap lower events for air pump duty cycle based on venous pressure + // air pump duty cycle (% PWM) = 0.0002x^2 + 0.0925x + 25.467, where x is long filtered H14 venous pressure in mmHg before air trap lower event QUADRATIC_COEFFICIENTS_T coefficients = { QUADRATIC_COEFFICIENT, LINEAR_COEFFICIENT, CONSTANT_TERM }; F32 dutycycleInPct = QUADRATIC_EVAL( coefficients.a, coefficients.b, coefficients.c, h14Pressure );