summaryrefslogtreecommitdiff
path: root/shared-module/displayio/Display.c
diff options
context:
space:
mode:
authorDan Halbert <halbert@adafruit.com>2019-09-04 15:48:00 -0400
committerGitHub <noreply@github.com>2019-09-04 15:48:00 -0400
commitfca440fb66aff746b0a2c752df15c445ba421fdf (patch)
tree1d6ede88cbfb246cdb8a14afa263c2c9e2bded95 /shared-module/displayio/Display.c
parent321b57a5d2a85f56ba198c8ff678e123dfe08c4c (diff)
parent7951646b9afbb333048730ad7660ee34685e8add (diff)
Merge pull request #2113 from tannewt/displayio_hidden5.0.0-alpha.2
Add .hidden to TileGrid and Group
Diffstat (limited to 'shared-module/displayio/Display.c')
-rw-r--r--shared-module/displayio/Display.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/shared-module/displayio/Display.c b/shared-module/displayio/Display.c
index 212ee8c7b..06b81f2f8 100644
--- a/shared-module/displayio/Display.c
+++ b/shared-module/displayio/Display.c
@@ -50,6 +50,8 @@ void common_hal_displayio_display_construct(displayio_display_obj_t* self,
uint8_t* init_sequence, uint16_t init_sequence_len, const mcu_pin_obj_t* backlight_pin,
uint16_t brightness_command, mp_float_t brightness, bool auto_brightness,
bool single_byte_bounds, bool data_as_commands, bool auto_refresh, uint16_t native_frames_per_second) {
+ // Turn off auto-refresh as we init.
+ self->auto_refresh = false;
uint16_t ram_width = 0x100;
uint16_t ram_height = 0x100;
if (single_byte_bounds) {
@@ -64,7 +66,6 @@ void common_hal_displayio_display_construct(displayio_display_obj_t* self,
self->write_ram_command = write_ram_command;
self->brightness_command = brightness_command;
self->auto_brightness = auto_brightness;
- self->auto_refresh = auto_refresh;
self->first_manual_refresh = !auto_refresh;
self->data_as_commands = data_as_commands;
@@ -128,6 +129,7 @@ void common_hal_displayio_display_construct(displayio_display_obj_t* self,
// Set the group after initialization otherwise we may send pixels while we delay in
// initialization.
common_hal_displayio_display_show(self, &circuitpython_splash);
+ self->auto_refresh = auto_refresh;
}
bool common_hal_displayio_display_show(displayio_display_obj_t* self, displayio_group_t* root_group) {