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.
Dependencies: mbed-dev-f303 FastPWM3
Diff: PositionSensor/PositionSensor.cpp
- Revision:
- 57:f3336e9eb1f2
- Parent:
- 56:fe5056ac6740
--- a/PositionSensor/PositionSensor.cpp Thu Oct 10 15:03:12 2019 +0000
+++ b/PositionSensor/PositionSensor.cpp Wed Sep 22 08:36:54 2021 +0000
@@ -38,6 +38,8 @@
//raw &= 0x3FFF;
raw = spi->write(0);
raw = raw>>2; //Extract last 14 bits
+ //raw &= 0x7FFF;
+ //raw = raw>>1;
GPIOA->ODR |= (1 << 15);
int off_1 = offset_lut[raw>>7];
int off_2 = offset_lut[((raw>>7)+1)%128];