Inkplate6: Fix crash with initial set of greyscale (#6038)

This commit is contained in:
Clyde Stubbs
2024-01-17 10:23:36 +11:00
committed by GitHub
parent 3854203037
commit 596943b683
2 changed files with 5 additions and 1 deletions
+2 -1
View File
@@ -68,8 +68,9 @@ class Inkplate6 : public display::DisplayBuffer, public i2c::I2CDevice {
void set_greyscale(bool greyscale) {
this->greyscale_ = greyscale;
this->initialize_();
this->block_partial_ = true;
if (this->is_ready())
this->initialize_();
}
void set_partial_updating(bool partial_updating) { this->partial_updating_ = partial_updating; }
void set_full_update_every(uint32_t full_update_every) { this->full_update_every_ = full_update_every; }