From 1f4eba717c3ec532430c44fe8941548f79e2747f Mon Sep 17 00:00:00 2001 From: Yuhan Kang Date: Fri, 19 Jan 2024 22:21:07 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dcpu=E6=B8=A9=E5=BA=A6?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=EF=BC=9B=E5=B0=86ip=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=E4=B8=BA=E8=BF=90=E8=A1=8C=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pio/build/nodemcuv2/idedata.json | 2 +- .../TFT_eSPI/User_Setups/Setup0_Sprite.h | 47 +++ .../User_Setups/Setup108_RP2040_ST7735.h | 44 +++ .../User_Setups/Setup212_LilyGo_T_PicoPro.h | 45 +++ .../Setup213_LilyGo_T_Beam_Shield.h | 36 +++ .../User_Setups/Setup29b_ILI9341_STM32.h | 141 +++++++++ .../Setup302_Waveshare_ESP32S3_GC9A01.h | 33 +++ .../User_Setups/Setup60_RP2040_RPI_MHS.h | 29 ++ .../User_Setups/Setup70h_ESP32_S3_GC9A01.h | 31 ++ .../lv_arduino/src/src/lv_font/lv_font.h | 4 + .../src/src/lv_font/tencent_w7_20_time.c | 255 ++++++++++++++++ .../src/src/lv_font/tencent_w7_24_time.c | 277 ++++++++++++++++++ src/NetData.h | 4 +- src/main.ino | 105 +++++-- 14 files changed, 1026 insertions(+), 27 deletions(-) create mode 100644 .pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup0_Sprite.h create mode 100644 .pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup108_RP2040_ST7735.h create mode 100644 .pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup212_LilyGo_T_PicoPro.h create mode 100644 .pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup213_LilyGo_T_Beam_Shield.h create mode 100644 .pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup29b_ILI9341_STM32.h create mode 100644 .pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup302_Waveshare_ESP32S3_GC9A01.h create mode 100644 .pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup60_RP2040_RPI_MHS.h create mode 100644 .pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup70h_ESP32_S3_GC9A01.h create mode 100644 .pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_20_time.c create mode 100644 .pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_24_time.c diff --git a/.pio/build/nodemcuv2/idedata.json b/.pio/build/nodemcuv2/idedata.json index 42643c6..fe97cff 100644 --- a/.pio/build/nodemcuv2/idedata.json +++ b/.pio/build/nodemcuv2/idedata.json @@ -1 +1 @@ -{"build_type": "debug", "env_name": "nodemcuv2", "libsource_dirs": ["C:\\Users\\danny\\Projects\\shelo\\routermonitor\\lib", "C:\\Users\\danny\\Projects\\shelo\\routermonitor\\.pio\\libdeps\\nodemcuv2", "C:\\Users\\danny\\.platformio\\lib", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries"], "defines": ["PLATFORMIO=60109", "ESP8266", "ARDUINO_ARCH_ESP8266", "ARDUINO_ESP8266_NODEMCU_ESP12E", "F_CPU=80000000L", "__ets__", "ICACHE_FLASH", "_GNU_SOURCE", "ARDUINO=10805", "ARDUINO_BOARD=\"PLATFORMIO_NODEMCUV2\"", "ARDUINO_BOARD_ID=\"nodemcuv2\"", "FLASHMODE_DIO", "LWIP_OPEN_SRC", "NONOSDK22x_190703=1", "TCP_MSS=536", "LWIP_FEATURES=1", "LWIP_IPV6=0", "VTABLES_IN_FLASH", "MMU_IRAM_SIZE=0x8000", "MMU_ICACHE_SIZE=0x8000", "__PLATFORMIO_BUILD_DEBUG__"], "includes": {"build": ["C:\\Users\\danny\\Projects\\shelo\\routermonitor\\include", "C:\\Users\\danny\\Projects\\shelo\\routermonitor\\src", "C:\\Users\\danny\\Projects\\shelo\\routermonitor\\include", "C:\\Users\\danny\\Projects\\shelo\\routermonitor\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266WiFi\\src", "C:\\Users\\danny\\Projects\\shelo\\routermonitor\\.pio\\libdeps\\nodemcuv2\\ArduinoJson\\src", "C:\\Users\\danny\\Projects\\shelo\\routermonitor\\.pio\\libdeps\\nodemcuv2\\lv_arduino\\src", "C:\\Users\\danny\\Projects\\shelo\\routermonitor\\.pio\\libdeps\\nodemcuv2\\TFT_eSPI", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\LittleFS\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SPI", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\tools\\sdk\\include", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\cores\\esp8266", "C:\\Users\\danny\\.platformio\\packages\\toolchain-xtensa\\include", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\tools\\sdk\\lwip2\\include", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\variants\\nodemcu"], "compatlib": ["C:\\Users\\danny\\Projects\\shelo\\routermonitor\\.pio\\libdeps\\nodemcuv2\\ArduinoJson\\src", "C:\\Users\\danny\\Projects\\shelo\\routermonitor\\.pio\\libdeps\\nodemcuv2\\ArduinoJson\\src", "C:\\Users\\danny\\Projects\\shelo\\routermonitor\\.pio\\libdeps\\nodemcuv2\\TFT_eSPI", "C:\\Users\\danny\\Projects\\shelo\\routermonitor\\.pio\\libdeps\\nodemcuv2\\TFT_eSPI", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\LittleFS\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SPI", "C:\\Users\\danny\\Projects\\shelo\\routermonitor\\.pio\\libdeps\\nodemcuv2\\lv_arduino\\src", "C:\\Users\\danny\\Projects\\shelo\\routermonitor\\.pio\\libdeps\\nodemcuv2\\lv_arduino\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266WiFi\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\LittleFS\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SPI", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ArduinoOTA", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\DNSServer\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\EEPROM", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266AVRISP\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266HTTPClient\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266HTTPUpdateServer\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266LLMNR", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266NetBIOS", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266SSDP", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266SdFat\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266WebServer\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266WiFiMesh\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266httpUpdate\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266mDNS\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Ethernet\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\FSTools", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\GDBStub\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Hash\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\I2S\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Netdump\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SD\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SDFS\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SPISlave\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Servo\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SoftwareSerial\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\TFT_Touch_Shield_V2", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Ticker\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Wire", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\esp8266\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\lwIP_Ethernet\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\lwIP_PPP\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\lwIP_enc28j60\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\lwIP_w5100\\src", "C:\\Users\\danny\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\lwIP_w5500\\src"], "toolchain": ["C:\\Users\\danny\\.platformio\\packages\\toolchain-xtensa\\xtensa-lx106-elf\\include\\c++\\10.3.0", "C:\\Users\\danny\\.platformio\\packages\\toolchain-xtensa\\xtensa-lx106-elf\\include\\c++\\10.3.0\\xtensa-lx106-elf", "C:\\Users\\danny\\.platformio\\packages\\toolchain-xtensa\\lib\\gcc\\xtensa-lx106-elf\\10.3.0\\include", "C:\\Users\\danny\\.platformio\\packages\\toolchain-xtensa\\lib\\gcc\\xtensa-lx106-elf\\10.3.0\\include-fixed", "C:\\Users\\danny\\.platformio\\packages\\toolchain-xtensa\\xtensa-lx106-elf\\include"]}, "cc_flags": ["-std=gnu17", "-Wpointer-arith", "-Wno-implicit-function-declaration", "-Wl,-EL", "-fno-inline-functions", "-nostdlib", "-mlongcalls", "-mtext-section-literals", "-falign-functions=4", "-U__STRICT_ANSI__", "-ffunction-sections", "-fdata-sections", "-Wall", "-Werror=return-type", "-free", "-fipa-pta", "-Og", "-g2", "-ggdb2"], "cxx_flags": ["-fno-rtti", "-std=gnu++17", "-fno-exceptions", "-mlongcalls", "-mtext-section-literals", "-falign-functions=4", "-U__STRICT_ANSI__", "-ffunction-sections", "-fdata-sections", "-Wall", "-Werror=return-type", "-free", "-fipa-pta", "-Og", "-g2", "-ggdb2"], "cc_path": "C:\\Users\\danny\\.platformio\\packages\\toolchain-xtensa\\bin\\xtensa-lx106-elf-gcc.exe", "cxx_path": "C:\\Users\\danny\\.platformio\\packages\\toolchain-xtensa\\bin\\xtensa-lx106-elf-g++.exe", "gdb_path": "C:\\Users\\danny\\.platformio\\packages\\toolchain-xtensa\\bin\\xtensa-lx106-elf-gdb.exe", "prog_path": "C:\\Users\\danny\\Projects\\shelo\\routermonitor\\.pio\\build\\nodemcuv2\\firmware.elf", "svd_path": null, "compiler_type": "gcc", "targets": [{"name": "buildfs", "title": "Build Filesystem Image", "description": null, "group": "Platform"}, {"name": "size", "title": "Program Size", "description": "Calculate program size", "group": "Platform"}, {"name": "upload", "title": "Upload", "description": null, "group": "Platform"}, {"name": "uploadfs", "title": "Upload Filesystem Image", "description": null, "group": "Platform"}, {"name": "uploadfsota", "title": "Upload Filesystem Image OTA", "description": null, "group": "Platform"}, {"name": "erase", "title": "Erase Flash", "description": null, "group": "Platform"}], "extra": {"flash_images": []}} \ No newline at end of file +{"build_type": "debug", "env_name": "nodemcuv2", "libsource_dirs": ["E:\\Code\\routermonitor\\lib", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2", "C:\\Users\\YuHan\\.platformio\\lib", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries"], "defines": ["PLATFORMIO=60113", "ESP8266", "ARDUINO_ARCH_ESP8266", "ARDUINO_ESP8266_NODEMCU_ESP12E", "F_CPU=80000000L", "__ets__", "ICACHE_FLASH", "_GNU_SOURCE", "ARDUINO=10805", "ARDUINO_BOARD=\"PLATFORMIO_NODEMCUV2\"", "ARDUINO_BOARD_ID=\"nodemcuv2\"", "FLASHMODE_DIO", "LWIP_OPEN_SRC", "NONOSDK22x_190703=1", "TCP_MSS=536", "LWIP_FEATURES=1", "LWIP_IPV6=0", "VTABLES_IN_FLASH", "MMU_IRAM_SIZE=0x8000", "MMU_ICACHE_SIZE=0x8000", "__PLATFORMIO_BUILD_DEBUG__"], "includes": {"build": ["E:\\Code\\routermonitor\\include", "E:\\Code\\routermonitor\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266WiFi\\src", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\ArduinoJson\\src", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\lv_arduino\\src", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\TFT_eSPI", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\LittleFS\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SPI", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\tools\\sdk\\include", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\cores\\esp8266", "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\include", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\tools\\sdk\\lwip2\\include", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\variants\\nodemcu"], "compatlib": ["E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\ArduinoJson\\src", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\TFT_eSPI", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\LittleFS\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SPI", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\lv_arduino\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266WiFi\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\LittleFS\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SPI", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ArduinoOTA", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\DNSServer\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\EEPROM", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266AVRISP\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266HTTPClient\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266HTTPUpdateServer\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266LLMNR", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266NetBIOS", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266SSDP", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266SdFat\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266WebServer\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266WiFiMesh\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266httpUpdate\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266mDNS\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Ethernet\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\FSTools", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\GDBStub\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Hash\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\I2S\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Netdump\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SD\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SDFS\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SPISlave\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Servo\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SoftwareSerial\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\TFT_Touch_Shield_V2", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Ticker\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Wire", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\esp8266\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\lwIP_Ethernet\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\lwIP_PPP\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\lwIP_enc28j60\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\lwIP_w5100\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\lwIP_w5500\\src"], "toolchain": ["C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\xtensa-lx106-elf\\include\\c++\\10.3.0", "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\xtensa-lx106-elf\\include\\c++\\10.3.0\\xtensa-lx106-elf", "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\lib\\gcc\\xtensa-lx106-elf\\10.3.0\\include", "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\lib\\gcc\\xtensa-lx106-elf\\10.3.0\\include-fixed", "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\xtensa-lx106-elf\\include"]}, "cc_flags": ["-std=gnu17", "-Wpointer-arith", "-Wno-implicit-function-declaration", "-Wl,-EL", "-fno-inline-functions", "-nostdlib", "-mlongcalls", "-mtext-section-literals", "-falign-functions=4", "-U__STRICT_ANSI__", "-ffunction-sections", "-fdata-sections", "-Wall", "-Werror=return-type", "-free", "-fipa-pta", "-Og", "-g2", "-ggdb2"], "cxx_flags": ["-fno-rtti", "-std=gnu++17", "-fno-exceptions", "-mlongcalls", "-mtext-section-literals", "-falign-functions=4", "-U__STRICT_ANSI__", "-ffunction-sections", "-fdata-sections", "-Wall", "-Werror=return-type", "-free", "-fipa-pta", "-Og", "-g2", "-ggdb2"], "cc_path": "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\bin\\xtensa-lx106-elf-gcc.exe", "cxx_path": "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\bin\\xtensa-lx106-elf-g++.exe", "gdb_path": "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\bin\\xtensa-lx106-elf-gdb.exe", "prog_path": "E:\\Code\\routermonitor\\.pio\\build\\nodemcuv2\\firmware.elf", "svd_path": null, "compiler_type": "gcc", "targets": [{"name": "buildfs", "title": "Build Filesystem Image", "description": null, "group": "Platform"}, {"name": "size", "title": "Program Size", "description": "Calculate program size", "group": "Platform"}, {"name": "upload", "title": "Upload", "description": null, "group": "Platform"}, {"name": "uploadfs", "title": "Upload Filesystem Image", "description": null, "group": "Platform"}, {"name": "uploadfsota", "title": "Upload Filesystem Image OTA", "description": null, "group": "Platform"}, {"name": "erase", "title": "Erase Flash", "description": null, "group": "Platform"}], "extra": {"flash_images": []}} \ No newline at end of file diff --git a/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup0_Sprite.h b/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup0_Sprite.h new file mode 100644 index 0000000..a769291 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup0_Sprite.h @@ -0,0 +1,47 @@ +// For sprite only functionality (untested) +#define USER_SETUP_ID 0 + +#define TFT_WIDTH 1000 +#define TFT_HEIGHT 1000 + +#define TFT_INIT_DELAY 0 + +#define TFT_NOP 0x00 +#define TFT_SWRST 0x00 + +#define TFT_CASET 0x00 +#define TFT_PASET 0x00 +#define TFT_RAMWR 0x00 + +#define TFT_RAMRD 0x00 +#define TFT_IDXRD 0x00 + +/* +#define TFT_MADCTL 0x00 +#define TFT_MAD_MY 0x00 +#define TFT_MAD_MX 0x00 +#define TFT_MAD_MV 0x00 +#define TFT_MAD_ML 0x00 +#define TFT_MAD_BGR 0x00 +#define TFT_MAD_MH 0x00 +#define TFT_MAD_RGB 0x00 +*/ +#define TFT_INVOFF 0x00 +#define TFT_INVON 0x00 + + +#define TFT_MISO -1 +#define TFT_MOSI -1 +#define TFT_SCLK -1 + + +#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH +#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters +#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters +#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm +#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-. +#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. +//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT +#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts + +#define SMOOTH_FONT diff --git a/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup108_RP2040_ST7735.h b/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup108_RP2040_ST7735.h new file mode 100644 index 0000000..dc6ac31 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup108_RP2040_ST7735.h @@ -0,0 +1,44 @@ +// This setup is for the Waveshare RP2040-LCD-0.96 board +// See SetupX_Template.h for all options available +#define USER_SETUP_ID 108 + +//////////////////////////////////////////////////////////////////////////////////////////// +// Display driver type +//////////////////////////////////////////////////////////////////////////////////////////// +#define ST7735_DRIVER +#define ST7735_GREENTAB160x80 + +//////////////////////////////////////////////////////////////////////////////////////////// +// Display params +//////////////////////////////////////////////////////////////////////////////////////////// +#define TFT_WIDTH 80 +#define TFT_HEIGHT 160 +#define TFT_INVERSION_ON + +//////////////////////////////////////////////////////////////////////////////////////////// +// RP2040 config and pins +//////////////////////////////////////////////////////////////////////////////////////////// +#define SPI_FREQUENCY 27000000 +#define RP2040_PIO_CLK_DIV 1 +#define TFT_SPI_PORT 1 + +#define TFT_MOSI 11 +#define TFT_SCLK 10 +#define TFT_CS 9 +#define TFT_DC 8 +#define TFT_RST 12 + +//////////////////////////////////////////////////////////////////////////////////////////// +// Fonts to be available +//////////////////////////////////////////////////////////////////////////////////////////// +#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH +#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters +#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters +#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm +#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:. +#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. +#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts + +#define SMOOTH_FONT + +//////////////////////////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup212_LilyGo_T_PicoPro.h b/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup212_LilyGo_T_PicoPro.h new file mode 100644 index 0000000..6be1f3b --- /dev/null +++ b/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup212_LilyGo_T_PicoPro.h @@ -0,0 +1,45 @@ +// ST7796 222 x 480 display with no chip select line +#define USER_SETUP_ID 212 + +#define ST7796_DRIVER // Configure all registers + +#define TFT_WIDTH 222 +#define TFT_HEIGHT 480 + +#define CGRAM_OFFSET // Library will add offsets required + +// #define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue +#define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red + +#define TFT_INVERSION_ON + +#define TFT_MISO 4 +#define TFT_MOSI 7 +#define TFT_SCLK 6 +#define TFT_CS 8 +#define TFT_DC 9 +#define TFT_RST 16 +#define TFT_BACKLIGHT_ON 1 +#define TFT_BL 10 + + +#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH +#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters +#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters +#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm +#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:. +#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. +//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT +#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts + +#define SMOOTH_FONT + + +// #define SPI_FREQUENCY 27000000 +#define SPI_FREQUENCY 40000000 + +#define SPI_READ_FREQUENCY 20000000 + +#define SPI_TOUCH_FREQUENCY 2500000 + +// #define SUPPORT_TRANSACTIONS \ No newline at end of file diff --git a/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup213_LilyGo_T_Beam_Shield.h b/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup213_LilyGo_T_Beam_Shield.h new file mode 100644 index 0000000..d9ebc87 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup213_LilyGo_T_Beam_Shield.h @@ -0,0 +1,36 @@ +// ST7796 222 x 480 display with no chip select line +#define USER_SETUP_ID 213 + +#define ST7796_DRIVER // Configure all registers + +#define TFT_WIDTH 222 +#define TFT_HEIGHT 480 + +#define CGRAM_OFFSET // Library will add offsets required + +// #define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue +#define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red + +#define TFT_INVERSION_ON + +#define TFT_MISO -1 +#define TFT_MOSI 14 +#define TFT_SCLK 15 +#define TFT_CS 25 +#define TFT_DC 13 +#define TFT_RST 2 +#define TFT_BL 4 +#define TFT_BACKLIGHT_ON HIGH + + +#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH +#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters +#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters +#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm +#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:. +#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. +//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT +#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts + +#define SMOOTH_FONT +#define SPI_FREQUENCY 40000000 diff --git a/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup29b_ILI9341_STM32.h b/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup29b_ILI9341_STM32.h new file mode 100644 index 0000000..fac3846 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup29b_ILI9341_STM32.h @@ -0,0 +1,141 @@ + +#define STM32 + +#define NUCLEO_64_TFT +//#define TFT_INVERSION_OFF + +#define TFT_WIDTH 240 +#define TFT_HEIGHT 320 + +#define ST7789_DRIVER +#define TFT_RGB_ORDER TFT_BGR + +#define TFT_SPI_PORT 1 // SPI 1 maximum clock rate is 55MHz +#define TFT_MOSI D11 +#define TFT_MISO D12 +#define TFT_SCLK D13 + + +// Can use Ardiuno pin references, arbitrary allocation, TFT_eSPI controls chip select +#define TFT_CS D5 // Chip select control pin to TFT CS +#define TFT_DC D6 // Data Command control pin to TFT DC (may be labelled RS = Register Select) +#define TFT_RST D7 // Reset pin to TFT RST (or RESET) + +#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH +#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters +#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters +#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm +#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-. +#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. +#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts + +// STM32 support for smooth fonts via program memory (FLASH) arrays +#define SMOOTH_FONT + +#define SPI_FREQUENCY 55000000 // 27MHz SPI clock +//#define SPI_FREQUENCY 55000000 // 55MHz is over-clocking ILI9341 but seems to work reliably! + +#define SPI_READ_FREQUENCY 15000000 // Reads need a slower SPI clock, probably ends up at 13.75MHz (CPU clock/16) + +// This has no effect, transactions for STM32 are automatically enabled +#define SUPPORT_TRANSACTIONS + +/* + /////////////////////////////////////////////////// + // Setup for STM32 Nucleo and ILI9341 display // + /////////////////////////////////////////////////// +#define USER_SETUP_ID 29 + +// Last update by Bodmer: 28/11/19 + +// STM32 optimised functions are not yet compatible with STM32H743 processor. +// The STM32H743 does work with the slower generic processor drivers +// +// REMINDER - Nucleo-F743ZI and Nucleo-F743ZI2 have different pin port allocations +// and require appropriate selection in IDE. ^---- Note the extra 2 in part number! + + +// Define STM32 to invoke STM32 optimised driver +#define STM32 + +// Define the TFT display driver +//#define ILI9341_DRIVER +//#define ILI9481_DRIVER +#define ST7789_DRIVER +#define TFT_RGB_ORDER TFT_BGR +// MOSI and SCK do not need to be defined, connect: +// - Arduino SCK to TFT SCK +// - Arduino MOSI to TFT SDI(may be marked SDA or MOSI) +// Typical Arduino SPI port 1 pins are (SCK=D13, MISO=D12, MOSI=D11) this is port pins PA5, PA6 and PA7 on Nucleo-F767ZI +// SPI port 2 pins are (SCK=D18, MISO=A7, MOSI=D17) this is port pins PB13, PC2 and PB15 on Nucleo-F767ZI + +//* +#define TFT_SPI_PORT 1 // SPI 1 maximum clock rate is 55MHz +#define TFT_MOSI PA7 +#define TFT_MISO PA6 +#define TFT_SCLK PA5 +//*/ + +/* +#define TFT_SPI_PORT 2 // SPI 2 maximum clock rate is 27MHz +#define TFT_MOSI D17 +#define TFT_MISO A7 +#define TFT_SCLK D18 +//*/ + +/* +#define TFT_SPI_PORT 2 // SPI 2 maximum clock rate is 27MHz +#define TFT_MOSI PB15 +#define TFT_MISO PC2 +#define TFT_SCLK PB13 +//*/ + +/* +#define TFT_SPI_PORT 2 // SPI 2 maximum clock rate is 27MHz +#define TFT_MOSI PB15 +#define TFT_MISO PB14 +#define TFT_SCLK PB13 +//*/ + +/* +// Can use Ardiuno pin references, arbitrary allocation, TFT_eSPI controls chip select +#define TFT_CS D5 // Chip select control pin to TFT CS +#define TFT_DC D6 // Data Command control pin to TFT DC (may be labelled RS = Register Select) +#define TFT_RST D7 // Reset pin to TFT RST (or RESET) + +// Alternatively, we can use STM32 port reference names PXnn +//#define TFT_CS PE11 // Nucleo-F767ZI equivalent of D5 +//#define TFT_DC PE9 // Nucleo-F767ZI equivalent of D6 +//#define TFT_RST PF13 // Nucleo-F767ZI equivalent of D7 + +//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to processor reset + // Use an Arduino pin for initial testing as connecting to processor reset + // may not work (pulse too short at power up?) + +// Chip select for XPT2046 touch controller +#define TOUCH_CS D4 + +#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH +#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters +#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters +#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm +#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-. +#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. +#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts + +// STM32 support for smooth fonts via program memory (FLASH) arrays +#define SMOOTH_FONT + + +// Nucleo-F767ZI has a ~216MHZ CPU clock, this is divided by 4, 8, 16 etc. + +#define SPI_FREQUENCY 27000000 // 27MHz SPI clock +//#define SPI_FREQUENCY 55000000 // 55MHz is over-clocking ILI9341 but seems to work reliably! + +#define SPI_READ_FREQUENCY 15000000 // Reads need a slower SPI clock, probably ends up at 13.75MHz (CPU clock/16) + +#define SPI_TOUCH_FREQUENCY 2500000 // Must be very slow + +// This has no effect, transactions for STM32 are automatically enabled +#define SUPPORT_TRANSACTIONS +*/ \ No newline at end of file diff --git a/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup302_Waveshare_ESP32S3_GC9A01.h b/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup302_Waveshare_ESP32S3_GC9A01.h new file mode 100644 index 0000000..5e3127f --- /dev/null +++ b/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup302_Waveshare_ESP32S3_GC9A01.h @@ -0,0 +1,33 @@ +// See SetupX_Template.h for all options available +#define USER_SETUP_ID 302 + +#define GC9A01_DRIVER + +#define TFT_MISO 12 +#define TFT_MOSI 11 +#define TFT_SCLK 10 +#define TFT_CS 9 // Chip select control pin +#define TFT_DC 8 // Data Command control pin +#define TFT_RST 14 // Reset pin (could connect to RST pin) +#define TFT_BL 2 +#define TFT_BACKLIGHT_ON HIGH + +#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH +#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters +#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters +#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm +#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:. +#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. +#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts +#define SMOOTH_FONT + +#define TFT_WIDTH 240 +#define TFT_HEIGHT 240 + +#define SPI_FREQUENCY 40000000 + +#define SPI_READ_FREQUENCY 20000000 + +#define SPI_TOUCH_FREQUENCY 2500000 + +// #define SUPPORT_TRANSACTIONS \ No newline at end of file diff --git a/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup60_RP2040_RPI_MHS.h b/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup60_RP2040_RPI_MHS.h new file mode 100644 index 0000000..804541c --- /dev/null +++ b/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup60_RP2040_RPI_MHS.h @@ -0,0 +1,29 @@ +#define USER_SETUP_ID 162 +#define ST7796_DRIVER + +#define MHS_DISPLAY_TYPE +//#define RP2040_PIO_SPI +#define TFT_MISO 16 +#define TFT_MOSI 19 +#define TFT_SCLK 18 +#define TFT_CS 17 // Chip select control pin +#define TFT_DC 20 // Data Command control pin +#define TFT_RST 21 // Reset pin (could connect to Arduino RESET pin) +//#define TFT_BL // LED back-light + +#define TOUCH_CS 22 // Chip select pin (T_CS) of touch screen + +#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH +#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters +#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters +#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm +#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-. +#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. +//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT +#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts + +#define SMOOTH_FONT + +#define SPI_FREQUENCY 125000000 +#define SPI_READ_FREQUENCY 20000000 +#define SPI_TOUCH_FREQUENCY 2500000 \ No newline at end of file diff --git a/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup70h_ESP32_S3_GC9A01.h b/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup70h_ESP32_S3_GC9A01.h new file mode 100644 index 0000000..847a2ee --- /dev/null +++ b/.pio/libdeps/nodemcuv2/TFT_eSPI/User_Setups/Setup70h_ESP32_S3_GC9A01.h @@ -0,0 +1,31 @@ +// Setup for the ESP32 S3 with GC9A01 display +#define USER_SETUP_ID 70 + +#define GC9A01_DRIVER + +#define TFT_WIDTH 240 +#define TFT_HEIGHT 240 + // Typical board default pins - change to match your board +#define TFT_CS 10 //34 // 10 or 34 (FSPI CS0) +#define TFT_MOSI 11 //35 // 11 or 35 (FSPI D) +#define TFT_SCLK 12 //36 // 12 or 36 (FSPI CLK) +#define TFT_MISO 13 //37 // 13 or 37 (FSPI Q) + +// Use pins in range 0-31 +#define TFT_DC 7 +#define TFT_RST 6 + +#define LOAD_GLCD +#define LOAD_FONT2 +#define LOAD_FONT4 +#define LOAD_FONT6 +#define LOAD_FONT7 +#define LOAD_FONT8 +#define LOAD_GFXFF + +#define SMOOTH_FONT + +// FSPI port (SPI2) used unless following defined +#define USE_HSPI_PORT + +#define SPI_FREQUENCY 80000000 // Maximum for ILI9341 diff --git a/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/lv_font.h b/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/lv_font.h index f4faef0..fce6266 100644 --- a/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/lv_font.h +++ b/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/lv_font.h @@ -236,6 +236,10 @@ LV_FONT_DECLARE(tencent_w7_22) LV_FONT_DECLARE(tencent_w7_24) #endif +#ifdef TENCENT_W7_24 +LV_FONT_DECLARE(tencent_w7_20) +#endif + #ifdef ICONFONT_SYMBOL LV_FONT_DECLARE(iconfont_symbol) #endif diff --git a/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_20_time.c b/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_20_time.c new file mode 100644 index 0000000..acd0df4 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_20_time.c @@ -0,0 +1,255 @@ +/******************************************************************************* + * Size: 20 px + * Bpp: 1 + * Opts: + ******************************************************************************/ + +#ifdef LV_LVGL_H_INCLUDE_SIMPLE +#include "lvgl.h" +#else +#include "../../lvgl.h" +#endif + +#ifndef TENCENT_W7_20_TIME +#define TENCENT_W7_20_TIME 1 +#endif + +#if TENCENT_W7_20_TIME + +/*----------------- + * BITMAPS + *----------------*/ + +/*Store the image of the glyphs*/ +static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = { + /* U+0030 "0" */ + 0x1f, 0xe3, 0xff, 0x38, 0x77, 0x7, 0x70, 0x77, + 0x7, 0x70, 0x77, 0xe, 0x70, 0xee, 0xe, 0xe0, + 0xee, 0xe, 0xe0, 0xee, 0x1c, 0xff, 0xc7, 0xf8, + + /* U+0031 "1" */ + 0x7, 0x1f, 0x7f, 0x76, 0x46, 0x6, 0xe, 0xe, + 0xe, 0xc, 0xc, 0xc, 0x1c, 0x1c, 0x1c, 0x18, + + /* U+0032 "2" */ + 0x1f, 0xe1, 0xfe, 0x0, 0x60, 0x6, 0x0, 0x60, + 0xe, 0x1, 0xe0, 0xfe, 0x3f, 0xc3, 0xe0, 0x70, + 0x7, 0x0, 0x60, 0x6, 0x0, 0x7f, 0xcf, 0xf8, + + /* U+0033 "3" */ + 0x3f, 0x8f, 0xf0, 0x1c, 0x7, 0x1, 0xc0, 0x70, + 0x38, 0x7c, 0x1f, 0x80, 0x70, 0x1c, 0x7, 0x1, + 0xc0, 0xef, 0xfb, 0xfc, + + /* U+0034 "4" */ + 0x7, 0x1, 0xc0, 0x30, 0xe, 0x1, 0x8c, 0x73, + 0x9c, 0x73, 0xc, 0xe1, 0x9f, 0xff, 0xff, 0x81, + 0xc0, 0x38, 0x6, 0x0, 0xc0, 0x18, + + /* U+0035 "5" */ + 0x3f, 0xe7, 0xf8, 0xc0, 0x18, 0x7, 0x0, 0xe0, + 0x1f, 0xe3, 0xfe, 0x1, 0xc0, 0x38, 0x7, 0x0, + 0xe0, 0x38, 0x7, 0x3f, 0xe7, 0xf8, + + /* U+0036 "6" */ + 0x1f, 0xc7, 0xf8, 0xe0, 0x38, 0x7, 0x0, 0xe0, + 0x1c, 0x3, 0xfc, 0x7f, 0xdc, 0x3b, 0x87, 0x70, + 0xee, 0x1d, 0xc3, 0x3f, 0xe3, 0xf8, + + /* U+0037 "7" */ + 0x7f, 0xef, 0xf8, 0x7, 0x0, 0xc0, 0x38, 0x6, + 0x1, 0xc0, 0x70, 0xe, 0x3, 0x80, 0x70, 0x1c, + 0x3, 0x80, 0xe0, 0x1c, 0x7, 0x0, + + /* U+0038 "8" */ + 0x1f, 0xe3, 0xff, 0x78, 0x77, 0x7, 0x70, 0x77, + 0x7, 0x70, 0xe3, 0xfc, 0x7f, 0xe7, 0xe, 0xe0, + 0xee, 0xe, 0xe0, 0xee, 0x1c, 0xff, 0xc7, 0xf8, + + /* U+0039 "9" */ + 0x3f, 0x9f, 0xf7, 0x1f, 0x87, 0xe1, 0xf8, 0x7e, + 0x1f, 0x86, 0xff, 0x9f, 0xe0, 0x38, 0xe, 0x3, + 0x81, 0xcf, 0xf3, 0xf8, + + /* U+003A ":" */ + 0x39, 0xcc, 0x0, 0x0, 0x0, 0x67, 0x38, + + /* U+5206 "分" */ + 0x3, 0x8c, 0x1, 0xc3, 0x80, 0xe0, 0x60, 0x38, + 0x1c, 0x1c, 0x3, 0xe, 0x0, 0xe7, 0x0, 0x1b, + 0xff, 0xff, 0x1f, 0xff, 0x0, 0xe1, 0xc0, 0x30, + 0x60, 0x1c, 0x18, 0x6, 0x6, 0x3, 0x81, 0x81, + 0xc0, 0xe0, 0xe0, 0x38, 0x70, 0x7e, 0x38, 0x1f, + 0x0, + + /* U+5929 "天" */ + 0xf, 0xff, 0xe3, 0xff, 0xf8, 0x1, 0xc0, 0x0, + 0x38, 0x0, 0x7, 0x0, 0x0, 0xe0, 0xf, 0xff, + 0xf9, 0xff, 0xff, 0x0, 0xe0, 0x0, 0x1e, 0x0, + 0x7, 0xe0, 0x1, 0xce, 0x0, 0x39, 0xc0, 0xe, + 0x1c, 0x3, 0x81, 0x80, 0xe0, 0x38, 0x38, 0x3, + 0x8e, 0x0, 0x70, + + /* U+65F6 "时" */ + 0x0, 0x0, 0xc3, 0xf0, 0xc, 0x3f, 0x80, 0xc3, + 0x1f, 0xff, 0x33, 0x7f, 0xf3, 0x30, 0x18, 0x33, + 0x61, 0x83, 0xf3, 0x18, 0x7f, 0x31, 0x86, 0x33, + 0x18, 0x63, 0x3b, 0x86, 0x61, 0xb8, 0x66, 0x1b, + 0x6, 0x60, 0x30, 0xe6, 0x3, 0xf, 0xe0, 0x30, + 0x0, 0x1f, 0x0, 0x1, 0xf0, + + /* U+79D2 "秒" */ + 0x1, 0xc1, 0x81, 0xfc, 0x30, 0x1f, 0xf, 0x60, + 0x71, 0xb6, 0x6, 0x1b, 0x63, 0xfd, 0xb6, 0x3f, + 0xf3, 0x30, 0x63, 0x33, 0x7, 0xf3, 0x31, 0x7e, + 0x76, 0x3f, 0x86, 0xe3, 0xd8, 0xc, 0x2d, 0x81, + 0x86, 0xd8, 0x70, 0x6d, 0x8e, 0x6, 0xc7, 0xc0, + 0xc, 0xf0, 0x1, 0xcc, 0x0 +}; + + +/*--------------------- + * GLYPH DESCRIPTION + *--------------------*/ + +static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, + {.bitmap_index = 0, .adv_w = 211, .box_w = 12, .box_h = 16, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 24, .adv_w = 145, .box_w = 8, .box_h = 16, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 40, .adv_w = 190, .box_w = 12, .box_h = 16, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 64, .adv_w = 177, .box_w = 10, .box_h = 16, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 84, .adv_w = 207, .box_w = 11, .box_h = 16, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 106, .adv_w = 182, .box_w = 11, .box_h = 16, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 128, .adv_w = 189, .box_w = 11, .box_h = 16, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 150, .adv_w = 173, .box_w = 11, .box_h = 16, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 172, .adv_w = 201, .box_w = 12, .box_h = 16, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 196, .adv_w = 190, .box_w = 10, .box_h = 16, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 216, .adv_w = 88, .box_w = 5, .box_h = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 223, .adv_w = 320, .box_w = 18, .box_h = 18, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 264, .adv_w = 320, .box_w = 19, .box_h = 18, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 307, .adv_w = 320, .box_w = 20, .box_h = 18, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 352, .adv_w = 320, .box_w = 20, .box_h = 18, .ofs_x = -1, .ofs_y = -3} +}; + +/*--------------------- + * CHARACTER MAPPING + *--------------------*/ + +static const uint16_t unicode_list_1[] = { + 0x0, 0x723, 0x13f0, 0x27cc +}; + +/*Collect the unicode lists and glyph_id offsets*/ +static const lv_font_fmt_txt_cmap_t cmaps[] = +{ + { + .range_start = 48, .range_length = 11, .glyph_id_start = 1, + .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY + }, + { + .range_start = 20998, .range_length = 10189, .glyph_id_start = 12, + .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL, .list_length = 4, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY + } +}; + +/*----------------- + * KERNING + *----------------*/ + + +/*Map glyph_ids to kern left classes*/ +static const uint8_t kern_left_class_mapping[] = +{ + 0, 1, 0, 2, 3, 4, 5, 6, + 7, 8, 1, 0, 0, 0, 0, 0 +}; + +/*Map glyph_ids to kern right classes*/ +static const uint8_t kern_right_class_mapping[] = +{ + 0, 1, 2, 3, 4, 5, 6, 1, + 7, 8, 9, 0, 0, 0, 0, 0 +}; + +/*Kern values between classes*/ +static const int8_t kern_class_values[] = +{ + 0, 0, -1, -2, -2, 0, -3, 0, + 0, 0, 0, 0, 0, -10, 0, -5, + 0, 0, 0, -3, 0, 0, 0, 0, + -6, 0, 0, -3, -19, -3, -8, 0, + -6, -12, -2, -3, 0, -10, 0, 0, + 0, 0, -5, 0, -3, 0, -11, 0, + 0, 0, 0, 0, 0, 0, -3, 3, + -2, 0, -10, -1, 3, -3, 0, 0, + -2, 0, -2, -1, -2, -3, 0, -2 +}; + + +/*Collect the kern class' data in one place*/ +static const lv_font_fmt_txt_kern_classes_t kern_classes = +{ + .class_pair_values = kern_class_values, + .left_class_mapping = kern_left_class_mapping, + .right_class_mapping = kern_right_class_mapping, + .left_class_cnt = 8, + .right_class_cnt = 9, +}; + +/*-------------------- + * ALL CUSTOM DATA + *--------------------*/ + +#if LVGL_VERSION_MAJOR == 8 +/*Store all the custom data of the font*/ +static lv_font_fmt_txt_glyph_cache_t cache; +#endif + +#if LVGL_VERSION_MAJOR >= 8 +static const lv_font_fmt_txt_dsc_t font_dsc = { +#else +static lv_font_fmt_txt_dsc_t font_dsc = { +#endif + .glyph_bitmap = glyph_bitmap, + .glyph_dsc = glyph_dsc, + .cmaps = cmaps, + .kern_dsc = &kern_classes, + .kern_scale = 16, + .cmap_num = 2, + .bpp = 1, + .kern_classes = 1, + .bitmap_format = 0, +#if LVGL_VERSION_MAJOR == 8 + .cache = &cache +#endif +}; + + +/*----------------- + * PUBLIC FONT + *----------------*/ + +/*Initialize a public general font descriptor*/ +#if LVGL_VERSION_MAJOR >= 8 +const lv_font_t tencent_w7_20_time = { +#else +lv_font_t tencent_w7_20_time = { +#endif + .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ + .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ + .line_height = 18, /*The maximum line height required by the font*/ + .base_line = 3, /*Baseline measured from the bottom of the line*/ +#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0) + .subpx = LV_FONT_SUBPX_NONE, +#endif +#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8 + .underline_position = -1, + .underline_thickness = 1, +#endif + .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ +}; + + + +#endif /*#if TENCENT_W7_20_TIME*/ + diff --git a/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_24_time.c b/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_24_time.c new file mode 100644 index 0000000..18de45b --- /dev/null +++ b/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_24_time.c @@ -0,0 +1,277 @@ +/******************************************************************************* + * Size: 24 px + * Bpp: 1 + * Opts: + ******************************************************************************/ + +#ifdef LV_LVGL_H_INCLUDE_SIMPLE +#include "lvgl.h" +#else +#include "../../lvgl.h" +#endif + +#ifndef TENCENT_W7_24_TIME +#define TENCENT_W7_24_TIME 1 +#endif + +#if TENCENT_W7_24_TIME + +/*----------------- + * BITMAPS + *----------------*/ + +/*Store the image of the glyphs*/ +static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = { + /* U+0030 "0" */ + 0xf, 0xf0, 0x7f, 0xf3, 0x81, 0xce, 0x7, 0x38, + 0x1d, 0xc0, 0x77, 0x1, 0xdc, 0x7, 0x70, 0x39, + 0xc0, 0xe7, 0x3, 0xb8, 0xe, 0xe0, 0x3b, 0x80, + 0xee, 0x7, 0x38, 0x1c, 0xe0, 0x73, 0xff, 0x83, + 0xfc, 0x0, + + /* U+0031 "1" */ + 0x7, 0x8f, 0xdf, 0xdf, 0xef, 0x72, 0x38, 0x1c, + 0xe, 0xe, 0x7, 0x3, 0x81, 0xc0, 0xe0, 0x70, + 0x70, 0x38, 0x1c, 0xe, 0x7, 0x0, + + /* U+0032 "2" */ + 0x3f, 0xf0, 0xff, 0xc0, 0xe, 0x0, 0x70, 0x3, + 0x80, 0x1c, 0x1, 0xc0, 0x1e, 0x7, 0xf1, 0xff, + 0x1f, 0xc0, 0xf0, 0x7, 0x0, 0x30, 0x3, 0x80, + 0x1c, 0x0, 0xff, 0xe7, 0xff, 0x3f, 0xf0, + + /* U+0033 "3" */ + 0x3f, 0xe3, 0xff, 0x0, 0x70, 0x7, 0x0, 0x70, + 0x7, 0x0, 0x70, 0xe, 0x1f, 0xc1, 0xfc, 0x0, + 0xe0, 0xe, 0x0, 0xe0, 0xe, 0x0, 0xe0, 0x1c, + 0x1, 0xcf, 0xfc, 0xff, 0x0, + + /* U+0034 "4" */ + 0x3, 0x80, 0xe, 0x0, 0x70, 0x3, 0xc0, 0xe, + 0x0, 0x79, 0xc1, 0xc7, 0xe, 0x1c, 0x78, 0x71, + 0xc1, 0xcf, 0xe, 0x3f, 0xfe, 0xff, 0xf8, 0x3, + 0x80, 0xe, 0x0, 0x30, 0x1, 0xc0, 0x7, 0x0, + 0x1c, 0x0, + + /* U+0035 "5" */ + 0x1f, 0xf8, 0xff, 0x86, 0x0, 0x30, 0x1, 0x80, + 0x1c, 0x0, 0xe0, 0x7, 0xfc, 0x3f, 0xf1, 0xff, + 0x80, 0x1c, 0x0, 0xe0, 0x7, 0x0, 0x38, 0x1, + 0x80, 0x1c, 0x0, 0xe3, 0xfe, 0x1f, 0xe0, + + /* U+0036 "6" */ + 0xf, 0xf8, 0xff, 0xcf, 0xfc, 0x70, 0x3, 0x80, + 0x38, 0x1, 0xc0, 0xe, 0x0, 0x7f, 0xf3, 0xff, + 0x9c, 0x1f, 0xc0, 0xee, 0x7, 0x70, 0x3b, 0x83, + 0xdc, 0x1e, 0xff, 0xf3, 0xff, 0xf, 0xf0, + + /* U+0037 "7" */ + 0x3f, 0xfb, 0xff, 0xdf, 0xfc, 0x0, 0xe0, 0xe, + 0x0, 0x70, 0x7, 0x0, 0x38, 0x3, 0x80, 0x3c, + 0x1, 0xc0, 0x1e, 0x0, 0xe0, 0xe, 0x0, 0x70, + 0x7, 0x0, 0x78, 0x3, 0x80, 0x3c, 0x0, + + /*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x79, 0xe0, 0x1, 0xe1, 0xc0, 0x7, 0x81, + 0xc0, 0x1e, 0x3, 0xc0, 0x78, 0x3, 0x81, 0xe0, + 0x3, 0x87, 0x80, 0x7, 0x80, + + /* U+65F6 "时" */ + 0x0, 0x0, 0x1c, 0x0, 0x0, 0x1c, 0x1f, 0xc0, + 0x18, 0x1f, 0xe0, 0x18, 0x18, 0xdf, 0xff, 0x38, + 0xdf, 0xff, 0x38, 0xc0, 0x38, 0x39, 0xc0, 0x38, + 0x31, 0xdc, 0x38, 0x3f, 0xdc, 0x30, 0x3f, 0xcc, + 0x30, 0x31, 0x8e, 0x30, 0x71, 0x8e, 0x70, 0x71, + 0x8e, 0x70, 0x73, 0x86, 0x70, 0x63, 0x87, 0x70, + 0x63, 0x80, 0x60, 0x63, 0x80, 0x60, 0x7f, 0x0, + 0x60, 0xff, 0x7, 0xe0, 0x0, 0x7, 0xe0, + + /* U+79D2 "秒" */ + 0x0, 0x70, 0x60, 0x3f, 0xc0, 0xc0, 0x7f, 0x3, + 0x80, 0x1c, 0x3f, 0x60, 0x30, 0x6e, 0xc0, 0x61, + 0xdd, 0x8f, 0xfb, 0xb3, 0x9f, 0xf6, 0x67, 0x7, + 0x1c, 0xce, 0xe, 0x39, 0x8c, 0x7f, 0x67, 0x1, + 0xb7, 0xce, 0x63, 0x6c, 0x1d, 0xc6, 0xd8, 0x7, + 0xd, 0xb0, 0x1c, 0x37, 0x60, 0x78, 0x6e, 0xc1, + 0xe0, 0xdd, 0x8f, 0x3, 0xb8, 0xfc, 0x0, 0x63, + 0xc0, 0x0, 0xc6, 0x0, 0x0 +}; + + +/*--------------------- + * GLYPH DESCRIPTION + *--------------------*/ + +static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, + {.bitmap_index = 0, .adv_w = 253, .box_w = 14, .box_h = 19, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 34, .adv_w = 174, .box_w = 9, .box_h = 19, .ofs_x = 2, .ofs_y = -1}, + {.bitmap_index = 56, .adv_w = 228, .box_w = 13, .box_h = 19, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 87, .adv_w = 212, .box_w = 12, .box_h = 19, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 116, .adv_w = 248, .box_w = 14, .box_h = 19, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 150, .adv_w = 218, .box_w = 13, .box_h = 19, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 181, .adv_w = 227, .box_w = 13, .box_h = 19, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 212, .adv_w = 208, .box_w = 13, .box_h = 19, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 243, .adv_w = 241, .box_w = 14, .box_h = 19, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 277, .adv_w = 228, .box_w = 12, .box_h = 19, .ofs_x = 2, .ofs_y = -1}, + {.bitmap_index = 306, .adv_w = 106, .box_w = 6, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 316, .adv_w = 384, .box_w = 22, .box_h = 21, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 374, .adv_w = 384, .box_w = 23, .box_h = 21, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 435, .adv_w = 384, .box_w = 24, .box_h = 21, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 498, .adv_w = 384, .box_w = 23, .box_h = 21, .ofs_x = 0, .ofs_y = -3} +}; + +/*--------------------- + * CHARACTER MAPPING + *--------------------*/ + +static const uint16_t unicode_list_1[] = { + 0x0, 0x723, 0x13f0, 0x27cc +}; + +/*Collect the unicode lists and glyph_id offsets*/ +static const lv_font_fmt_txt_cmap_t cmaps[] = +{ + { + .range_start = 48, .range_length = 11, .glyph_id_start = 1, + .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY + }, + { + .range_start = 20998, .range_length = 10189, .glyph_id_start = 12, + .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL, .list_length = 4, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY + } +}; + +/*----------------- + * KERNING + *----------------*/ + + +/*Map glyph_ids to kern left classes*/ +static const uint8_t kern_left_class_mapping[] = +{ + 0, 1, 0, 2, 3, 4, 5, 6, + 7, 8, 1, 0, 0, 0, 0, 0 +}; + +/*Map glyph_ids to kern right classes*/ +static const uint8_t kern_right_class_mapping[] = +{ + 0, 1, 2, 3, 4, 5, 6, 1, + 7, 8, 9, 0, 0, 0, 0, 0 +}; + +/*Kern values between classes*/ +static const int8_t kern_class_values[] = +{ + 0, 0, -1, -2, -2, 0, -4, 0, + 0, 0, 0, 0, 0, -12, 0, -6, + 0, 0, 0, -4, 0, 0, 0, 0, + -7, 0, 0, -4, -23, -4, -9, 0, + -8, -14, -2, -3, 0, -12, 0, 0, + 0, 0, -6, 0, -3, 0, -13, 0, + 0, 0, 0, 0, 0, 0, -4, 4, + -2, 0, -12, -2, 4, -4, 0, 0, + -2, 0, -2, -1, -2, -4, 0, -2 +}; + + +/*Collect the kern class' data in one place*/ +static const lv_font_fmt_txt_kern_classes_t kern_classes = +{ + .class_pair_values = kern_class_values, + .left_class_mapping = kern_left_class_mapping, + .right_class_mapping = kern_right_class_mapping, + .left_class_cnt = 8, + .right_class_cnt = 9, +}; + +/*-------------------- + * ALL CUSTOM DATA + *--------------------*/ + +#if LVGL_VERSION_MAJOR == 8 +/*Store all the custom data of the font*/ +static lv_font_fmt_txt_glyph_cache_t cache; +#endif + +#if LVGL_VERSION_MAJOR >= 8 +static const lv_font_fmt_txt_dsc_t font_dsc = { +#else +static lv_font_fmt_txt_dsc_t font_dsc = { +#endif + .glyph_bitmap = glyph_bitmap, + .glyph_dsc = glyph_dsc, + .cmaps = cmaps, + .kern_dsc = &kern_classes, + .kern_scale = 16, + .cmap_num = 2, + .bpp = 1, + .kern_classes = 1, + .bitmap_format = 0, +#if LVGL_VERSION_MAJOR == 8 + .cache = &cache +#endif +}; + + +/*----------------- + * PUBLIC FONT + *----------------*/ + +/*Initialize a public general font descriptor*/ +#if LVGL_VERSION_MAJOR >= 8 +const lv_font_t tencent_w7_24_time = { +#else +lv_font_t tencent_w7_24_time = { +#endif + .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ + .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ + .line_height = 21, /*The maximum line height required by the font*/ + .base_line = 3, /*Baseline measured from the bottom of the line*/ +#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0) + .subpx = LV_FONT_SUBPX_NONE, +#endif +#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8 + .underline_position = -2, + .underline_thickness = 1, +#endif + .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ +}; + + + +#endif /*#if TENCENT_W7_24_TIME*/ + diff --git a/src/NetData.h b/src/NetData.h index 3a514f1..b8c17d4 100644 --- a/src/NetData.h +++ b/src/NetData.h @@ -72,7 +72,7 @@ void parseNetDataResponse(WiFiClient &client, NetChartData &data) data.points = doc["points"]; // 2 data.format = doc["format"].as(); // "array" - JsonArray db_points_per_tier = doc["db_points_per_tier"]; + // JsonArray db_points_per_tier = doc["db_points_per_tier"]; data.result = doc["result"]; data.min = doc["min"]; // 2.1594684 data.max = doc["max"]; // 3.7468776 @@ -87,7 +87,7 @@ void parseNetDataResponse(WiFiClient &client, NetChartData &data) bool getNetDataInfoWithDimension(String chartID, NetChartData &data, String dimensions_filter) { - const char *NETDATA_HOST = "192.168.100.1"; + const char *NETDATA_HOST = "192.168.5.175"; int NETDATA_PORT = 19999; // String reqRes = "/api/v0/data?chart=sensors.temp_thermal_zone0_thermal_thermal_zone0&format=json&points=9&group=average>ime=0&options=s%7Cjsonwrap%7Cnonzero&after=-10"; String reqRes = "/api/v1/data?chart=" + chartID + "&format=json&points=1&group=average>ime=0&options=s%7Cjsonwrap%7Cnonzero&after=-2"; diff --git a/src/main.ino b/src/main.ino index 48d2496..1c0fdda 100644 --- a/src/main.ino +++ b/src/main.ino @@ -7,13 +7,15 @@ using namespace std; -const char *ssid = "HWCTQ"; // 连接WiFi名(此处使用taichi-maker为示例) - // 请将您需要连接的WiFi名填入引号中 -const char *password = "qazxsw123"; // 连接WiFi密码(此处使用12345678为示例) +const char *ssid = "ImmortalWrt"; // 连接WiFi名(此处使用taichi-maker为示例) + // 请将您需要连接的WiFi名填入引号中 +const char *password = "8877654321"; // 连接WiFi密码(此处使用12345678为示例) // extern lv_font_t my_font_name; LV_FONT_DECLARE(tencent_w7_22) LV_FONT_DECLARE(tencent_w7_24) +// LV_FONT_DECLARE(tencent_w7_24_time) +LV_FONT_DECLARE(tencent_w7_20_time) TFT_eSPI tft = TFT_eSPI(); /* TFT instance */ static lv_disp_buf_t disp_buf; @@ -39,6 +41,7 @@ static lv_obj_t *mem_value_label; static lv_obj_t *temp_value_label; static lv_obj_t *temperature_arc; static lv_obj_t *ip_label; +static lv_obj_t *up_time_label; static lv_style_t arc_indic_style; static lv_obj_t *chart; @@ -57,6 +60,10 @@ double mem_usage; double temp_value; lv_coord_t upload_serise[10] = {0}; lv_coord_t download_serise[10] = {0}; +string up_time; + +const auto net_name = "net.ovs_eth1"; +const auto mem_size = 7833960 / 1024.0; #if LV_USE_LOG != 0 /* Serial debugging */ @@ -69,7 +76,8 @@ void my_print(lv_log_level_t level, const char *file, uint32_t line, const char #endif // 屏幕亮度设置,value [0, 256] 越小月亮,越大越暗 -void setBrightness(int value) { +void setBrightness(int value) +{ pinMode(TFT_BL, INPUT); analogWrite(TFT_BL, value); pinMode(TFT_BL, OUTPUT); @@ -167,8 +175,10 @@ void getCPUUsage() { Serial.print("CPU Usage: "); Serial.println(String(netChartData.max).c_str()); - - cpu_usage = netChartData.max; + cpu_usage = 0; + for (int i = 1; i <= 5; i++) + cpu_usage += netChartData.latest_values[i].as(); + // cpu_usage = netChartData.max; } } @@ -179,7 +189,7 @@ void getMemoryUsage() Serial.print("Memory Available: "); Serial.println(String(netChartData.max).c_str()); - mem_usage = 100 * (1.0 - netChartData.max / 1024.0); + mem_usage = 100 * (1.0 - netChartData.max / mem_size); } } @@ -214,7 +224,7 @@ lv_coord_t updateNetSeries(lv_coord_t *series, double speed) void getNetworkReceived() { - if (getNetDataInfoWithDimension("net.eth0", netChartData, "received")) + if (getNetDataInfoWithDimension(net_name, netChartData, "received")) { Serial.print("Received: "); Serial.println(String(netChartData.max).c_str()); @@ -227,7 +237,7 @@ void getNetworkReceived() void getNetworkSent() { - if (getNetDataInfoWithDimension("net.eth0", netChartData, "sent")) + if (getNetDataInfoWithDimension(net_name, netChartData, "sent")) { Serial.print("Sent: "); Serial.println(String(netChartData.min).c_str()); @@ -240,7 +250,7 @@ void getNetworkSent() void getTemperature() { - if (getNetDataInfo("sensors.temp_thermal_zone0_thermal_thermal_zone0", netChartData)) + if (getNetDataInfo("snmp_nas.temperature", netChartData)) { Serial.print("Temperature: "); Serial.println(String(netChartData.max).c_str()); @@ -255,54 +265,54 @@ void updateNetworkInfoLabel() { // < 99.99 K/S lv_label_set_text_fmt(up_speed_label, "%.2f", up_speed); - lv_label_set_text(up_speed_unit_label, "K/s"); + lv_label_set_text(up_speed_unit_label, "KB/s"); } else if (up_speed < 1000.0) { // 999.9 K/S lv_label_set_text_fmt(up_speed_label, "%.1f", up_speed); - lv_label_set_text(up_speed_unit_label, "K/s"); + lv_label_set_text(up_speed_unit_label, "KB/s"); } else if (up_speed < 100000.0) { // 99.99 M/S up_speed /= 1024.0; lv_label_set_text_fmt(up_speed_label, "%.2f", up_speed); - lv_label_set_text(up_speed_unit_label, "M/s"); + lv_label_set_text(up_speed_unit_label, "MB/s"); } else if (up_speed < 1000000.0) { // 999.9 M/S up_speed = up_speed / 1024.0; lv_label_set_text_fmt(up_speed_label, "%.1f", up_speed); - lv_label_set_text(up_speed_unit_label, "M/s"); + lv_label_set_text(up_speed_unit_label, "MB/s"); } if (down_speed < 100.0) { // < 99.99 K/S lv_label_set_text_fmt(down_speed_label, "%.2f", down_speed); - lv_label_set_text(down_speed_unit_label, "K/s"); + lv_label_set_text(down_speed_unit_label, "KB/s"); } else if (down_speed < 1000.0) { // 999.9 K/S lv_label_set_text_fmt(down_speed_label, "%.1f", down_speed); - lv_label_set_text(down_speed_unit_label, "K/s"); + lv_label_set_text(down_speed_unit_label, "KB/s"); } else if (down_speed < 100000.0) { // 99.99 M/S down_speed /= 1024.0; lv_label_set_text_fmt(down_speed_label, "%.2f", down_speed); - lv_label_set_text(down_speed_unit_label, "M/s"); + lv_label_set_text(down_speed_unit_label, "MB/s"); } else if (down_speed < 1000000.0) { // 999.9 M/S down_speed = down_speed / 1024.0; lv_label_set_text_fmt(down_speed_label, "%.1f", down_speed); - lv_label_set_text(down_speed_unit_label, "M/s"); + lv_label_set_text(down_speed_unit_label, "MB/s"); } } @@ -313,13 +323,47 @@ void updateChartRange() lv_chart_set_range(chart, 0, (lv_coord_t)(max_speed * 1.1)); } +void getUptime() +{ + if (getNetDataInfo("system.uptime", netChartData)) + { + Serial.print("Up time:"); + int seconds = static_cast(netChartData.max); + int day = seconds / (24 * 3600); + int hour = (seconds % (24 * 3600)) / 3600; + int minute = (seconds % 3600) / 60; + int second = seconds % 60; + if (day != 0) + { + up_time += to_string(day)+"天"; + } + if (hour != 0 || day != 0) + { + up_time += to_string(hour)+"时" ; + } + if (minute != 0 || hour != 0 || day != 0) + { + up_time += to_string(minute)+"分"; + } + if (second != 0 || minute != 0 || hour != 0 || day != 0) + { + up_time += to_string(second)+"秒"; + } + if (day == 0 && hour == 0 && minute == 0 && second == 0) + { + up_time += "0秒"; + } + Serial.print(up_time.c_str()); + } +} + // task循环执行的函数 static void task_cb(lv_task_t *task) { if (WiFi.status() != WL_CONNECTED) { connectWiFi(); - lv_label_set_text(ip_label, WiFi.localIP().toString().c_str()); + // lv_label_set_text(ip_label, WiFi.localIP().toString().c_str()); } getCPUUsage(); getMemoryUsage(); @@ -327,16 +371,22 @@ static void task_cb(lv_task_t *task) getNetworkReceived(); getNetworkSent(); updateChartRange(); + getUptime(); lv_chart_refresh(chart); updateNetworkInfoLabel(); + lv_bar_set_value(cpu_bar, cpu_usage, LV_ANIM_OFF); lv_label_set_text_fmt(cpu_value_label, "%2.1f%%", cpu_usage); lv_bar_set_value(mem_bar, mem_usage, LV_ANIM_OFF); lv_label_set_text_fmt(mem_value_label, "%2.0f%%", mem_usage); + lv_label_set_text(up_time_label,up_time.c_str()); + lv_obj_set_pos(up_time_label, 10, 220); + up_time.clear(); + lv_label_set_text_fmt(temp_value_label, "%2.0f°C", temp_value); uint16_t end_value = 120 + 300 * temp_value / 100.0f; lv_color_t arc_color = temp_value > 75 ? lv_color_hex(0xff5d18) : lv_color_hex(0x50ff7d); @@ -394,10 +444,10 @@ void setup() lv_obj_set_size(bg, LV_HOR_RES_MAX, LV_VER_RES_MAX); // 显示ip地址 - ip_label = lv_label_create(monitor_page, NULL); - lv_label_set_text(ip_label, WiFi.localIP().toString().c_str()); + // ip_label = lv_label_create(monitor_page, NULL); + // lv_label_set_text(ip_label, WiFi.localIP().toString().c_str()); // lv_label_set_text(ip_label, "192.168.100.199"); - lv_obj_set_pos(ip_label, 10, 220); + // lv_obj_set_pos(ip_label, 10, 220); lv_obj_t *cont = lv_cont_create(monitor_page, NULL); lv_obj_set_auto_realign(cont, true); /*Auto realign when the size changes*/ @@ -445,7 +495,7 @@ void setup() lv_obj_set_pos(up_speed_label, 30, 15); up_speed_unit_label = lv_label_create(monitor_page, NULL); - lv_label_set_text(up_speed_unit_label, "K/S"); + lv_label_set_text(up_speed_unit_label, "KB/S"); lv_obj_set_style_local_text_color(up_speed_unit_label, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, speed_label_color); lv_obj_set_pos(up_speed_unit_label, 90, 18); @@ -456,10 +506,17 @@ void setup() lv_obj_set_pos(down_speed_label, 142, 15); down_speed_unit_label = lv_label_create(monitor_page, NULL); - lv_label_set_text(down_speed_unit_label, "M/S"); + lv_label_set_text(down_speed_unit_label, "MB/S"); lv_obj_set_style_local_text_color(down_speed_unit_label, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, speed_label_color); lv_obj_set_pos(down_speed_unit_label, 202, 18); + //绘制启动时间 + static lv_style_t font_20_time; + lv_style_init(&font_20_time); + lv_style_set_text_font(&font_20_time, LV_STATE_DEFAULT, &tencent_w7_20_time); + up_time_label=lv_label_create(monitor_page, NULL); + lv_obj_add_style(up_time_label,LV_LABEL_PART_MAIN,&font_20_time); + // 绘制曲线图 /*Create a chart*/ chart = lv_chart_create(monitor_page, NULL); -- Gitee From 8a54b4a7b77b0d8323bac124815333406d98f882 Mon Sep 17 00:00:00 2001 From: Yuhan Kang Date: Sat, 20 Jan 2024 17:12:36 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=B0=83=E6=8D=A2=E4=BA=86=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E5=92=8C=E4=B8=8B=E8=BD=BD=E7=9A=84=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=EF=BC=9B=E6=B7=BB=E5=8A=A0ntp=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=EF=BC=8C23=E7=82=B9=E5=88=B0=E6=AC=A1=E6=97=A59=E7=82=B9?= =?UTF-8?q?=E4=BC=91=E7=9C=A0=EF=BC=8C=E5=B1=8F=E5=B9=95=E5=85=A8=E9=BB=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pio/build/nodemcuv2/idedata.json | 2 +- .pio/libdeps/nodemcuv2/NTPClient/.codespellrc | 7 + .../NTPClient/.github/dependabot.yml | 10 + .../.github/workflows/check-arduino.yml | 28 + .../.github/workflows/compile-examples.yml | 70 +++ .../.github/workflows/report-size-deltas.yml | 24 + .../.github/workflows/spell-check.yml | 22 + .../.github/workflows/sync-labels.yml | 138 +++++ .pio/libdeps/nodemcuv2/NTPClient/.piopm | 1 + .pio/libdeps/nodemcuv2/NTPClient/CHANGELOG | 15 + .../libdeps/nodemcuv2/NTPClient/NTPClient.cpp | 212 +++++++ .pio/libdeps/nodemcuv2/NTPClient/NTPClient.h | 114 ++++ .pio/libdeps/nodemcuv2/NTPClient/README.md | 52 ++ .../NTPClient/examples/Advanced/Advanced.ino | 37 ++ .../NTPClient/examples/Basic/Basic.ino | 33 + .../examples/IsTimeSet/IsTimeSet.ino | 53 ++ .pio/libdeps/nodemcuv2/NTPClient/keywords.txt | 24 + .../nodemcuv2/NTPClient/library.properties | 9 + .pio/libdeps/nodemcuv2/Time/.piopm | 1 + .pio/libdeps/nodemcuv2/Time/DateStrings.cpp | 97 +++ .pio/libdeps/nodemcuv2/Time/Readme.md | 165 +++++ .pio/libdeps/nodemcuv2/Time/Time.cpp | 321 ++++++++++ .pio/libdeps/nodemcuv2/Time/TimeLib.h | 144 +++++ .../SyncArduinoClock/SyncArduinoClock.pde | 87 +++ .../Processing/SyncArduinoClock/readme.txt | 9 + .../TimeArduinoDue/TimeArduinoDue.ino | 71 +++ .../Time/examples/TimeGPS/TimeGPS.ino | 87 +++ .../Time/examples/TimeNTP/TimeNTP.ino | 135 ++++ .../TimeNTP_ENC28J60/TimeNTP_ENC28J60.ino | 168 +++++ .../TimeNTP_ESP8266WiFi.ino | 156 +++++ .../Time/examples/TimeRTC/TimeRTC.ino | 55 ++ .../Time/examples/TimeRTCLog/TimeRTCLog.ino | 109 ++++ .../Time/examples/TimeRTCSet/TimeRTCSet.ino | 80 +++ .../Time/examples/TimeSerial/TimeSerial.ino | 81 +++ .../TimeSerialDateStrings.ino | 108 ++++ .../Time/examples/TimeTeensy3/TimeTeensy3.ino | 78 +++ .pio/libdeps/nodemcuv2/Time/keywords.txt | 34 + .pio/libdeps/nodemcuv2/Time/library.json | 26 + .../libdeps/nodemcuv2/Time/library.properties | 11 + .pio/libdeps/nodemcuv2/integrity.dat | 6 +- .../lv_arduino/src/src/lv_font/lv_font.h | 6 +- .../src/src/lv_font/tencent_w7_16.c | 564 ++++++----------- .../src/src/lv_font/tencent_w7_18.c | 383 ++++++++++++ .../src/src/lv_font/tencent_w7_18_time.c | 245 ++++++++ .../src/src/lv_font/tencent_w7_22.c | 582 ++++++------------ platformio.ini | 2 + src/main.ino | 161 +++-- 47 files changed, 3997 insertions(+), 826 deletions(-) create mode 100644 .pio/libdeps/nodemcuv2/NTPClient/.codespellrc create mode 100644 .pio/libdeps/nodemcuv2/NTPClient/.github/dependabot.yml create mode 100644 .pio/libdeps/nodemcuv2/NTPClient/.github/workflows/check-arduino.yml create mode 100644 .pio/libdeps/nodemcuv2/NTPClient/.github/workflows/compile-examples.yml create mode 100644 .pio/libdeps/nodemcuv2/NTPClient/.github/workflows/report-size-deltas.yml create mode 100644 .pio/libdeps/nodemcuv2/NTPClient/.github/workflows/spell-check.yml create mode 100644 .pio/libdeps/nodemcuv2/NTPClient/.github/workflows/sync-labels.yml create mode 100644 .pio/libdeps/nodemcuv2/NTPClient/.piopm create mode 100644 .pio/libdeps/nodemcuv2/NTPClient/CHANGELOG create mode 100644 .pio/libdeps/nodemcuv2/NTPClient/NTPClient.cpp create mode 100644 .pio/libdeps/nodemcuv2/NTPClient/NTPClient.h create mode 100644 .pio/libdeps/nodemcuv2/NTPClient/README.md create mode 100644 .pio/libdeps/nodemcuv2/NTPClient/examples/Advanced/Advanced.ino create mode 100644 .pio/libdeps/nodemcuv2/NTPClient/examples/Basic/Basic.ino create mode 100644 .pio/libdeps/nodemcuv2/NTPClient/examples/IsTimeSet/IsTimeSet.ino create mode 100644 .pio/libdeps/nodemcuv2/NTPClient/keywords.txt create mode 100644 .pio/libdeps/nodemcuv2/NTPClient/library.properties create mode 100644 .pio/libdeps/nodemcuv2/Time/.piopm create mode 100644 .pio/libdeps/nodemcuv2/Time/DateStrings.cpp create mode 100644 .pio/libdeps/nodemcuv2/Time/Readme.md create mode 100644 .pio/libdeps/nodemcuv2/Time/Time.cpp create mode 100644 .pio/libdeps/nodemcuv2/Time/TimeLib.h create mode 100644 .pio/libdeps/nodemcuv2/Time/examples/Processing/SyncArduinoClock/SyncArduinoClock.pde create mode 100644 .pio/libdeps/nodemcuv2/Time/examples/Processing/SyncArduinoClock/readme.txt create mode 100644 .pio/libdeps/nodemcuv2/Time/examples/TimeArduinoDue/TimeArduinoDue.ino create mode 100644 .pio/libdeps/nodemcuv2/Time/examples/TimeGPS/TimeGPS.ino create mode 100644 .pio/libdeps/nodemcuv2/Time/examples/TimeNTP/TimeNTP.ino create mode 100644 .pio/libdeps/nodemcuv2/Time/examples/TimeNTP_ENC28J60/TimeNTP_ENC28J60.ino create mode 100644 .pio/libdeps/nodemcuv2/Time/examples/TimeNTP_ESP8266WiFi/TimeNTP_ESP8266WiFi.ino create mode 100644 .pio/libdeps/nodemcuv2/Time/examples/TimeRTC/TimeRTC.ino create mode 100644 .pio/libdeps/nodemcuv2/Time/examples/TimeRTCLog/TimeRTCLog.ino create mode 100644 .pio/libdeps/nodemcuv2/Time/examples/TimeRTCSet/TimeRTCSet.ino create mode 100644 .pio/libdeps/nodemcuv2/Time/examples/TimeSerial/TimeSerial.ino create mode 100644 .pio/libdeps/nodemcuv2/Time/examples/TimeSerialDateStrings/TimeSerialDateStrings.ino create mode 100644 .pio/libdeps/nodemcuv2/Time/examples/TimeTeensy3/TimeTeensy3.ino create mode 100644 .pio/libdeps/nodemcuv2/Time/keywords.txt create mode 100644 .pio/libdeps/nodemcuv2/Time/library.json create mode 100644 .pio/libdeps/nodemcuv2/Time/library.properties create mode 100644 .pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_18.c create mode 100644 .pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_18_time.c diff --git a/.pio/build/nodemcuv2/idedata.json b/.pio/build/nodemcuv2/idedata.json index fe97cff..54cdb65 100644 --- a/.pio/build/nodemcuv2/idedata.json +++ b/.pio/build/nodemcuv2/idedata.json @@ -1 +1 @@ -{"build_type": "debug", "env_name": "nodemcuv2", "libsource_dirs": ["E:\\Code\\routermonitor\\lib", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2", "C:\\Users\\YuHan\\.platformio\\lib", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries"], "defines": ["PLATFORMIO=60113", "ESP8266", "ARDUINO_ARCH_ESP8266", "ARDUINO_ESP8266_NODEMCU_ESP12E", "F_CPU=80000000L", "__ets__", "ICACHE_FLASH", "_GNU_SOURCE", "ARDUINO=10805", "ARDUINO_BOARD=\"PLATFORMIO_NODEMCUV2\"", "ARDUINO_BOARD_ID=\"nodemcuv2\"", "FLASHMODE_DIO", "LWIP_OPEN_SRC", "NONOSDK22x_190703=1", "TCP_MSS=536", "LWIP_FEATURES=1", "LWIP_IPV6=0", "VTABLES_IN_FLASH", "MMU_IRAM_SIZE=0x8000", "MMU_ICACHE_SIZE=0x8000", "__PLATFORMIO_BUILD_DEBUG__"], "includes": {"build": ["E:\\Code\\routermonitor\\include", "E:\\Code\\routermonitor\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266WiFi\\src", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\ArduinoJson\\src", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\lv_arduino\\src", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\TFT_eSPI", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\LittleFS\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SPI", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\tools\\sdk\\include", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\cores\\esp8266", "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\include", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\tools\\sdk\\lwip2\\include", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\variants\\nodemcu"], "compatlib": ["E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\ArduinoJson\\src", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\TFT_eSPI", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\LittleFS\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SPI", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\lv_arduino\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266WiFi\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\LittleFS\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SPI", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ArduinoOTA", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\DNSServer\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\EEPROM", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266AVRISP\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266HTTPClient\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266HTTPUpdateServer\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266LLMNR", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266NetBIOS", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266SSDP", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266SdFat\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266WebServer\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266WiFiMesh\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266httpUpdate\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266mDNS\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Ethernet\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\FSTools", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\GDBStub\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Hash\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\I2S\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Netdump\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SD\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SDFS\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SPISlave\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Servo\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SoftwareSerial\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\TFT_Touch_Shield_V2", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Ticker\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Wire", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\esp8266\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\lwIP_Ethernet\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\lwIP_PPP\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\lwIP_enc28j60\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\lwIP_w5100\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\lwIP_w5500\\src"], "toolchain": ["C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\xtensa-lx106-elf\\include\\c++\\10.3.0", "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\xtensa-lx106-elf\\include\\c++\\10.3.0\\xtensa-lx106-elf", "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\lib\\gcc\\xtensa-lx106-elf\\10.3.0\\include", "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\lib\\gcc\\xtensa-lx106-elf\\10.3.0\\include-fixed", "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\xtensa-lx106-elf\\include"]}, "cc_flags": ["-std=gnu17", "-Wpointer-arith", "-Wno-implicit-function-declaration", "-Wl,-EL", "-fno-inline-functions", "-nostdlib", "-mlongcalls", "-mtext-section-literals", "-falign-functions=4", "-U__STRICT_ANSI__", "-ffunction-sections", "-fdata-sections", "-Wall", "-Werror=return-type", "-free", "-fipa-pta", "-Og", "-g2", "-ggdb2"], "cxx_flags": ["-fno-rtti", "-std=gnu++17", "-fno-exceptions", "-mlongcalls", "-mtext-section-literals", "-falign-functions=4", "-U__STRICT_ANSI__", "-ffunction-sections", "-fdata-sections", "-Wall", "-Werror=return-type", "-free", "-fipa-pta", "-Og", "-g2", "-ggdb2"], "cc_path": "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\bin\\xtensa-lx106-elf-gcc.exe", "cxx_path": "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\bin\\xtensa-lx106-elf-g++.exe", "gdb_path": "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\bin\\xtensa-lx106-elf-gdb.exe", "prog_path": "E:\\Code\\routermonitor\\.pio\\build\\nodemcuv2\\firmware.elf", "svd_path": null, "compiler_type": "gcc", "targets": [{"name": "buildfs", "title": "Build Filesystem Image", "description": null, "group": "Platform"}, {"name": "size", "title": "Program Size", "description": "Calculate program size", "group": "Platform"}, {"name": "upload", "title": "Upload", "description": null, "group": "Platform"}, {"name": "uploadfs", "title": "Upload Filesystem Image", "description": null, "group": "Platform"}, {"name": "uploadfsota", "title": "Upload Filesystem Image OTA", "description": null, "group": "Platform"}, {"name": "erase", "title": "Erase Flash", "description": null, "group": "Platform"}], "extra": {"flash_images": []}} \ No newline at end of file +{"build_type": "debug", "env_name": "nodemcuv2", "libsource_dirs": ["E:\\Code\\routermonitor\\lib", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2", "C:\\Users\\YuHan\\.platformio\\lib", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries"], "defines": ["PLATFORMIO=60113", "ESP8266", "ARDUINO_ARCH_ESP8266", "ARDUINO_ESP8266_NODEMCU_ESP12E", "F_CPU=80000000L", "__ets__", "ICACHE_FLASH", "_GNU_SOURCE", "ARDUINO=10805", "ARDUINO_BOARD=\"PLATFORMIO_NODEMCUV2\"", "ARDUINO_BOARD_ID=\"nodemcuv2\"", "FLASHMODE_DIO", "LWIP_OPEN_SRC", "NONOSDK22x_190703=1", "TCP_MSS=536", "LWIP_FEATURES=1", "LWIP_IPV6=0", "VTABLES_IN_FLASH", "MMU_IRAM_SIZE=0x8000", "MMU_ICACHE_SIZE=0x8000", "__PLATFORMIO_BUILD_DEBUG__"], "includes": {"build": ["E:\\Code\\routermonitor\\include", "E:\\Code\\routermonitor\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266WiFi\\src", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\NTPClient", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\ArduinoJson\\src", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\lv_arduino\\src", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\TFT_eSPI", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\LittleFS\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SPI", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\Time", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\tools\\sdk\\include", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\cores\\esp8266", "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\include", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\tools\\sdk\\lwip2\\include", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\variants\\nodemcu"], "compatlib": ["E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\ArduinoJson\\src", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\NTPClient", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\TFT_eSPI", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\LittleFS\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SPI", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\Time", "E:\\Code\\routermonitor\\.pio\\libdeps\\nodemcuv2\\lv_arduino\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266WiFi\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\LittleFS\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SPI", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ArduinoOTA", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\DNSServer\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\EEPROM", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266AVRISP\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266HTTPClient\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266HTTPUpdateServer\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266LLMNR", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266NetBIOS", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266SSDP", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266SdFat\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266WebServer\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266WiFiMesh\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266httpUpdate\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\ESP8266mDNS\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Ethernet\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\FSTools", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\GDBStub\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Hash\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\I2S\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Netdump\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SD\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SDFS\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SPISlave\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Servo\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\SoftwareSerial\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\TFT_Touch_Shield_V2", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Ticker\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\Wire", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\esp8266\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\lwIP_Ethernet\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\lwIP_PPP\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\lwIP_enc28j60\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\lwIP_w5100\\src", "C:\\Users\\YuHan\\.platformio\\packages\\framework-arduinoespressif8266\\libraries\\lwIP_w5500\\src"], "toolchain": ["C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\xtensa-lx106-elf\\include\\c++\\10.3.0", "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\xtensa-lx106-elf\\include\\c++\\10.3.0\\xtensa-lx106-elf", "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\lib\\gcc\\xtensa-lx106-elf\\10.3.0\\include", "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\lib\\gcc\\xtensa-lx106-elf\\10.3.0\\include-fixed", "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\xtensa-lx106-elf\\include"]}, "cc_flags": ["-std=gnu17", "-Wpointer-arith", "-Wno-implicit-function-declaration", "-Wl,-EL", "-fno-inline-functions", "-nostdlib", "-mlongcalls", "-mtext-section-literals", "-falign-functions=4", "-U__STRICT_ANSI__", "-ffunction-sections", "-fdata-sections", "-Wall", "-Werror=return-type", "-free", "-fipa-pta", "-Og", "-g2", "-ggdb2"], "cxx_flags": ["-fno-rtti", "-std=gnu++17", "-fno-exceptions", "-mlongcalls", "-mtext-section-literals", "-falign-functions=4", "-U__STRICT_ANSI__", "-ffunction-sections", "-fdata-sections", "-Wall", "-Werror=return-type", "-free", "-fipa-pta", "-Og", "-g2", "-ggdb2"], "cc_path": "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\bin\\xtensa-lx106-elf-gcc.exe", "cxx_path": "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\bin\\xtensa-lx106-elf-g++.exe", "gdb_path": "C:\\Users\\YuHan\\.platformio\\packages\\toolchain-xtensa\\bin\\xtensa-lx106-elf-gdb.exe", "prog_path": "E:\\Code\\routermonitor\\.pio\\build\\nodemcuv2\\firmware.elf", "svd_path": null, "compiler_type": "gcc", "targets": [{"name": "buildfs", "title": "Build Filesystem Image", "description": null, "group": "Platform"}, {"name": "size", "title": "Program Size", "description": "Calculate program size", "group": "Platform"}, {"name": "upload", "title": "Upload", "description": null, "group": "Platform"}, {"name": "uploadfs", "title": "Upload Filesystem Image", "description": null, "group": "Platform"}, {"name": "uploadfsota", "title": "Upload Filesystem Image OTA", "description": null, "group": "Platform"}, {"name": "erase", "title": "Erase Flash", "description": null, "group": "Platform"}], "extra": {"flash_images": []}} \ No newline at end of file diff --git a/.pio/libdeps/nodemcuv2/NTPClient/.codespellrc b/.pio/libdeps/nodemcuv2/NTPClient/.codespellrc new file mode 100644 index 0000000..101edae --- /dev/null +++ b/.pio/libdeps/nodemcuv2/NTPClient/.codespellrc @@ -0,0 +1,7 @@ +# See: https://github.com/codespell-project/codespell#using-a-config-file +[codespell] +# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here: +ignore-words-list = , +check-filenames = +check-hidden = +skip = ./.git diff --git a/.pio/libdeps/nodemcuv2/NTPClient/.github/dependabot.yml b/.pio/libdeps/nodemcuv2/NTPClient/.github/dependabot.yml new file mode 100644 index 0000000..03600dd --- /dev/null +++ b/.pio/libdeps/nodemcuv2/NTPClient/.github/dependabot.yml @@ -0,0 +1,10 @@ +# See: https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#about-the-dependabotyml-file +version: 2 + +updates: + # Configure check for outdated GitHub Actions actions in workflows. + # See: https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-dependabot + - package-ecosystem: github-actions + directory: / # Check the repository's workflows under /.github/workflows/ + schedule: + interval: daily diff --git a/.pio/libdeps/nodemcuv2/NTPClient/.github/workflows/check-arduino.yml b/.pio/libdeps/nodemcuv2/NTPClient/.github/workflows/check-arduino.yml new file mode 100644 index 0000000..3e0d26c --- /dev/null +++ b/.pio/libdeps/nodemcuv2/NTPClient/.github/workflows/check-arduino.yml @@ -0,0 +1,28 @@ +name: Check Arduino + +# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows +on: + push: + pull_request: + schedule: + # Run every Tuesday at 8 AM UTC to catch breakage caused by new rules added to Arduino Lint. + - cron: "0 8 * * TUE" + workflow_dispatch: + repository_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Arduino Lint + uses: arduino/arduino-lint-action@v1 + with: + compliance: specification + library-manager: update + # Always use this setting for official repositories. Remove for 3rd party projects. + official: true + project-type: library diff --git a/.pio/libdeps/nodemcuv2/NTPClient/.github/workflows/compile-examples.yml b/.pio/libdeps/nodemcuv2/NTPClient/.github/workflows/compile-examples.yml new file mode 100644 index 0000000..c9f68fc --- /dev/null +++ b/.pio/libdeps/nodemcuv2/NTPClient/.github/workflows/compile-examples.yml @@ -0,0 +1,70 @@ +name: Compile Examples + +# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows +on: + push: + paths: + - ".github/workflows/compile-examples.yml" + - "examples/**" + - "**.c" + - "**.cpp" + - "**.h" + - "*.S" + pull_request: + paths: + - ".github/workflows/compile-examples.yml" + - "examples/**" + - "**.c" + - "**.cpp" + - "**.h" + - "*.S" + schedule: + # Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms). + - cron: "0 8 * * TUE" + workflow_dispatch: + repository_dispatch: + +jobs: + build: + name: ${{ matrix.board.fqbn }} + runs-on: ubuntu-latest + + env: + SKETCHES_REPORTS_PATH: sketches-reports + + strategy: + fail-fast: false + + matrix: + board: + - fqbn: esp8266:esp8266:huzzah + platforms: | + - name: esp8266:esp8266 + source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Compile examples + uses: arduino/compile-sketches@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + fqbn: ${{ matrix.board.fqbn }} + platforms: ${{ matrix.board.platforms }} + libraries: | + # Install the library from the local path. + - source-path: ./ + # Additional library dependencies can be listed here. + # See: https://github.com/arduino/compile-sketches#libraries + sketch-paths: | + - examples + enable-deltas-report: true + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} + + - name: Save sketches report as workflow artifact + uses: actions/upload-artifact@v3 + with: + if-no-files-found: error + path: ${{ env.SKETCHES_REPORTS_PATH }} + name: ${{ env.SKETCHES_REPORTS_PATH }} diff --git a/.pio/libdeps/nodemcuv2/NTPClient/.github/workflows/report-size-deltas.yml b/.pio/libdeps/nodemcuv2/NTPClient/.github/workflows/report-size-deltas.yml new file mode 100644 index 0000000..652be5d --- /dev/null +++ b/.pio/libdeps/nodemcuv2/NTPClient/.github/workflows/report-size-deltas.yml @@ -0,0 +1,24 @@ +name: Report Size Deltas + +# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows +on: + push: + paths: + - ".github/workflows/report-size-deltas.yml" + schedule: + # Run at the minimum interval allowed by GitHub Actions. + # Note: GitHub Actions periodically has outages which result in workflow failures. + # In this event, the workflows will start passing again once the service recovers. + - cron: "*/5 * * * *" + workflow_dispatch: + repository_dispatch: + +jobs: + report: + runs-on: ubuntu-latest + steps: + - name: Comment size deltas reports to PRs + uses: arduino/report-size-deltas@v1 + with: + # The name of the workflow artifact created by the sketch compilation workflow + sketches-reports-source: sketches-reports diff --git a/.pio/libdeps/nodemcuv2/NTPClient/.github/workflows/spell-check.yml b/.pio/libdeps/nodemcuv2/NTPClient/.github/workflows/spell-check.yml new file mode 100644 index 0000000..3f6b03f --- /dev/null +++ b/.pio/libdeps/nodemcuv2/NTPClient/.github/workflows/spell-check.yml @@ -0,0 +1,22 @@ +name: Spell Check + +# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows +on: + push: + pull_request: + schedule: + # Run every Tuesday at 8 AM UTC to catch new misspelling detections resulting from dictionary updates. + - cron: "0 8 * * TUE" + workflow_dispatch: + repository_dispatch: + +jobs: + spellcheck: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Spell check + uses: codespell-project/actions-codespell@master diff --git a/.pio/libdeps/nodemcuv2/NTPClient/.github/workflows/sync-labels.yml b/.pio/libdeps/nodemcuv2/NTPClient/.github/workflows/sync-labels.yml new file mode 100644 index 0000000..986bda6 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/NTPClient/.github/workflows/sync-labels.yml @@ -0,0 +1,138 @@ +# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/sync-labels.md +name: Sync Labels + +# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows +on: + push: + paths: + - ".github/workflows/sync-labels.ya?ml" + - ".github/label-configuration-files/*.ya?ml" + pull_request: + paths: + - ".github/workflows/sync-labels.ya?ml" + - ".github/label-configuration-files/*.ya?ml" + schedule: + # Run daily at 8 AM UTC to sync with changes to shared label configurations. + - cron: "0 8 * * *" + workflow_dispatch: + repository_dispatch: + +env: + CONFIGURATIONS_FOLDER: .github/label-configuration-files + CONFIGURATIONS_ARTIFACT: label-configuration-files + +jobs: + check: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Download JSON schema for labels configuration file + id: download-schema + uses: carlosperate/download-file-action@v1 + with: + file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/arduino-tooling-gh-label-configuration-schema.json + location: ${{ runner.temp }}/label-configuration-schema + + - name: Install JSON schema validator + run: | + sudo npm install \ + --global \ + ajv-cli \ + ajv-formats + + - name: Validate local labels configuration + run: | + # See: https://github.com/ajv-validator/ajv-cli#readme + ajv validate \ + --all-errors \ + -c ajv-formats \ + -s "${{ steps.download-schema.outputs.file-path }}" \ + -d "${{ env.CONFIGURATIONS_FOLDER }}/*.{yml,yaml}" + + download: + needs: check + runs-on: ubuntu-latest + + strategy: + matrix: + filename: + # Filenames of the shared configurations to apply to the repository in addition to the local configuration. + # https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/sync-labels + - universal.yml + + steps: + - name: Download + uses: carlosperate/download-file-action@v1 + with: + file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }} + + - name: Pass configuration files to next job via workflow artifact + uses: actions/upload-artifact@v3 + with: + path: | + *.yaml + *.yml + if-no-files-found: error + name: ${{ env.CONFIGURATIONS_ARTIFACT }} + + sync: + needs: download + runs-on: ubuntu-latest + + steps: + - name: Set environment variables + run: | + # See: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable + echo "MERGED_CONFIGURATION_PATH=${{ runner.temp }}/labels.yml" >> "$GITHUB_ENV" + + - name: Determine whether to dry run + id: dry-run + if: > + github.event_name == 'pull_request' || + ( + ( + github.event_name == 'push' || + github.event_name == 'workflow_dispatch' + ) && + github.ref != format('refs/heads/{0}', github.event.repository.default_branch) + ) + run: | + # Use of this flag in the github-label-sync command will cause it to only check the validity of the + # configuration. + echo "::set-output name=flag::--dry-run" + + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Download configuration files artifact + uses: actions/download-artifact@v3 + with: + name: ${{ env.CONFIGURATIONS_ARTIFACT }} + path: ${{ env.CONFIGURATIONS_FOLDER }} + + - name: Remove unneeded artifact + uses: geekyeggo/delete-artifact@v1 + with: + name: ${{ env.CONFIGURATIONS_ARTIFACT }} + + - name: Merge label configuration files + run: | + # Merge all configuration files + shopt -s extglob + cat "${{ env.CONFIGURATIONS_FOLDER }}"/*.@(yml|yaml) > "${{ env.MERGED_CONFIGURATION_PATH }}" + + - name: Install github-label-sync + run: sudo npm install --global github-label-sync + + - name: Sync labels + env: + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # See: https://github.com/Financial-Times/github-label-sync + github-label-sync \ + --labels "${{ env.MERGED_CONFIGURATION_PATH }}" \ + ${{ steps.dry-run.outputs.flag }} \ + ${{ github.repository }} diff --git a/.pio/libdeps/nodemcuv2/NTPClient/.piopm b/.pio/libdeps/nodemcuv2/NTPClient/.piopm new file mode 100644 index 0000000..086822d --- /dev/null +++ b/.pio/libdeps/nodemcuv2/NTPClient/.piopm @@ -0,0 +1 @@ +{"type": "library", "name": "NTPClient", "version": "3.2.1", "spec": {"owner": "arduino-libraries", "id": 551, "name": "NTPClient", "requirements": null, "uri": null}} \ No newline at end of file diff --git a/.pio/libdeps/nodemcuv2/NTPClient/CHANGELOG b/.pio/libdeps/nodemcuv2/NTPClient/CHANGELOG new file mode 100644 index 0000000..6a082d5 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/NTPClient/CHANGELOG @@ -0,0 +1,15 @@ +NTPClient 3.1.0 - 2016.05.31 + +* Added functions for changing the timeOffset and updateInterval later. Thanks @SirUli + +NTPClient 3.0.0 - 2016.04.19 + +* Constructors now require UDP instance argument, to add support for non-ESP8266 boards +* Added optional begin API to override default local port +* Added end API to close UDP socket +* Changed return type of update and forceUpdate APIs to bool, and return success or failure +* Change return type of getDay, getHours, getMinutes, and getSeconds to int + +Older + +* Changes not recorded diff --git a/.pio/libdeps/nodemcuv2/NTPClient/NTPClient.cpp b/.pio/libdeps/nodemcuv2/NTPClient/NTPClient.cpp new file mode 100644 index 0000000..b435855 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/NTPClient/NTPClient.cpp @@ -0,0 +1,212 @@ +/** + * The MIT License (MIT) + * Copyright (c) 2015 by Fabrice Weinberg + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include "NTPClient.h" + +NTPClient::NTPClient(UDP& udp) { + this->_udp = &udp; +} + +NTPClient::NTPClient(UDP& udp, long timeOffset) { + this->_udp = &udp; + this->_timeOffset = timeOffset; +} + +NTPClient::NTPClient(UDP& udp, const char* poolServerName) { + this->_udp = &udp; + this->_poolServerName = poolServerName; +} + +NTPClient::NTPClient(UDP& udp, IPAddress poolServerIP) { + this->_udp = &udp; + this->_poolServerIP = poolServerIP; + this->_poolServerName = NULL; +} + +NTPClient::NTPClient(UDP& udp, const char* poolServerName, long timeOffset) { + this->_udp = &udp; + this->_timeOffset = timeOffset; + this->_poolServerName = poolServerName; +} + +NTPClient::NTPClient(UDP& udp, IPAddress poolServerIP, long timeOffset){ + this->_udp = &udp; + this->_timeOffset = timeOffset; + this->_poolServerIP = poolServerIP; + this->_poolServerName = NULL; +} + +NTPClient::NTPClient(UDP& udp, const char* poolServerName, long timeOffset, unsigned long updateInterval) { + this->_udp = &udp; + this->_timeOffset = timeOffset; + this->_poolServerName = poolServerName; + this->_updateInterval = updateInterval; +} + +NTPClient::NTPClient(UDP& udp, IPAddress poolServerIP, long timeOffset, unsigned long updateInterval) { + this->_udp = &udp; + this->_timeOffset = timeOffset; + this->_poolServerIP = poolServerIP; + this->_poolServerName = NULL; + this->_updateInterval = updateInterval; +} + +void NTPClient::begin() { + this->begin(NTP_DEFAULT_LOCAL_PORT); +} + +void NTPClient::begin(unsigned int port) { + this->_port = port; + + this->_udp->begin(this->_port); + + this->_udpSetup = true; +} + +bool NTPClient::forceUpdate() { + #ifdef DEBUG_NTPClient + Serial.println("Update from NTP Server"); + #endif + + // flush any existing packets + while(this->_udp->parsePacket() != 0) + this->_udp->flush(); + + this->sendNTPPacket(); + + // Wait till data is there or timeout... + byte timeout = 0; + int cb = 0; + do { + delay ( 10 ); + cb = this->_udp->parsePacket(); + if (timeout > 100) return false; // timeout after 1000 ms + timeout++; + } while (cb == 0); + + this->_lastUpdate = millis() - (10 * (timeout + 1)); // Account for delay in reading the time + + this->_udp->read(this->_packetBuffer, NTP_PACKET_SIZE); + + unsigned long highWord = word(this->_packetBuffer[40], this->_packetBuffer[41]); + unsigned long lowWord = word(this->_packetBuffer[42], this->_packetBuffer[43]); + // combine the four bytes (two words) into a long integer + // this is NTP time (seconds since Jan 1 1900): + unsigned long secsSince1900 = highWord << 16 | lowWord; + + this->_currentEpoc = secsSince1900 - SEVENZYYEARS; + + return true; // return true after successful update +} + +bool NTPClient::update() { + if ((millis() - this->_lastUpdate >= this->_updateInterval) // Update after _updateInterval + || this->_lastUpdate == 0) { // Update if there was no update yet. + if (!this->_udpSetup || this->_port != NTP_DEFAULT_LOCAL_PORT) this->begin(this->_port); // setup the UDP client if needed + return this->forceUpdate(); + } + return false; // return false if update does not occur +} + +bool NTPClient::isTimeSet() const { + return (this->_lastUpdate != 0); // returns true if the time has been set, else false +} + +unsigned long NTPClient::getEpochTime() const { + return this->_timeOffset + // User offset + this->_currentEpoc + // Epoch returned by the NTP server + ((millis() - this->_lastUpdate) / 1000); // Time since last update +} + +int NTPClient::getDay() const { + return (((this->getEpochTime() / 86400L) + 4 ) % 7); //0 is Sunday +} +int NTPClient::getHours() const { + return ((this->getEpochTime() % 86400L) / 3600); +} +int NTPClient::getMinutes() const { + return ((this->getEpochTime() % 3600) / 60); +} +int NTPClient::getSeconds() const { + return (this->getEpochTime() % 60); +} + +String NTPClient::getFormattedTime() const { + unsigned long rawTime = this->getEpochTime(); + unsigned long hours = (rawTime % 86400L) / 3600; + String hoursStr = hours < 10 ? "0" + String(hours) : String(hours); + + unsigned long minutes = (rawTime % 3600) / 60; + String minuteStr = minutes < 10 ? "0" + String(minutes) : String(minutes); + + unsigned long seconds = rawTime % 60; + String secondStr = seconds < 10 ? "0" + String(seconds) : String(seconds); + + return hoursStr + ":" + minuteStr + ":" + secondStr; +} + +void NTPClient::end() { + this->_udp->stop(); + + this->_udpSetup = false; +} + +void NTPClient::setTimeOffset(int timeOffset) { + this->_timeOffset = timeOffset; +} + +void NTPClient::setUpdateInterval(unsigned long updateInterval) { + this->_updateInterval = updateInterval; +} + +void NTPClient::setPoolServerName(const char* poolServerName) { + this->_poolServerName = poolServerName; +} + +void NTPClient::sendNTPPacket() { + // set all bytes in the buffer to 0 + memset(this->_packetBuffer, 0, NTP_PACKET_SIZE); + // Initialize values needed to form NTP request + this->_packetBuffer[0] = 0b11100011; // LI, Version, Mode + this->_packetBuffer[1] = 0; // Stratum, or type of clock + this->_packetBuffer[2] = 6; // Polling Interval + this->_packetBuffer[3] = 0xEC; // Peer Clock Precision + // 8 bytes of zero for Root Delay & Root Dispersion + this->_packetBuffer[12] = 49; + this->_packetBuffer[13] = 0x4E; + this->_packetBuffer[14] = 49; + this->_packetBuffer[15] = 52; + + // all NTP fields have been given values, now + // you can send a packet requesting a timestamp: + if (this->_poolServerName) { + this->_udp->beginPacket(this->_poolServerName, 123); + } else { + this->_udp->beginPacket(this->_poolServerIP, 123); + } + this->_udp->write(this->_packetBuffer, NTP_PACKET_SIZE); + this->_udp->endPacket(); +} + +void NTPClient::setRandomPort(unsigned int minValue, unsigned int maxValue) { + randomSeed(analogRead(0)); + this->_port = random(minValue, maxValue); +} diff --git a/.pio/libdeps/nodemcuv2/NTPClient/NTPClient.h b/.pio/libdeps/nodemcuv2/NTPClient/NTPClient.h new file mode 100644 index 0000000..a31d32f --- /dev/null +++ b/.pio/libdeps/nodemcuv2/NTPClient/NTPClient.h @@ -0,0 +1,114 @@ +#pragma once + +#include "Arduino.h" + +#include + +#define SEVENZYYEARS 2208988800UL +#define NTP_PACKET_SIZE 48 +#define NTP_DEFAULT_LOCAL_PORT 1337 + +class NTPClient { + private: + UDP* _udp; + bool _udpSetup = false; + + const char* _poolServerName = "pool.ntp.org"; // Default time server + IPAddress _poolServerIP; + unsigned int _port = NTP_DEFAULT_LOCAL_PORT; + long _timeOffset = 0; + + unsigned long _updateInterval = 60000; // In ms + + unsigned long _currentEpoc = 0; // In s + unsigned long _lastUpdate = 0; // In ms + + byte _packetBuffer[NTP_PACKET_SIZE]; + + void sendNTPPacket(); + + public: + NTPClient(UDP& udp); + NTPClient(UDP& udp, long timeOffset); + NTPClient(UDP& udp, const char* poolServerName); + NTPClient(UDP& udp, const char* poolServerName, long timeOffset); + NTPClient(UDP& udp, const char* poolServerName, long timeOffset, unsigned long updateInterval); + NTPClient(UDP& udp, IPAddress poolServerIP); + NTPClient(UDP& udp, IPAddress poolServerIP, long timeOffset); + NTPClient(UDP& udp, IPAddress poolServerIP, long timeOffset, unsigned long updateInterval); + + /** + * Set time server name + * + * @param poolServerName + */ + void setPoolServerName(const char* poolServerName); + + /** + * Set random local port + */ + void setRandomPort(unsigned int minValue = 49152, unsigned int maxValue = 65535); + + /** + * Starts the underlying UDP client with the default local port + */ + void begin(); + + /** + * Starts the underlying UDP client with the specified local port + */ + void begin(unsigned int port); + + /** + * This should be called in the main loop of your application. By default an update from the NTP Server is only + * made every 60 seconds. This can be configured in the NTPClient constructor. + * + * @return true on success, false on failure + */ + bool update(); + + /** + * This will force the update from the NTP Server. + * + * @return true on success, false on failure + */ + bool forceUpdate(); + + /** + * This allows to check if the NTPClient successfully received a NTP packet and set the time. + * + * @return true if time has been set, else false + */ + bool isTimeSet() const; + + int getDay() const; + int getHours() const; + int getMinutes() const; + int getSeconds() const; + + /** + * Changes the time offset. Useful for changing timezones dynamically + */ + void setTimeOffset(int timeOffset); + + /** + * Set the update interval to another frequency. E.g. useful when the + * timeOffset should not be set in the constructor + */ + void setUpdateInterval(unsigned long updateInterval); + + /** + * @return time formatted like `hh:mm:ss` + */ + String getFormattedTime() const; + + /** + * @return time in seconds since Jan. 1, 1970 + */ + unsigned long getEpochTime() const; + + /** + * Stops the underlying UDP client + */ + void end(); +}; diff --git a/.pio/libdeps/nodemcuv2/NTPClient/README.md b/.pio/libdeps/nodemcuv2/NTPClient/README.md new file mode 100644 index 0000000..f83882c --- /dev/null +++ b/.pio/libdeps/nodemcuv2/NTPClient/README.md @@ -0,0 +1,52 @@ +# NTPClient + +[![Check Arduino status](https://github.com/arduino-libraries/NTPClient/actions/workflows/check-arduino.yml/badge.svg)](https://github.com/arduino-libraries/NTPClient/actions/workflows/check-arduino.yml) +[![Compile Examples status](https://github.com/arduino-libraries/NTPClient/actions/workflows/compile-examples.yml/badge.svg)](https://github.com/arduino-libraries/NTPClient/actions/workflows/compile-examples.yml) +[![Spell Check status](https://github.com/arduino-libraries/NTPClient/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino-libraries/NTPClient/actions/workflows/spell-check.yml) + +Connect to a NTP server, here is how: + +```cpp +#include +// change next line to use with another board/shield +#include +//#include // for WiFi shield +//#include // for WiFi 101 shield or MKR1000 +#include + +const char *ssid = ""; +const char *password = ""; + +WiFiUDP ntpUDP; + +// By default 'pool.ntp.org' is used with 60 seconds update interval and +// no offset +NTPClient timeClient(ntpUDP); + +// You can specify the time server pool and the offset, (in seconds) +// additionally you can specify the update interval (in milliseconds). +// NTPClient timeClient(ntpUDP, "europe.pool.ntp.org", 3600, 60000); + +void setup(){ + Serial.begin(115200); + WiFi.begin(ssid, password); + + while ( WiFi.status() != WL_CONNECTED ) { + delay ( 500 ); + Serial.print ( "." ); + } + + timeClient.begin(); +} + +void loop() { + timeClient.update(); + + Serial.println(timeClient.getFormattedTime()); + + delay(1000); +} +``` + +## Function documentation +`getEpochTime` returns the Unix epoch, which are the seconds elapsed since 00:00:00 UTC on 1 January 1970 (leap seconds are ignored, every day is treated as having 86400 seconds). **Attention**: If you have set a time offset this time offset will be added to your epoch timestamp. diff --git a/.pio/libdeps/nodemcuv2/NTPClient/examples/Advanced/Advanced.ino b/.pio/libdeps/nodemcuv2/NTPClient/examples/Advanced/Advanced.ino new file mode 100644 index 0000000..18a6a97 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/NTPClient/examples/Advanced/Advanced.ino @@ -0,0 +1,37 @@ +#include +// change next line to use with another board/shield +#include +//#include // for WiFi shield +//#include // for WiFi 101 shield or MKR1000 +#include + +const char *ssid = ""; +const char *password = ""; + +WiFiUDP ntpUDP; + +// You can specify the time server pool and the offset (in seconds, can be +// changed later with setTimeOffset() ). Additionally you can specify the +// update interval (in milliseconds, can be changed using setUpdateInterval() ). +NTPClient timeClient(ntpUDP, "europe.pool.ntp.org", 3600, 60000); + +void setup(){ + Serial.begin(115200); + + WiFi.begin(ssid, password); + + while ( WiFi.status() != WL_CONNECTED ) { + delay ( 500 ); + Serial.print ( "." ); + } + + timeClient.begin(); +} + +void loop() { + timeClient.update(); + + Serial.println(timeClient.getFormattedTime()); + + delay(1000); +} diff --git a/.pio/libdeps/nodemcuv2/NTPClient/examples/Basic/Basic.ino b/.pio/libdeps/nodemcuv2/NTPClient/examples/Basic/Basic.ino new file mode 100644 index 0000000..f0a2a7c --- /dev/null +++ b/.pio/libdeps/nodemcuv2/NTPClient/examples/Basic/Basic.ino @@ -0,0 +1,33 @@ +#include +// change next line to use with another board/shield +#include +//#include // for WiFi shield +//#include // for WiFi 101 shield or MKR1000 +#include + +const char *ssid = ""; +const char *password = ""; + +WiFiUDP ntpUDP; +NTPClient timeClient(ntpUDP); + +void setup(){ + Serial.begin(115200); + + WiFi.begin(ssid, password); + + while ( WiFi.status() != WL_CONNECTED ) { + delay ( 500 ); + Serial.print ( "." ); + } + + timeClient.begin(); +} + +void loop() { + timeClient.update(); + + Serial.println(timeClient.getFormattedTime()); + + delay(1000); +} diff --git a/.pio/libdeps/nodemcuv2/NTPClient/examples/IsTimeSet/IsTimeSet.ino b/.pio/libdeps/nodemcuv2/NTPClient/examples/IsTimeSet/IsTimeSet.ino new file mode 100644 index 0000000..619bfde --- /dev/null +++ b/.pio/libdeps/nodemcuv2/NTPClient/examples/IsTimeSet/IsTimeSet.ino @@ -0,0 +1,53 @@ +#include +// change next line to use with another board/shield +#include +//#include // for WiFi shield +//#include // for WiFi 101 shield or MKR1000 +#include + +const char *ssid = ""; +const char *password = ""; + +WiFiUDP ntpUDP; +// initialized to a time offset of 10 hours +NTPClient timeClient(ntpUDP,"pool.ntp.org", 36000, 60000); +// HH:MM:SS +// timeClient initializes to 10:00:00 if it does not receive an NTP packet +// before the 100ms timeout. +// without isTimeSet() the LED would be switched on, although the time +// was not yet set correctly. + +// blue LED on ESP-12F +const int led = 2; +const int hour = 10; +const int minute = 0; + +void setup(){ + Serial.begin(115200); + + pinMode(led, OUTPUT); + // led is off when pin is high + digitalWrite(led, 1); + + WiFi.begin(ssid, password); + + while (WiFi.status() != WL_CONNECTED) { + delay (500); + Serial.print ("."); + } + + timeClient.begin(); +} + +void loop() { + timeClient.update(); + + Serial.println(timeClient.getFormattedTime()); + if(timeClient.isTimeSet()) { + if (hour == timeClient.getHours() && minute == timeClient.getMinutes()) { + digitalWrite(led, 0); + } + } + + delay(1000); +} diff --git a/.pio/libdeps/nodemcuv2/NTPClient/keywords.txt b/.pio/libdeps/nodemcuv2/NTPClient/keywords.txt new file mode 100644 index 0000000..4df40a7 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/NTPClient/keywords.txt @@ -0,0 +1,24 @@ +####################################### +# Datatypes (KEYWORD1) +####################################### + +NTPClient KEYWORD1 + +####################################### +# Methods and Functions (KEYWORD2) +####################################### + +begin KEYWORD2 +end KEYWORD2 +update KEYWORD2 +forceUpdate KEYWORD2 +isTimeSet KEYWORD2 +getDay KEYWORD2 +getHours KEYWORD2 +getMinutes KEYWORD2 +getSeconds KEYWORD2 +getFormattedTime KEYWORD2 +getEpochTime KEYWORD2 +setTimeOffset KEYWORD2 +setUpdateInterval KEYWORD2 +setPoolServerName KEYWORD2 diff --git a/.pio/libdeps/nodemcuv2/NTPClient/library.properties b/.pio/libdeps/nodemcuv2/NTPClient/library.properties new file mode 100644 index 0000000..abdd80d --- /dev/null +++ b/.pio/libdeps/nodemcuv2/NTPClient/library.properties @@ -0,0 +1,9 @@ +name=NTPClient +version=3.2.1 +author=Fabrice Weinberg +maintainer=Fabrice Weinberg +sentence=An NTPClient to connect to a time server +paragraph=Get time from a NTP server and keep it in sync. +category=Timing +url=https://github.com/arduino-libraries/NTPClient +architectures=* diff --git a/.pio/libdeps/nodemcuv2/Time/.piopm b/.pio/libdeps/nodemcuv2/Time/.piopm new file mode 100644 index 0000000..7c5723d --- /dev/null +++ b/.pio/libdeps/nodemcuv2/Time/.piopm @@ -0,0 +1 @@ +{"type": "library", "name": "Time", "version": "1.6.1", "spec": {"owner": "paulstoffregen", "id": 44, "name": "Time", "requirements": null, "uri": null}} \ No newline at end of file diff --git a/.pio/libdeps/nodemcuv2/Time/DateStrings.cpp b/.pio/libdeps/nodemcuv2/Time/DateStrings.cpp new file mode 100644 index 0000000..2424678 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/Time/DateStrings.cpp @@ -0,0 +1,97 @@ +/* DateStrings.cpp + * Definitions for date strings for use with the Time library + * + * Updated for Arduino 1.5.7 18 July 2014 + * + * No memory is consumed in the sketch if your code does not call any of the string methods + * You can change the text of the strings, make sure the short strings are each exactly 3 characters + * the long strings can be any length up to the constant dt_MAX_STRING_LEN defined in TimeLib.h + * + */ + +#include + +// Arduino.h should properly define PROGMEM, PGM_P, strcpy_P, pgm_read_byte, pgm_read_ptr +// But not all platforms define these as they should. If you find a platform needing these +// defined, or if any this becomes unnecessary as platforms improve, please send a pull req. +#if defined(ESP8266) +#undef PROGMEM +#define PROGMEM +#endif + +#include "TimeLib.h" + + +// the short strings for each day or month must be exactly dt_SHORT_STR_LEN +#define dt_SHORT_STR_LEN 3 // the length of short strings + +static char buffer[dt_MAX_STRING_LEN+1]; // must be big enough for longest string and the terminating null + +const char monthStr0[] PROGMEM = ""; +const char monthStr1[] PROGMEM = "January"; +const char monthStr2[] PROGMEM = "February"; +const char monthStr3[] PROGMEM = "March"; +const char monthStr4[] PROGMEM = "April"; +const char monthStr5[] PROGMEM = "May"; +const char monthStr6[] PROGMEM = "June"; +const char monthStr7[] PROGMEM = "July"; +const char monthStr8[] PROGMEM = "August"; +const char monthStr9[] PROGMEM = "September"; +const char monthStr10[] PROGMEM = "October"; +const char monthStr11[] PROGMEM = "November"; +const char monthStr12[] PROGMEM = "December"; + +const PROGMEM char * const PROGMEM monthNames_P[] = +{ + monthStr0,monthStr1,monthStr2,monthStr3,monthStr4,monthStr5,monthStr6, + monthStr7,monthStr8,monthStr9,monthStr10,monthStr11,monthStr12 +}; + +const char monthShortNames_P[] PROGMEM = "ErrJanFebMarAprMayJunJulAugSepOctNovDec"; + +const char dayStr0[] PROGMEM = "Err"; +const char dayStr1[] PROGMEM = "Sunday"; +const char dayStr2[] PROGMEM = "Monday"; +const char dayStr3[] PROGMEM = "Tuesday"; +const char dayStr4[] PROGMEM = "Wednesday"; +const char dayStr5[] PROGMEM = "Thursday"; +const char dayStr6[] PROGMEM = "Friday"; +const char dayStr7[] PROGMEM = "Saturday"; + +const PROGMEM char * const PROGMEM dayNames_P[] = +{ + dayStr0,dayStr1,dayStr2,dayStr3,dayStr4,dayStr5,dayStr6,dayStr7 +}; + +const char dayShortNames_P[] PROGMEM = "ErrSunMonTueWedThuFriSat"; + +/* functions to return date strings */ + +char* monthStr(uint8_t month) +{ + strcpy_P(buffer, (PGM_P)pgm_read_ptr(&(monthNames_P[month]))); + return buffer; +} + +char* monthShortStr(uint8_t month) +{ + for (int i=0; i < dt_SHORT_STR_LEN; i++) + buffer[i] = pgm_read_byte(&(monthShortNames_P[i+ (month*dt_SHORT_STR_LEN)])); + buffer[dt_SHORT_STR_LEN] = 0; + return buffer; +} + +char* dayStr(uint8_t day) +{ + strcpy_P(buffer, (PGM_P)pgm_read_ptr(&(dayNames_P[day]))); + return buffer; +} + +char* dayShortStr(uint8_t day) +{ + uint8_t index = day*dt_SHORT_STR_LEN; + for (int i=0; i < dt_SHORT_STR_LEN; i++) + buffer[i] = pgm_read_byte(&(dayShortNames_P[index + i])); + buffer[dt_SHORT_STR_LEN] = 0; + return buffer; +} diff --git a/.pio/libdeps/nodemcuv2/Time/Readme.md b/.pio/libdeps/nodemcuv2/Time/Readme.md new file mode 100644 index 0000000..ba47aeb --- /dev/null +++ b/.pio/libdeps/nodemcuv2/Time/Readme.md @@ -0,0 +1,165 @@ +# Arduino Time Library + +Time is a library that provides timekeeping functionality for Arduino. + +Using the Arduino Library Manager, install "*Time* by *Michael Margolis*". + +The code is derived from the Playground DateTime library but is updated +to provide an API that is more flexible and easier to use. + +A primary goal was to enable date and time functionality that can be used with +a variety of external time sources with minimum differences required in sketch logic. + +Example sketches illustrate how similar sketch code can be used with: a Real Time Clock, +internet NTP time service, GPS time data, and Serial time messages from a computer +for time synchronization. + +## Functionality + +To use the Time library in an Arduino sketch, include TimeLib.h. + +```c +#include +``` + +The functions available in the library include + +```c +hour(); // the hour now (0-23) +minute(); // the minute now (0-59) +second(); // the second now (0-59) +day(); // the day now (1-31) +weekday(); // day of the week (1-7), Sunday is day 1 +month(); // the month now (1-12) +year(); // the full four digit year: (2009, 2010 etc) +``` + +there are also functions to return the hour in 12-hour format + +```c +hourFormat12(); // the hour now in 12 hour format +isAM(); // returns true if time now is AM +isPM(); // returns true if time now is PM + +now(); // returns the current time as seconds since Jan 1 1970 +``` + +The time and date functions can take an optional parameter for the time. This prevents +errors if the time rolls over between elements. For example, if a new minute begins +between getting the minute and second, the values will be inconsistent. Using the +following functions eliminates this problem + +```c +time_t t = now(); // store the current time in time variable t +hour(t); // returns the hour for the given time t +minute(t); // returns the minute for the given time t +second(t); // returns the second for the given time t +day(t); // the day for the given time t +weekday(t); // day of the week for the given time t +month(t); // the month for the given time t +year(t); // the year for the given time t +``` + +Functions for managing the timer services are: + +```c +setTime(t); // set the system time to the give time t +setTime(hr,min,sec,day,mnth,yr); // alternative to above, yr is 2 or 4 digit yr + // (2010 or 10 sets year to 2010) +adjustTime(adjustment); // adjust system time by adding the adjustment value +timeStatus(); // indicates if time has been set and recently synchronized + // returns one of the following enumerations: +timeNotSet // the time has never been set, the clock started on Jan 1, 1970 +timeNeedsSync // the time had been set but a sync attempt did not succeed +timeSet // the time is set and is synced +``` + +Time and Date values are not valid if the status is `timeNotSet`. Otherwise, values can be used but +the returned time may have drifted if the status is `timeNeedsSync`. + +```c +setSyncProvider(getTimeFunction); // set the external time provider +setSyncInterval(interval); // set the number of seconds between re-sync +``` + +There are many convenience macros in the `time.h` file for time constants and conversion +of time units. + +To use the library, copy the download to the Library directory. + +## Examples + +The Time directory contains the Time library and some example sketches +illustrating how the library can be used with various time sources: + +- `TimeSerial.pde` shows Arduino as a clock without external hardware. + It is synchronized by time messages sent over the serial port. + A companion Processing sketch will automatically provide these messages + if it is running and connected to the Arduino serial port. + +- `TimeSerialDateStrings.pde` adds day and month name strings to the sketch above. + Short (3 characters) and long strings are available to print the days of + the week and names of the months. + +- `TimeRTC` uses a DS1307 real-time clock to provide time synchronization. + The basic [DS1307RTC library][1] must be downloaded and installed, + in order to run this sketch. + +- `TimeRTCSet` is similar to the above and adds the ability to set the Real Time Clock. + +- `TimeRTCLog` demonstrates how to calculate the difference between times. + It is a very simple logger application that monitors events on digital pins + and prints (to the serial port) the time of an event and the time period since + the previous event. + +- `TimeNTP` uses the Arduino Ethernet shield to access time using the internet NTP time service. + The NTP protocol uses UDP and the UdpBytewise library is required, see: + + +- `TimeGPS` gets time from a GPS. + This requires the TinyGPS library from Mikal Hart: + + +## Differences + +Differences between this code and the playground DateTime library +although the Time library is based on the DateTime codebase, the API has changed. +Changes in the Time library API: + +- time elements are functions returning `int` (they are variables in DateTime) +- Years start from 1970 +- days of the week and months start from 1 (they start from 0 in DateTime) +- DateStrings do not require a separate library +- time elements can be accessed non-atomically (in DateTime they are always atomic) +- function added to automatically sync time with external source +- `localTime` and `maketime` parameters changed, `localTime` renamed to `breakTime` + +## Technical Notes + +Internal system time is based on the standard Unix `time_t`. +The value is the number of seconds since Jan 1, 1970. +System time begins at zero when the sketch starts. + +The internal time can be automatically synchronized at regular intervals to an external time source. +This is enabled by calling the `setSyncProvider(provider)` function - the provider argument is +the address of a function that returns the current time as a `time_t`. +See the sketches in the examples directory for usage. + +The default interval for re-syncing the time is 5 minutes but can be changed by calling the +`setSyncInterval(interval)` method to set the number of seconds between re-sync attempts. + +The Time library defines a structure for holding time elements that is a compact version of the C `tm` structure. +All the members of the Arduino `tm` structure are bytes and the year is offset from 1970. +Convenience macros provide conversion to and from the Arduino format. + +Low-level functions to convert between system time and individual time elements are provided: + +```c +breakTime(time, &tm); // break time_t into elements stored in tm struct +makeTime(&tm); // return time_t from elements stored in tm struct +``` + +This [DS1307RTC library][1] provides an example of how a time provider +can use the low-level functions to interface with the Time library. + +[1]: diff --git a/.pio/libdeps/nodemcuv2/Time/Time.cpp b/.pio/libdeps/nodemcuv2/Time/Time.cpp new file mode 100644 index 0000000..0dcb29f --- /dev/null +++ b/.pio/libdeps/nodemcuv2/Time/Time.cpp @@ -0,0 +1,321 @@ +/* + time.c - low level time and date functions + Copyright (c) Michael Margolis 2009-2014 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + 1.0 6 Jan 2010 - initial release + 1.1 12 Feb 2010 - fixed leap year calculation error + 1.2 1 Nov 2010 - fixed setTime bug (thanks to Korman for this) + 1.3 24 Mar 2012 - many edits by Paul Stoffregen: fixed timeStatus() to update + status, updated examples for Arduino 1.0, fixed ARM + compatibility issues, added TimeArduinoDue and TimeTeensy3 + examples, add error checking and messages to RTC examples, + add examples to DS1307RTC library. + 1.4 5 Sep 2014 - compatibility with Arduino 1.5.7 +*/ + +#if ARDUINO >= 100 +#include +#else +#include +#endif + +#include "TimeLib.h" + +static tmElements_t tm; // a cache of time elements +static time_t cacheTime; // the time the cache was updated +static uint32_t syncInterval = 300; // time sync will be attempted after this many seconds + +void refreshCache(time_t t) { + if (t != cacheTime) { + breakTime(t, tm); + cacheTime = t; + } +} + +int hour() { // the hour now + return hour(now()); +} + +int hour(time_t t) { // the hour for the given time + refreshCache(t); + return tm.Hour; +} + +int hourFormat12() { // the hour now in 12 hour format + return hourFormat12(now()); +} + +int hourFormat12(time_t t) { // the hour for the given time in 12 hour format + refreshCache(t); + if( tm.Hour == 0 ) + return 12; // 12 midnight + else if( tm.Hour > 12) + return tm.Hour - 12 ; + else + return tm.Hour ; +} + +uint8_t isAM() { // returns true if time now is AM + return !isPM(now()); +} + +uint8_t isAM(time_t t) { // returns true if given time is AM + return !isPM(t); +} + +uint8_t isPM() { // returns true if PM + return isPM(now()); +} + +uint8_t isPM(time_t t) { // returns true if PM + return (hour(t) >= 12); +} + +int minute() { + return minute(now()); +} + +int minute(time_t t) { // the minute for the given time + refreshCache(t); + return tm.Minute; +} + +int second() { + return second(now()); +} + +int second(time_t t) { // the second for the given time + refreshCache(t); + return tm.Second; +} + +int day(){ + return(day(now())); +} + +int day(time_t t) { // the day for the given time (0-6) + refreshCache(t); + return tm.Day; +} + +int weekday() { // Sunday is day 1 + return weekday(now()); +} + +int weekday(time_t t) { + refreshCache(t); + return tm.Wday; +} + +int month(){ + return month(now()); +} + +int month(time_t t) { // the month for the given time + refreshCache(t); + return tm.Month; +} + +int year() { // as in Processing, the full four digit year: (2009, 2010 etc) + return year(now()); +} + +int year(time_t t) { // the year for the given time + refreshCache(t); + return tmYearToCalendar(tm.Year); +} + +/*============================================================================*/ +/* functions to convert to and from system time */ +/* These are for interfacing with time services and are not normally needed in a sketch */ + +// leap year calculator expects year argument as years offset from 1970 +#define LEAP_YEAR(Y) ( ((1970+(Y))>0) && !((1970+(Y))%4) && ( ((1970+(Y))%100) || !((1970+(Y))%400) ) ) + +static const uint8_t monthDays[]={31,28,31,30,31,30,31,31,30,31,30,31}; // API starts months from 1, this array starts from 0 + +void breakTime(time_t timeInput, tmElements_t &tm){ +// break the given time_t into time components +// this is a more compact version of the C library localtime function +// note that year is offset from 1970 !!! + + uint8_t year; + uint8_t month, monthLength; + uint32_t time; + unsigned long days; + + time = (uint32_t)timeInput; + tm.Second = time % 60; + time /= 60; // now it is minutes + tm.Minute = time % 60; + time /= 60; // now it is hours + tm.Hour = time % 24; + time /= 24; // now it is days + tm.Wday = ((time + 4) % 7) + 1; // Sunday is day 1 + + year = 0; + days = 0; + while((unsigned)(days += (LEAP_YEAR(year) ? 366 : 365)) <= time) { + year++; + } + tm.Year = year; // year is offset from 1970 + + days -= LEAP_YEAR(year) ? 366 : 365; + time -= days; // now it is days in this year, starting at 0 + + days=0; + month=0; + monthLength=0; + for (month=0; month<12; month++) { + if (month==1) { // february + if (LEAP_YEAR(year)) { + monthLength=29; + } else { + monthLength=28; + } + } else { + monthLength = monthDays[month]; + } + + if (time >= monthLength) { + time -= monthLength; + } else { + break; + } + } + tm.Month = month + 1; // jan is month 1 + tm.Day = time + 1; // day of month +} + +time_t makeTime(const tmElements_t &tm){ +// assemble time elements into time_t +// note year argument is offset from 1970 (see macros in time.h to convert to other formats) +// previous version used full four digit year (or digits since 2000),i.e. 2009 was 2009 or 9 + + int i; + uint32_t seconds; + + // seconds from 1970 till 1 jan 00:00:00 of the given year + seconds= tm.Year*(SECS_PER_DAY * 365); + for (i = 0; i < tm.Year; i++) { + if (LEAP_YEAR(i)) { + seconds += SECS_PER_DAY; // add extra days for leap years + } + } + + // add days for this year, months start from 1 + for (i = 1; i < tm.Month; i++) { + if ( (i == 2) && LEAP_YEAR(tm.Year)) { + seconds += SECS_PER_DAY * 29; + } else { + seconds += SECS_PER_DAY * monthDays[i-1]; //monthDay array starts from 0 + } + } + seconds+= (tm.Day-1) * SECS_PER_DAY; + seconds+= tm.Hour * SECS_PER_HOUR; + seconds+= tm.Minute * SECS_PER_MIN; + seconds+= tm.Second; + return (time_t)seconds; +} +/*=====================================================*/ +/* Low level system time functions */ + +static uint32_t sysTime = 0; +static uint32_t prevMillis = 0; +static uint32_t nextSyncTime = 0; +static timeStatus_t Status = timeNotSet; + +getExternalTime getTimePtr; // pointer to external sync function +//setExternalTime setTimePtr; // not used in this version + +#ifdef TIME_DRIFT_INFO // define this to get drift data +time_t sysUnsyncedTime = 0; // the time sysTime unadjusted by sync +#endif + + +time_t now() { + // calculate number of seconds passed since last call to now() + while (millis() - prevMillis >= 1000) { + // millis() and prevMillis are both unsigned ints thus the subtraction will always be the absolute value of the difference + sysTime++; + prevMillis += 1000; +#ifdef TIME_DRIFT_INFO + sysUnsyncedTime++; // this can be compared to the synced time to measure long term drift +#endif + } + if (nextSyncTime <= sysTime) { + if (getTimePtr != 0) { + time_t t = getTimePtr(); + if (t != 0) { + setTime(t); + } else { + nextSyncTime = sysTime + syncInterval; + Status = (Status == timeNotSet) ? timeNotSet : timeNeedsSync; + } + } + } + return (time_t)sysTime; +} + +void setTime(time_t t) { +#ifdef TIME_DRIFT_INFO + if(sysUnsyncedTime == 0) + sysUnsyncedTime = t; // store the time of the first call to set a valid Time +#endif + + sysTime = (uint32_t)t; + nextSyncTime = (uint32_t)t + syncInterval; + Status = timeSet; + prevMillis = millis(); // restart counting from now (thanks to Korman for this fix) +} + +void setTime(int hr,int min,int sec,int dy, int mnth, int yr){ + // year can be given as full four digit year or two digts (2010 or 10 for 2010); + //it is converted to years since 1970 + if( yr > 99) + yr = yr - 1970; + else + yr += 30; + tm.Year = yr; + tm.Month = mnth; + tm.Day = dy; + tm.Hour = hr; + tm.Minute = min; + tm.Second = sec; + setTime(makeTime(tm)); +} + +void adjustTime(long adjustment) { + sysTime += adjustment; +} + +// indicates if time has been set and recently synchronized +timeStatus_t timeStatus() { + now(); // required to actually update the status + return Status; +} + +void setSyncProvider( getExternalTime getTimeFunction){ + getTimePtr = getTimeFunction; + nextSyncTime = sysTime; + now(); // this will sync the clock +} + +void setSyncInterval(time_t interval){ // set the number of seconds between re-sync + syncInterval = (uint32_t)interval; + nextSyncTime = sysTime + syncInterval; +} diff --git a/.pio/libdeps/nodemcuv2/Time/TimeLib.h b/.pio/libdeps/nodemcuv2/Time/TimeLib.h new file mode 100644 index 0000000..b587046 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/Time/TimeLib.h @@ -0,0 +1,144 @@ +/* + time.h - low level time and date functions +*/ + +/* + July 3 2011 - fixed elapsedSecsThisWeek macro (thanks Vincent Valdy for this) + - fixed daysToTime_t macro (thanks maniacbug) +*/ + +#ifndef _Time_h +#ifdef __cplusplus +#define _Time_h + +#include +#ifndef __AVR__ +#include // for __time_t_defined, but avr libc lacks sys/types.h +#endif + + +#if !defined(__time_t_defined) // avoid conflict with newlib or other posix libc +typedef unsigned long time_t; +#endif + + +// This ugly hack allows us to define C++ overloaded functions, when included +// from within an extern "C", as newlib's sys/stat.h does. Actually it is +// intended to include "time.h" from the C library (on ARM, but AVR does not +// have that file at all). On Mac and Windows, the compiler will find this +// "Time.h" instead of the C library "time.h", so we may cause other weird +// and unpredictable effects by conflicting with the C library header "time.h", +// but at least this hack lets us define C++ functions as intended. Hopefully +// nothing too terrible will result from overriding the C library header?! +extern "C++" { +typedef enum {timeNotSet, timeNeedsSync, timeSet +} timeStatus_t ; + +typedef enum { + dowInvalid, dowSunday, dowMonday, dowTuesday, dowWednesday, dowThursday, dowFriday, dowSaturday +} timeDayOfWeek_t; + +typedef enum { + tmSecond, tmMinute, tmHour, tmWday, tmDay,tmMonth, tmYear, tmNbrFields +} tmByteFields; + +typedef struct { + uint8_t Second; + uint8_t Minute; + uint8_t Hour; + uint8_t Wday; // day of week, sunday is day 1 + uint8_t Day; + uint8_t Month; + uint8_t Year; // offset from 1970; +} tmElements_t, TimeElements, *tmElementsPtr_t; + +//convenience macros to convert to and from tm years +#define tmYearToCalendar(Y) ((Y) + 1970) // full four digit year +#define CalendarYrToTm(Y) ((Y) - 1970) +#define tmYearToY2k(Y) ((Y) - 30) // offset is from 2000 +#define y2kYearToTm(Y) ((Y) + 30) + +typedef time_t(*getExternalTime)(); +//typedef void (*setExternalTime)(const time_t); // not used in this version + + +/*==============================================================================*/ +/* Useful Constants */ +#define SECS_PER_MIN ((time_t)(60UL)) +#define SECS_PER_HOUR ((time_t)(3600UL)) +#define SECS_PER_DAY ((time_t)(SECS_PER_HOUR * 24UL)) +#define DAYS_PER_WEEK ((time_t)(7UL)) +#define SECS_PER_WEEK ((time_t)(SECS_PER_DAY * DAYS_PER_WEEK)) +#define SECS_PER_YEAR ((time_t)(SECS_PER_DAY * 365UL)) // TODO: ought to handle leap years +#define SECS_YR_2000 ((time_t)(946684800UL)) // the time at the start of y2k + +/* Useful Macros for getting elapsed time */ +#define numberOfSeconds(_time_) ((_time_) % SECS_PER_MIN) +#define numberOfMinutes(_time_) (((_time_) / SECS_PER_MIN) % SECS_PER_MIN) +#define numberOfHours(_time_) (((_time_) % SECS_PER_DAY) / SECS_PER_HOUR) +#define dayOfWeek(_time_) ((((_time_) / SECS_PER_DAY + 4) % DAYS_PER_WEEK)+1) // 1 = Sunday +#define elapsedDays(_time_) ((_time_) / SECS_PER_DAY) // this is number of days since Jan 1 1970 +#define elapsedSecsToday(_time_) ((_time_) % SECS_PER_DAY) // the number of seconds since last midnight +// The following macros are used in calculating alarms and assume the clock is set to a date later than Jan 1 1971 +// Always set the correct time before setting alarms +#define previousMidnight(_time_) (((_time_) / SECS_PER_DAY) * SECS_PER_DAY) // time at the start of the given day +#define nextMidnight(_time_) (previousMidnight(_time_) + SECS_PER_DAY) // time at the end of the given day +#define elapsedSecsThisWeek(_time_) (elapsedSecsToday(_time_) + ((dayOfWeek(_time_)-1) * SECS_PER_DAY)) // note that week starts on day 1 +#define previousSunday(_time_) ((_time_) - elapsedSecsThisWeek(_time_)) // time at the start of the week for the given time +#define nextSunday(_time_) (previousSunday(_time_)+SECS_PER_WEEK) // time at the end of the week for the given time + + +/* Useful Macros for converting elapsed time to a time_t */ +#define minutesToTime_t ((M)) ( (M) * SECS_PER_MIN) +#define hoursToTime_t ((H)) ( (H) * SECS_PER_HOUR) +#define daysToTime_t ((D)) ( (D) * SECS_PER_DAY) // fixed on Jul 22 2011 +#define weeksToTime_t ((W)) ( (W) * SECS_PER_WEEK) + +/*============================================================================*/ +/* time and date functions */ +int hour(); // the hour now +int hour(time_t t); // the hour for the given time +int hourFormat12(); // the hour now in 12 hour format +int hourFormat12(time_t t); // the hour for the given time in 12 hour format +uint8_t isAM(); // returns true if time now is AM +uint8_t isAM(time_t t); // returns true the given time is AM +uint8_t isPM(); // returns true if time now is PM +uint8_t isPM(time_t t); // returns true the given time is PM +int minute(); // the minute now +int minute(time_t t); // the minute for the given time +int second(); // the second now +int second(time_t t); // the second for the given time +int day(); // the day now +int day(time_t t); // the day for the given time +int weekday(); // the weekday now (Sunday is day 1) +int weekday(time_t t); // the weekday for the given time +int month(); // the month now (Jan is month 1) +int month(time_t t); // the month for the given time +int year(); // the full four digit year: (2009, 2010 etc) +int year(time_t t); // the year for the given time + +time_t now(); // return the current time as seconds since Jan 1 1970 +void setTime(time_t t); +void setTime(int hr,int min,int sec,int day, int month, int yr); +void adjustTime(long adjustment); + +/* date strings */ +#define dt_MAX_STRING_LEN 9 // length of longest date string (excluding terminating null) +char* monthStr(uint8_t month); +char* dayStr(uint8_t day); +char* monthShortStr(uint8_t month); +char* dayShortStr(uint8_t day); + +/* time sync functions */ +timeStatus_t timeStatus(); // indicates if time has been set and recently synchronized +void setSyncProvider( getExternalTime getTimeFunction); // identify the external time provider +void setSyncInterval(time_t interval); // set the number of seconds between re-sync + +/* low level functions to convert to and from system time */ +void breakTime(time_t time, tmElements_t &tm); // break time_t into elements +time_t makeTime(const tmElements_t &tm); // convert time elements into time_t + +} // extern "C++" +#endif // __cplusplus +#endif /* _Time_h */ + diff --git a/.pio/libdeps/nodemcuv2/Time/examples/Processing/SyncArduinoClock/SyncArduinoClock.pde b/.pio/libdeps/nodemcuv2/Time/examples/Processing/SyncArduinoClock/SyncArduinoClock.pde new file mode 100644 index 0000000..62ee57b --- /dev/null +++ b/.pio/libdeps/nodemcuv2/Time/examples/Processing/SyncArduinoClock/SyncArduinoClock.pde @@ -0,0 +1,87 @@ +/** + * SyncArduinoClock. + * + * SyncArduinoClock is a Processing sketch that responds to Arduino + * requests for time synchronization messages. Run this in the + * Processing environment (not in Arduino) on your PC or Mac. + * + * Download TimeSerial onto Arduino and you should see the time + * message displayed when you run SyncArduinoClock in Processing. + * The Arduino time is set from the time on your computer through the + * Processing sketch. + * + * portIndex must be set to the port connected to the Arduino + * + * The current time is sent in response to request message from Arduino + * or by clicking the display window + * + * The time message is 11 ASCII text characters; a header (the letter 'T') + * followed by the ten digit system time (unix time) + */ + + +import processing.serial.*; +import java.util.Date; +import java.util.Calendar; +import java.util.GregorianCalendar; + +public static final short portIndex = 0; // select the com port, 0 is the first port +public static final String TIME_HEADER = "T"; //header for arduino serial time message +public static final char TIME_REQUEST = 7; // ASCII bell character +public static final char LF = 10; // ASCII linefeed +public static final char CR = 13; // ASCII linefeed +Serial myPort; // Create object from Serial class + +void setup() { + size(200, 200); + println(Serial.list()); + println(" Connecting to -> " + Serial.list()[portIndex]); + myPort = new Serial(this,Serial.list()[portIndex], 9600); + println(getTimeNow()); +} + +void draw() +{ + textSize(20); + textAlign(CENTER); + fill(0); + text("Click to send\nTime Sync", 0, 75, 200, 175); + if ( myPort.available() > 0) { // If data is available, + char val = char(myPort.read()); // read it and store it in val + if(val == TIME_REQUEST){ + long t = getTimeNow(); + sendTimeMessage(TIME_HEADER, t); + } + else + { + if(val == LF) + ; //igonore + else if(val == CR) + println(); + else + print(val); // echo everying but time request + } + } +} + +void mousePressed() { + sendTimeMessage( TIME_HEADER, getTimeNow()); +} + + +void sendTimeMessage(String header, long time) { + String timeStr = String.valueOf(time); + myPort.write(header); // send header and time to arduino + myPort.write(timeStr); + myPort.write('\n'); +} + +long getTimeNow(){ + // java time is in ms, we want secs + Date d = new Date(); + Calendar cal = new GregorianCalendar(); + long current = d.getTime()/1000; + long timezone = cal.get(cal.ZONE_OFFSET)/1000; + long daylight = cal.get(cal.DST_OFFSET)/1000; + return current + timezone + daylight; +} diff --git a/.pio/libdeps/nodemcuv2/Time/examples/Processing/SyncArduinoClock/readme.txt b/.pio/libdeps/nodemcuv2/Time/examples/Processing/SyncArduinoClock/readme.txt new file mode 100644 index 0000000..da9721d --- /dev/null +++ b/.pio/libdeps/nodemcuv2/Time/examples/Processing/SyncArduinoClock/readme.txt @@ -0,0 +1,9 @@ +SyncArduinoClock is a Processing sketch that responds to Arduino requests for +time synchronization messages. + +The portIndex must be set the Serial port connected to Arduino. + +Download TimeSerial.pde onto Arduino and you should see the time +message displayed when you run SyncArduinoClock in Processing. +The Arduino time is set from the time on your computer through the +Processing sketch. diff --git a/.pio/libdeps/nodemcuv2/Time/examples/TimeArduinoDue/TimeArduinoDue.ino b/.pio/libdeps/nodemcuv2/Time/examples/TimeArduinoDue/TimeArduinoDue.ino new file mode 100644 index 0000000..f0a9a95 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/Time/examples/TimeArduinoDue/TimeArduinoDue.ino @@ -0,0 +1,71 @@ +/* + * TimeRTC.pde + * example code illustrating Time library with Real Time Clock. + * + * This example requires Markus Lange's Arduino Due RTC Library + * https://github.com/MarkusLange/Arduino-Due-RTC-Library + */ + +#include +#include + +// Select the Slowclock source +//RTC_clock rtc_clock(RC); +RTC_clock rtc_clock(XTAL); + +void setup() { + Serial.begin(9600); + rtc_clock.init(); + if (rtc_clock.date_already_set() == 0) { + // Unfortunately, the Arduino Due hardware does not seem to + // be designed to maintain the RTC clock state when the + // board resets. Markus described it thusly: "Uhh the Due + // does reset with the NRSTB pin. This resets the full chip + // with all backup regions including RTC, RTT and SC. Only + // if the reset is done with the NRST pin will these regions + // stay with their old values." + rtc_clock.set_time(__TIME__); + rtc_clock.set_date(__DATE__); + // However, this might work on other unofficial SAM3X boards + // with different reset circuitry than Arduino Due? + } + setSyncProvider(getArduinoDueTime); + if(timeStatus()!= timeSet) + Serial.println("Unable to sync with the RTC"); + else + Serial.println("RTC has set the system time"); +} + +time_t getArduinoDueTime() +{ + return rtc_clock.unixtime(); +} + +void loop() +{ + digitalClockDisplay(); + delay(1000); +} + +void digitalClockDisplay(){ + // digital clock display of the time + Serial.print(hour()); + printDigits(minute()); + printDigits(second()); + Serial.print(" "); + Serial.print(day()); + Serial.print(" "); + Serial.print(month()); + Serial.print(" "); + Serial.print(year()); + Serial.println(); +} + +void printDigits(int digits){ + // utility function for digital clock display: prints preceding colon and leading 0 + Serial.print(":"); + if(digits < 10) + Serial.print('0'); + Serial.print(digits); +} + diff --git a/.pio/libdeps/nodemcuv2/Time/examples/TimeGPS/TimeGPS.ino b/.pio/libdeps/nodemcuv2/Time/examples/TimeGPS/TimeGPS.ino new file mode 100644 index 0000000..fea9698 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/Time/examples/TimeGPS/TimeGPS.ino @@ -0,0 +1,87 @@ +/* + * TimeGPS.pde + * example code illustrating time synced from a GPS + * + */ + +#include +#include // http://arduiniana.org/libraries/TinyGPS/ +#include +// TinyGPS and SoftwareSerial libraries are the work of Mikal Hart + +SoftwareSerial SerialGPS = SoftwareSerial(10, 11); // receive on pin 10 +TinyGPS gps; + +// To use a hardware serial port, which is far more efficient than +// SoftwareSerial, uncomment this line and remove SoftwareSerial +//#define SerialGPS Serial1 + +// Offset hours from gps time (UTC) +const int offset = 1; // Central European Time +//const int offset = -5; // Eastern Standard Time (USA) +//const int offset = -4; // Eastern Daylight Time (USA) +//const int offset = -8; // Pacific Standard Time (USA) +//const int offset = -7; // Pacific Daylight Time (USA) + +// Ideally, it should be possible to learn the time zone +// based on the GPS position data. However, that would +// require a complex library, probably incorporating some +// sort of database using Eric Muller's time zone shape +// maps, at http://efele.net/maps/tz/ + +time_t prevDisplay = 0; // when the digital clock was displayed + +void setup() +{ + Serial.begin(9600); + while (!Serial) ; // Needed for Leonardo only + SerialGPS.begin(4800); + Serial.println("Waiting for GPS time ... "); +} + +void loop() +{ + while (SerialGPS.available()) { + if (gps.encode(SerialGPS.read())) { // process gps messages + // when TinyGPS reports new data... + unsigned long age; + int Year; + byte Month, Day, Hour, Minute, Second; + gps.crack_datetime(&Year, &Month, &Day, &Hour, &Minute, &Second, NULL, &age); + if (age < 500) { + // set the Time to the latest GPS reading + setTime(Hour, Minute, Second, Day, Month, Year); + adjustTime(offset * SECS_PER_HOUR); + } + } + } + if (timeStatus()!= timeNotSet) { + if (now() != prevDisplay) { //update the display only if the time has changed + prevDisplay = now(); + digitalClockDisplay(); + } + } +} + +void digitalClockDisplay(){ + // digital clock display of the time + Serial.print(hour()); + printDigits(minute()); + printDigits(second()); + Serial.print(" "); + Serial.print(day()); + Serial.print(" "); + Serial.print(month()); + Serial.print(" "); + Serial.print(year()); + Serial.println(); +} + +void printDigits(int digits) { + // utility function for digital clock display: prints preceding colon and leading 0 + Serial.print(":"); + if(digits < 10) + Serial.print('0'); + Serial.print(digits); +} + diff --git a/.pio/libdeps/nodemcuv2/Time/examples/TimeNTP/TimeNTP.ino b/.pio/libdeps/nodemcuv2/Time/examples/TimeNTP/TimeNTP.ino new file mode 100644 index 0000000..17a908f --- /dev/null +++ b/.pio/libdeps/nodemcuv2/Time/examples/TimeNTP/TimeNTP.ino @@ -0,0 +1,135 @@ +/* + * Time_NTP.pde + * Example showing time sync to NTP time source + * + * This sketch uses the Ethernet library + */ + +#include +#include +#include +#include + +byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; +// NTP Servers: +IPAddress timeServer(132, 163, 4, 101); // time-a.timefreq.bldrdoc.gov +// IPAddress timeServer(132, 163, 4, 102); // time-b.timefreq.bldrdoc.gov +// IPAddress timeServer(132, 163, 4, 103); // time-c.timefreq.bldrdoc.gov + + +const int timeZone = 1; // Central European Time +//const int timeZone = -5; // Eastern Standard Time (USA) +//const int timeZone = -4; // Eastern Daylight Time (USA) +//const int timeZone = -8; // Pacific Standard Time (USA) +//const int timeZone = -7; // Pacific Daylight Time (USA) + + +EthernetUDP Udp; +unsigned int localPort = 8888; // local port to listen for UDP packets + +void setup() +{ + Serial.begin(9600); + while (!Serial) ; // Needed for Leonardo only + delay(250); + Serial.println("TimeNTP Example"); + if (Ethernet.begin(mac) == 0) { + // no point in carrying on, so do nothing forevermore: + while (1) { + Serial.println("Failed to configure Ethernet using DHCP"); + delay(10000); + } + } + Serial.print("IP number assigned by DHCP is "); + Serial.println(Ethernet.localIP()); + Udp.begin(localPort); + Serial.println("waiting for sync"); + setSyncProvider(getNtpTime); +} + +time_t prevDisplay = 0; // when the digital clock was displayed + +void loop() +{ + if (timeStatus() != timeNotSet) { + if (now() != prevDisplay) { //update the display only if time has changed + prevDisplay = now(); + digitalClockDisplay(); + } + } +} + +void digitalClockDisplay(){ + // digital clock display of the time + Serial.print(hour()); + printDigits(minute()); + printDigits(second()); + Serial.print(" "); + Serial.print(day()); + Serial.print(" "); + Serial.print(month()); + Serial.print(" "); + Serial.print(year()); + Serial.println(); +} + +void printDigits(int digits){ + // utility for digital clock display: prints preceding colon and leading 0 + Serial.print(":"); + if(digits < 10) + Serial.print('0'); + Serial.print(digits); +} + +/*-------- NTP code ----------*/ + +const int NTP_PACKET_SIZE = 48; // NTP time is in the first 48 bytes of message +byte packetBuffer[NTP_PACKET_SIZE]; //buffer to hold incoming & outgoing packets + +time_t getNtpTime() +{ + while (Udp.parsePacket() > 0) ; // discard any previously received packets + Serial.println("Transmit NTP Request"); + sendNTPpacket(timeServer); + uint32_t beginWait = millis(); + while (millis() - beginWait < 1500) { + int size = Udp.parsePacket(); + if (size >= NTP_PACKET_SIZE) { + Serial.println("Receive NTP Response"); + Udp.read(packetBuffer, NTP_PACKET_SIZE); // read packet into the buffer + unsigned long secsSince1900; + // convert four bytes starting at location 40 to a long integer + secsSince1900 = (unsigned long)packetBuffer[40] << 24; + secsSince1900 |= (unsigned long)packetBuffer[41] << 16; + secsSince1900 |= (unsigned long)packetBuffer[42] << 8; + secsSince1900 |= (unsigned long)packetBuffer[43]; + return secsSince1900 - 2208988800UL + timeZone * SECS_PER_HOUR; + } + } + Serial.println("No NTP Response :-("); + return 0; // return 0 if unable to get the time +} + +// send an NTP request to the time server at the given address +void sendNTPpacket(IPAddress &address) +{ + // set all bytes in the buffer to 0 + memset(packetBuffer, 0, NTP_PACKET_SIZE); + // Initialize values needed to form NTP request + // (see URL above for details on the packets) + packetBuffer[0] = 0b11100011; // LI, Version, Mode + packetBuffer[1] = 0; // Stratum, or type of clock + packetBuffer[2] = 6; // Polling Interval + packetBuffer[3] = 0xEC; // Peer Clock Precision + // 8 bytes of zero for Root Delay & Root Dispersion + packetBuffer[12] = 49; + packetBuffer[13] = 0x4E; + packetBuffer[14] = 49; + packetBuffer[15] = 52; + // all NTP fields have been given values, now + // you can send a packet requesting a timestamp: + Udp.beginPacket(address, 123); //NTP requests are to port 123 + Udp.write(packetBuffer, NTP_PACKET_SIZE); + Udp.endPacket(); +} + diff --git a/.pio/libdeps/nodemcuv2/Time/examples/TimeNTP_ENC28J60/TimeNTP_ENC28J60.ino b/.pio/libdeps/nodemcuv2/Time/examples/TimeNTP_ENC28J60/TimeNTP_ENC28J60.ino new file mode 100644 index 0000000..b6ad796 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/Time/examples/TimeNTP_ENC28J60/TimeNTP_ENC28J60.ino @@ -0,0 +1,168 @@ +/* + * Time_NTP.pde + * Example showing time sync to NTP time source + * + * Also shows how to handle DST automatically. + * + * This sketch uses the EtherCard library: + * http://jeelabs.org/pub/docs/ethercard/ + */ + +#include +#include + +byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; + +// NTP Server +const char timeServer[] PROGMEM = "pool.ntp.org"; + +const int utcOffset = 1; // Central European Time +//const int utcOffset = -5; // Eastern Standard Time (USA) +//const int utcOffset = -4; // Eastern Daylight Time (USA) +//const int utcOffset = -8; // Pacific Standard Time (USA) +//const int utcOffset = -7; // Pacific Daylight Time (USA) + +// Packet buffer, must be big enough to packet and payload +#define BUFFER_SIZE 550 +byte Ethernet::buffer[BUFFER_SIZE]; + +const unsigned int remotePort = 123; + +void setup() +{ + Serial.begin(9600); + + while (!Serial) // Needed for Leonardo only + ; + delay(250); + + Serial.println("TimeNTP_ENC28J60 Example"); + + if (ether.begin(BUFFER_SIZE, mac) == 0) { + // no point in carrying on, so do nothing forevermore: + while (1) { + Serial.println("Failed to access Ethernet controller"); + delay(10000); + } + } + + if (!ether.dhcpSetup()) { + // no point in carrying on, so do nothing forevermore: + while (1) { + Serial.println("Failed to configure Ethernet using DHCP"); + delay(10000); + } + } + + ether.printIp("IP number assigned by DHCP is ", ether.myip); + + Serial.println("waiting for sync"); + //setSyncProvider(getNtpTime); // Use this for GMT time + setSyncProvider(getDstCorrectedTime); // Use this for local, DST-corrected time +} + +time_t prevDisplay = 0; // when the digital clock was displayed + +void loop() +{ + if (timeStatus() != timeNotSet) { + if (now() != prevDisplay) { //update the display only if time has changed + prevDisplay = now(); + digitalClockDisplay(); + } + } +} + +void digitalClockDisplay(){ + // digital clock display of the time + Serial.print(hour()); + printDigits(minute()); + printDigits(second()); + Serial.print(" "); + Serial.print(day()); + Serial.print(" "); + Serial.print(month()); + Serial.print(" "); + Serial.print(year()); + Serial.println(); +} + +void printDigits(int digits){ + // utility for digital clock display: prints preceding colon and leading 0 + Serial.print(":"); + if(digits < 10) + Serial.print('0'); + Serial.print(digits); +} + +/*-------- NTP code ----------*/ + +// SyncProvider that returns UTC time +time_t getNtpTime() +{ + // Send request + Serial.println("Transmit NTP Request"); + if (!ether.dnsLookup(timeServer)) { + Serial.println("DNS failed"); + return 0; // return 0 if unable to get the time + } else { + //ether.printIp("SRV: ", ether.hisip); + ether.ntpRequest(ether.hisip, remotePort); + + // Wait for reply + uint32_t beginWait = millis(); + while (millis() - beginWait < 1500) { + word len = ether.packetReceive(); + ether.packetLoop(len); + + unsigned long secsSince1900 = 0L; + if (len > 0 && ether.ntpProcessAnswer(&secsSince1900, remotePort)) { + Serial.println("Receive NTP Response"); + return secsSince1900 - 2208988800UL; + } + } + + Serial.println("No NTP Response :-("); + return 0; + } +} + +/* Alternative SyncProvider that automatically handles Daylight Saving Time (DST) periods, + * at least in Europe, see below. + */ +time_t getDstCorrectedTime (void) { + time_t t = getNtpTime (); + + if (t > 0) { + TimeElements tm; + breakTime (t, tm); + t += (utcOffset + dstOffset (tm.Day, tm.Month, tm.Year + 1970, tm.Hour)) * SECS_PER_HOUR; + } + + return t; +} + +/* This function returns the DST offset for the current UTC time. + * This is valid for the EU, for other places see + * http://www.webexhibits.org/daylightsaving/i.html + * + * Results have been checked for 2012-2030 (but should work since + * 1996 to 2099) against the following references: + * - http://www.uniquevisitor.it/magazine/ora-legale-italia.php + * - http://www.calendario-365.it/ora-legale-orario-invernale.html + */ +byte dstOffset (byte d, byte m, unsigned int y, byte h) { + // Day in March that DST starts on, at 1 am + byte dstOn = (31 - (5 * y / 4 + 4) % 7); + + // Day in October that DST ends on, at 2 am + byte dstOff = (31 - (5 * y / 4 + 1) % 7); + + if ((m > 3 && m < 10) || + (m == 3 && (d > dstOn || (d == dstOn && h >= 1))) || + (m == 10 && (d < dstOff || (d == dstOff && h <= 1)))) + return 1; + else + return 0; +} + diff --git a/.pio/libdeps/nodemcuv2/Time/examples/TimeNTP_ESP8266WiFi/TimeNTP_ESP8266WiFi.ino b/.pio/libdeps/nodemcuv2/Time/examples/TimeNTP_ESP8266WiFi/TimeNTP_ESP8266WiFi.ino new file mode 100644 index 0000000..1aeb2d7 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/Time/examples/TimeNTP_ESP8266WiFi/TimeNTP_ESP8266WiFi.ino @@ -0,0 +1,156 @@ +/* + * TimeNTP_ESP8266WiFi.ino + * Example showing time sync to NTP time source + * + * This sketch uses the ESP8266WiFi library + */ + +#include +#include +#include + +const char ssid[] = "*************"; // your network SSID (name) +const char pass[] = "********"; // your network password + +// NTP Servers: +static const char ntpServerName[] = "us.pool.ntp.org"; +//static const char ntpServerName[] = "time.nist.gov"; +//static const char ntpServerName[] = "time-a.timefreq.bldrdoc.gov"; +//static const char ntpServerName[] = "time-b.timefreq.bldrdoc.gov"; +//static const char ntpServerName[] = "time-c.timefreq.bldrdoc.gov"; + +const int timeZone = 1; // Central European Time +//const int timeZone = -5; // Eastern Standard Time (USA) +//const int timeZone = -4; // Eastern Daylight Time (USA) +//const int timeZone = -8; // Pacific Standard Time (USA) +//const int timeZone = -7; // Pacific Daylight Time (USA) + + +WiFiUDP Udp; +unsigned int localPort = 8888; // local port to listen for UDP packets + +time_t getNtpTime(); +void digitalClockDisplay(); +void printDigits(int digits); +void sendNTPpacket(IPAddress &address); + +void setup() +{ + Serial.begin(9600); + while (!Serial) ; // Needed for Leonardo only + delay(250); + Serial.println("TimeNTP Example"); + Serial.print("Connecting to "); + Serial.println(ssid); + WiFi.begin(ssid, pass); + + while (WiFi.status() != WL_CONNECTED) { + delay(500); + Serial.print("."); + } + + Serial.print("IP number assigned by DHCP is "); + Serial.println(WiFi.localIP()); + Serial.println("Starting UDP"); + Udp.begin(localPort); + Serial.print("Local port: "); + Serial.println(Udp.localPort()); + Serial.println("waiting for sync"); + setSyncProvider(getNtpTime); + setSyncInterval(300); +} + +time_t prevDisplay = 0; // when the digital clock was displayed + +void loop() +{ + if (timeStatus() != timeNotSet) { + if (now() != prevDisplay) { //update the display only if time has changed + prevDisplay = now(); + digitalClockDisplay(); + } + } +} + +void digitalClockDisplay() +{ + // digital clock display of the time + Serial.print(hour()); + printDigits(minute()); + printDigits(second()); + Serial.print(" "); + Serial.print(day()); + Serial.print("."); + Serial.print(month()); + Serial.print("."); + Serial.print(year()); + Serial.println(); +} + +void printDigits(int digits) +{ + // utility for digital clock display: prints preceding colon and leading 0 + Serial.print(":"); + if (digits < 10) + Serial.print('0'); + Serial.print(digits); +} + +/*-------- NTP code ----------*/ + +const int NTP_PACKET_SIZE = 48; // NTP time is in the first 48 bytes of message +byte packetBuffer[NTP_PACKET_SIZE]; //buffer to hold incoming & outgoing packets + +time_t getNtpTime() +{ + IPAddress ntpServerIP; // NTP server's ip address + + while (Udp.parsePacket() > 0) ; // discard any previously received packets + Serial.println("Transmit NTP Request"); + // get a random server from the pool + WiFi.hostByName(ntpServerName, ntpServerIP); + Serial.print(ntpServerName); + Serial.print(": "); + Serial.println(ntpServerIP); + sendNTPpacket(ntpServerIP); + uint32_t beginWait = millis(); + while (millis() - beginWait < 1500) { + int size = Udp.parsePacket(); + if (size >= NTP_PACKET_SIZE) { + Serial.println("Receive NTP Response"); + Udp.read(packetBuffer, NTP_PACKET_SIZE); // read packet into the buffer + unsigned long secsSince1900; + // convert four bytes starting at location 40 to a long integer + secsSince1900 = (unsigned long)packetBuffer[40] << 24; + secsSince1900 |= (unsigned long)packetBuffer[41] << 16; + secsSince1900 |= (unsigned long)packetBuffer[42] << 8; + secsSince1900 |= (unsigned long)packetBuffer[43]; + return secsSince1900 - 2208988800UL + timeZone * SECS_PER_HOUR; + } + } + Serial.println("No NTP Response :-("); + return 0; // return 0 if unable to get the time +} + +// send an NTP request to the time server at the given address +void sendNTPpacket(IPAddress &address) +{ + // set all bytes in the buffer to 0 + memset(packetBuffer, 0, NTP_PACKET_SIZE); + // Initialize values needed to form NTP request + // (see URL above for details on the packets) + packetBuffer[0] = 0b11100011; // LI, Version, Mode + packetBuffer[1] = 0; // Stratum, or type of clock + packetBuffer[2] = 6; // Polling Interval + packetBuffer[3] = 0xEC; // Peer Clock Precision + // 8 bytes of zero for Root Delay & Root Dispersion + packetBuffer[12] = 49; + packetBuffer[13] = 0x4E; + packetBuffer[14] = 49; + packetBuffer[15] = 52; + // all NTP fields have been given values, now + // you can send a packet requesting a timestamp: + Udp.beginPacket(address, 123); //NTP requests are to port 123 + Udp.write(packetBuffer, NTP_PACKET_SIZE); + Udp.endPacket(); +} diff --git a/.pio/libdeps/nodemcuv2/Time/examples/TimeRTC/TimeRTC.ino b/.pio/libdeps/nodemcuv2/Time/examples/TimeRTC/TimeRTC.ino new file mode 100644 index 0000000..fa10ff6 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/Time/examples/TimeRTC/TimeRTC.ino @@ -0,0 +1,55 @@ +/* + * TimeRTC.pde + * example code illustrating Time library with Real Time Clock. + * + */ + +#include +#include +#include // a basic DS1307 library that returns time as a time_t + +void setup() { + Serial.begin(9600); + while (!Serial) ; // wait until Arduino Serial Monitor opens + setSyncProvider(RTC.get); // the function to get the time from the RTC + if(timeStatus()!= timeSet) + Serial.println("Unable to sync with the RTC"); + else + Serial.println("RTC has set the system time"); +} + +void loop() +{ + if (timeStatus() == timeSet) { + digitalClockDisplay(); + } else { + Serial.println("The time has not been set. Please run the Time"); + Serial.println("TimeRTCSet example, or DS1307RTC SetTime example."); + Serial.println(); + delay(4000); + } + delay(1000); +} + +void digitalClockDisplay(){ + // digital clock display of the time + Serial.print(hour()); + printDigits(minute()); + printDigits(second()); + Serial.print(" "); + Serial.print(day()); + Serial.print(" "); + Serial.print(month()); + Serial.print(" "); + Serial.print(year()); + Serial.println(); +} + +void printDigits(int digits){ + // utility function for digital clock display: prints preceding colon and leading 0 + Serial.print(":"); + if(digits < 10) + Serial.print('0'); + Serial.print(digits); +} + diff --git a/.pio/libdeps/nodemcuv2/Time/examples/TimeRTCLog/TimeRTCLog.ino b/.pio/libdeps/nodemcuv2/Time/examples/TimeRTCLog/TimeRTCLog.ino new file mode 100644 index 0000000..42fc3e4 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/Time/examples/TimeRTCLog/TimeRTCLog.ino @@ -0,0 +1,109 @@ +/* + * TimeRTCLogger.ino + * example code illustrating adding and subtracting Time. + * + * this sketch logs pin state change events + * the time of the event and time since the previous event is calculated and sent to the serial port. + */ + +#include +#include +#include // a basic DS1307 library that returns time as a time_t + +const int nbrInputPins = 6; // monitor 6 digital pins +const int inputPins[nbrInputPins] = {2,3,4,5,6,7}; // pins to monitor +boolean state[nbrInputPins] ; // the state of the monitored pins +time_t prevEventTime[nbrInputPins] ; // the time of the previous event + +void setup() { + Serial.begin(9600); + setSyncProvider(RTC.get); // the function to sync the time from the RTC + for (int i=0; i < nbrInputPins; i++) { + pinMode( inputPins[i], INPUT); + // uncomment these lines if pull-up resistors are wanted + // pinMode( inputPins[i], INPUT_PULLUP); + // state[i] = HIGH; + } +} + +void loop() +{ + for (int i=0; i < nbrInputPins; i++) { + boolean val = digitalRead(inputPins[i]); + if (val != state[i]) { + time_t duration = 0; // the time since the previous event + state[i] = val; + time_t timeNow = now(); + if (prevEventTime[i] > 0) { + // if this was not the first state change, calculate the time from the previous change + duration = timeNow - prevEventTime[i]; + } + logEvent(inputPins[i], val, timeNow, duration ); // log the event + prevEventTime[i] = timeNow; // store the time for this event + } + } +} + +void logEvent( int pin, boolean state, time_t timeNow, time_t duration) +{ + Serial.print("Pin "); + Serial.print(pin); + if (state == HIGH) { + Serial.print(" went High at "); + } else { + Serial.print(" went Low at "); + } + showTime(timeNow); + if (duration > 0) { + // only display duration if greater than 0 + Serial.print(", Duration was "); + showDuration(duration); + } + Serial.println(); +} + + +void showTime(time_t t) +{ + // display the given time + Serial.print(hour(t)); + printDigits(minute(t)); + printDigits(second(t)); + Serial.print(" "); + Serial.print(day(t)); + Serial.print(" "); + Serial.print(month(t)); + Serial.print(" "); + Serial.print(year(t)); +} + +void printDigits(int digits){ + // utility function for digital clock display: prints preceding colon and leading 0 + Serial.print(":"); + if(digits < 10) + Serial.print('0'); + Serial.print(digits); +} + +void showDuration(time_t duration) +{ + // prints the duration in days, hours, minutes and seconds + if (duration >= SECS_PER_DAY) { + Serial.print(duration / SECS_PER_DAY); + Serial.print(" day(s) "); + duration = duration % SECS_PER_DAY; + } + if (duration >= SECS_PER_HOUR) { + Serial.print(duration / SECS_PER_HOUR); + Serial.print(" hour(s) "); + duration = duration % SECS_PER_HOUR; + } + if (duration >= SECS_PER_MIN) { + Serial.print(duration / SECS_PER_MIN); + Serial.print(" minute(s) "); + duration = duration % SECS_PER_MIN; + } + Serial.print(duration); + Serial.print(" second(s) "); +} + diff --git a/.pio/libdeps/nodemcuv2/Time/examples/TimeRTCSet/TimeRTCSet.ino b/.pio/libdeps/nodemcuv2/Time/examples/TimeRTCSet/TimeRTCSet.ino new file mode 100644 index 0000000..49c49f3 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/Time/examples/TimeRTCSet/TimeRTCSet.ino @@ -0,0 +1,80 @@ +/* + * TimeRTCSet.pde + * example code illustrating Time library with Real Time Clock. + * + * RTC clock is set in response to serial port time message + * A Processing example sketch to set the time is included in the download + * On Linux, you can use "date +T%s > /dev/ttyACM0" (UTC time zone) + */ + +#include +#include +#include // a basic DS1307 library that returns time as a time_t + + +void setup() { + Serial.begin(9600); + while (!Serial) ; // Needed for Leonardo only + setSyncProvider(RTC.get); // the function to get the time from the RTC + if (timeStatus() != timeSet) + Serial.println("Unable to sync with the RTC"); + else + Serial.println("RTC has set the system time"); +} + +void loop() +{ + if (Serial.available()) { + time_t t = processSyncMessage(); + if (t != 0) { + RTC.set(t); // set the RTC and the system time to the received value + setTime(t); + } + } + digitalClockDisplay(); + delay(1000); +} + +void digitalClockDisplay(){ + // digital clock display of the time + Serial.print(hour()); + printDigits(minute()); + printDigits(second()); + Serial.print(" "); + Serial.print(day()); + Serial.print(" "); + Serial.print(month()); + Serial.print(" "); + Serial.print(year()); + Serial.println(); +} + +void printDigits(int digits){ + // utility function for digital clock display: prints preceding colon and leading 0 + Serial.print(":"); + if(digits < 10) + Serial.print('0'); + Serial.print(digits); +} + +/* code to process time sync messages from the serial port */ +#define TIME_HEADER "T" // Header tag for serial time sync message + +unsigned long processSyncMessage() { + unsigned long pctime = 0L; + const unsigned long DEFAULT_TIME = 1357041600; // Jan 1 2013 + + if(Serial.find(TIME_HEADER)) { + pctime = Serial.parseInt(); + return pctime; + if( pctime < DEFAULT_TIME) { // check the value is a valid time (greater than Jan 1 2013) + pctime = 0L; // return 0 to indicate that the time is not valid + } + } + return pctime; +} + + + + + diff --git a/.pio/libdeps/nodemcuv2/Time/examples/TimeSerial/TimeSerial.ino b/.pio/libdeps/nodemcuv2/Time/examples/TimeSerial/TimeSerial.ino new file mode 100644 index 0000000..07e609f --- /dev/null +++ b/.pio/libdeps/nodemcuv2/Time/examples/TimeSerial/TimeSerial.ino @@ -0,0 +1,81 @@ +/* + * TimeSerial.pde + * example code illustrating Time library set through serial port messages. + * + * Messages consist of the letter T followed by ten digit time (as seconds since Jan 1 1970) + * you can send the text on the next line using Serial Monitor to set the clock to noon Jan 1 2013 + T1357041600 + * + * A Processing example sketch to automatically send the messages is included in the download + * On Linux, you can use "date +T%s\n > /dev/ttyACM0" (UTC time zone) + */ + +#include + +#define TIME_HEADER "T" // Header tag for serial time sync message +#define TIME_REQUEST 7 // ASCII bell character requests a time sync message + +void setup() { + Serial.begin(9600); + while (!Serial) ; // Needed for Leonardo only + pinMode(13, OUTPUT); + setSyncProvider( requestSync); //set function to call when sync required + Serial.println("Waiting for sync message"); +} + +void loop(){ + if (Serial.available()) { + processSyncMessage(); + } + if (timeStatus()!= timeNotSet) { + digitalClockDisplay(); + } + if (timeStatus() == timeSet) { + digitalWrite(13, HIGH); // LED on if synced + } else { + digitalWrite(13, LOW); // LED off if needs refresh + } + delay(1000); +} + +void digitalClockDisplay(){ + // digital clock display of the time + Serial.print(hour()); + printDigits(minute()); + printDigits(second()); + Serial.print(" "); + Serial.print(day()); + Serial.print(" "); + Serial.print(month()); + Serial.print(" "); + Serial.print(year()); + Serial.println(); +} + +void printDigits(int digits){ + // utility function for digital clock display: prints preceding colon and leading 0 + Serial.print(":"); + if(digits < 10) + Serial.print('0'); + Serial.print(digits); +} + + +void processSyncMessage() { + unsigned long pctime; + const unsigned long DEFAULT_TIME = 1357041600; // Jan 1 2013 + + if(Serial.find(TIME_HEADER)) { + pctime = Serial.parseInt(); + if( pctime >= DEFAULT_TIME) { // check the integer is a valid time (greater than Jan 1 2013) + setTime(pctime); // Sync Arduino clock to the time received on the serial port + } + } +} + +time_t requestSync() +{ + Serial.write(TIME_REQUEST); + return 0; // the time will be sent later in response to serial mesg +} + diff --git a/.pio/libdeps/nodemcuv2/Time/examples/TimeSerialDateStrings/TimeSerialDateStrings.ino b/.pio/libdeps/nodemcuv2/Time/examples/TimeSerialDateStrings/TimeSerialDateStrings.ino new file mode 100644 index 0000000..95d2568 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/Time/examples/TimeSerialDateStrings/TimeSerialDateStrings.ino @@ -0,0 +1,108 @@ +/* + * TimeSerialDateStrings.pde + * example code illustrating Time library date strings + * + * This sketch adds date string functionality to TimeSerial sketch + * Also shows how to handle different messages + * + * A message starting with a time header sets the time + * A Processing example sketch to automatically send the messages is inclided in the download + * On Linux, you can use "date +T%s\n > /dev/ttyACM0" (UTC time zone) + * + * A message starting with a format header sets the date format + + * send: Fs\n for short date format + * send: Fl\n for long date format + */ + +#include + +// single character message tags +#define TIME_HEADER 'T' // Header tag for serial time sync message +#define FORMAT_HEADER 'F' // Header tag indicating a date format message +#define FORMAT_SHORT 's' // short month and day strings +#define FORMAT_LONG 'l' // (lower case l) long month and day strings + +#define TIME_REQUEST 7 // ASCII bell character requests a time sync message + +static boolean isLongFormat = true; + +void setup() { + Serial.begin(9600); + while (!Serial) ; // Needed for Leonardo only + setSyncProvider( requestSync); //set function to call when sync required + Serial.println("Waiting for sync message"); +} + +void loop(){ + if (Serial.available() > 1) { // wait for at least two characters + char c = Serial.read(); + if( c == TIME_HEADER) { + processSyncMessage(); + } + else if( c== FORMAT_HEADER) { + processFormatMessage(); + } + } + if (timeStatus()!= timeNotSet) { + digitalClockDisplay(); + } + delay(1000); +} + +void digitalClockDisplay() { + // digital clock display of the time + Serial.print(hour()); + printDigits(minute()); + printDigits(second()); + Serial.print(" "); + if(isLongFormat) + Serial.print(dayStr(weekday())); + else + Serial.print(dayShortStr(weekday())); + Serial.print(" "); + Serial.print(day()); + Serial.print(" "); + if(isLongFormat) + Serial.print(monthStr(month())); + else + Serial.print(monthShortStr(month())); + Serial.print(" "); + Serial.print(year()); + Serial.println(); +} + +void printDigits(int digits) { + // utility function for digital clock display: prints preceding colon and leading 0 + Serial.print(":"); + if(digits < 10) + Serial.print('0'); + Serial.print(digits); +} + +void processFormatMessage() { + char c = Serial.read(); + if( c == FORMAT_LONG){ + isLongFormat = true; + Serial.println(F("Setting long format")); + } + else if( c == FORMAT_SHORT) { + isLongFormat = false; + Serial.println(F("Setting short format")); + } +} + +void processSyncMessage() { + unsigned long pctime; + const unsigned long DEFAULT_TIME = 1357041600; // Jan 1 2013 - paul, perhaps we define in time.h? + + pctime = Serial.parseInt(); + if( pctime >= DEFAULT_TIME) { // check the integer is a valid time (greater than Jan 1 2013) + setTime(pctime); // Sync Arduino clock to the time received on the serial port + } +} + +time_t requestSync() { + Serial.write(TIME_REQUEST); + return 0; // the time will be sent later in response to serial mesg +} diff --git a/.pio/libdeps/nodemcuv2/Time/examples/TimeTeensy3/TimeTeensy3.ino b/.pio/libdeps/nodemcuv2/Time/examples/TimeTeensy3/TimeTeensy3.ino new file mode 100644 index 0000000..f68dd8c --- /dev/null +++ b/.pio/libdeps/nodemcuv2/Time/examples/TimeTeensy3/TimeTeensy3.ino @@ -0,0 +1,78 @@ +/* + * TimeRTC.pde + * example code illustrating Time library with Real Time Clock. + * + */ + +#include + +void setup() { + // set the Time library to use Teensy 3.0's RTC to keep time + setSyncProvider(getTeensy3Time); + + Serial.begin(115200); + while (!Serial); // Wait for Arduino Serial Monitor to open + delay(100); + if (timeStatus()!= timeSet) { + Serial.println("Unable to sync with the RTC"); + } else { + Serial.println("RTC has set the system time"); + } +} + +void loop() { + if (Serial.available()) { + time_t t = processSyncMessage(); + if (t != 0) { + Teensy3Clock.set(t); // set the RTC + setTime(t); + } + } + digitalClockDisplay(); + delay(1000); +} + +void digitalClockDisplay() { + // digital clock display of the time + Serial.print(hour()); + printDigits(minute()); + printDigits(second()); + Serial.print(" "); + Serial.print(day()); + Serial.print(" "); + Serial.print(month()); + Serial.print(" "); + Serial.print(year()); + Serial.println(); +} + +time_t getTeensy3Time() +{ + return Teensy3Clock.get(); +} + +/* code to process time sync messages from the serial port */ +#define TIME_HEADER "T" // Header tag for serial time sync message + +unsigned long processSyncMessage() { + unsigned long pctime = 0L; + const unsigned long DEFAULT_TIME = 1357041600; // Jan 1 2013 + + if(Serial.find(TIME_HEADER)) { + pctime = Serial.parseInt(); + return pctime; + if( pctime < DEFAULT_TIME) { // check the value is a valid time (greater than Jan 1 2013) + pctime = 0L; // return 0 to indicate that the time is not valid + } + } + return pctime; +} + +void printDigits(int digits){ + // utility function for digital clock display: prints preceding colon and leading 0 + Serial.print(":"); + if(digits < 10) + Serial.print('0'); + Serial.print(digits); +} + diff --git a/.pio/libdeps/nodemcuv2/Time/keywords.txt b/.pio/libdeps/nodemcuv2/Time/keywords.txt new file mode 100644 index 0000000..073f8f8 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/Time/keywords.txt @@ -0,0 +1,34 @@ +####################################### +# Syntax Coloring Map For Time +####################################### + +####################################### +# Datatypes (KEYWORD1) +####################################### +time_t KEYWORD1 +####################################### +# Methods and Functions (KEYWORD2) +####################################### +now KEYWORD2 +second KEYWORD2 +minute KEYWORD2 +hour KEYWORD2 +day KEYWORD2 +month KEYWORD2 +year KEYWORD2 +isAM KEYWORD2 +isPM KEYWORD2 +weekday KEYWORD2 +setTime KEYWORD2 +adjustTime KEYWORD2 +setSyncProvider KEYWORD2 +setSyncInterval KEYWORD2 +timeStatus KEYWORD2 +TimeLib KEYWORD2 +####################################### +# Instances (KEYWORD2) +####################################### + +####################################### +# Constants (LITERAL1) +####################################### diff --git a/.pio/libdeps/nodemcuv2/Time/library.json b/.pio/libdeps/nodemcuv2/Time/library.json new file mode 100644 index 0000000..b181e78 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/Time/library.json @@ -0,0 +1,26 @@ +{ + "name": "Time", + "description": "Time keeping library", + "keywords": "Time, date, hour, minute, second, day, week, month, year, RTC", + "authors": [ + { + "name": "Michael Margolis" + }, + { + "name": "Paul Stoffregen", + "email": "paul@pjrc.com", + "url": "http://www.pjrc.com", + "maintainer": true + } + ], + "repository": { + "type": "git", + "url": "https://github.com/PaulStoffregen/Time" + }, + "version": "1.6.1", + "homepage": "http://playground.arduino.cc/Code/Time", + "frameworks": "Arduino", + "examples": [ + "examples/*/*.ino" + ] +} diff --git a/.pio/libdeps/nodemcuv2/Time/library.properties b/.pio/libdeps/nodemcuv2/Time/library.properties new file mode 100644 index 0000000..4aa6ad8 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/Time/library.properties @@ -0,0 +1,11 @@ +name=Time +version=1.6.1 +author=Michael Margolis +maintainer=Paul Stoffregen +sentence=Timekeeping functionality for Arduino +paragraph=Date and Time functions, with provisions to synchronize to external time sources like GPS and NTP (Internet). This library is often used together with TimeAlarms and DS1307RTC. +category=Timing +url=http://playground.arduino.cc/Code/Time/ +includes=TimeLib.h +architectures=* + diff --git a/.pio/libdeps/nodemcuv2/integrity.dat b/.pio/libdeps/nodemcuv2/integrity.dat index 09c3fb3..89c70f7 100644 --- a/.pio/libdeps/nodemcuv2/integrity.dat +++ b/.pio/libdeps/nodemcuv2/integrity.dat @@ -1,3 +1,5 @@ +bodmer/TFT_eSPI@^2.5.0 +Time@^1.6.1 +NTPClient lvgl/lv_arduino@^3.0.1 -bblanchon/ArduinoJson@^6.20.0 -bodmer/TFT_eSPI@^2.5.0 \ No newline at end of file +bblanchon/ArduinoJson@^6.20.0 \ No newline at end of file diff --git a/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/lv_font.h b/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/lv_font.h index fce6266..f17b3d3 100644 --- a/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/lv_font.h +++ b/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/lv_font.h @@ -236,10 +236,14 @@ LV_FONT_DECLARE(tencent_w7_22) LV_FONT_DECLARE(tencent_w7_24) #endif -#ifdef TENCENT_W7_24 +#ifdef TENCENT_W7_20 LV_FONT_DECLARE(tencent_w7_20) #endif +#ifdef TENCENT_W7_18 +LV_FONT_DECLARE(tencent_w7_18) +#endif + #ifdef ICONFONT_SYMBOL LV_FONT_DECLARE(iconfont_symbol) #endif diff --git a/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_16.c b/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_16.c index f95e51f..2b71ff7 100644 --- a/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_16.c +++ b/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_16.c @@ -23,309 +23,129 @@ /*Store the image of the glyphs*/ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = { /* U+0025 "%" */ - 0x3, 0xff, 0xe0, 0x3, 0xf0, 0xf, 0xff, 0xe0, - 0x1f, 0x80, 0x3e, 0xf, 0x80, 0xfc, 0x0, 0x7c, - 0x1f, 0x7, 0xc0, 0x0, 0xff, 0xfc, 0x7e, 0x0, - 0x0, 0x7f, 0xc3, 0xf0, 0x0, 0x0, 0x0, 0x1f, - 0x80, 0x0, 0x0, 0x0, 0xfc, 0x3f, 0xe0, 0x0, - 0x7, 0xe3, 0xff, 0xf8, 0x0, 0x3f, 0x7, 0xc1, - 0xf0, 0x1, 0xf8, 0x1f, 0x7, 0xc0, 0xf, 0xc0, - 0x3f, 0xff, 0x80, 0x7e, 0x0, 0x3f, 0xfc, 0x0, + 0x78, 0x79, 0x1b, 0x26, 0x64, 0xcf, 0xb0, 0xc, + 0x1, 0x80, 0x60, 0x19, 0xe6, 0x64, 0xcc, 0xb1, + 0xbc, 0x3c, /* U+002E "." */ - 0x0, 0x0, 0x1f, 0xc0, 0x3f, 0x80, + 0xe0, /* U+002F "/" */ - 0x0, 0x0, 0x3f, 0x0, 0x0, 0xf, 0xc0, 0x0, - 0x3, 0xf0, 0x0, 0x0, 0xfc, 0x0, 0x0, 0x3f, - 0x0, 0x0, 0xf, 0xc0, 0x0, 0x3, 0xf0, 0x0, - 0x0, 0xfc, 0x0, 0x0, 0x3f, 0x0, 0x0, 0xf, - 0xc0, 0x0, 0x3, 0xf0, 0x0, 0x0, 0xfc, 0x0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0x7, 0xe0, 0x0, 0x0, 0x0, 0x0, - 0xf, 0xe0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xe0, - 0x0, 0x0, 0x0, 0x0, 0x7, 0xff, 0xff, 0x80, - 0x0, 0x0, 0x0, 0xff, 0xfe, 0x0 + 0x7c, 0xff, 0xf7, 0xfc, 0xd8, 0x33, 0x60, 0xf9, + 0x80, 0xe, 0x0, 0x30, 0x0, 0xc0, 0x3, 0x0, + 0xc, 0x0, 0x3f, 0x80, 0x7c }; @@ -335,41 +155,35 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = { static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, - {.bitmap_index = 0, .adv_w = 210, .box_w = 39, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 64, .adv_w = 71, .box_w = 15, .box_h = 3, .ofs_x = -1, .ofs_y = -1}, - {.bitmap_index = 70, .adv_w = 82, .box_w = 27, .box_h = 16, .ofs_x = -2, .ofs_y = -4}, - {.bitmap_index = 124, .adv_w = 169, .box_w = 33, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 178, .adv_w = 116, .box_w = 24, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 217, .adv_w = 152, .box_w = 33, .box_h = 13, .ofs_x = -1, .ofs_y = -1}, - {.bitmap_index = 271, .adv_w = 142, .box_w = 30, .box_h = 13, .ofs_x = -1, .ofs_y = -1}, - {.bitmap_index = 320, .adv_w = 166, .box_w = 33, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 374, .adv_w = 145, .box_w = 30, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 423, .adv_w = 152, .box_w = 30, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 472, .adv_w = 139, .box_w = 30, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 521, .adv_w = 161, .box_w = 33, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 575, .adv_w = 152, .box_w = 30, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 624, .adv_w = 141, .box_w = 30, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 673, .adv_w = 140, .box_w = 33, .box_h = 13, .ofs_x = -1, .ofs_y = -1}, - {.bitmap_index = 727, .adv_w = 165, .box_w = 39, .box_h = 13, .ofs_x = -1, .ofs_y = -1}, - {.bitmap_index = 791, .adv_w = 242, .box_w = 51, .box_h = 13, .ofs_x = -1, .ofs_y = -1}, - {.bitmap_index = 874, .adv_w = 181, .box_w = 36, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 933, .adv_w = 162, .box_w = 36, .box_h = 13, .ofs_x = -1, .ofs_y = -1}, - {.bitmap_index = 992, .adv_w = 167, .box_w = 36, .box_h = 13, .ofs_x = -1, .ofs_y = -1}, - {.bitmap_index = 1051, .adv_w = 151, .box_w = 30, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1100, .adv_w = 177, .box_w = 36, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1159, .adv_w = 164, .box_w = 33, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1213, .adv_w = 126, .box_w = 27, .box_h = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1247, .adv_w = 142, .box_w = 27, .box_h = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1281, .adv_w = 144, .box_w = 30, .box_h = 14, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1334, .adv_w = 237, .box_w = 45, .box_h = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1391, .adv_w = 152, .box_w = 30, .box_h = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1429, .adv_w = 153, .box_w = 33, .box_h = 13, .ofs_x = -1, .ofs_y = -4}, - {.bitmap_index = 1483, .adv_w = 106, .box_w = 27, .box_h = 10, .ofs_x = -1, .ofs_y = -1}, - {.bitmap_index = 1517, .adv_w = 134, .box_w = 27, .box_h = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1551, .adv_w = 160, .box_w = 30, .box_h = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1589, .adv_w = 154, .box_w = 30, .box_h = 13, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 1638, .adv_w = 106, .box_w = 24, .box_h = 6, .ofs_x = 0, .ofs_y = 6}, - {.bitmap_index = 1656, .adv_w = 239, .box_w = 48, .box_h = 13, .ofs_x = 0, .ofs_y = -1} + {.bitmap_index = 0, .adv_w = 210, .box_w = 11, .box_h = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 18, .adv_w = 71, .box_w = 3, .box_h = 1, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 19, .adv_w = 82, .box_w = 7, .box_h = 16, .ofs_x = -1, .ofs_y = -4}, + {.bitmap_index = 33, .adv_w = 169, .box_w = 10, .box_h = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 50, .adv_w = 116, .box_w = 6, .box_h = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 60, .adv_w = 152, .box_w = 9, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 75, .adv_w = 142, .box_w = 9, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 90, .adv_w = 166, .box_w = 10, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 107, .adv_w = 145, .box_w = 9, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 122, .adv_w = 152, .box_w = 8, .box_h = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 135, .adv_w = 139, .box_w = 8, .box_h = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 148, .adv_w = 161, .box_w = 10, .box_h = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 165, .adv_w = 152, .box_w = 8, .box_h = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 178, .adv_w = 162, .box_w = 10, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 195, .adv_w = 141, .box_w = 8, .box_h = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 208, .adv_w = 165, .box_w = 11, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 226, .adv_w = 242, .box_w = 14, .box_h = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 249, .adv_w = 162, .box_w = 10, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 266, .adv_w = 151, .box_w = 9, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 281, .adv_w = 177, .box_w = 10, .box_h = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 298, .adv_w = 142, .box_w = 8, .box_h = 10, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 308, .adv_w = 144, .box_w = 9, .box_h = 14, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 324, .adv_w = 237, .box_w = 13, .box_h = 10, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 341, .adv_w = 152, .box_w = 8, .box_h = 10, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 351, .adv_w = 106, .box_w = 7, .box_h = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 360, .adv_w = 134, .box_w = 8, .box_h = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 370, .adv_w = 154, .box_w = 9, .box_h = 13, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 385, .adv_w = 106, .box_w = 6, .box_h = 5, .ofs_x = 1, .ofs_y = 7}, + {.bitmap_index = 389, .adv_w = 239, .box_w = 14, .box_h = 12, .ofs_x = 1, .ofs_y = -1} }; /*--------------------- @@ -378,10 +192,9 @@ static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { static const uint16_t unicode_list_0[] = { 0x0, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x1e, 0x20, 0x26, - 0x28, 0x2a, 0x2b, 0x2d, 0x2e, 0x30, 0x34, 0x3e, - 0x40, 0x46, 0x48, 0x4a, 0x4b, 0x4d, 0x4e, 0x50, - 0x54, 0x8b, 0x20de + 0x10, 0x11, 0x12, 0x13, 0x14, 0x1d, 0x1e, 0x26, + 0x28, 0x2b, 0x2e, 0x30, 0x40, 0x46, 0x48, 0x4a, + 0x4d, 0x4e, 0x54, 0x8b, 0x20de }; /*Collect the unicode lists and glyph_id offsets*/ @@ -389,7 +202,7 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = { { .range_start = 37, .range_length = 8415, .glyph_id_start = 1, - .unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 35, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY + .unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 29, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY } }; @@ -403,9 +216,8 @@ static const uint8_t kern_left_class_mapping[] = { 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 3, 12, 13, - 14, 15, 16, 17, 18, 19, 0, 0, - 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 12 + 14, 15, 16, 17, 0, 18, 19, 20, + 21, 22, 23, 24, 25, 13 }; /*Map glyph_ids to kern right classes*/ @@ -413,9 +225,8 @@ static const uint8_t kern_right_class_mapping[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 4, 10, 11, 12, 13, 14, - 14, 14, 13, 14, 14, 15, 16, 17, - 18, 19, 20, 21, 19, 0, 22, 23, - 24, 25, 26, 26 + 13, 13, 13, 15, 16, 17, 18, 19, + 17, 20, 21, 22, 23, 23 }; /*Kern values between classes*/ @@ -424,101 +235,75 @@ static const int8_t kern_class_values[] = 0, 0, 0, 0, -20, 0, 0, -10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, 3, 0, - 5, 0, 3, 10, 3, 8, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, -1, -2, -2, 0, -3, 0, 0, - 0, 0, -2, 0, -2, 0, 0, 0, + 0, 0, 3, 3, 0, 5, 0, 3, + 10, 3, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -1, -2, -2, 0, -3, + 0, 0, 0, 0, -2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -2, 0, -3, 0, 0, 0, 0, -8, - 0, -4, 0, 0, 0, 0, -3, -3, - -4, 0, -1, -1, -1, 0, -2, -1, - 0, -3, -6, 0, -5, 0, -3, 0, - 0, 0, 0, -5, 0, 0, 0, 0, - -4, -2, -4, 0, 0, -1, 0, 0, - -1, 0, 0, -6, -15, -8, -5, -3, - -15, -3, -6, 0, -5, -9, -2, -2, - -2, -3, -8, 0, -6, 0, -2, -1, - -2, 0, -2, -3, 0, -23, -8, 0, - 0, 0, -8, 0, 0, 0, 0, -4, - 0, -2, 0, 0, -2, -1, -3, 0, - 0, 0, 0, 0, 0, 0, 0, -13, + 0, 0, 0, 0, -2, 0, -3, 0, + 0, 0, 0, -8, 0, -4, 0, 0, + 0, 0, -3, -3, -1, -1, -1, 0, + -2, 0, -3, -6, 0, -5, 0, -3, + 0, 0, 0, 0, -5, 0, 0, 0, + 0, -4, -2, 0, -1, 0, 0, -1, + 0, -6, -15, -8, -5, -3, -15, -3, + -6, 0, -5, -9, -2, -2, -3, -2, + -8, 0, -2, -1, -2, 0, -2, 0, + -23, -8, 0, 0, 0, -8, 0, 0, + 0, 0, -4, 0, -2, 0, 0, -2, + -1, 0, 0, 0, 0, 0, 0, -13, -8, 0, 0, 0, -9, 0, 0, 0, - 0, 0, 0, 0, 0, 2, -2, 0, - -6, 3, 3, 2, 0, 0, 1, 1, - 0, -10, 3, -26, -26, -3, 3, -2, - 0, -8, -1, 3, -3, 0, 0, 0, - -2, -3, -3, -8, -8, -1, -3, -8, - -8, -3, -3, 3, -3, 0, -3, 0, - -2, 0, -2, -1, -2, -3, 0, -2, - 0, 0, -3, 0, -2, 0, -1, -1, - -1, 0, -1, 0, 0, -10, 0, 0, - 0, -1, -5, 0, 2, -8, -1, 0, - -5, -2, -2, -1, -8, 0, -6, 0, - 0, 0, -2, 0, 0, -2, -3, 0, - 0, 0, 0, 0, 0, 0, -1, -2, - 0, -1, 0, 0, -1, 0, -3, 0, - -1, 0, 0, 0, -1, 0, 0, -1, - 0, 0, 0, 0, 0, -1, -5, 0, - -2, -7, -1, 3, -2, -1, -4, -1, - -2, 0, -5, -3, -2, 0, -1, 0, - -2, -4, -4, 0, 0, 0, -8, 0, - -3, 0, 0, 0, 0, 2, 0, 0, - 0, 0, -1, 0, -1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - -8, 0, 0, 0, -1, 0, 0, -4, - 0, 0, 0, 0, -2, 0, -1, 0, - 0, -1, 0, 0, 0, 0, 0, 0, - 0, -31, -14, 0, 0, -3, 0, 0, - 0, 0, 0, 0, 0, -1, -1, 0, - -1, 0, 0, 0, -2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -2, -3, - -3, 0, -1, 0, 0, -1, -1, 0, - 0, -1, -1, 0, 0, 0, -8, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - -1, -4, -3, 0, -4, 0, 0, -1, + 0, 0, 0, 0, 2, 0, -2, 0, + 3, 2, 0, 0, 1, 0, -10, 3, + -26, -26, -3, 3, -2, 0, -8, -1, + 3, -3, 0, 0, 0, -2, -3, -8, + -1, -3, -8, -8, -3, 3, -3, 0, + -3, 0, -2, 0, -2, -1, -2, -3, + 0, -2, 0, 0, -3, 0, -1, -1, + -1, 0, -1, 0, -10, 0, 0, 0, + 0, -3, 0, -1, 0, 0, -2, 0, + 0, -2, 0, -5, 0, 0, 0, -1, + 0, 0, 0, 0, 0, 0, 0, -1, + -5, 0, 2, -8, -1, 0, -5, -2, + -1, -2, -8, 0, 0, 0, -2, 0, + 0, -3, 0, 0, 0, 0, -1, -5, + 0, -2, -7, -1, 3, -2, -1, -1, + -4, -2, 0, -2, 0, -1, 0, -2, + -4, 0, 0, 0, -8, 0, -3, 0, + 0, 0, 0, 2, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -3, 0, 0, -3, 0, -5, - -1, 0, -1, 0, 0, 0, -4, 0, - 0, 0, 0, 0, -1, -1, -1, 0, - 0, 0, -3, 0, -9, 0, -4, 0, - 0, -8, 0, -1, 0, 0, -1, 0, - -5, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -8, 0, -1, -3, 0, - -3, -3, 0, -1, 0, 0, 0, 0, - 0, 0, 0, -1, 0, -1, 0, 0, + 0, 0, -31, -14, 0, 0, -3, 0, + 0, 0, 0, 0, 0, -1, 0, -1, + 0, 0, 0, -2, 0, 0, 0, 0, + 0, 0, -8, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -4, -1, -3, 0, + 0, -1, -1, 0, 0, 0, 0, 0, + 0, -3, 0, -9, 0, -4, 0, 0, + -8, 0, -1, 0, 0, -1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -8, + 0, -1, -3, 0, -3, -3, 0, -1, + 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, - -18, 0, -3, -2, -2, -9, 0, -5, - 0, -1, -4, -2, -6, -1, 0, -1, - -1, 0, -1, -1, -1, 0, 0, 0, - 0, 0, -15, 0, -3, 0, -2, -10, - 0, -3, 0, 0, -4, 0, -5, 0, - 0, -1, 0, 0, -1, 0, 0, 0, - 0, 0, -3, 0, -15, 0, -3, 0, - -2, -9, 0, -3, 0, -1, -2, 0, - -5, 0, 0, -1, -2, 0, -1, 0, - 0, 0, 0, -26, -10, 0, 0, -3, - -7, -4, 0, -3, 0, 3, 1, -1, - 0, 0, 0, -1, -1, -1, -1, -2, - 0, 0, -1, 0, 0, 0, 0, 0, - -10, 0, -2, 0, 0, -5, 0, -2, - -4, 0, 0, -1, -3, 0, 0, 0, - 0, 0, -1, 0, 0, 0, 0, 0, - 0, 0, -13, 0, -3, -3, 0, -3, - 0, -3, 0, 0, 0, 0, 0, 0, + 0, -18, 0, -3, -2, -2, -9, 0, + -5, -1, 0, -4, -2, 0, -1, -1, + 0, -1, -1, 0, 0, 0, 0, 0, + -15, 0, -3, 0, -2, -10, 0, -3, + 0, 0, -4, 0, 0, -1, 0, 0, + -1, 0, 0, 0, -26, -10, 0, 0, + -3, -7, -4, 0, -3, 0, 3, -1, + 1, 0, 0, -1, -1, -1, -2, 0, + -1, 0, 0, 0, 0, 0, -10, 0, + -2, 0, 0, -5, 0, -2, 0, -4, + 0, -1, 0, 0, 0, 0, -1, 0, + 0, 0, 0, -3, 0, -13, 0, 0, + 0, 0, -3, 0, -2, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -3, 0, -13, 0, 0, 0, - 0, -3, 0, -2, 0, 0, -1, 0, - -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -8, -12, - -9, 0, 0, -10, -10, 0, -8, 0, - -10, 0, 0, 0 + 0, 0, 0, 0, -12, -8, -9, 0, + -10, 0, -8, 0, -10, 0, 0 }; @@ -528,17 +313,20 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = .class_pair_values = kern_class_values, .left_class_mapping = kern_left_class_mapping, .right_class_mapping = kern_right_class_mapping, - .left_class_cnt = 30, - .right_class_cnt = 26, + .left_class_cnt = 25, + .right_class_cnt = 23, }; /*-------------------- * ALL CUSTOM DATA *--------------------*/ -#if LV_VERSION_CHECK(8, 0, 0) +#if LVGL_VERSION_MAJOR == 8 /*Store all the custom data of the font*/ static lv_font_fmt_txt_glyph_cache_t cache; +#endif + +#if LVGL_VERSION_MAJOR >= 8 static const lv_font_fmt_txt_dsc_t font_dsc = { #else static lv_font_fmt_txt_dsc_t font_dsc = { @@ -552,7 +340,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = { .bpp = 1, .kern_classes = 1, .bitmap_format = 0, -#if LV_VERSION_CHECK(8, 0, 0) +#if LVGL_VERSION_MAJOR == 8 .cache = &cache #endif }; @@ -563,7 +351,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = { *----------------*/ /*Initialize a public general font descriptor*/ -#if LV_VERSION_CHECK(8, 0, 0) +#if LVGL_VERSION_MAJOR >= 8 const lv_font_t tencent_w7_16 = { #else lv_font_t tencent_w7_16 = { @@ -573,13 +361,13 @@ lv_font_t tencent_w7_16 = { .line_height = 17, /*The maximum line height required by the font*/ .base_line = 4, /*Baseline measured from the bottom of the line*/ #if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0) - .subpx = LV_FONT_SUBPX_HOR, + .subpx = LV_FONT_SUBPX_NONE, #endif #if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8 .underline_position = -1, .underline_thickness = 1, #endif - .dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ + .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ }; diff --git a/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_18.c b/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_18.c new file mode 100644 index 0000000..2adfaa0 --- /dev/null +++ b/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_18.c @@ -0,0 +1,383 @@ +/******************************************************************************* + * Size: 18 px + * Bpp: 1 + * Opts: + ******************************************************************************/ + +#ifdef LV_LVGL_H_INCLUDE_SIMPLE +#include "lvgl.h" +#else +#include "../../lvgl.h" +#endif + +#ifndef TENCENT_W7_18 +#define TENCENT_W7_18 1 +#endif + +#if TENCENT_W7_18 + +/*----------------- + * BITMAPS + *----------------*/ + +/*Store the image of the glyphs*/ +static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = { + /* U+0025 "%" */ + 0x7c, 0x3f, 0xe3, 0xb3, 0x19, 0x99, 0x8f, 0xdc, + 0x7d, 0xc0, 0xc, 0x0, 0xc0, 0xf, 0xf8, 0xef, + 0xc6, 0xc6, 0x66, 0x36, 0x3f, 0x71, 0xf8, + + /* U+002E "." */ + 0x7c, + + /* U+002F "/" */ + 0x3, 0x6, 0x6, 0x6, 0xc, 0xc, 0x1c, 0x18, + 0x18, 0x38, 0x30, 0x30, 0x60, 0x60, 0xe0, 0xc0, + 0xc0, + + /* U+0030 "0" */ + 0x1f, 0xc7, 0xfd, 0xc1, 0xb0, 0x36, 0x6, 0xc0, + 0xd8, 0x3b, 0x6, 0xc0, 0xd8, 0x1b, 0x3, 0x60, + 0xef, 0xf8, 0xfe, 0x0, + + /* U+0031 "1" */ + 0xe, 0x7f, 0xfb, 0x70, 0xc1, 0x83, 0x6, 0x1c, + 0x38, 0x60, 0xc1, 0x83, 0x0, + + /* U+0032 "2" */ + 0x3f, 0xc3, 0xf8, 0x3, 0x0, 0x60, 0xc, 0x3, + 0x83, 0xf1, 0xf8, 0x78, 0xc, 0x1, 0x80, 0x30, + 0xf, 0xf9, 0xfe, 0x0, + + /* U+0033 "3" */ + 0x7f, 0x1f, 0xc0, 0x60, 0x30, 0x19, 0xf8, 0xfc, + 0x6, 0x3, 0x1, 0x80, 0xc0, 0xef, 0xe7, 0xe0, + + /* U+0034 "4" */ + 0x7, 0x0, 0xc0, 0x38, 0x6, 0x61, 0x8c, 0x73, + 0x8c, 0x63, 0x8c, 0x7f, 0xef, 0xf8, 0x6, 0x1, + 0xc0, 0x30, 0x6, 0x0, + + /* U+0035 "5" */ + 0x3f, 0x3f, 0x98, 0xc, 0x6, 0x3, 0xf1, 0xfc, + 0x6, 0x3, 0x1, 0x80, 0xc0, 0xcf, 0xe7, 0xe0, + + /* U+0036 "6" */ + 0x1f, 0x9f, 0xdc, 0xc, 0x6, 0x3, 0xf9, 0xff, + 0x83, 0xc1, 0xe0, 0xf0, 0x78, 0x6f, 0xf3, 0xf0, + + /* U+0037 "7" */ + 0x7f, 0xbf, 0xe0, 0x38, 0xc, 0x7, 0x1, 0x80, + 0xe0, 0x70, 0x18, 0xe, 0x3, 0x1, 0xc0, 0x60, + 0x38, 0x0, + + /* U+0038 "8" */ + 0x1f, 0x8f, 0xf3, 0xc, 0xc3, 0x30, 0xcf, 0xe7, + 0xf9, 0x86, 0xc1, 0xb0, 0x6c, 0x1b, 0xe, 0xff, + 0x1f, 0x80, + + /* U+0039 "9" */ + 0x3f, 0x3f, 0xf8, 0x78, 0x3c, 0x1e, 0x1f, 0xfc, + 0xfe, 0x3, 0x1, 0x80, 0xc0, 0xef, 0xe7, 0xe0, + + /* U+0042 "B" */ + 0x1f, 0xc3, 0xfc, 0xe1, 0x9c, 0x33, 0x6, 0x7f, + 0x8f, 0xf1, 0x86, 0x70, 0xce, 0x19, 0x83, 0x30, + 0xe7, 0xf9, 0xfe, 0x0, + + /* U+0043 "C" */ + 0x1f, 0x9f, 0xdc, 0xc, 0x6, 0x3, 0x1, 0x81, + 0x80, 0xc0, 0x60, 0x30, 0x18, 0xf, 0xe3, 0xf0, + + /* U+004B "K" */ + 0x18, 0x33, 0x86, 0x38, 0xe3, 0x8c, 0x31, 0x83, + 0x38, 0x3f, 0x7, 0xf0, 0x73, 0x7, 0x38, 0x61, + 0x86, 0x1c, 0x61, 0xce, 0xc, + + /* U+004D "M" */ + 0x3f, 0xfe, 0x3f, 0xff, 0x38, 0xe3, 0x30, 0xc3, + 0x30, 0xc3, 0x30, 0xc3, 0x71, 0xc7, 0x71, 0xc6, + 0x71, 0xc6, 0x61, 0x86, 0x61, 0x86, 0x61, 0x86, + 0xe3, 0x8e, 0xe3, 0x8e, + + /* U+0050 "P" */ + 0x1f, 0xe7, 0xfc, 0xe1, 0x9c, 0x33, 0x6, 0x61, + 0x8c, 0x33, 0xfe, 0x7f, 0x8c, 0x1, 0x80, 0x30, + 0x6, 0x1, 0xc0, 0x0, + + /* U+0053 "S" */ + 0x1f, 0xcf, 0xf3, 0x1, 0xc0, 0x70, 0x18, 0x7, + 0xf9, 0xfe, 0x3, 0x80, 0xe0, 0x38, 0xc, 0xff, + 0x3f, 0x80, + + /* U+0055 "U" */ + 0x70, 0x6e, 0xd, 0x83, 0xb0, 0x76, 0xe, 0xc1, + 0x98, 0x37, 0x6, 0xc1, 0xd8, 0x3b, 0x7, 0x60, + 0xcf, 0xf8, 0xfe, 0x0, + + /* U+0065 "e" */ + 0x3f, 0x3f, 0xd8, 0x6c, 0x76, 0x3f, 0xfb, 0xfd, + 0x80, 0xc0, 0x7f, 0x1f, 0x80, + + /* U+006B "k" */ + 0x18, 0x3, 0x0, 0xe0, 0x1c, 0x3, 0xc, 0x63, + 0xc, 0xe1, 0x98, 0x7e, 0xf, 0xc1, 0x98, 0x33, + 0x86, 0x30, 0xc6, 0x38, 0xe0, + + /* U+006D "m" */ + 0x3f, 0xfc, 0x7f, 0xfd, 0xc6, 0x1b, 0x8c, 0x36, + 0x18, 0x6c, 0x30, 0xd8, 0xe3, 0xb1, 0xc6, 0xe3, + 0xd, 0xc6, 0x1b, 0xc, 0x30, + + /* U+006F "o" */ + 0x3f, 0x3f, 0xd8, 0x6c, 0x36, 0x1e, 0xf, 0xd, + 0x86, 0xc3, 0x7f, 0x9f, 0x80, + + /* U+0072 "r" */ + 0x1f, 0x3e, 0x30, 0x70, 0x70, 0x60, 0x60, 0x60, + 0x60, 0xe0, 0xe0, + + /* U+0073 "s" */ + 0x3f, 0x9f, 0x98, 0xc, 0x6, 0x3, 0xf9, 0xfc, + 0x6, 0x7, 0x7f, 0x1f, 0x80, + + /* U+0079 "y" */ + 0x61, 0xb0, 0xd8, 0x7c, 0x3c, 0x3e, 0x1f, 0xd, + 0x86, 0xff, 0x3f, 0x81, 0xc0, 0xcf, 0xe7, 0xe0, + + /* U+00B0 "°" */ + 0x7d, 0xfb, 0x96, 0x2f, 0xdf, 0x80, + + /* U+2103 "℃" */ + 0x7c, 0x7e, 0xfc, 0xfe, 0xcd, 0xc0, 0xcd, 0x80, + 0xcd, 0x80, 0xf9, 0x80, 0x3, 0x80, 0x3, 0x80, + 0x3, 0x80, 0x3, 0x0, 0x3, 0x0, 0x3, 0x0, + 0x3, 0xfc, 0x1, 0xf8 +}; + + +/*--------------------- + * GLYPH DESCRIPTION + *--------------------*/ + +static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, + {.bitmap_index = 0, .adv_w = 236, .box_w = 13, .box_h = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 23, .adv_w = 79, .box_w = 3, .box_h = 2, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 24, .adv_w = 93, .box_w = 8, .box_h = 17, .ofs_x = -1, .ofs_y = -4}, + {.bitmap_index = 41, .adv_w = 190, .box_w = 11, .box_h = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 61, .adv_w = 130, .box_w = 7, .box_h = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 74, .adv_w = 171, .box_w = 11, .box_h = 14, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 94, .adv_w = 159, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 110, .adv_w = 186, .box_w = 11, .box_h = 14, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 130, .adv_w = 164, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 146, .adv_w = 170, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 162, .adv_w = 156, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 180, .adv_w = 181, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 198, .adv_w = 171, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 214, .adv_w = 182, .box_w = 11, .box_h = 14, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 234, .adv_w = 159, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 250, .adv_w = 186, .box_w = 12, .box_h = 14, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 271, .adv_w = 272, .box_w = 16, .box_h = 14, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 299, .adv_w = 183, .box_w = 11, .box_h = 14, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 319, .adv_w = 170, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 337, .adv_w = 200, .box_w = 11, .box_h = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 357, .adv_w = 160, .box_w = 9, .box_h = 11, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 370, .adv_w = 162, .box_w = 11, .box_h = 15, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 391, .adv_w = 266, .box_w = 15, .box_h = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 412, .adv_w = 171, .box_w = 9, .box_h = 11, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 425, .adv_w = 120, .box_w = 8, .box_h = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 436, .adv_w = 151, .box_w = 9, .box_h = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 449, .adv_w = 173, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 465, .adv_w = 119, .box_w = 7, .box_h = 6, .ofs_x = 1, .ofs_y = 7}, + {.bitmap_index = 471, .adv_w = 269, .box_w = 16, .box_h = 14, .ofs_x = 1, .ofs_y = -1} +}; + +/*--------------------- + * CHARACTER MAPPING + *--------------------*/ + +static const uint16_t unicode_list_0[] = { + 0x0, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x1d, 0x1e, 0x26, + 0x28, 0x2b, 0x2e, 0x30, 0x40, 0x46, 0x48, 0x4a, + 0x4d, 0x4e, 0x54, 0x8b, 0x20de +}; + +/*Collect the unicode lists and glyph_id offsets*/ +static const lv_font_fmt_txt_cmap_t cmaps[] = +{ + { + .range_start = 37, .range_length = 8415, .glyph_id_start = 1, + .unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 29, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY + } +}; + +/*----------------- + * KERNING + *----------------*/ + + +/*Map glyph_ids to kern left classes*/ +static const uint8_t kern_left_class_mapping[] = +{ + 0, 0, 1, 2, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 3, 12, 13, + 14, 15, 16, 17, 0, 18, 19, 20, + 21, 22, 23, 24, 25, 13 +}; + +/*Map glyph_ids to kern right classes*/ +static const uint8_t kern_right_class_mapping[] = +{ + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 4, 10, 11, 12, 13, 14, + 13, 13, 13, 15, 16, 17, 18, 19, + 17, 20, 21, 22, 23, 23 +}; + +/*Kern values between classes*/ +static const int8_t kern_class_values[] = +{ + 0, 0, 0, 0, -23, 0, 0, -12, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 0, 6, 0, 3, + 12, 3, 9, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -1, -2, -2, 0, -3, + 0, 0, 0, 0, -2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -3, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -2, 0, -3, 0, + 0, 0, 0, -9, 0, -5, 0, 0, + 0, 0, -3, -3, -1, -1, -1, 0, + -2, 0, -3, -6, 0, -6, 0, -3, + 0, 0, 0, 0, -5, 0, 0, 0, + 0, -5, -2, 0, -1, 0, 0, -1, + 0, -7, -17, -9, -6, -3, -17, -3, + -7, 0, -6, -10, -2, -2, -3, -2, + -9, 0, -2, -1, -2, 0, -2, 0, + -26, -9, 0, 0, 0, -9, 0, 0, + 0, 0, -5, 0, -2, 0, 0, -2, + -1, 0, 0, 0, 0, 0, 0, -14, + -9, 0, 0, 0, -10, 0, 0, 0, + 0, 0, 0, 0, 2, 0, -2, 0, + 3, 2, 0, 0, 1, 0, -12, 3, + -29, -29, -3, 3, -2, 0, -9, -1, + 3, -3, 0, 0, 0, -2, -3, -9, + -1, -3, -9, -9, -3, 3, -3, 0, + -3, 0, -2, 0, -2, -1, -2, -3, + 0, -2, 0, 0, -3, 0, -1, -1, + -1, 0, -1, 0, -12, 0, 0, 0, + 0, -3, 0, -1, 0, 0, -2, 0, + 0, -2, 0, -6, 0, 0, 0, -1, + 0, 0, 0, 0, 0, 0, 0, -1, + -6, 0, 2, -9, -1, 0, -5, -2, + -1, -2, -9, 0, 0, 0, -2, 0, + 0, -4, 0, 0, 0, 0, -1, -6, + 0, -2, -7, -1, 3, -2, -1, -1, + -4, -2, 0, -2, 0, -1, 0, -2, + -5, 0, 0, 0, -9, 0, -3, 0, + 0, 0, 0, 2, 0, 0, 0, 0, + -1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -35, -16, 0, 0, -3, 0, + 0, 0, 0, 0, 0, -1, 0, -1, + 0, 0, 0, -2, 0, 0, 0, 0, + 0, 0, -9, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -5, -1, -3, 0, + 0, -1, -1, 0, 0, 0, 0, 0, + 0, -3, 0, -10, 0, -5, 0, 0, + -9, 0, -1, 0, 0, -1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -9, + 0, -1, -3, 0, -3, -3, 0, -1, + 0, 0, 0, 0, 0, 0, 0, -1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -20, 0, -3, -2, -2, -10, 0, + -5, -1, 0, -4, -2, 0, -1, -1, + 0, -1, -1, 0, 0, 0, 0, 0, + -17, 0, -3, 0, -2, -12, 0, -3, + 0, 0, -4, 0, 0, -1, 0, 0, + -1, 0, 0, 0, -29, -11, 0, 0, + -3, -7, -4, 0, -3, 0, 3, -1, + 1, 0, 0, -1, -1, -1, -2, 0, + -1, 0, 0, 0, 0, 0, -12, 0, + -2, 0, 0, -5, 0, -2, 0, -5, + 0, -1, 0, 0, 0, 0, -1, 0, + 0, 0, 0, -3, 0, -14, 0, 0, + 0, 0, -3, 0, -2, 0, 0, -1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -13, -9, -10, 0, + -12, 0, -9, 0, -12, 0, 0 +}; + + +/*Collect the kern class' data in one place*/ +static const lv_font_fmt_txt_kern_classes_t kern_classes = +{ + .class_pair_values = kern_class_values, + .left_class_mapping = kern_left_class_mapping, + .right_class_mapping = kern_right_class_mapping, + .left_class_cnt = 25, + .right_class_cnt = 23, +}; + +/*-------------------- + * ALL CUSTOM DATA + *--------------------*/ + +#if LVGL_VERSION_MAJOR == 8 +/*Store all the custom data of the font*/ +static lv_font_fmt_txt_glyph_cache_t cache; +#endif + +#if LVGL_VERSION_MAJOR >= 8 +static const lv_font_fmt_txt_dsc_t font_dsc = { +#else +static lv_font_fmt_txt_dsc_t font_dsc = { +#endif + .glyph_bitmap = glyph_bitmap, + .glyph_dsc = glyph_dsc, + .cmaps = cmaps, + .kern_dsc = &kern_classes, + .kern_scale = 16, + .cmap_num = 1, + .bpp = 1, + .kern_classes = 1, + .bitmap_format = 0, +#if LVGL_VERSION_MAJOR == 8 + .cache = &cache +#endif +}; + + +/*----------------- + * PUBLIC FONT + *----------------*/ + +/*Initialize a public general font descriptor*/ +#if LVGL_VERSION_MAJOR >= 8 +const lv_font_t tencent_w7_18 = { +#else +lv_font_t tencent_w7_18 = { +#endif + .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ + .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ + .line_height = 18, /*The maximum line height required by the font*/ + .base_line = 4, /*Baseline measured from the bottom of the line*/ +#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0) + .subpx = LV_FONT_SUBPX_NONE, +#endif +#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8 + .underline_position = -1, + .underline_thickness = 1, +#endif + .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ +}; + + + +#endif /*#if TENCENT_W7_18*/ + diff --git a/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_18_time.c b/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_18_time.c new file mode 100644 index 0000000..4c6d09e --- /dev/null +++ b/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_18_time.c @@ -0,0 +1,245 @@ +/******************************************************************************* + * Size: 18 px + * Bpp: 1 + * Opts: + ******************************************************************************/ + +#ifdef LV_LVGL_H_INCLUDE_SIMPLE +#include "lvgl.h" +#else +#include "../../lvgl.h" +#endif + +#ifndef TENCENT_W7_18_TIME +#define TENCENT_W7_18_TIME 1 +#endif + +#if TENCENT_W7_18_TIME + +/*----------------- + * BITMAPS + *----------------*/ + +/*Store the image of the glyphs*/ +static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = { + /* U+0030 "0" */ + 0x1f, 0xc7, 0xfd, 0xc1, 0xb0, 0x36, 0x6, 0xc0, + 0xd8, 0x3b, 0x6, 0xc0, 0xd8, 0x1b, 0x3, 0x60, + 0xef, 0xf8, 0xfe, 0x0, + + /* U+0031 "1" */ + 0xe, 0x7f, 0xfb, 0x70, 0xc1, 0x83, 0x6, 0x1c, + 0x38, 0x60, 0xc1, 0x83, 0x0, + + /* U+0032 "2" */ + 0x3f, 0xc3, 0xf8, 0x3, 0x0, 0x60, 0xc, 0x3, + 0x83, 0xf1, 0xf8, 0x78, 0xc, 0x1, 0x80, 0x30, + 0xf, 0xf9, 0xfe, 0x0, + + /* U+0033 "3" */ + 0x7f, 0x1f, 0xc0, 0x60, 0x30, 0x19, 0xf8, 0xfc, + 0x6, 0x3, 0x1, 0x80, 0xc0, 0xef, 0xe7, 0xe0, + + /* U+0034 "4" */ + 0x7, 0x0, 0xc0, 0x38, 0x6, 0x61, 0x8c, 0x73, + 0x8c, 0x63, 0x8c, 0x7f, 0xef, 0xf8, 0x6, 0x1, + 0xc0, 0x30, 0x6, 0x0, + + /* U+0035 "5" */ + 0x3f, 0x3f, 0x98, 0xc, 0x6, 0x3, 0xf1, 0xfc, + 0x6, 0x3, 0x1, 0x80, 0xc0, 0xcf, 0xe7, 0xe0, + + /* U+0036 "6" */ + 0x1f, 0x9f, 0xdc, 0xc, 0x6, 0x3, 0xf9, 0xff, + 0x83, 0xc1, 0xe0, 0xf0, 0x78, 0x6f, 0xf3, 0xf0, + + /* U+0037 "7" */ + 0x7f, 0xbf, 0xe0, 0x38, 0xc, 0x7, 0x1, 0x80, + 0xe0, 0x70, 0x18, 0xe, 0x3, 0x1, 0xc0, 0x60, + 0x38, 0x0, + + /* U+0038 "8" */ + 0x1f, 0x8f, 0xf3, 0xc, 0xc3, 0x30, 0xcf, 0xe7, + 0xf9, 0x86, 0xc1, 0xb0, 0x6c, 0x1b, 0xe, 0xff, + 0x1f, 0x80, + + /* U+0039 "9" */ + 0x3f, 0x3f, 0xf8, 0x78, 0x3c, 0x1e, 0x1f, 0xfc, + 0xfe, 0x3, 0x1, 0x80, 0xc0, 0xef, 0xe7, 0xe0, + + /* U+003A ":" */ + 0x33, 0x0, 0x0, 0x0, 0x6e, + + /* U+5206 "分" */ + 0x7, 0x18, 0xe, 0x18, 0x1c, 0xc, 0x18, 0xe, + 0x38, 0x6, 0x70, 0x7, 0x9f, 0xfc, 0x7, 0xc, + 0x6, 0xc, 0xe, 0xc, 0xc, 0x1c, 0x18, 0x18, + 0x38, 0x18, 0x70, 0x18, 0xe0, 0xf8, + + /* U+5929 "天" */ + 0x1f, 0xff, 0x80, 0x30, 0x0, 0x38, 0x0, 0x1c, + 0x0, 0xe, 0x0, 0x6, 0x0, 0xff, 0xfe, 0x3, + 0x80, 0x1, 0xe0, 0x1, 0xd8, 0x1, 0xce, 0x1, + 0xc3, 0x1, 0xc1, 0xc1, 0xc0, 0x71, 0xc0, 0x1c, + + /* U+65F6 "时" */ + 0x0, 0x3, 0x0, 0x0, 0xc3, 0xf0, 0x30, 0xfc, + 0xc, 0x33, 0xff, 0xcc, 0xc0, 0xc6, 0x2c, 0x21, + 0xf9, 0x98, 0x7e, 0x66, 0x19, 0x99, 0x86, 0x66, + 0x61, 0x98, 0xd8, 0x66, 0x6, 0x31, 0x1, 0xf, + 0xc0, 0xc0, 0x0, 0xf0, + + /* U+79D2 "秒" */ + 0x3, 0x86, 0xf, 0xe1, 0x83, 0x63, 0x78, 0x30, + 0xde, 0xc, 0x35, 0x8f, 0xfb, 0x20, 0xc6, 0xcc, + 0x31, 0xb3, 0x3f, 0xcc, 0xb, 0xc3, 0x67, 0xb0, + 0x31, 0xec, 0x1c, 0x5b, 0xe, 0x36, 0xce, 0xd, + 0x9e, 0x0, 0x66, 0x0 +}; + + +/*--------------------- + * GLYPH DESCRIPTION + *--------------------*/ + +static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, + {.bitmap_index = 0, .adv_w = 190, .box_w = 11, .box_h = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 20, .adv_w = 130, .box_w = 7, .box_h = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 33, .adv_w = 171, .box_w = 11, .box_h = 14, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 53, .adv_w = 159, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 69, .adv_w = 186, .box_w = 11, .box_h = 14, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 89, .adv_w = 164, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 105, .adv_w = 170, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 121, .adv_w = 156, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 139, .adv_w = 181, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 157, .adv_w = 171, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 173, .adv_w = 79, .box_w = 4, .box_h = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 178, .adv_w = 288, .box_w = 16, .box_h = 15, .ofs_x = 1, .ofs_y = -2}, + {.bitmap_index = 208, .adv_w = 288, .box_w = 17, .box_h = 15, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 240, .adv_w = 288, .box_w = 18, .box_h = 16, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 276, .adv_w = 288, .box_w = 18, .box_h = 16, .ofs_x = 0, .ofs_y = -2} +}; + +/*--------------------- + * CHARACTER MAPPING + *--------------------*/ + +static const uint16_t unicode_list_1[] = { + 0x0, 0x723, 0x13f0, 0x27cc +}; + +/*Collect the unicode lists and glyph_id offsets*/ +static const lv_font_fmt_txt_cmap_t cmaps[] = +{ + { + .range_start = 48, .range_length = 11, .glyph_id_start = 1, + .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY + }, + { + .range_start = 20998, .range_length = 10189, .glyph_id_start = 12, + .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL, .list_length = 4, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY + } +}; + +/*----------------- + * KERNING + *----------------*/ + + +/*Map glyph_ids to kern left classes*/ +static const uint8_t kern_left_class_mapping[] = +{ + 0, 1, 0, 2, 3, 4, 5, 6, + 7, 8, 1, 0, 0, 0, 0, 0 +}; + +/*Map glyph_ids to kern right classes*/ +static const uint8_t kern_right_class_mapping[] = +{ + 0, 1, 2, 3, 4, 5, 6, 1, + 7, 8, 9, 0, 0, 0, 0, 0 +}; + +/*Kern values between classes*/ +static const int8_t kern_class_values[] = +{ + 0, 0, -1, -2, -2, 0, -3, 0, + 0, 0, 0, 0, 0, -9, 0, -5, + 0, 0, 0, -3, 0, 0, 0, 0, + -5, 0, 0, -3, -17, -3, -7, 0, + -6, -10, -2, -2, 0, -9, 0, 0, + 0, 0, -5, 0, -2, 0, -10, 0, + 0, 0, 0, 0, 0, 0, -3, 3, + -2, 0, -9, -1, 3, -3, 0, 0, + -2, 0, -2, -1, -2, -3, 0, -2 +}; + + +/*Collect the kern class' data in one place*/ +static const lv_font_fmt_txt_kern_classes_t kern_classes = +{ + .class_pair_values = kern_class_values, + .left_class_mapping = kern_left_class_mapping, + .right_class_mapping = kern_right_class_mapping, + .left_class_cnt = 8, + .right_class_cnt = 9, +}; + +/*-------------------- + * ALL CUSTOM DATA + *--------------------*/ + +#if LVGL_VERSION_MAJOR == 8 +/*Store all the custom data of the font*/ +static lv_font_fmt_txt_glyph_cache_t cache; +#endif + +#if LVGL_VERSION_MAJOR >= 8 +static const lv_font_fmt_txt_dsc_t font_dsc = { +#else +static lv_font_fmt_txt_dsc_t font_dsc = { +#endif + .glyph_bitmap = glyph_bitmap, + .glyph_dsc = glyph_dsc, + .cmaps = cmaps, + .kern_dsc = &kern_classes, + .kern_scale = 16, + .cmap_num = 2, + .bpp = 1, + .kern_classes = 1, + .bitmap_format = 0, +#if LVGL_VERSION_MAJOR == 8 + .cache = &cache +#endif +}; + + +/*----------------- + * PUBLIC FONT + *----------------*/ + +/*Initialize a public general font descriptor*/ +#if LVGL_VERSION_MAJOR >= 8 +const lv_font_t tencent_w7_18_time = { +#else +lv_font_t tencent_w7_18_time = { +#endif + .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ + .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ + .line_height = 16, /*The maximum line height required by the font*/ + .base_line = 2, /*Baseline measured from the bottom of the line*/ +#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0) + .subpx = LV_FONT_SUBPX_NONE, +#endif +#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8 + .underline_position = -1, + .underline_thickness = 1, +#endif + .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ +}; + + + +#endif /*#if TENCENT_W7_18_TIME*/ + diff --git a/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_22.c b/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_22.c index fd2dbe1..3032303 100644 --- a/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_22.c +++ b/.pio/libdeps/nodemcuv2/lv_arduino/src/src/lv_font/tencent_w7_22.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Size: 16 px + * Size: 22 px * Bpp: 1 * Opts: ******************************************************************************/ @@ -23,367 +23,170 @@ /*Store the image of the glyphs*/ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = { /* U+0025 "%" */ - 0x3, 0xff, 0xfc, 0x0, 0x3, 0xfe, 0x1, 0xff, - 0xff, 0xe0, 0x1, 0xfe, 0x0, 0x7f, 0x1, 0xfc, - 0x0, 0xff, 0x0, 0x1f, 0xc0, 0x3f, 0x0, 0x7f, - 0x80, 0x3, 0xf8, 0xf, 0xe0, 0x3f, 0xc0, 0x0, - 0x7f, 0xff, 0xf8, 0x3f, 0xc0, 0x0, 0x7, 0xff, - 0xfe, 0x1f, 0xe0, 0x0, 0x0, 0x0, 0x0, 0xf, - 0xf0, 0x0, 0x0, 0x0, 0x0, 0x7, 0xf8, 0x0, - 0x0, 0x0, 0x0, 0x7, 0xfc, 0x0, 0x0, 0x0, - 0x0, 0x3, 0xfc, 0x1f, 0xff, 0xf8, 0x0, 0x1, - 0xfe, 0xf, 0xff, 0xff, 0x80, 0x0, 0xff, 0x1, - 0xfc, 0x7, 0xf0, 0x0, 0x7f, 0x80, 0x7f, 0x1, - 0xfc, 0x0, 0x7f, 0xc0, 0xf, 0xe0, 0x7f, 0x80, - 0x3f, 0xc0, 0x1, 0xff, 0xff, 0xe0, 0x1f, 0xe0, - 0x0, 0x1f, 0xff, 0xf0, 0x0, + 0x7e, 0xf, 0x7f, 0xe, 0xe7, 0x1c, 0xe7, 0x38, + 0xe7, 0x78, 0xfe, 0x70, 0x7e, 0xe0, 0x1, 0xc0, + 0x3, 0xc0, 0x3, 0x80, 0x7, 0x7e, 0xe, 0x7f, + 0x1e, 0xe7, 0x1c, 0xe7, 0x38, 0xe7, 0x70, 0xfe, + 0xf0, 0x7e, /* U+002E "." */ - 0x0, 0x0, 0x1, 0xff, 0x0, 0xff, 0xc0, 0x3f, - 0x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c0, 0x7, 0xf8 }; @@ -393,34 +196,35 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = { static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, - {.bitmap_index = 0, .adv_w = 289, .box_w = 51, .box_h = 17, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 109, .adv_w = 97, .box_w = 18, .box_h = 4, .ofs_x = -1, .ofs_y = -1}, - {.bitmap_index = 118, .adv_w = 113, .box_w = 36, .box_h = 21, .ofs_x = -3, .ofs_y = -5}, - {.bitmap_index = 213, .adv_w = 232, .box_w = 45, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 309, .adv_w = 159, .box_w = 30, .box_h = 17, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 373, .adv_w = 209, .box_w = 39, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 456, .adv_w = 195, .box_w = 36, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 533, .adv_w = 228, .box_w = 42, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 623, .adv_w = 200, .box_w = 39, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 706, .adv_w = 208, .box_w = 39, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 789, .adv_w = 191, .box_w = 42, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 879, .adv_w = 221, .box_w = 42, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 969, .adv_w = 209, .box_w = 42, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1059, .adv_w = 194, .box_w = 39, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1142, .adv_w = 227, .box_w = 48, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1244, .adv_w = 333, .box_w = 63, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1378, .adv_w = 223, .box_w = 45, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1474, .adv_w = 208, .box_w = 42, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1564, .adv_w = 244, .box_w = 48, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1666, .adv_w = 195, .box_w = 39, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1730, .adv_w = 198, .box_w = 42, .box_h = 18, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1825, .adv_w = 325, .box_w = 60, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1923, .adv_w = 209, .box_w = 39, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1987, .adv_w = 146, .box_w = 33, .box_h = 13, .ofs_x = -1, .ofs_y = -1}, - {.bitmap_index = 2041, .adv_w = 185, .box_w = 36, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2100, .adv_w = 211, .box_w = 42, .box_h = 17, .ofs_x = 0, .ofs_y = -5}, - {.bitmap_index = 2190, .adv_w = 146, .box_w = 27, .box_h = 8, .ofs_x = 1, .ofs_y = 9}, - {.bitmap_index = 2217, .adv_w = 329, .box_w = 63, .box_h = 18, .ofs_x = 1, .ofs_y = -2} + {.bitmap_index = 0, .adv_w = 289, .box_w = 16, .box_h = 17, .ofs_x = 2, .ofs_y = -1}, + {.bitmap_index = 34, .adv_w = 97, .box_w = 4, .box_h = 3, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 36, .adv_w = 113, .box_w = 11, .box_h = 21, .ofs_x = -2, .ofs_y = -5}, + {.bitmap_index = 65, .adv_w = 232, .box_w = 13, .box_h = 17, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 93, .adv_w = 159, .box_w = 8, .box_h = 17, .ofs_x = 2, .ofs_y = -1}, + {.bitmap_index = 110, .adv_w = 209, .box_w = 12, .box_h = 17, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 136, .adv_w = 195, .box_w = 12, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 162, .adv_w = 228, .box_w = 12, .box_h = 17, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 188, .adv_w = 200, .box_w = 12, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 214, .adv_w = 208, .box_w = 12, .box_h = 17, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 240, .adv_w = 191, .box_w = 12, .box_h = 17, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 266, .adv_w = 221, .box_w = 13, .box_h = 17, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 294, .adv_w = 209, .box_w = 11, .box_h = 17, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 318, .adv_w = 222, .box_w = 13, .box_h = 17, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 346, .adv_w = 194, .box_w = 12, .box_h = 17, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 372, .adv_w = 227, .box_w = 15, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 404, .adv_w = 333, .box_w = 20, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 447, .adv_w = 223, .box_w = 14, .box_h = 17, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 477, .adv_w = 208, .box_w = 12, .box_h = 17, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 503, .adv_w = 244, .box_w = 14, .box_h = 17, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 533, .adv_w = 195, .box_w = 11, .box_h = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 551, .adv_w = 198, .box_w = 13, .box_h = 18, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 581, .adv_w = 325, .box_w = 19, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 612, .adv_w = 209, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 632, .adv_w = 146, .box_w = 10, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 649, .adv_w = 185, .box_w = 10, .box_h = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 666, .adv_w = 211, .box_w = 12, .box_h = 17, .ofs_x = 1, .ofs_y = -5}, + {.bitmap_index = 692, .adv_w = 146, .box_w = 8, .box_h = 8, .ofs_x = 2, .ofs_y = 9}, + {.bitmap_index = 700, .adv_w = 329, .box_w = 19, .box_h = 16, .ofs_x = 2, .ofs_y = -1} }; /*--------------------- @@ -429,9 +233,9 @@ static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { static const uint16_t unicode_list_0[] = { 0x0, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x1e, 0x26, 0x28, - 0x2b, 0x2e, 0x30, 0x40, 0x46, 0x48, 0x4a, 0x4d, - 0x4e, 0x54, 0x8b, 0x20de + 0x10, 0x11, 0x12, 0x13, 0x14, 0x1d, 0x1e, 0x26, + 0x28, 0x2b, 0x2e, 0x30, 0x40, 0x46, 0x48, 0x4a, + 0x4d, 0x4e, 0x54, 0x8b, 0x20de }; /*Collect the unicode lists and glyph_id offsets*/ @@ -439,7 +243,7 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = { { .range_start = 37, .range_length = 8415, .glyph_id_start = 1, - .unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 28, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY + .unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 29, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY } }; @@ -453,8 +257,8 @@ static const uint8_t kern_left_class_mapping[] = { 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 3, 12, 13, - 14, 15, 16, 0, 17, 18, 19, 20, - 21, 22, 23, 24, 12 + 14, 15, 16, 17, 0, 18, 19, 20, + 21, 22, 23, 24, 25, 13 }; /*Map glyph_ids to kern right classes*/ @@ -462,8 +266,8 @@ static const uint8_t kern_right_class_mapping[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 4, 10, 11, 12, 13, 14, - 14, 14, 15, 16, 17, 18, 19, 17, - 20, 21, 22, 23, 23 + 13, 13, 13, 15, 16, 17, 18, 19, + 17, 20, 21, 22, 23, 23 }; /*Kern values between classes*/ @@ -487,13 +291,13 @@ static const int8_t kern_class_values[] = 0, 0, 0, 0, -6, 0, 0, 0, 0, -6, -3, 0, -1, 0, 0, -1, 0, -8, -21, -11, -7, -4, -21, -4, - -8, 0, -7, -13, -2, -3, -3, -4, + -8, 0, -7, -13, -2, -3, -4, -3, -11, 0, -3, -1, -2, 0, -2, 0, -32, -11, 0, 0, 0, -11, 0, 0, 0, 0, -6, 0, -3, 0, 0, -3, -1, 0, 0, 0, 0, 0, 0, -18, -11, 0, 0, 0, -12, 0, 0, 0, - 0, 0, 0, 0, 0, 3, -2, 0, + 0, 0, 0, 0, 3, 0, -2, 0, 4, 3, 0, 0, 1, 0, -14, 4, -35, -35, -4, 4, -2, 0, -11, -1, 4, -4, 0, 0, 0, -2, -4, -11, @@ -501,43 +305,46 @@ static const int8_t kern_class_values[] = -4, 0, -2, 0, -2, -1, -2, -4, 0, -2, 0, 0, -4, 0, -1, -1, -1, 0, -1, 0, -14, 0, 0, 0, - -1, -7, 0, 2, -11, -1, 0, -6, - -3, -2, -1, -11, 0, 0, 0, -2, - 0, 0, -5, 0, 0, 0, 0, -1, - -7, 0, -2, -9, -1, 4, -2, -1, - -5, -1, -2, 0, -3, 0, -2, 0, - -2, -6, 0, 0, 0, -11, 0, -4, - 0, 0, 0, 0, 2, 0, 0, 0, - 0, -2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -42, -19, 0, 0, -4, + 0, -4, 0, -1, 0, 0, -2, 0, + 0, -3, 0, -7, 0, 0, 0, -1, + 0, 0, 0, 0, 0, 0, 0, -1, + -7, 0, 2, -11, -1, 0, -6, -3, + -1, -2, -11, 0, 0, 0, -2, 0, + 0, -5, 0, 0, 0, 0, -1, -7, + 0, -2, -9, -1, 4, -2, -1, -1, + -5, -2, 0, -3, 0, -2, 0, -2, + -6, 0, 0, 0, -11, 0, -4, 0, + 0, 0, 0, 2, 0, 0, 0, 0, + -2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -42, -19, 0, 0, -4, 0, + 0, 0, 0, 0, 0, -1, 0, -1, + 0, 0, 0, -3, 0, 0, 0, 0, + 0, 0, -11, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -6, -1, -4, 0, + 0, -1, -1, 0, 0, 0, 0, 0, + 0, -4, 0, -12, 0, -6, 0, 0, + -11, 0, -1, 0, 0, -1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -11, + 0, -1, -4, 0, -4, -4, 0, -1, 0, 0, 0, 0, 0, 0, 0, -1, - -1, 0, 0, 0, -3, 0, 0, 0, - 0, 0, 0, -11, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -1, -6, -4, - 0, 0, -1, -1, 0, 0, 0, 0, - 0, 0, -4, 0, -12, 0, -6, 0, - 0, -11, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -11, 0, -1, -4, 0, -4, -4, 0, - -1, 0, 0, 0, 0, 0, 0, 0, - -1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -25, 0, -4, -2, -3, -13, - 0, -6, 0, -1, -5, -2, 0, -1, - -1, 0, -1, -1, 0, 0, 0, 0, - 0, -21, 0, -4, 0, -3, -14, 0, - -4, 0, 0, -5, 0, 0, -1, 0, - 0, -1, 0, 0, 0, -35, -13, 0, - 0, -4, -9, -5, 0, -4, 0, 4, - 1, -1, 0, 0, -1, -1, -1, -2, - 0, -1, 0, 0, 0, 0, 0, -14, - 0, -2, 0, 0, -6, 0, -3, -6, - 0, 0, -1, 0, 0, 0, 0, -1, - 0, 0, 0, 0, -4, 0, -18, 0, - 0, 0, 0, -4, 0, -3, 0, 0, - -1, 0, 0, 0, 0, 0, 0, 0, + 0, -25, 0, -4, -2, -3, -13, 0, + -6, -1, 0, -5, -2, 0, -1, -1, + 0, -1, -1, 0, 0, 0, 0, 0, + -21, 0, -4, 0, -3, -14, 0, -4, + 0, 0, -5, 0, 0, -1, 0, 0, + -1, 0, 0, 0, -35, -13, 0, 0, + -4, -9, -5, 0, -4, 0, 4, -1, + 1, 0, 0, -1, -1, -1, -2, 0, + -1, 0, 0, 0, 0, 0, -14, 0, + -2, 0, 0, -6, 0, -3, 0, -6, + 0, -1, 0, 0, 0, 0, -1, 0, + 0, 0, 0, -4, 0, -18, 0, 0, + 0, 0, -4, 0, -3, 0, 0, -1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -11, -16, -12, - 0, -14, 0, -11, 0, -14, 0, 0 + 0, 0, 0, 0, -16, -11, -12, 0, + -14, 0, -11, 0, -14, 0, 0 }; @@ -547,7 +354,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = .class_pair_values = kern_class_values, .left_class_mapping = kern_left_class_mapping, .right_class_mapping = kern_right_class_mapping, - .left_class_cnt = 24, + .left_class_cnt = 25, .right_class_cnt = 23, }; @@ -555,9 +362,12 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = * ALL CUSTOM DATA *--------------------*/ -#if LV_VERSION_CHECK(8, 0, 0) +#if LVGL_VERSION_MAJOR == 8 /*Store all the custom data of the font*/ static lv_font_fmt_txt_glyph_cache_t cache; +#endif + +#if LVGL_VERSION_MAJOR >= 8 static const lv_font_fmt_txt_dsc_t font_dsc = { #else static lv_font_fmt_txt_dsc_t font_dsc = { @@ -571,7 +381,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = { .bpp = 1, .kern_classes = 1, .bitmap_format = 0, -#if LV_VERSION_CHECK(8, 0, 0) +#if LVGL_VERSION_MAJOR == 8 .cache = &cache #endif }; @@ -582,7 +392,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = { *----------------*/ /*Initialize a public general font descriptor*/ -#if LV_VERSION_CHECK(8, 0, 0) +#if LVGL_VERSION_MAJOR >= 8 const lv_font_t tencent_w7_22 = { #else lv_font_t tencent_w7_22 = { @@ -592,13 +402,13 @@ lv_font_t tencent_w7_22 = { .line_height = 22, /*The maximum line height required by the font*/ .base_line = 5, /*Baseline measured from the bottom of the line*/ #if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0) - .subpx = LV_FONT_SUBPX_HOR, + .subpx = LV_FONT_SUBPX_NONE, #endif #if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8 .underline_position = -2, .underline_thickness = 1, #endif - .dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ + .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ }; diff --git a/platformio.ini b/platformio.ini index 55676b9..15e0569 100644 --- a/platformio.ini +++ b/platformio.ini @@ -13,9 +13,11 @@ platform = espressif8266 board = nodemcuv2 framework = arduino lib_deps = + Time@^1.6.1 bodmer/TFT_eSPI@^2.5.0 lvgl/lv_arduino@^3.0.1 bblanchon/ArduinoJson@^6.20.0 + NTPClient monitor_speed = 921600 upload_speed = 921600 monitor_filters = esp8266_exception_decoder diff --git a/src/main.ino b/src/main.ino index 1c0fdda..1ab0bb4 100644 --- a/src/main.ino +++ b/src/main.ino @@ -2,6 +2,8 @@ #include #include #include +#include +#include #include "NetData.h" @@ -14,8 +16,8 @@ const char *password = "8877654321"; // 连接WiFi密码(此处使用12345678 // extern lv_font_t my_font_name; LV_FONT_DECLARE(tencent_w7_22) LV_FONT_DECLARE(tencent_w7_24) -// LV_FONT_DECLARE(tencent_w7_24_time) -LV_FONT_DECLARE(tencent_w7_20_time) +LV_FONT_DECLARE(tencent_w7_18_time) +LV_FONT_DECLARE(tencent_w7_18) TFT_eSPI tft = TFT_eSPI(); /* TFT instance */ static lv_disp_buf_t disp_buf; @@ -48,6 +50,26 @@ static lv_obj_t *chart; static lv_chart_series_t *ser1; static lv_chart_series_t *ser2; +// 字体配置 +static lv_style_t iconfont; +static lv_style_t font_16; +static lv_style_t font_18; +static lv_style_t font_18_time; +static lv_style_t font_22; +static lv_style_t font_24; + +// 定时亮度配置 +unsigned int bright = 220; +bool autoLight = true; // true:开启定时亮度 false:关闭定时亮度 +unsigned int nightLight = 256; //[0, 256] 越小越亮,越大越暗 +unsigned int nightHour = 23; +unsigned int nightMin = 00; +unsigned int nightSec = 00; +unsigned int dayLight = bright; //[0, 256] 越小越亮,越大越暗 +unsigned int dayHour = 9; +unsigned int dayMin = 0; +unsigned int daySec = 0; + NetChartData netChartData; lv_coord_t up_speed_max = 0; @@ -65,6 +87,9 @@ string up_time; const auto net_name = "net.ovs_eth1"; const auto mem_size = 7833960 / 1024.0; +WiFiUDP ntpUDP; +NTPClient timeClient(ntpUDP, "192.168.5.1", 28800); + #if LV_USE_LOG != 0 /* Serial debugging */ void my_print(lv_log_level_t level, const char *file, uint32_t line, const char *dsc, const char *params) @@ -83,10 +108,31 @@ void setBrightness(int value) pinMode(TFT_BL, OUTPUT); } +void setFont() +{ + lv_style_init(&iconfont); + lv_style_set_text_font(&iconfont, LV_STATE_DEFAULT, &iconfont_symbol); + + lv_style_init(&font_16); + lv_style_set_text_font(&font_16, LV_STATE_DEFAULT, &tencent_w7_16); + + lv_style_init(&font_18); + lv_style_set_text_font(&font_18, LV_STATE_DEFAULT, &tencent_w7_18); + + lv_style_init(&font_18_time); + lv_style_set_text_font(&font_18_time, LV_STATE_DEFAULT, &tencent_w7_18_time); + + lv_style_init(&font_22); + lv_style_set_text_font(&font_22, LV_STATE_DEFAULT, &tencent_w7_22); + + lv_style_init(&font_24); + lv_style_set_text_font(&font_24, LV_STATE_DEFAULT, &tencent_w7_24); +} + // 页面初始化 void setupPages() { - setBrightness(180); + setBrightness(bright); login_page = lv_cont_create(lv_scr_act(), NULL); lv_obj_set_size(login_page, 240, 240); // 设置容器大小 lv_obj_set_style_local_bg_color(login_page, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_BLACK); @@ -100,6 +146,32 @@ void setupPages() lv_obj_set_hidden(monitor_page, true); } +void autoLightCtl() +{ + // string s = "现在时间:" + to_string(hour()) + ":" + to_string(minute()) + ":" + to_string(second()); + // Serial.print(s.c_str()); + if (!autoLight) + { + return; + } + int hour = timeClient.getHours(); + int minute = timeClient.getMinutes(); + int second = timeClient.getSeconds(); + + if ((hour == nightHour) && (minute == nightMin) && (second == nightSec)) + { + setBrightness(nightLight); + Serial.println("nightLight: "); + Serial.println(nightLight); + } + else if ((hour == dayHour) && (minute == dayMin) && (second == daySec)) + { + setBrightness(dayLight); + Serial.println("dayLight: "); + Serial.println(dayLight); + } +} + // 设置login_page显示组件 void initLoginPage() { @@ -335,25 +407,25 @@ void getUptime() int second = seconds % 60; if (day != 0) { - up_time += to_string(day)+"天"; + up_time += to_string(day) + "天"; } if (hour != 0 || day != 0) { - up_time += to_string(hour)+"时" ; + up_time += to_string(hour) + "时"; } if (minute != 0 || hour != 0 || day != 0) { - up_time += to_string(minute)+"分"; + up_time += to_string(minute) + "分"; } if (second != 0 || minute != 0 || hour != 0 || day != 0) { - up_time += to_string(second)+"秒"; + up_time += to_string(second) + "秒"; } if (day == 0 && hour == 0 && minute == 0 && second == 0) { up_time += "0秒"; } - Serial.print(up_time.c_str()); + Serial.println(up_time.c_str()); } } @@ -363,7 +435,6 @@ static void task_cb(lv_task_t *task) if (WiFi.status() != WL_CONNECTED) { connectWiFi(); - // lv_label_set_text(ip_label, WiFi.localIP().toString().c_str()); } getCPUUsage(); getMemoryUsage(); @@ -376,14 +447,13 @@ static void task_cb(lv_task_t *task) updateNetworkInfoLabel(); - lv_bar_set_value(cpu_bar, cpu_usage, LV_ANIM_OFF); lv_label_set_text_fmt(cpu_value_label, "%2.1f%%", cpu_usage); lv_bar_set_value(mem_bar, mem_usage, LV_ANIM_OFF); lv_label_set_text_fmt(mem_value_label, "%2.0f%%", mem_usage); - lv_label_set_text(up_time_label,up_time.c_str()); + lv_label_set_text(up_time_label, up_time.c_str()); lv_obj_set_pos(up_time_label, 10, 220); up_time.clear(); @@ -393,10 +463,12 @@ static void task_cb(lv_task_t *task) lv_style_set_line_color(&arc_indic_style, LV_STATE_DEFAULT, arc_color); lv_obj_add_style(temperature_arc, LV_ARC_PART_INDIC, &arc_indic_style); lv_arc_set_end_angle(temperature_arc, end_value); - // 测试内存泄漏 Serial.print("⚠ Left Memory:"); Serial.println(ESP.getFreeHeap()); + + timeClient.update(); + Serial.println(timeClient.getFormattedTime()); } void setup() @@ -433,6 +505,7 @@ void setup() setupPages(); initLoginPage(); + setFont(); lv_obj_t *bg; bg = lv_obj_create(monitor_page, NULL); @@ -463,59 +536,51 @@ void setup() lv_obj_set_style_local_border_color(cont, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, cont_color); lv_obj_set_style_local_bg_color(cont, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, cont_color); - // Upload & Download Symbol - static lv_style_t iconfont; - lv_style_init(&iconfont); - lv_style_set_text_font(&iconfont, LV_STATE_DEFAULT, &iconfont_symbol); - + // 上传的图标、速度和单位 upload_label = lv_label_create(monitor_page, NULL); lv_obj_add_style(upload_label, LV_LABEL_PART_MAIN, &iconfont); lv_label_set_text(upload_label, CUSTOM_SYMBOL_UPLOAD); lv_color_t speed_label_color = lv_color_hex(0x838a99); lv_obj_set_style_local_text_color(upload_label, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_RED); - lv_obj_set_pos(upload_label, 10, 18); - - lv_obj_t *down_label = lv_label_create(monitor_page, NULL); - lv_obj_add_style(down_label, LV_LABEL_PART_MAIN, &iconfont); - lv_label_set_text(down_label, CUSTOM_SYMBOL_DOWNLOAD); - speed_label_color = lv_color_hex(0x838a99); - lv_obj_set_style_local_text_color(down_label, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GREEN); - lv_obj_set_pos(down_label, 120, 18); - - // Upload & Download Speed Display - static lv_style_t font_22; - lv_style_init(&font_22); - // lv_style_set_text_font(&font_22, LV_STATE_DEFAULT, &lv_font_montserrat_24); - lv_style_set_text_font(&font_22, LV_STATE_DEFAULT, &tencent_w7_22); + lv_obj_set_pos(upload_label, 120, 18); up_speed_label = lv_label_create(monitor_page, NULL); lv_label_set_text(up_speed_label, "56.78"); - lv_obj_add_style(up_speed_label, LV_LABEL_PART_MAIN, &font_22); + lv_obj_add_style(up_speed_label, LV_LABEL_PART_MAIN, &font_18); lv_obj_set_style_local_text_color(up_speed_label, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE); - lv_obj_set_pos(up_speed_label, 30, 15); + lv_obj_set_pos(up_speed_label, 143, 18); up_speed_unit_label = lv_label_create(monitor_page, NULL); lv_label_set_text(up_speed_unit_label, "KB/S"); + lv_obj_add_style(up_speed_unit_label, LV_LABEL_PART_MAIN, &font_16); lv_obj_set_style_local_text_color(up_speed_unit_label, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, speed_label_color); - lv_obj_set_pos(up_speed_unit_label, 90, 18); + lv_obj_set_pos(up_speed_unit_label, 198, 18); + + // 下载的图标、速度和单位 + lv_obj_t *down_label = lv_label_create(monitor_page, NULL); + lv_obj_add_style(down_label, LV_LABEL_PART_MAIN, &iconfont); + lv_label_set_text(down_label, CUSTOM_SYMBOL_DOWNLOAD); + speed_label_color = lv_color_hex(0x838a99); + lv_obj_set_style_local_text_color(down_label, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GREEN); + lv_obj_set_pos(down_label, 10, 18); down_speed_label = lv_label_create(monitor_page, NULL); lv_label_set_text(down_speed_label, "12.34"); - lv_obj_add_style(down_speed_label, LV_LABEL_PART_MAIN, &font_22); + lv_obj_add_style(down_speed_label, LV_LABEL_PART_MAIN, &font_18); lv_obj_set_style_local_text_color(down_speed_label, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE); - lv_obj_set_pos(down_speed_label, 142, 15); + lv_obj_set_pos(down_speed_label, 33, 18); down_speed_unit_label = lv_label_create(monitor_page, NULL); + lv_obj_add_style(down_speed_unit_label, LV_LABEL_PART_MAIN, &font_16); lv_label_set_text(down_speed_unit_label, "MB/S"); lv_obj_set_style_local_text_color(down_speed_unit_label, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, speed_label_color); - lv_obj_set_pos(down_speed_unit_label, 202, 18); + lv_obj_set_pos(down_speed_unit_label, 76, 18); + + // 绘制启动时间 - //绘制启动时间 - static lv_style_t font_20_time; - lv_style_init(&font_20_time); - lv_style_set_text_font(&font_20_time, LV_STATE_DEFAULT, &tencent_w7_20_time); - up_time_label=lv_label_create(monitor_page, NULL); - lv_obj_add_style(up_time_label,LV_LABEL_PART_MAIN,&font_20_time); + up_time_label = lv_label_create(monitor_page, NULL); + lv_obj_add_style(up_time_label, LV_LABEL_PART_MAIN, &font_18_time); + lv_obj_set_pos(up_time_label, 0, 220); // 绘制曲线图 /*Create a chart*/ @@ -624,10 +689,6 @@ void setup() lv_obj_add_style(temperature_arc, LV_ARC_PART_INDIC, &arc_indic_style); // lv_obj_align(temperature_arc, NULL, LV_ALIGN_IN_BOTTOM_LEFT, 10, 10); - static lv_style_t font_24; - lv_style_init(&font_24); - lv_style_set_text_font(&font_24, LV_STATE_DEFAULT, &tencent_w7_24); - temp_value_label = lv_label_create(monitor_page, NULL); lv_label_set_text(temp_value_label, "72℃"); lv_obj_add_style(temp_value_label, LV_LABEL_PART_MAIN, &font_24); @@ -635,9 +696,13 @@ void setup() lv_obj_set_pos(temp_value_label, 160, 170); lv_task_t *t = lv_task_create(task_cb, 1000, LV_TASK_PRIO_MID, &test_data); + + timeClient.begin(); } void loop() { - lv_task_handler(); /* let the GUI do its work */ + lv_task_handler(); + timeClient.update(); + autoLightCtl(); } -- Gitee From 1279fd837180088e7d36fab0fd9a4c18cbb25b87 Mon Sep 17 00:00:00 2001 From: Yuhan Kang Date: Sun, 21 Jan 2024 13:32:00 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=9A=84=E5=88=B7=E6=96=B0=E9=80=9F=E7=8E=87=EF=BC=8C?= =?UTF-8?q?=E7=8E=B0=E5=9C=A8=E6=98=AF=E4=B8=80=E7=A7=92=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E4=B8=80=E6=AC=A1=EF=BC=9B=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E9=87=8D=E5=8F=A0=E7=AD=89=E5=B0=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pio/libdeps/nodemcuv2/lv_arduino/lv_conf.h | 4 ++-- src/NetData.h | 2 +- src/main.ino | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pio/libdeps/nodemcuv2/lv_arduino/lv_conf.h b/.pio/libdeps/nodemcuv2/lv_arduino/lv_conf.h index 5cf5435..8ed9fbf 100644 --- a/.pio/libdeps/nodemcuv2/lv_arduino/lv_conf.h +++ b/.pio/libdeps/nodemcuv2/lv_arduino/lv_conf.h @@ -48,7 +48,7 @@ /* Default display refresh period. * Can be changed in the display driver (`lv_disp_drv_t`).*/ -#define LV_DISP_DEF_REFR_PERIOD 30 /*[ms]*/ +#define LV_DISP_DEF_REFR_PERIOD 10 /*[ms]*/ /* Dot Per Inch: used to initialize default sizes. * E.g. a button with width = LV_DPI / 2 -> half inch wide @@ -114,7 +114,7 @@ typedef int32_t lv_coord_t; * Can be changed in the Input device driver (`lv_indev_drv_t`)*/ /* Input device read period in milliseconds */ -#define LV_INDEV_DEF_READ_PERIOD 30 +#define LV_INDEV_DEF_READ_PERIOD 10 /* Drag threshold in pixels */ #define LV_INDEV_DEF_DRAG_LIMIT 10 diff --git a/src/NetData.h b/src/NetData.h index b8c17d4..5131652 100644 --- a/src/NetData.h +++ b/src/NetData.h @@ -90,7 +90,7 @@ bool getNetDataInfoWithDimension(String chartID, NetChartData &data, String dime const char *NETDATA_HOST = "192.168.5.175"; int NETDATA_PORT = 19999; // String reqRes = "/api/v0/data?chart=sensors.temp_thermal_zone0_thermal_thermal_zone0&format=json&points=9&group=average>ime=0&options=s%7Cjsonwrap%7Cnonzero&after=-10"; - String reqRes = "/api/v1/data?chart=" + chartID + "&format=json&points=1&group=average>ime=0&options=s%7Cjsonwrap%7Cnonzero&after=-2"; + String reqRes = "/api/v1/data?chart=" + chartID + "&format=json&points=1&group=average>ime=0&options=s%7Cjsonwrap%7Cnonzero&after=-1"; reqRes = reqRes + "&dimensions=" + dimensions_filter; WiFiClient client; diff --git a/src/main.ino b/src/main.ino index 1ab0bb4..92df460 100644 --- a/src/main.ino +++ b/src/main.ino @@ -399,7 +399,7 @@ void getUptime() { if (getNetDataInfo("system.uptime", netChartData)) { - Serial.print("Up time:"); + Serial.println(netChartData.max); int seconds = static_cast(netChartData.max); int day = seconds / (24 * 3600); int hour = (seconds % (24 * 3600)) / 3600; -- Gitee From 1790cf17541aeb7788188c8d9432a35240ee1463 Mon Sep 17 00:00:00 2001 From: Howloong Date: Sun, 21 Jan 2024 05:35:49 +0000 Subject: [PATCH 4/5] update README.md. Signed-off-by: Howloong --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e890748..a58f26e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # 路由监视器 RouterMonitor -[[toc]] + _** +## 基于源代码进行了一些自定义修改,包括:上下行网速对调;cpu温度使用snmp获取;将原来显示ip的位置替换为了系统启动时间;添加字库,修改单位为MB/S(KB/s)等; +**_ ## 前言 > 这个项目当前功能还比较简单,配置功能的完善比我预期的要麻烦,但是耐不住大家都很期待,因此就先开源再完善,有能力的小伙伴可以先玩起来,也欢迎贡献PR. -- Gitee From 5e4c527ecfea2357753a8134b6518e6b0edd24f1 Mon Sep 17 00:00:00 2001 From: Howloong Date: Sun, 21 Jan 2024 05:36:11 +0000 Subject: [PATCH 5/5] update README.md. Signed-off-by: Howloong --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a58f26e..1a0f56b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # 路由监视器 RouterMonitor - _** + ## 基于源代码进行了一些自定义修改,包括:上下行网速对调;cpu温度使用snmp获取;将原来显示ip的位置替换为了系统启动时间;添加字库,修改单位为MB/S(KB/s)等; -**_ + ## 前言 > 这个项目当前功能还比较简单,配置功能的完善比我预期的要麻烦,但是耐不住大家都很期待,因此就先开源再完善,有能力的小伙伴可以先玩起来,也欢迎贡献PR. -- Gitee