-
-
Notifications
You must be signed in to change notification settings - Fork 21
Description
An observation I've had, but frankly couldn't find the time for it during the overhaul update dev cycle, is that the display drawing routines could benefit from a similar queuing system that the input system uses now as of v6.0.
Basically, when calling to draw something new to the display, the act of drawing to the backbuffer should be as-is, but instead of drawing immediately at every one of these updates (i.e. calling display() with every menial change), it should mark the display as "ready to update" when it has new contents. Then, during OLED.IdleOps(), we should check if that "ready to update" flag is called, and if so, call display() then.
Ideally, maybe OLED.IdleOps() shouldn't be called every cycle that the camera isn't active? Perhaps only the cycle after the cam is read, since all I2C ops need to be done sequentially from the primary core (to avoid e.g. glitchiness that was present in cases when the second core called for screen mode updates). I did notice, since adding #69 (nice), it seems like simply displaying updated temps somewhat impacts the camera update rate down to about ~189hz? But then again, if we want to support other cameras in the future, would that still work? Does the display have an effective "framerate"? I could be a little paranoid thinking about this in too much detail, honestly.
Also, we are using Adafruit's display library pretty much off-the-shelf, but it could be beneficial if we modify how the library handles I2C transmissions to (for ARDUINO_ARCH_RP2040, obvi) offload it to use async transmits using DMA as provided in the SDK? Heck, since we can have access to the library's back buffer, and since it's mainly exclusively one-way messaging (from board to display), it should be a no brainer, yeah?
Because life's taking a toll on me lately, and I put off so many things just to get this past batch of updates out the door, I don't think I'll have the time or mental energy to do this myself atm (at least, maybe not till late summer or late fall), so leaving this note-to-self to the public in case someone wants an experiment to play with.