From 961fb696536e35642f2b7064cc3c64676ebebb17 Mon Sep 17 00:00:00 2001 From: zisi Date: Sun, 19 Aug 2018 16:17:39 +0300 Subject: [PATCH] Change the direction of azimuth orientation Signed-off-by: zisi --- libraries/as5601.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/as5601.h b/libraries/as5601.h index dfbb2b6..94cb6b5 100755 --- a/libraries/as5601.h +++ b/libraries/as5601.h @@ -78,7 +78,7 @@ public: else if (delta_raw_pos < -180) _n--; // Calculate the real angle - real_pos = ((raw_pos + 360 * _n) / _enc_ratio) - _angle_offset; + real_pos = - ((raw_pos + 360 * _n) / _enc_ratio) - _angle_offset; _raw_prev_pos = raw_pos; } *new_pos = (double)real_pos;