fdsaf

Files at this revision

API Documentation at this revision

Comitter:
shadow103012033
Date:
Wed Mar 27 07:10:12 2019 +0000
Parent:
3:a969ae9954a8
Commit message:
fixed pwm2 bug -- tommy

Changed in this revision

hallsensor_software_decoder.h Show annotated file Show diff for this revision Revisions of this file
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) {