Index: firmware/App/Controllers/ROPump.c =================================================================== diff -u -r410afd26b3ae5e372310c696c82f58c59235e10d -r8d272582cbd2cb5fc0c6af0fead2867ce02658b0 --- firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision 410afd26b3ae5e372310c696c82f58c59235e10d) +++ firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision 8d272582cbd2cb5fc0c6af0fead2867ce02658b0) @@ -55,8 +55,6 @@ #define DATA_PUBLISH_COUNTER_START_COUNT 10 ///< Data publish counter start count. -#define ROP_FLOW_TO_PWM(flow) ( ROP_FLOW_TO_PWM_SLOPE * flow + ROP_FLOW_TO_PWM_INTERCEPT ) ///< PWM line equation for flow. -#define ROP_PRESSURE_TO_PWM(pres) ( ROP_PRESSURE_TO_PWM_SLOPE * pres + ROP_PRESSURE_TO_PWM_INTERCEPT ) ///< PWM line equation for pressure. /// Enumeration of RO pump states. typedef enum ROPump_States @@ -463,6 +461,34 @@ /*********************************************************************//** * @brief + * The getTargetRODutyCyclePCT function gets the current target RO pump + * pwm. + * @details \b Inputs: roPumpOpenLoopTargetDutyCycle + * @details \b Outputs: none + * @return the current target RO pwm between 0 and 0.99 + *************************************************************************/ +F32 getTargetROPumpDutyCyclePCT( void ) +{ + return roPumpOpenLoopTargetDutyCycle; +} + +/*********************************************************************//** + * @brief + * The getCurrentRODutyCyclePCT function gets the current RO pump + * pwm. + * @details \b Inputs: none + * @details \b Outputs: none + * @return the current feedback RO pwm between 0 and 0.99 + *************************************************************************/ +F32 getCurrentROPumpDutyCyclePCT( void ) +{ + U16 dutyCyclePct = convertDutyCycleCntToPct( getFluidPumpReadPWMDutyCycle( P12_PUMP ) ); + + return dutyCyclePct; +} + +/*********************************************************************//** + * @brief * The getTargetROPumpPressure function gets the current target RO pump * pressure. * @details \b Inputs: targetROPumpPressure