Index: firmware/App/Controllers/SyringePump.c =================================================================== diff -u -r06b1c05c9c43fd6c6d80c3af32c1563f0b28f36c -r82a8a3cf0ea04c4d2732a8ea912cfb85b981ec5f --- firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision 06b1c05c9c43fd6c6d80c3af32c1563f0b28f36c) +++ firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision 82a8a3cf0ea04c4d2732a8ea912cfb85b981ec5f) @@ -8,7 +8,7 @@ * @file SyringePump.c * * @author (last) Sean Nash -* @date (last) 01-Dec-2022 +* @date (last) 05-Feb-2023 * * @author (original) Sean Nash * @date (original) 04-Mar-2021 @@ -479,6 +479,18 @@ /*********************************************************************//** * @brief + * The resetPreLoadStatus function resets the syringe pump pre-load status. + * @details Inputs: none + * @details Outputs: syringePumpPreLoadCompleted + * @return none + *************************************************************************/ +void resetPreLoadStatus( void ) +{ + syringePumpPreLoadCompleted = FALSE; +} + +/*********************************************************************//** + * @brief * The stopSyringePump function requests syringe pump be stopped. * @details Inputs: none * @details Outputs: syringePumpSetRate, syringePumpState, heparinDeliveryState @@ -1405,7 +1417,6 @@ syringePumpPlungerFound = FALSE; syringeVolumeAdequate = FALSE; syringePumpPrimeCompleted = FALSE; - syringePumpPreLoadCompleted = FALSE; syringePumpVolumeRequired = 0.0F; // Clear insufficient volume alarm condition in case we're retracting to allow user to resolve alarm clearAlarmCondition( ALARM_ID_HD_SYRINGE_PUMP_NOT_ENOUGH_HEPARIN_ALARM ); @@ -1525,10 +1536,9 @@ syringePumpVolumeDelivered.data = 0.0; syringePumpSafetyVolumeDelivered = 0.0; syringePumpVolumeStartPosition = pos; - syringePumpPreLoadCompleted = FALSE; - // Check estimated syringe volume needed for treatment vs. volume detected - if insufficient for treatment needs, alarm - if ( syringeVol >= txVolume ) + // Check estimated syringe volume needed for treatment vs. volume detected - if insufficient for treatment needs, alarm (check only applies in pre-tx mode) + if ( ( syringeVol >= txVolume ) || ( getCurrentOperationMode() != MODE_PRET ) ) { syringePumpPlungerFound = TRUE; syringeVolumeAdequate = TRUE; @@ -1587,7 +1597,6 @@ syringePumpVolumeDelivered.data = 0.0; syringePumpSafetyVolumeDelivered = 0.0; syringePumpVolumeStartPosition = syringePumpPosition.data; - syringePumpPreLoadCompleted = FALSE; } // Has syringe been removed?