auto-measurements

Dependencies:   FastPWM3 mbed-dev

Fork of Hobbyking_Cheetah_Compact by Ben Katz

Revision:
28:8c7e29f719c5
Parent:
26:2b865c00d7e9
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();
     }