DRV8323RS Version

Dependencies:   mbed-dev-f303 FastPWM3

Revision:
28:8c7e29f719c5
Parent:
26:2b865c00d7e9
Child:
34:51647c6c500d
diff -r 501fee691e0e -r 8c7e29f719c5 PositionSensor/PositionSensor.cpp
--- a/PositionSensor/PositionSensor.cpp	Wed May 17 14:53:22 2017 +0000
+++ b/PositionSensor/PositionSensor.cpp	Sun Jun 04 19:00:22 2017 +0000
@@ -92,6 +92,8 @@
 
 void PositionSensorAM5147::ZeroPosition(){
     rotations = 0;
+    MechOffset = 0;
+    Sample();
     MechOffset = GetMechPosition();
     }