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.
Fork of foc-ed_in_the_bot_compact by
Diff: PositionSensor/PositionSensor.cpp
- Revision:
- 8:70122bad5f90
- Parent:
- 7:caebf421f288
diff -r caebf421f288 -r 70122bad5f90 PositionSensor/PositionSensor.cpp
--- a/PositionSensor/PositionSensor.cpp Wed Mar 30 06:50:11 2016 +0000
+++ b/PositionSensor/PositionSensor.cpp Sat Apr 23 21:29:32 2016 +0000
@@ -81,12 +81,14 @@
}
}
+int PositionSensorEncoder::GetRawPosition() {
+ return TIM2->CNT;
+}
+
void PositionSensorEncoder::ZeroEncoderCount(void){
if (ZSense->read() == 1){
if (ZSense->read() == 1){
- ZTest->write(state);
TIM2->CNT=0;
- state = !state;
}
}
}
\ No newline at end of file
