Index: firmware/App/Drivers/PeristalticPump.c =================================================================== diff -u -r291d652fcd09b461728962a547d3b08163737d76 -r52a632f60aba59fe611daf7736dae8bc6f263a2a --- firmware/App/Drivers/PeristalticPump.c (.../PeristalticPump.c) (revision 291d652fcd09b461728962a547d3b08163737d76) +++ firmware/App/Drivers/PeristalticPump.c (.../PeristalticPump.c) (revision 52a632f60aba59fe611daf7736dae8bc6f263a2a) @@ -121,7 +121,14 @@ // update measured pump rotor speed if ( rotPer != 0 ) { - pumpMeasRotSpeedRPM = H4_ROT_PERIOD_TO_RPM( rotPer ); + // abs() is used to get the magnitude from signed FPGA period value + pumpMeasRotSpeedRPM = H4_ROT_PERIOD_TO_RPM( abs( rotPer ) ); + + // negate rotor speed as motor spins in opposite direction + if ( pumpSetSpeedRPM > 0 ) + { + pumpMeasRotSpeedRPM *= -1.0F; + } } else {