fdsaf

Revision:
4:8ce9fbe46da2
Parent:
3:a969ae9954a8
diff -r a969ae9954a8 -r 8ce9fbe46da2 hallsensor_software_decoder.h
--- a/hallsensor_software_decoder.h	Wed Mar 27 03:08:46 2019 +0000
+++ b/hallsensor_software_decoder.h	Wed Mar 27 07:10:12 2019 +0000
@@ -50,7 +50,7 @@
      **     1. hallA = 0, 1
      **     2. hallB = 0, 1 
      ********************************/
-    wheelState1.state = (wheelState1.hallA << 1) + (wheelState1.hallA ^ wheelState1.hallB) + 1;
+    wheelState1.state = (wheelState1.hallA << 1) + ((wheelState1.hallA ^ wheelState1.hallB) & 0x0001) + 1;
     
     
     if(wheelState1.state == 1) {