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:
- 20:bf9ea5125d52
- Parent:
- 14:80ce59119d93
- Child:
- 22:60276ba87ac6
diff -r bd10a04eedc2 -r bf9ea5125d52 PositionSensor/PositionSensor.cpp
--- a/PositionSensor/PositionSensor.cpp Tue Feb 14 03:28:16 2017 +0000
+++ b/PositionSensor/PositionSensor.cpp Thu Mar 02 15:31:23 2017 +0000
@@ -66,7 +66,7 @@
rotations = 0;
spi = new SPI(PC_12, PC_11, PC_10);
spi->format(16, 1);
- spi->frequency(10000000);
+ spi->frequency(5000000);
cs = new DigitalOut(PA_15);
cs->write(1);
readAngleCmd = 0xffff;
@@ -118,6 +118,8 @@
MechOffset = GetMechPosition();
}
+
+
PositionSensorEncoder::PositionSensorEncoder(int CPR, float offset, int ppairs) {
_ppairs = ppairs;
_CPR = CPR;