Skip to content

Commit

Permalink
Merge pull request #1265 from pjsg/fix-rotary-doc
Browse files Browse the repository at this point in the history
Fixed the rotary documentation to match the implementation
  • Loading branch information
Johny Mattsson committed Apr 26, 2016
2 parents 09ba1fc + 45722f3 commit 3ec5885
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/en/modules/rotary.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ 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
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)

Expand Down

0 comments on commit 3ec5885

Please sign in to comment.