Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
3ec58852
Commit
3ec58852
authored
Apr 26, 2016
by
Johny Mattsson
Browse files
Merge pull request #1265 from pjsg/fix-rotary-doc
Fixed the rotary documentation to match the implementation
parents
09ba1fc8
45722f3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
docs/en/modules/rotary.md
View file @
3ec58852
...
...
@@ -64,8 +64,8 @@ Sets a callback on specific events.
If the callback is None or omitted, then the registration is cancelled.
The callback will be invoked with three arguments when the event happens. The first argument is the
current position of the rotary switch,
the second is the eventtype,
and the third is the time when the event happened.
The callback will be invoked with three arguments when the event happens. The first argument is the
eventtype,
the second is the
current position of the rotary switch, and the third is the time when the event happened.
The position is tracked
and is represented as a signed 32-bit integer. Increasing values indicate clockwise motion. The time is the number of microseconds represented
...
...
@@ -73,7 +73,7 @@ in a 32-bit integer. Note that this wraps every hour or so.
#### Example
rotary.on(0, rotary.ALL, function (
pos, type
, when)
rotary.on(0, rotary.ALL, function (
type, pos
, when)
print "Position=" .. pos .. " event type=" .. type .. " time=" .. when
end)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment