Index: firmware/App/Controllers/ROPump.c =================================================================== diff -u -rc71fc505053e922b9865f1e241d01e144d8d68cd -re6c6e39765c3f993b6a2b965188e7c13e93ffa92 --- firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision c71fc505053e922b9865f1e241d01e144d8d68cd) +++ firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision e6c6e39765c3f993b6a2b965188e7c13e93ffa92) @@ -124,20 +124,20 @@ isROPumpOn = FALSE; stopPumpRequest = FALSE; roControlTimerCounter = 0; - roPumpDutyCyclePctSet = 0.0; - roPumpOpenLoopTargetDutyCycle = 0.0; + roPumpDutyCyclePctSet = 0.0F; + roPumpOpenLoopTargetDutyCycle = 0.0F; roPumpDataPublicationTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; roPumpDataPublishInterval.data = RO_PUMP_DATA_PUB_INTERVAL; roPumpDataPublishInterval.ovData = RO_PUMP_DATA_PUB_INTERVAL; roPumpDataPublishInterval.ovInitData = 0; roPumpDataPublishInterval.override = OVERRIDE_RESET; - targetROPumpFlowRate.data = 0.0; - targetROPumpFlowRate.ovData = 0.0; - targetROPumpFlowRate.ovInitData = 0.0; + targetROPumpFlowRate.data = 0.0F; + targetROPumpFlowRate.ovData = 0.0F; + targetROPumpFlowRate.ovInitData = 0.0F; targetROPumpFlowRate.override = OVERRIDE_RESET; - targetROPumpPressure.data = 0.0; - targetROPumpPressure.ovData = 0.0; - targetROPumpPressure.ovInitData = 0.0; + targetROPumpPressure.data = 0.0F; + targetROPumpPressure.ovData = 0.0F; + targetROPumpPressure.ovInitData = 0.0F; targetROPumpPressure.override = OVERRIDE_RESET; stopROPump(); @@ -339,11 +339,11 @@ // Clear previous target data if ( getTargetROPumpPressure() > 0.0F ) { - targetROPumpPressure.data = 0; + targetROPumpPressure.data = 0.0F;; } if ( roPumpOpenLoopTargetDutyCycle > 0.0F ) { - roPumpOpenLoopTargetDutyCycle = 0; + roPumpOpenLoopTargetDutyCycle = 0.0F;; } result = TRUE; } @@ -382,11 +382,11 @@ // Clear previous target data if ( getTargetROPumpFlowRateLPM() > 0.0F ) { - targetROPumpFlowRate.data = 0; + targetROPumpFlowRate.data = 0.0F;; } if ( roPumpOpenLoopTargetDutyCycle > 0.0F ) { - roPumpOpenLoopTargetDutyCycle = 0; + roPumpOpenLoopTargetDutyCycle = 0.0F;; } result = TRUE; } @@ -425,11 +425,11 @@ // Clear previous target data if ( getTargetROPumpFlowRateLPM() > 0.0F ) { - targetROPumpFlowRate.data = 0; + targetROPumpFlowRate.data = 0.0F;; } if ( getTargetROPumpPressure() > 0.0F ) { - targetROPumpPressure.data = 0; + targetROPumpPressure.data = 0.0F;; } } else @@ -476,6 +476,7 @@ * pressure. * @details Inputs: none * @details Outputs: dutyCyclePct + * @param targetPressure target pressure value to control in PSI * @return the current target RO pump PWM in a percentage. *************************************************************************/ static F32 roPumpPresToPWM( F32 targetPressure ) @@ -491,6 +492,7 @@ * flow rate. * @details Inputs: none * @details Outputs: dutyCyclePct + * @param targetFlow target flow value to control in in mL/min * @return the current target RO pump PWM in a percentage. *************************************************************************/ static F32 roPumpFlowToPWM( F32 targetFlow ) @@ -506,26 +508,25 @@ * resets all the variables associated with the P12 pump run. * @details \b Inputs: roPumpState[] * @details \b Outputs: stopPumpRequest[] - * @param pumpID ID of boost pump to stop * @return none *************************************************************************/ void signalROPumpHardStop( void ) { if( targetROPumpFlowRate.data > 0.0F ) { - targetROPumpFlowRate.data = 0.0; - resetPIController( PI_CONTROLLER_ID_RO_PUMP_FLOW, MIN_FLUID_PUMP_DUTY_CYCLE_PCT, 0 ); + targetROPumpFlowRate.data = 0.0F;; + resetPIController( PI_CONTROLLER_ID_RO_PUMP_FLOW, MIN_FLUID_PUMP_DUTY_CYCLE_PCT, 0.0F ); } if( targetROPumpPressure.data > 0.0F ) { - targetROPumpPressure.data = 0.0; - resetPIController( PI_CONTROLLER_ID_RO_PUMP_PRES, MIN_FLUID_PUMP_DUTY_CYCLE_PCT, 0 ); + targetROPumpPressure.data = 0.0F;; + resetPIController( PI_CONTROLLER_ID_RO_PUMP_PRES, MIN_FLUID_PUMP_DUTY_CYCLE_PCT, 0.0F ); } roPumpState = RO_PUMP_OFF_STATE; - roPumpDutyCyclePctSet = 0; + roPumpDutyCyclePctSet = 0.0F; roControlTimerCounter = 0; roPumpOpenLoopTargetDutyCycle = 0; stopROPump(); @@ -534,14 +535,14 @@ /*********************************************************************//** * @brief * The stopROPump function sets the P12 pump duty cycle to zero. - * @details Inputs: isROPumpOn, roPumpPWMDutyCyclePctSet + * @details Inputs: none * @details Outputs: isROPumpOn, roPumpPWMDutyCyclePctSet * @return none *************************************************************************/ static void stopROPump( void ) { isROPumpOn = FALSE; - roPumpDutyCyclePctSet = 0.0; + roPumpDutyCyclePctSet = 0.0F; // Set the new duty cycle of the pump setFluidPumpPWMDutyCycle( P12_PUMP, 0 ); } @@ -558,6 +559,7 @@ { return isROPumpOn; } + /*********************************************************************//** * @brief * The publishROPumpData function publishes p12 pump data at the set interval. @@ -611,10 +613,10 @@ /*********************************************************************//** * @brief - * The testROPumpDataPublishIntervalOverride function overrides the RO pump + * The testROPumpTargetPressureOverride function overrides the RO pump * data publish interval. - * @details Inputs: roPumpDataPublishInterval - * @details Outputs: roPumpDataPublishInterval + * @details Inputs: targetROPumpPressure + * @details Outputs: targetROPumpPressure * @param message Override message from Dialin which includes the value * that override ro pump data publish interval with (in ms) * @return TRUE if override successful, FALSE if not @@ -628,10 +630,10 @@ /*********************************************************************//** * @brief - * The testROPumpDataPublishIntervalOverride function overrides the RO pump + * The testROPumpTargetFlowOverride function overrides the RO pump * data publish interval. - * @details Inputs: roPumpDataPublishInterval - * @details Outputs: roPumpDataPublishInterval + * @details Inputs: targetROPumpFlowRate + * @details Outputs: targetROPumpFlowRate * @param message Override message from Dialin which includes the value * that override ro pump data publish interval with (in ms) * @return TRUE if override successful, FALSE if not