Skip to content

Commit fa4b480

Browse files
committed
looking into how null show works
1 parent ef33984 commit fa4b480

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

shared-module/displayio/Display.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,28 @@ void common_hal_displayio_display_construct(displayio_display_obj_t *self,
136136

137137
// Set the group after initialization otherwise we may send pixels while we delay in
138138
// initialization.
139+
mp_printf(&mp_plat_print, "Inside display make_new\n");
140+
is_null(&circuitpython_splash);
141+
//is_null(0);
142+
// if(circuitpython_splash == mp_const_none) {
143+
// mp_printf(&mp_plat_print, "Splash is NULL \n");
144+
// }
145+
// mp_printf(&mp_plat_print, *circuitpython_splash);
146+
// mp_printf(&mp_plat_print, "\n");
139147
common_hal_displayio_display_show(self, &circuitpython_splash);
140148
common_hal_displayio_display_set_auto_refresh(self, auto_refresh);
141149
}
142150

151+
void is_null(displayio_group_t *root_group){
152+
if (root_group == NULL){
153+
mp_printf(&mp_plat_print, "root_group is null\n");
154+
}
155+
}
156+
143157
bool common_hal_displayio_display_show(displayio_display_obj_t *self, displayio_group_t *root_group) {
158+
if(root_group == NULL){
159+
mp_printf(&mp_plat_print, "Its NULL fer flucks snakes\n");
160+
}
144161
return displayio_display_core_set_root_group(&self->core, root_group);
145162
}
146163

shared-module/displayio/Display.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ typedef struct {
6464
void displayio_display_background(displayio_display_obj_t *self);
6565
void release_display(displayio_display_obj_t *self);
6666
void reset_display(displayio_display_obj_t *self);
67-
67+
void is_null(displayio_group_t *root_group);
6868
void displayio_display_collect_ptrs(displayio_display_obj_t *self);
6969

7070
#endif // MICROPY_INCLUDED_SHARED_MODULE_DISPLAYIO_DISPLAY_H

shared-module/displayio/display_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ bool displayio_display_core_set_root_group(displayio_display_core_t *self, displ
169169
// force the circuit_python_splash out of any group (Note: could cause problems with the parent group)
170170
circuitpython_splash.x = 0; // reset position in case someone moved it.
171171
circuitpython_splash.y = 0;
172-
172+
mp_printf(&mp_plat_print, "Inside set root group NULL\n");
173173
supervisor_start_terminal(self->width, self->height);
174174

175175
root_group = &circuitpython_splash;

0 commit comments

Comments
 (0)