From 45722f3d79ec9c832412e0af6aa7f210b970f592 Mon Sep 17 00:00:00 2001 From: philip Date: Mon, 25 Apr 2016 21:34:21 -0400 Subject: [PATCH] Fixed the documentation to match the implementation --- docs/en/modules/rotary.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/modules/rotary.md b/docs/en/modules/rotary.md index e01033b1..935cc98d 100644 --- a/docs/en/modules/rotary.md +++ b/docs/en/modules/rotary.md @@ -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)