looking into how null show works

This commit is contained in:
foamyguy 2022-11-21 20:21:39 -06:00
parent ef3398422a
commit fa4b480439
3 changed files with 19 additions and 2 deletions

View File

@ -136,11 +136,28 @@ 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.
mp_printf(&mp_plat_print, "Inside display make_new\n");
is_null(&circuitpython_splash);
//is_null(0);
// if(circuitpython_splash == mp_const_none) {
// mp_printf(&mp_plat_print, "Splash is NULL \n");
// }
// mp_printf(&mp_plat_print, *circuitpython_splash);
// mp_printf(&mp_plat_print, "\n");
common_hal_displayio_display_show(self, &circuitpython_splash);
common_hal_displayio_display_set_auto_refresh(self, auto_refresh);
}
void is_null(displayio_group_t *root_group){
if (root_group == NULL){
mp_printf(&mp_plat_print, "root_group is null\n");
}
}
bool common_hal_displayio_display_show(displayio_display_obj_t *self, displayio_group_t *root_group) {
if(root_group == NULL){
mp_printf(&mp_plat_print, "Its NULL fer flucks snakes\n");
}
return displayio_display_core_set_root_group(&self->core, root_group);
}

View File

@ -64,7 +64,7 @@ typedef struct {
void displayio_display_background(displayio_display_obj_t *self);
void release_display(displayio_display_obj_t *self);
void reset_display(displayio_display_obj_t *self);
void is_null(displayio_group_t *root_group);
void displayio_display_collect_ptrs(displayio_display_obj_t *self);
#endif // MICROPY_INCLUDED_SHARED_MODULE_DISPLAYIO_DISPLAY_H

View File

@ -169,7 +169,7 @@ bool displayio_display_core_set_root_group(displayio_display_core_t *self, displ
// force the circuit_python_splash out of any group (Note: could cause problems with the parent group)
circuitpython_splash.x = 0; // reset position in case someone moved it.
circuitpython_splash.y = 0;
mp_printf(&mp_plat_print, "Inside set root group NULL\n");
supervisor_start_terminal(self->width, self->height);
root_group = &circuitpython_splash;