Review comments. Also ensure that we have GPIO if we have ROTARY.
This commit is contained in:
parent
82b4c81484
commit
39c95722e3
|
@ -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.
|
||||
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in New Issue