diff --git a/components/modules/Kconfig b/components/modules/Kconfig index 4b5a8f5c..11f47bcd 100644 --- a/components/modules/Kconfig +++ b/components/modules/Kconfig @@ -228,6 +228,7 @@ menu "NodeMCU modules" config NODEMCU_CMODULE_ROTARY bool "Rotary switch input device" default "n" + select NODEMCU_CMODULE_GPIO help Includes the rotary module which allows easy access to one or more rotary switches. diff --git a/components/modules/rotary.c b/components/modules/rotary.c index 409ef784..0b69aa7b 100644 --- a/components/modules/rotary.c +++ b/components/modules/rotary.c @@ -231,7 +231,6 @@ static bool lrotary_dequeue_single(lua_State* L, DATA *d) bool something_pending = false; if (d) { - // This chnnel is open rotary_event_t result; if (rotary_getevent(d->handle, &result)) { diff --git a/docs/modules/rotary.md b/docs/modules/rotary.md index 4ebd2379..1f969e18 100644 --- a/docs/modules/rotary.md +++ b/docs/modules/rotary.md @@ -80,8 +80,8 @@ Events will be delivered in order, but there may be missing TURN events. If ther queue of events, then PRESS and RELEASE events may also be missed. Multiple pending TURN events are typically dispatched as one TURN callback with the final position as its parameter. -Some switches have 4 steps per detent. This means that, in practice, the application -should divide the position by 4 and use that to determine the number of clicks. It is +Some switches have 4 (or 2) steps per detent. This means that, in practice, the application +should divide the position by 4 (or 2) and use that to determine the number of clicks. It is unlikely that a switch will ever reach 30 bits of rotation in either direction -- some are rated for under 50,000 revolutions.