SHA2017-badge / Firmware

ESP32 firmware for the SHA2017 badge
https://wiki.sha2017.org/w/Badge
Other
83 stars 36 forks source link

Skip frames when flushing #73

Closed raboof closed 7 years ago

raboof commented 7 years ago

When flushing 3 times immediately after each other, the first flush will be instant, while the second 2 flushes will both take about 33 ticks.

Apparently flushing is somehow asynchronous. It would be neat if we could somehow detect the first flush is still in progress, and skip the second flush when the third flush comes in before the first flush has really finished.

annejan commented 7 years ago

We could probably expose the "bussy" pin state to the micropython env.

Something like badge.eink_bussy() True False

raboof commented 7 years ago

we can even do that entirely on the C (ugfx lld) side I'd say - but yeah, worth a try.

annejan commented 7 years ago

It used to be fully synchronous, which wasted a lot of time after sending a flush()

I don't think ugfx really has something to manage the wait in a satisfactory way, that's why I guess doing the checking high-level would be most ideal.

annejan commented 7 years ago

This should work https://github.com/SHA2017-badge/micropython-esp32/pull/36