Index: firmware/App/Controllers/DrainPump.c =================================================================== diff -u -rbcf9339af8a725054a8c936ae572bb95e2bcd3f0 -r3e9328290bdbc18a940935bd7f7c720ca8432b1d --- firmware/App/Controllers/DrainPump.c (.../DrainPump.c) (revision bcf9339af8a725054a8c936ae572bb95e2bcd3f0) +++ firmware/App/Controllers/DrainPump.c (.../DrainPump.c) (revision 3e9328290bdbc18a940935bd7f7c720ca8432b1d) @@ -58,7 +58,7 @@ FLOAT_TO_INT_ROUNDUP_OFFSET ) ///< RPM to DAC conversion equation. #define TOGGLE_PERIOD_RESOLUTION_SECONDS 0.000005F ///< Toggle period to resolution in seconds. -#define ROTATIONAL_TO_TOGGLE_PERIOD_CONVERSION 4 ///< Rotational to toggle period conversion coefficient. +#define ROTATIONAL_TO_TOGGLE_PERIOD_CONVERSION 4.0F ///< Rotational to toggle period conversion coefficient. #define DRAIN_PUMP_P_COEFFICIENT 0.5F ///< P term for drain pump delta pressure control. #define DRAIN_PUMP_I_COEFFICIENT 1.0F ///< I term for drain pump delta pressure control. @@ -123,7 +123,7 @@ static DG_DRAIN_PUMP_CAL_RECORD_T drainPumpCalRecord; ///< Drain pump calibration record. /// ADC to RPM conversion coefficient or RPM to ADC conversion. -static const F32 CONVERSION_COEFF = SEC_PER_MIN / ( 2 * TOGGLE_PERIOD_RESOLUTION_SECONDS * ROTATIONAL_TO_TOGGLE_PERIOD_CONVERSION ); +static const F32 CONVERSION_COEFF = (F32) SEC_PER_MIN / ( 2.0F * TOGGLE_PERIOD_RESOLUTION_SECONDS * ROTATIONAL_TO_TOGGLE_PERIOD_CONVERSION ); // ********** private function prototypes **********