Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: PositionSensor/PositionSensor.cpp
- Revision:
- 48:74a40481740c
- Parent:
- 47:e1196a851f76
diff -r e1196a851f76 -r 74a40481740c PositionSensor/PositionSensor.cpp
--- a/PositionSensor/PositionSensor.cpp	Wed Dec 05 04:07:46 2018 +0000
+++ b/PositionSensor/PositionSensor.cpp	Sun Mar 03 02:51:51 2019 +0000
@@ -30,7 +30,7 @@
     //raw = spi->write(readAngleCmd);
     //raw &= 0x3FFF;   
     raw = spi->write(0);
-    raw = raw>>1;                                                             //Extract last 14 bits
+    raw = raw>>2;                                                             //Extract last 14 bits
     GPIOA->ODR |= (1 << 15);
     int off_1 = offset_lut[raw>>7];
     int off_2 = offset_lut[((raw>>7)+1)%128];