kopia lustrzana https://github.com/peterhinch/micropython-nano-gui
README: detail Scale widget precision limit.
rodzic
29b183cab1
commit
168e1bf91d
17
DRIVERS.md
17
DRIVERS.md
|
@ -444,15 +444,24 @@ On Adafruit displays, combinations that don't produce mirror images are:
|
||||||
|
|
||||||
#### Use with uasyncio
|
#### Use with uasyncio
|
||||||
|
|
||||||
Running the SPI bus at 60MHz a refresh blocks for 83ms. If this is acceptable,
|
Running the SPI bus at 60MHz a refresh blocks for 83ms (tested on a Pi Pico at
|
||||||
no special precautions are required. This period may be unacceptable for some
|
standard clock frequency). If the blocking period is acceptable, no special
|
||||||
`uasyncio` applications. Some may use lower SPI baudrates either for electrical
|
precautions are required. This period may be unacceptable for some `uasyncio`
|
||||||
reasons or where the host cannot support high speeds.
|
applications. Some may use lower SPI baudrates either for electrical reasons or
|
||||||
|
where the host cannot support high speeds, and some platforms may run Python
|
||||||
|
code at a different speed.
|
||||||
|
|
||||||
The driver provides an asynchronous `do_refresh(split=4)` method. If this is
|
The driver provides an asynchronous `do_refresh(split=4)` method. If this is
|
||||||
run the display will be refreshed, but will periodically yield to the scheduler
|
run the display will be refreshed, but will periodically yield to the scheduler
|
||||||
enabling other tasks to run. This is documented [here](./ASYNC.md).
|
enabling other tasks to run. This is documented [here](./ASYNC.md).
|
||||||
|
|
||||||
|
The amount of data for SPI transfer for a 240x240 display is
|
||||||
|
240x240x16 = 921.6K bits
|
||||||
|
At a 60MHz baudrate this equates to
|
||||||
|
240x240x16/6e7=15.36ms
|
||||||
|
This suggests that about 80% of the latency results from the Python code. An
|
||||||
|
option may be to overclock.
|
||||||
|
|
||||||
###### [Contents](./DRIVERS.md#contents)
|
###### [Contents](./DRIVERS.md#contents)
|
||||||
|
|
||||||
# 4. Drivers for sharp displays
|
# 4. Drivers for sharp displays
|
||||||
|
|
|
@ -752,7 +752,7 @@ Method:
|
||||||
* `value=None` Set or get the current value. Always returns the current value.
|
* `value=None` Set or get the current value. Always returns the current value.
|
||||||
A passed `float` is constrained to the range -1.0 <= V <= 1.0 and becomes the
|
A passed `float` is constrained to the range -1.0 <= V <= 1.0 and becomes the
|
||||||
`Scale`'s current value. The `Scale` is updated. Passing `None` enables
|
`Scale`'s current value. The `Scale` is updated. Passing `None` enables
|
||||||
reading the current value.
|
reading the current value, but see note below on precision.
|
||||||
|
|
||||||
### Callback legendcb
|
### Callback legendcb
|
||||||
|
|
||||||
|
@ -796,6 +796,12 @@ between consecutive large ticks and legends is divided by 10. This means that
|
||||||
the `tickcb` callback must return a string having an additional significant
|
the `tickcb` callback must return a string having an additional significant
|
||||||
digit. If this is not done, consecutive legends will have the same value.
|
digit. If this is not done, consecutive legends will have the same value.
|
||||||
|
|
||||||
|
### Precision
|
||||||
|
|
||||||
|
For performance reasons the control stores values as integers. This means that
|
||||||
|
if you set `value` and subsequently retrieve it, there may be some loss of
|
||||||
|
precision. Each visible division on the control represents 10 integer units.
|
||||||
|
|
||||||
###### [Contents](./README.md#contents)
|
###### [Contents](./README.md#contents)
|
||||||
|
|
||||||
## 3.7 Class Textbox
|
## 3.7 Class Textbox
|
||||||
|
|
Ładowanie…
Reference in New Issue