N K
/
GaNtroller
a fork of priustroller
Fork of priustroller_current by
Diff: sensors/positionsensors.cpp
- Revision:
- 29:cb03760ba9ea
- Parent:
- 28:af9d43bcb371
- Child:
- 33:e7b132029bae
--- a/sensors/positionsensors.cpp Sat Mar 14 19:18:34 2015 +0000 +++ b/sensors/positionsensors.cpp Sat Mar 14 23:42:46 2015 +0000 @@ -18,6 +18,9 @@ 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;