diff --git a/examples/UnitTest/UnitTest.ino b/examples/UnitTest/UnitTest.ino index 1977f91..7f49238 100644 --- a/examples/UnitTest/UnitTest.ino +++ b/examples/UnitTest/UnitTest.ino @@ -33,13 +33,12 @@ #define USE_ESP_VAD #include "utilities.h" - +#include "config.h" #ifndef BOARD_HAS_PSRAM #error "Detected that PSRAM is not turned on. Please set PSRAM to OPI PSRAM in ArduinoIDE" #endif - #ifndef SerialGPS #define SerialGPS Serial1 #endif @@ -55,14 +54,6 @@ TinyGPSPlus gps; #define VAD_FRAME_LENGTH_MS 30 #define VAD_BUFFER_LENGTH (VAD_FRAME_LENGTH_MS * VAD_SAMPLE_RATE_HZ / 1000) -LV_IMG_DECLARE(image_output); -LV_IMG_DECLARE(image); -LV_IMG_DECLARE(image1); -LV_IMG_DECLARE(image2); -LV_IMG_DECLARE(image3); -LV_IMG_DECLARE(image4); - - #if TFT_DC != BOARD_TFT_DC || TFT_CS != BOARD_TFT_CS || TFT_MOSI != BOARD_SPI_MOSI || TFT_SCLK != BOARD_SPI_SCK #error "Not using the already configured T-Deck file, please remove and replace with , please do not click the upgrade library button when opening sketches in ArduinoIDE versions 2.0 and above, otherwise the original configuration file will be replaced !!!" #error "Not using the already configured T-Deck file, please remove and replace with , please do not click the upgrade library button when opening sketches in ArduinoIDE versions 2.0 and above, otherwise the original configuration file will be replaced !!!" @@ -149,17 +140,7 @@ uint32_t last_update_millis = 0; lv_obj_t *main_count; -#ifndef WIFI_SSID -#define WIFI_SSID "You WIFI SSID" -#endif -#ifndef WIFI_PASSWORD -#define WIFI_PASSWORD "You WIFI PASSWORD" -#endif - -#define NTP_SERVER1 "pool.ntp.org" -#define NTP_SERVER2 "time.nist.gov" -#define DEFAULT_TIMEZONE "CST-8" //When the time zone cannot be obtained, the default time zone is used static void setupLvgl(); diff --git a/examples/UnitTest/config.h b/examples/UnitTest/config.h new file mode 100644 index 0000000..95e8105 --- /dev/null +++ b/examples/UnitTest/config.h @@ -0,0 +1,17 @@ +#pragma once + + +#ifndef WIFI_SSID +#define WIFI_SSID "You WIFI SSID" +#endif + +#ifndef WIFI_PASSWORD +#define WIFI_PASSWORD "You WIFI PASSWORD" +#endif + +#define NTP_SERVER1 "pool.ntp.org" +#define NTP_SERVER2 "time.nist.gov" +#define DEFAULT_TIMEZONE "CST-8" //When the time zone cannot be obtained, the default time zone is used + + + diff --git a/platformio.ini b/platformio.ini index ebf7b8a..0f1e58b 100644 --- a/platformio.ini +++ b/platformio.ini @@ -13,7 +13,7 @@ ; Please comment out the following when compiling the T-Keyboard -; default_envs = T-Deck +default_envs = T-Deck @@ -29,14 +29,14 @@ src_dir = examples/UnitTest ; src_dir = examples/SX126x_Transmit +;! Don't make changes +boards_dir = boards + [env:T-Keyboard] platform = espressif32 board = ttgo-t-oi-plus framework = arduino -;! Don't make changes -boards_dir = boards - [env:T-Deck] platform = espressif32@6.3.0 board = T-Deck @@ -55,4 +55,3 @@ build_flags = -DDISABLE_ALL_LIBRARY_WARNINGS - \ No newline at end of file