PicoGraphics: Presto full res option.

patch-img-open_file
Mike Bell 2024-11-17 14:19:03 +00:00 zatwierdzone przez Phil Howard
rodzic 4274cd183b
commit b9f11a3b1d
3 zmienionych plików z 12 dodań i 2 usunięć

Wyświetl plik

@ -172,6 +172,7 @@ static const mp_map_elem_t picographics_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_DISPLAY_PICO_W_EXPLORER), MP_ROM_INT(DISPLAY_PICO_W_EXPLORER) }, { MP_ROM_QSTR(MP_QSTR_DISPLAY_PICO_W_EXPLORER), MP_ROM_INT(DISPLAY_PICO_W_EXPLORER) },
{ MP_ROM_QSTR(MP_QSTR_DISPLAY_EXPLORER), MP_ROM_INT(DISPLAY_EXPLORER) }, { MP_ROM_QSTR(MP_QSTR_DISPLAY_EXPLORER), MP_ROM_INT(DISPLAY_EXPLORER) },
{ MP_ROM_QSTR(MP_QSTR_DISPLAY_PRESTO), MP_ROM_INT(DISPLAY_PRESTO) }, { MP_ROM_QSTR(MP_QSTR_DISPLAY_PRESTO), MP_ROM_INT(DISPLAY_PRESTO) },
{ MP_ROM_QSTR(MP_QSTR_DISPLAY_PRESTO_FULL_RES), MP_ROM_INT(DISPLAY_PRESTO_FULL_RES) },
{ MP_ROM_QSTR(MP_QSTR_PEN_1BIT), MP_ROM_INT(PEN_1BIT) }, { MP_ROM_QSTR(MP_QSTR_PEN_1BIT), MP_ROM_INT(PEN_1BIT) },
{ MP_ROM_QSTR(MP_QSTR_PEN_P4), MP_ROM_INT(PEN_P4) }, { MP_ROM_QSTR(MP_QSTR_PEN_P4), MP_ROM_INT(PEN_P4) },

Wyświetl plik

@ -256,6 +256,13 @@ bool get_display_settings(PicoGraphicsDisplay display, int &width, int &height,
rotate = (int)Rotation::ROTATE_0; rotate = (int)Rotation::ROTATE_0;
pen_type = PEN_RGB565; pen_type = PEN_RGB565;
break; break;
case DISPLAY_PRESTO_FULL_RES:
width = 480;
height = 480;
bus_type = BUS_PIO;
rotate = (int)Rotation::ROTATE_0;
pen_type = PEN_RGB565;
break;
default: default:
return false; return false;
} }
@ -397,7 +404,8 @@ mp_obj_t ModPicoGraphics_make_new(const mp_obj_type_t *type, size_t n_args, size
|| display == DISPLAY_STELLAR_UNICORN || display == DISPLAY_STELLAR_UNICORN
|| display == DISPLAY_UNICORN_PACK || display == DISPLAY_UNICORN_PACK
|| display == DISPLAY_SCROLL_PACK || display == DISPLAY_SCROLL_PACK
|| display == DISPLAY_PRESTO) { || display == DISPLAY_PRESTO
|| display == DISPLAY_PRESTO_FULL_RES) {
// Create a dummy display driver // Create a dummy display driver
self->display = m_new_class(DisplayDriver, width, height, (Rotation)rotate); self->display = m_new_class(DisplayDriver, width, height, (Rotation)rotate);

Wyświetl plik

@ -32,7 +32,8 @@ enum PicoGraphicsDisplay {
DISPLAY_SCROLL_PACK, DISPLAY_SCROLL_PACK,
DISPLAY_PICO_W_EXPLORER, DISPLAY_PICO_W_EXPLORER,
DISPLAY_EXPLORER, DISPLAY_EXPLORER,
DISPLAY_PRESTO DISPLAY_PRESTO,
DISPLAY_PRESTO_FULL_RES
}; };
enum PicoGraphicsPenType { enum PicoGraphicsPenType {