Skip to content

Commit 2c479f4

Browse files
committed
working on None behavior
1 parent fa4b480 commit 2c479f4

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

shared-module/displayio/Display.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,19 +144,21 @@ void common_hal_displayio_display_construct(displayio_display_obj_t *self,
144144
// }
145145
// mp_printf(&mp_plat_print, *circuitpython_splash);
146146
// mp_printf(&mp_plat_print, "\n");
147-
common_hal_displayio_display_show(self, &circuitpython_splash);
147+
//common_hal_displayio_display_show(self, &circuitpython_splash);
148148
common_hal_displayio_display_set_auto_refresh(self, auto_refresh);
149149
}
150150

151151
void is_null(displayio_group_t *root_group){
152152
if (root_group == NULL){
153-
mp_printf(&mp_plat_print, "root_group is null\n");
153+
mp_printf(&mp_plat_print, "root_group is NULL\n");
154+
}else{
155+
mp_printf(&mp_plat_print, "root_group not NULL");
154156
}
155157
}
156158

157159
bool common_hal_displayio_display_show(displayio_display_obj_t *self, displayio_group_t *root_group) {
158160
if(root_group == NULL){
159-
mp_printf(&mp_plat_print, "Its NULL fer flucks snakes\n");
161+
mp_printf(&mp_plat_print, "Its NULL inside display.show()\n");
160162
}
161163
return displayio_display_core_set_root_group(&self->core, root_group);
162164
}
@@ -446,7 +448,7 @@ void release_display(displayio_display_obj_t *self) {
446448

447449
void reset_display(displayio_display_obj_t *self) {
448450
common_hal_displayio_display_set_auto_refresh(self, true);
449-
common_hal_displayio_display_show(self, NULL);
451+
common_hal_displayio_display_show(self, &circuitpython_splash);
450452
}
451453

452454
void displayio_display_collect_ptrs(displayio_display_obj_t *self) {

shared-module/displayio/display_core.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,15 @@ void displayio_display_core_set_rotation(displayio_display_core_t *self,
165165
bool displayio_display_core_set_root_group(displayio_display_core_t *self, displayio_group_t *root_group) {
166166

167167
if (root_group == NULL) { // set the display to the REPL, reset REPL position and size
168-
circuitpython_splash.in_group = false;
168+
//circuitpython_splash.in_group = false;
169169
// force the circuit_python_splash out of any group (Note: could cause problems with the parent group)
170-
circuitpython_splash.x = 0; // reset position in case someone moved it.
171-
circuitpython_splash.y = 0;
170+
//circuitpython_splash.x = 0; // reset position in case someone moved it.
171+
//circuitpython_splash.y = 0;
172172
mp_printf(&mp_plat_print, "Inside set root group NULL\n");
173-
supervisor_start_terminal(self->width, self->height);
173+
//supervisor_start_terminal(self->width, self->height);
174+
175+
//root_group = &circuitpython_splash;
174176

175-
root_group = &circuitpython_splash;
176177
}
177178
if (root_group == self->current_group) {
178179
return true;

0 commit comments

Comments
 (0)