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: serial_connected_mcu_nucleo rotary_encoder_mbed serial_connected_mcu_nucleo omuni_speed_pid ... more
Fork of rotary_encoder by
Revision 10:684e1604e5ea, committed 2016-06-25
- Comitter:
- inst
- Date:
- Sat Jun 25 05:40:31 2016 +0000
- Parent:
- 9:d1e6284a13ab
- Commit message:
- add read() to rotary_encoder;
Changed in this revision
| rotary_encoder.cpp | Show annotated file Show diff for this revision Revisions of this file |
| rotary_encoder.hpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/rotary_encoder.cpp Sat May 21 03:19:33 2016 +0000
+++ b/rotary_encoder.cpp Sat Jun 25 05:40:31 2016 +0000
@@ -10,3 +10,7 @@
float rotary_encoder::get_revol_num() const {
return static_cast<float>(get_counts()) / resolution_;
}
+
+float rotary_encoder::read() const {
+ return get_revol_num();
+}
--- a/rotary_encoder.hpp Sat May 21 03:19:33 2016 +0000
+++ b/rotary_encoder.hpp Sat Jun 25 05:40:31 2016 +0000
@@ -11,6 +11,7 @@
virtual int32_t get_counts() const = 0;
float get_revol_num() const;
+ float read() const;
virtual void reset() = 0;
virtual void start() = 0;
