Removing some unnecessary files that were changed
This commit is contained in:
parent
db0140f586
commit
0290fc35d2
|
@ -444,6 +444,23 @@ const mp_obj_property_t displayio_display_bus_obj = {
|
|||
MP_ROM_NONE},
|
||||
};
|
||||
|
||||
//| root_group: _Group
|
||||
//| """The root group on the display."""
|
||||
//|
|
||||
//|
|
||||
STATIC mp_obj_t displayio_display_obj_get_root_group(mp_obj_t self_in) {
|
||||
displayio_display_obj_t *self = native_display(self_in);
|
||||
return common_hal_displayio_display_get_root_group(self);
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(displayio_display_get_root_group_obj, displayio_display_obj_get_root_group);
|
||||
|
||||
const mp_obj_property_t displayio_display_root_group_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_display_get_root_group_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
|
||||
|
||||
//| def fill_row(self, y: int, buffer: WriteableBuffer) -> WriteableBuffer:
|
||||
//| """Extract the pixels from a single row
|
||||
|
@ -517,6 +534,7 @@ STATIC const mp_rom_map_elem_t displayio_display_locals_dict_table[] = {
|
|||
{ MP_ROM_QSTR(MP_QSTR_height), MP_ROM_PTR(&displayio_display_height_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_rotation), MP_ROM_PTR(&displayio_display_rotation_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_bus), MP_ROM_PTR(&displayio_display_bus_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_root_group), MP_ROM_PTR(&displayio_display_root_group_obj) },
|
||||
};
|
||||
STATIC MP_DEFINE_CONST_DICT(displayio_display_locals_dict, displayio_display_locals_dict_table);
|
||||
|
||||
|
|
|
@ -69,6 +69,6 @@ mp_float_t common_hal_displayio_display_get_brightness(displayio_display_obj_t *
|
|||
bool common_hal_displayio_display_set_brightness(displayio_display_obj_t *self, mp_float_t brightness);
|
||||
|
||||
mp_obj_t common_hal_displayio_display_get_bus(displayio_display_obj_t *self);
|
||||
|
||||
mp_obj_t common_hal_displayio_display_get_root_group(displayio_display_obj_t *self);
|
||||
|
||||
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO_DISPLAY_H
|
||||
|
|
|
@ -324,7 +324,6 @@ STATIC const mp_rom_map_elem_t supervisor_module_globals_table[] = {
|
|||
{ MP_ROM_QSTR(MP_QSTR_ticks_ms), MP_ROM_PTR(&supervisor_ticks_ms_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_get_previous_traceback), MP_ROM_PTR(&supervisor_get_previous_traceback_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_disable_ble_workflow), MP_ROM_PTR(&supervisor_disable_ble_workflow_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_splash), MP_ROM_PTR(&circuitpython_splash) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_reset_terminal), MP_ROM_PTR(&supervisor_reset_terminal_obj) },
|
||||
};
|
||||
|
||||
|
|
|
@ -220,6 +220,10 @@ mp_obj_t common_hal_displayio_display_get_bus(displayio_display_obj_t *self) {
|
|||
return self->core.bus;
|
||||
}
|
||||
|
||||
mp_obj_t common_hal_displayio_display_get_root_group(displayio_display_obj_t *self) {
|
||||
return self->core.current_group;
|
||||
}
|
||||
|
||||
STATIC const displayio_area_t *_get_refresh_areas(displayio_display_obj_t *self) {
|
||||
if (self->core.full_refresh) {
|
||||
self->core.area.next = NULL;
|
||||
|
|
|
@ -163,12 +163,15 @@ void displayio_display_core_set_rotation(displayio_display_core_t *self,
|
|||
}
|
||||
|
||||
bool displayio_display_core_show(displayio_display_core_t *self, displayio_group_t *root_group) {
|
||||
if (root_group == NULL) {
|
||||
if (!circuitpython_splash.in_group) {
|
||||
root_group = &circuitpython_splash;
|
||||
} else if (self->current_group == &circuitpython_splash) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (root_group == NULL) { // set the display to the REPL, reset REPL position and size
|
||||
circuitpython_splash.in_group = false;
|
||||
// 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;
|
||||
supervisor_stop_terminal();
|
||||
supervisor_start_terminal(self->width, self->height);
|
||||
root_group = &circuitpython_splash;
|
||||
}
|
||||
if (root_group == self->current_group) {
|
||||
return true;
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#if CIRCUITPY_TERMINALIO
|
||||
|
||||
#include "shared-bindings/displayio/Bitmap.h"
|
||||
#include "shared-bindings/displayio/Group.h"
|
||||
#include "shared-bindings/displayio/TileGrid.h"
|
||||
#include "shared-bindings/fontio/BuiltinFont.h"
|
||||
#include "shared-bindings/terminalio/Terminal.h"
|
||||
|
@ -46,7 +45,6 @@ extern const fontio_builtinfont_t supervisor_terminal_font;
|
|||
extern displayio_bitmap_t supervisor_terminal_font_bitmap;
|
||||
extern displayio_tilegrid_t supervisor_terminal_text_grid;
|
||||
extern terminalio_terminal_obj_t supervisor_terminal;
|
||||
extern displayio_group_t circuitpython_splash;
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue