Add default limit to OLED dirty processing (#19068)
This commit is contained in:
parent
a42ab90220
commit
0719d68b20
2 changed files with 7 additions and 2 deletions
|
@ -300,8 +300,9 @@ void oled_render(void) {
|
|||
// Turn on display if it is off
|
||||
oled_on();
|
||||
|
||||
uint8_t update_start = 0;
|
||||
while (oled_dirty) { // render all dirty blocks
|
||||
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)
|
||||
// Find next dirty block
|
||||
while (!(oled_dirty & ((OLED_BLOCK_TYPE)1 << update_start))) {
|
||||
++update_start;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue