1
0
Fork 0

Allow force flush of oled display (#20953)

Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
This commit is contained in:
Chris Salch 2023-09-14 03:20:03 -05:00 committed by GitHub
parent b9d6bfe927
commit d8e100ae3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 64 additions and 16 deletions

View file

@ -448,7 +448,7 @@ static void rotate_90(const uint8_t *src, uint8_t *dest) {
}
}
void oled_render(void) {
void oled_render_dirty(bool all) {
// Do we have work to do?
oled_dirty &= OLED_ALL_BLOCKS_MASK;
if (!oled_dirty || !oled_initialized || oled_scrolling) {
@ -460,7 +460,7 @@ void oled_render(void) {
uint8_t update_start = 0;
uint8_t num_processed = 0;
while (oled_dirty && num_processed++ < OLED_UPDATE_PROCESS_LIMIT) { // render all dirty blocks (up to the configured limit)
while (oled_dirty && (num_processed++ < OLED_UPDATE_PROCESS_LIMIT || all)) { // render all dirty blocks (up to the configured limit)
// Find next dirty block
while (!(oled_dirty & ((OLED_BLOCK_TYPE)1 << update_start))) {
++update_start;