Index: firmware/App/Controllers/SyringePump.c =================================================================== diff -u -rbfa0e8787383e83b19cda450c477b58778513fdf -rd3b7ae356aae29c99cb039713a2e120fdbce5a9c --- firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision bfa0e8787383e83b19cda450c477b58778513fdf) +++ firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision d3b7ae356aae29c99cb039713a2e120fdbce5a9c) @@ -230,7 +230,7 @@ static BOOL checkOcclusionOrEmpty( BOOL stopPump ); static BOOL checkSyringeRemoved( BOOL stopPump ); static BOOL checkMaxTravel( BOOL stopPump, S32 maxPos ); -static BOOL checkMaxMeasRate( BOOL stopPump, F32 pctMargin ); +static BOOL checkMeasRate( BOOL stopPump, F32 pctMargin ); static BOOL checkVolumeVsSafetyVolume( BOOL stopPump, F32 pctMargin ); static void publishSyringePumpData( void ); @@ -1167,7 +1167,7 @@ stopPump = checkOcclusionOrEmpty( stopPump ); // Check for commanded vs. meas. rate - stopPump = checkMaxMeasRate( stopPump, SYRINGE_PUMP_RATE_CHECK_MARGIN ); + stopPump = checkMeasRate( stopPump, SYRINGE_PUMP_RATE_CHECK_MARGIN ); // Check position > max travel stopPump = checkMaxTravel( stopPump, syringePumpVolumeStartPosition + ( bolusVol * FIVE_PCT_OVER_ALLOWANCE * SYRINGE_ENCODER_COUNTS_PER_ML ) ); @@ -1208,7 +1208,7 @@ stopPump = checkMaxTravel( stopPump, SYRINGE_PUMP_EMPTY_POS + SYRINGE_PUMP_EMPTY_POS_MARGIN ); // Check for commanded vs. meas. rate - stopPump = checkMaxMeasRate( stopPump, SYRINGE_PUMP_RATE_CHECK_MARGIN ); + stopPump = checkMeasRate( stopPump, SYRINGE_PUMP_RATE_CHECK_MARGIN ); // Check volume vs. safety volume stopPump = checkVolumeVsSafetyVolume( stopPump, SYRINGE_PUMP_VOLUME_CHECK_MARGIN ); @@ -1344,16 +1344,15 @@ /*********************************************************************//** * @brief - * The checkMaxMeasRate function checks whether the measured rate is exceeding - * a maximum rate (in mL/hr). This threshold is state dependent so the calling - * function must provide the maximum rate to apply. + * The checkMeasRate function checks whether the measured rate is within a + * given margin of the set rate (in mL/hr). * @details Inputs: syringePumpMeasRate.data, syringePumpSetRate * @details Outputs: alarm triggered if measured and set rates deviate too much * @param stopPump flag passed in by caller indicating whether pump should be stopped * @param pctMargin percent tolerance allowed between set and measured rate * @return TRUE if pump should be stopped, FALSE if not *************************************************************************/ -static BOOL checkMaxMeasRate( BOOL stopPump, F32 pctMargin ) +static BOOL checkMeasRate( BOOL stopPump, F32 pctMargin ) { BOOL result = stopPump; F32 rate = getSyringePumpMeasRate();