a fork of priustroller

Dependencies:   mbed

Fork of priustroller_current by N K

Revision:
33:e7b132029bae
Parent:
29:cb03760ba9ea
Child:
54:e8d9bc885723
--- a/sensors/positionsensors.cpp	Mon Mar 16 02:43:19 2015 +0000
+++ b/sensors/positionsensors.cpp	Mon Mar 16 03:09:48 2015 +0000
@@ -4,8 +4,8 @@
 
 AnalogHallPositionSensor::AnalogHallPositionSensor(PinName pin_a, PinName pin_b, float cal1_a, float cal2_a, 
                              float cal1_b, float cal2_b, float offset) {
-    _in_a = new NativeAnalogIn(pin_a);
-    _in_b = new NativeAnalogIn(pin_b);
+    _in_a = new AnalogIn(pin_a);
+    _in_b = new AnalogIn(pin_b);
     _cal1_a = cal1_a;
     _cal2_a = cal2_a;
     _cal1_b = cal1_b;
@@ -18,9 +18,6 @@
     float ascaled = 2 * (((float) *_in_a - _cal1_a) / (_cal2_a - _cal1_a) - 0.5f);
     float bscaled = 2 * (((float) *_in_b - _cal1_b)/ (_cal2_b - _cal1_b) - 0.5f);
     
-    dbg_ascaled = ascaled;
-    dbg_bscaled = bscaled;
-    
     float x = bscaled / ascaled;
     
     unsigned int index = (abs(x) / ATAN_UPPER_BOUND) * ATAN_TABLE_SIZE;