Skip to content

Commit c85001f

Browse files
committed
Encoder primitive now has div arg.
1 parent db21199 commit c85001f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

v3/docs/DRIVERS.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ can be reduced. A virtual encoder with lower resolution can be useful in some
360360
applications.
361361

362362
The driver allows limits to be assigned to the virtual encoder's value so that
363-
a dial running from (say) 0 to 100 may be implemented. If limits arenused,
363+
a dial running from (say) 0 to 100 may be implemented. If limits are used,
364364
encoder values no longer represent absolute angles, as the user might continue
365365
to rotate the dial when it is "stuck" at an endstop.
366366

@@ -388,7 +388,7 @@ Constructor arguments:
388388
receives two args, `v` being the encoder's current value and `delta` being
389389
the signed difference between the current value and the previous one. Further
390390
args may be appended by the following.
391-
8. `args=()` An optional tuple of args for the callback.
391+
8. `args=()` An optional tuple of positionl args for the callback.
392392

393393
Synchronous method:
394394
* `value` No args. Returns an integer being the `Encoder` current value.
@@ -397,20 +397,21 @@ Class variable:
397397
* `delay=100` After motion is detected the driver waits for `delay` ms before
398398
reading the current position. This was found useful with the Adafruit encoder
399399
which has mechanical detents, which span multiple increments or decrements. A
400-
delay gives time for motion to stop, enabling just one call to the callback.
400+
delay gives time for motion to stop enabling just one call to the callback.
401401

402402
#### Note
403403

404404
The driver works by maintaining an internal value `._v` which uses hardware
405405
interrupts to track the absolute position of the physical encoder. In theory
406-
this should be precise, but on ESP32 with the Adafruit encoder it is not.
406+
this should be precise, but on ESP32 with the Adafruit encoder it is not:
407+
returning the dial to a given detent shows a small "drift" in position.
407408

408409
Currently under investigation: it may be a consequence of ESP32's use of soft
409410
IRQ's.
410411

411412
This is probably of little practical consequence as encoder knobs are usually
412413
used in systems where there is user feedback. In a practical application
413-
([ugui](https://github.com/peterhinch/micropython-micro-gui)) I can see no
414+
([micro-gui](https://github.com/peterhinch/micropython-micro-gui)) I can see no
414415
evidence of the missed pulses.
415416

416417
###### [Contents](./DRIVERS.md#1-contents)

0 commit comments

Comments
 (0)