Index: firmware/App/Controllers/SyringePump.c =================================================================== diff -u -r943c6072dae3678dbba29f9b63035d44139ea1cf -reb8477e165e028478922b8c7dd9bdd2564b90525 --- firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision 943c6072dae3678dbba29f9b63035d44139ea1cf) +++ firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision eb8477e165e028478922b8c7dd9bdd2564b90525) @@ -1113,7 +1113,7 @@ syringePumpPosition.data = encPosition - syringePumpHomePositionOffset; // Calculate volume delivered from position syringePumpVolumeDelivered.data = (F32)( syringePumpPosition.data - syringePumpVolumeStartPosition ) / SYRINGE_ENCODER_COUNTS_PER_ML; - syringePumpVolumeDelivered.data = ( syringePumpVolumeDelivered.data < 0.0F ? 0.0F : syringePumpVolumeDelivered.data ); + syringePumpVolumeDelivered.data = MAX( syringePumpVolumeDelivered.data, 0.0F ); calcSafetyVolumeDelivered(); // Calculate measured rate (mL/hr) calcMeasRate();