diff --git a/include/display_config.h b/include/display_config.h new file mode 100644 index 0000000..7073e9d --- /dev/null +++ b/include/display_config.h @@ -0,0 +1,20 @@ +/* + * This file is part of the Capibara zero (https://github.com/CapibaraZero/fw or + * https://capibarazero.github.io/). Copyright (c) 2024 Andrea Canale. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 3. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Set your display resolution here +#define DISPLAY_WIDTH 240 +#define DISPLAY_HEIGHT 240 \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 27c95cd..7d54048 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -32,6 +32,7 @@ #include "pins.h" #include "posixsd.hpp" #include "style.h" +#include "display_config.h" /* TODO: To lower this, we can may switch to heap for wifi_networks */ #define TASK_STACK_SIZE 16000 @@ -62,7 +63,7 @@ void setup() { init_sd(); init_english_dict(); display = new Adafruit_ST7789(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST); - screen = new GFXForms(240, 320, display); + screen = new GFXForms(DISPLAY_WIDTH, DISPLAY_HEIGHT, display); screen->set_rotation(1); screen->set_background_color(HOME_BACKGROUND_COLOR);