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.
Dependents: backdrive backdrive_3
Diff: encoder.h
- Revision:
- 4:c99eb511ac08
- Parent:
- 3:6dce9d79da13
- Child:
- 5:32ee588c735d
- Child:
- 8:dd1732f51780
diff -r 6dce9d79da13 -r c99eb511ac08 encoder.h
--- a/encoder.h Tue Dec 04 09:42:15 2018 +0000
+++ b/encoder.h Sat Jan 05 07:16:33 2019 +0000
@@ -10,6 +10,7 @@
VELOCITY,
ACCELERATION,
OMEGA,
+
DELTA_DISTANCE,
};
@@ -47,6 +48,8 @@
private:
void readAphaseRise();
void readAphaseFall();
+ void readBphaseRise();
+ void readBphaseFall();
float rpm, distance, omega, velocity, radius, delta_distance,
ppr, dt, dt_square, circle, acceleration;
@@ -56,7 +59,7 @@
}
*/
InterruptIn aPhase;
- DigitalIn bPhase;
+ InterruptIn bPhase;
};
#endif