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: Encoder.h
- Revision:
- 3:cf7ae37c6930
- Parent:
- 1:c44f4aa7a45d
--- a/Encoder.h Mon Jan 25 14:26:30 2021 +0000
+++ b/Encoder.h Sun Mar 07 09:25:55 2021 +0000
@@ -9,6 +9,8 @@
Encoder(PinName pin_A, PinName pin_B);
float get_raito();
+
+ float get_rotation();
private:
Timer timer;
@@ -19,10 +21,12 @@
int max_time;
- float dt_to_raito;
+ float to_raito; //TODO: rename
float raito;
+ int total_count;
+
void did_rise();
void update_raito(int dt); //dt microsec