Index: firmware/App/Controllers/ConcentratePumps.c =================================================================== diff -u -r652b062698ad294c2bd27db3f836b60c69219311 -r550a5df210ac26217412e5e312d0a08864c5682e --- firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision 652b062698ad294c2bd27db3f836b60c69219311) +++ firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision 550a5df210ac26217412e5e312d0a08864c5682e) @@ -544,16 +544,17 @@ static void calcMeasuredPumpsSpeed( CONCENTRATE_PUMPS_T pumpId, U16 pulseWidthCount ) { F32 pulseWidthInSecond = ( (F32)pulseWidthCount * CONCENTRATE_PUMP_HALL_SENSE_PERIOD_RESOLUTION ) / US_PER_SECOND; - BOOL isPulseWidthOut = ( pulseWidthInSecond <= CONCENTRATE_PUMP_MIN_ALLOWED_HALL_SENSOR_COUNT ? TRUE : FALSE ); + concentratePumps[ pumpId ].measuredPumpSpeed.data = ( 1.0 / pulseWidthInSecond ) * CONCENTRATE_PUMP_VOLUME_PER_PULSE * SEC_PER_MIN; - // TODO will implement in DEN-12224 + /* TODO will implement in DEN-12224 + // BOOL isPulseWidthOut = ( pulseWidthInSecond <= CONCENTRATE_PUMP_MIN_ALLOWED_HALL_SENSOR_COUNT ? TRUE : FALSE ); //checkPersistentAlarm( ALARM_ID_DG_CONC_PUMP_HALL_SENSOR_OUT_OF_RANGE, isPulseWidthOut, pulseWidthInSecond, CONCENTRATE_PUMP_MIN_ALLOWED_HALL_SENSOR_COUNT ); - // TODO will implement in DEN-12224 if ( FALSE == isPulseWidthOut ) { concentratePumps[ pumpId ].measuredPumpSpeed.data = ( 1.0 / pulseWidthInSecond ) * CONCENTRATE_PUMP_VOLUME_PER_PULSE * SEC_PER_MIN; } + TODO will implement in DEN-12224 */ if ( CONCENTRATE_PUMP_ZERO_FLOW_RATE == pulseWidthCount ) { Index: firmware/App/Controllers/ROPump.c =================================================================== diff -u -r4b208641ed0c22d13211e6343ffaec9778560cc5 -r550a5df210ac26217412e5e312d0a08864c5682e --- firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision 4b208641ed0c22d13211e6343ffaec9778560cc5) +++ firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision 550a5df210ac26217412e5e312d0a08864c5682e) @@ -808,12 +808,12 @@ { RO_PUMP_DATA_T pumpData; - pumpData.roPumpTgtFlowRateLM = getTargetROPumpFlowRate(); - pumpData.roPumpTgtPressure = getTargetROPumpPressure(); - pumpData.measROFlowRate = getMeasuredROFlowRateLPM(); - pumpData.roPumpDutyCycle = roPumpDutyCyclePctSet * FRACTION_TO_PERCENT_FACTOR; - pumpData.roPumpState = (U32)roPumpState; - pumpData.roPumpFBDutyCycle = roPumpFeedbackDutyCyclePct * FRACTION_TO_PERCENT_FACTOR; + pumpData.roPumpTgtFlowRateLM = getTargetROPumpFlowRate(); + pumpData.roPumpTgtPressure = getTargetROPumpPressure(); + pumpData.measROFlowRate = getMeasuredROFlowRateLPM(); + pumpData.roPumpDutyCycle = roPumpDutyCyclePctSet * FRACTION_TO_PERCENT_FACTOR; + pumpData.roPumpState = (U32)roPumpState; + pumpData.roPumpFBDutyCycle = roPumpFeedbackDutyCyclePct * FRACTION_TO_PERCENT_FACTOR; pumpData.roPumpRawFlowRateMLP = rawFlowLP * ML_PER_LITER; Index: firmware/App/Services/Reservoirs.c =================================================================== diff -u -r92708a5ab23026f5c9afce66bfa542c84141011a -r550a5df210ac26217412e5e312d0a08864c5682e --- firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 92708a5ab23026f5c9afce66bfa542c84141011a) +++ firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 550a5df210ac26217412e5e312d0a08864c5682e) @@ -674,6 +674,7 @@ F32 loadcellWeightML = getLoadCellSmallFilteredWeight( associatedLoadCell[ reservoirId ] ); U32 targetDrainVolML = getU32OverrideValue( &drainVolumeTargetMl ); F32 drainFlowML = loadcellWeightML - previousReservoirWeight[ reservoirId ]; + F32 drainThresholdML = ( (F32)getDrainPumpTargetRPM() ) / 2400.0; // Update the structure with the current weight as the previous previousReservoirWeight[ reservoirId ] = getLoadCellSmallFilteredWeight( associatedLoadCell[ reservoirId ] ); @@ -683,11 +684,11 @@ // ready to consider this the end of the reservoir flow // If the wait for drain to steady has elapsed and the drain pump inlet pressure sensor is indicating and increased vacuum, // signal the drain is complete - if ( ( drainFlowML <= DRAIN_THRESHOLD_ML( getDrainPumpTargetRPM() ) ) && ( 0 == reservoirWeightUnchangeStartTime[ reservoirId ] ) ) + if ( ( drainFlowML <= drainThresholdML ) && ( 0 == reservoirWeightUnchangeStartTime[ reservoirId ] ) ) { reservoirWeightUnchangeStartTime[ reservoirId ] = getMSTimerCount(); } - else if ( drainFlowML > DRAIN_THRESHOLD_ML( getDrainPumpTargetRPM() ) ) + else if ( drainFlowML > drainThresholdML ) { reservoirWeightUnchangeStartTime[ reservoirId ] = 0; }