Index: firmware/App/Controllers/ROPump.c =================================================================== diff -u -r19dd28ed9c1c81d3bbf50e7a6bf691f19be0b54e -r644186b74908ecb1c61a2af06a2bfb43b5618c8e --- firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision 19dd28ed9c1c81d3bbf50e7a6bf691f19be0b54e) +++ firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision 644186b74908ecb1c61a2af06a2bfb43b5618c8e) @@ -54,12 +54,10 @@ #define ROP_PRESSURE_TO_PWM_INTERCEPT 0.0F ///< Intercept of pressure to PWM line equation. #define DATA_PUBLISH_COUNTER_START_COUNT 10 ///< Data publish counter start count. - -#define ROP_PRESSURE_TO_PWM_PCT(pres) ( ( ROP_PRESSURE_TO_PWM_SLOPE * pres + ROP_PRESSURE_TO_PWM_INTERCEPT ) / MAX_FLUID_PUMP_PWM_DUTY_CYCLE ) ///< PWM line equation for pressure. converted to percentage. - -#define ROP_FLOW_TO_PWM_PCT(slope, intercept, flow) ( ( slope * log(flow) + intercept ) / MAX_FLUID_PUMP_PWM_DUTY_CYCLE ) ///< PWM line equation for flow converted to percentage. -#define ROP_FLOW_TO_PWM(slope, intercept, flow) ( slope * log(flow) + intercept ) ///< PWM line equation for flow converted to percentage. - +///< PWM line equation for pressure. converted to percentage. +#define ROP_PRESSURE_TO_PWM_PCT(pres) ( ( ROP_PRESSURE_TO_PWM_SLOPE * pres + ROP_PRESSURE_TO_PWM_INTERCEPT ) / MAX_FLUID_PUMP_PWM_DUTY_CYCLE ) +///< PWM line equation for flow converted to percentage. +#define ROP_FLOW_TO_PWM_PCT(slope, intercept, flow) ( ( slope * log(flow) + intercept ) / MAX_FLUID_PUMP_PWM_DUTY_CYCLE ) #define FP_FLOW_RATE_BELOW_TARGET_TIMEOUT_MS ( 10 * MS_PER_SECOND ) ///< Timeout for flow rate below 75% of target flow rate #define FP_FLOW_RATE_BELOW_TARGET_CLEAR_MS ( 10 * MS_PER_SECOND ) ///< Clear timeout for flow rate below target flow rate #define PERMEATE_FLOW_LOW_OUT_OF_RANGE_EXEMPT_MS ( 10 * MS_PER_SECOND ) ///< Permeate flow low alarm exempt for 10 seconds after starting from Off