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 RotaryEncoder by
Revision 4:7a50a5d3682c, committed 2016-06-12
- Comitter:
- ryood
- Date:
- Sun Jun 12 08:48:43 2016 +0000
- Parent:
- 3:6736c3bf48c9
- Child:
- 5:60c44df48016
- Commit message:
- setVal????????
Changed in this revision
| RotaryEncoder.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/RotaryEncoder.h Wed May 25 01:08:22 2016 +0000
+++ b/RotaryEncoder.h Sun Jun 12 08:48:43 2016 +0000
@@ -71,13 +71,24 @@
/**
* Get the value.
*
- * @param The value.
+ * @return The value.
*/
int getVal() const {
return val;
}
/**
+ * Set the value.
+ *
+ * @param The value.
+ */
+ void setVal(int _val) {
+ if (min <= _val && _val <= max) {
+ val = _val;
+ }
+ }
+
+ /**
* Set the ticker interval.
*
* @param The interval in microseconds.
