From 9a97c35df1c69ec5f6677aaccf539d647646b98d Mon Sep 17 00:00:00 2001
From: fvanroie
Date: Fri, 2 Feb 2024 18:26:42 +0100
Subject: [PATCH 01/20] Update Copyright to include 2024
---
LICENSE | 2 +-
platformio.ini | 2 +-
src/dev/esp32/esp32.h | 2 +-
src/drv/tft/tft_driver_arduinogfx.cpp | 2 +-
src/drv/tft/tft_driver_lovyangfx.cpp | 2 +-
src/drv/touch/touch_driver_gt911.cpp | 2 +-
src/drv/touch/touch_driver_gt911.h | 2 +-
src/drv/touch/touch_driver_tftespi.h | 2 +-
src/hasp/hasp.cpp | 2 +-
src/hasp/hasp.h | 2 +-
src/hasp/hasp_attribute.cpp | 2 +-
src/hasp/hasp_dispatch.cpp | 2 +-
src/hasp/hasp_font.cpp | 2 +-
src/hasp/hasp_nvs.cpp | 2 +-
src/hasp/hasp_nvs.h | 2 +-
src/hasp/hasp_object.h | 2 +-
src/hasp/hasp_task.cpp | 2 +-
src/hasp_config.cpp | 2 +-
src/hasp_config.h | 2 +-
src/hasp_debug.cpp | 2 +-
src/hasp_filesystem.cpp | 2 +-
src/hasp_filesystem.h | 2 +-
src/hasp_gui.cpp | 2 +-
src/hasp_oobe.cpp | 2 +-
src/hasp_oobe.h | 2 +-
src/hasplib.h | 2 +-
src/main_arduino.cpp | 2 +-
src/mqtt/hasp_mqtt.h | 2 +-
src/mqtt/hasp_mqtt_esp.cpp | 2 +-
src/mqtt/hasp_mqtt_paho_single.cpp | 2 +-
src/mqtt/hasp_mqtt_pubsubclient.cpp | 2 +-
src/sys/gpio/hasp_gpio.cpp | 2 +-
src/sys/gpio/hasp_gpio.h | 2 +-
src/sys/net/hasp_time.cpp | 2 +-
src/sys/net/hasp_time.h | 2 +-
src/sys/net/hasp_wifi.cpp | 2 +-
src/sys/net/hasp_wifi.h | 2 +-
src/sys/svc/hasp_console.cpp | 2 +-
src/sys/svc/hasp_console.h | 2 +-
src/sys/svc/hasp_ftp.cpp | 2 +-
src/sys/svc/hasp_ftp.h | 2 +-
src/sys/svc/hasp_http.cpp | 4 ++--
src/sys/svc/hasp_http.h | 2 +-
src/sys/svc/hasp_http_async.cpp | 2 +-
src/sys/svc/hasp_mdns.h | 2 +-
src/sys/svc/hasp_ota.cpp | 2 +-
src/sys/svc/hasp_telnet.cpp | 2 +-
47 files changed, 48 insertions(+), 48 deletions(-)
diff --git a/LICENSE b/LICENSE
index c212742b..85f9577f 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2019-2023 Francis Van Roie
+Copyright (c) 2019-2024 Francis Van Roie
Copyright (c) 2018-2019 Allen Derusha allen@derusha.org
Permission is hereby granted, free of charge, to any person obtaining a copy
diff --git a/platformio.ini b/platformio.ini
index ba38d320..7d61dc60 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -1,4 +1,4 @@
-; MIT License - Copyright (c) 2019-2023 Francis Van Roie
+; MIT License - Copyright (c) 2019-2024 Francis Van Roie
; For full license information read the LICENSE file in the project folder
;
; PlatformIO Project Configuration File
diff --git a/src/dev/esp32/esp32.h b/src/dev/esp32/esp32.h
index 660d0df8..e3a8bd17 100644
--- a/src/dev/esp32/esp32.h
+++ b/src/dev/esp32/esp32.h
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#ifndef HASP_DEVICE_ESP32_H
diff --git a/src/drv/tft/tft_driver_arduinogfx.cpp b/src/drv/tft/tft_driver_arduinogfx.cpp
index ff6f0835..c946120a 100644
--- a/src/drv/tft/tft_driver_arduinogfx.cpp
+++ b/src/drv/tft/tft_driver_arduinogfx.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#if defined(ARDUINO) && defined(HASP_USE_ARDUINOGFX)
diff --git a/src/drv/tft/tft_driver_lovyangfx.cpp b/src/drv/tft/tft_driver_lovyangfx.cpp
index d6ba0892..e4f73ea4 100644
--- a/src/drv/tft/tft_driver_lovyangfx.cpp
+++ b/src/drv/tft/tft_driver_lovyangfx.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#if defined(ARDUINO) && defined(LGFX_USE_V1)
diff --git a/src/drv/touch/touch_driver_gt911.cpp b/src/drv/touch/touch_driver_gt911.cpp
index c3da9ef0..1ff67cad 100644
--- a/src/drv/touch/touch_driver_gt911.cpp
+++ b/src/drv/touch/touch_driver_gt911.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#if defined(ARDUINO) && (TOUCH_DRIVER == 0x0911) && !defined(HASP_USE_LGFX_TOUCH)
diff --git a/src/drv/touch/touch_driver_gt911.h b/src/drv/touch/touch_driver_gt911.h
index ac5447d4..983e696e 100644
--- a/src/drv/touch/touch_driver_gt911.h
+++ b/src/drv/touch/touch_driver_gt911.h
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#ifndef HASP_GT911_TOUCH_DRIVER_H
diff --git a/src/drv/touch/touch_driver_tftespi.h b/src/drv/touch/touch_driver_tftespi.h
index 4762844a..fc5895c8 100644
--- a/src/drv/touch/touch_driver_tftespi.h
+++ b/src/drv/touch/touch_driver_tftespi.h
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#ifndef HASP_TFTESPI_TOUCH_DRIVER_H
diff --git a/src/hasp/hasp.cpp b/src/hasp/hasp.cpp
index 1a3336ee..e2e49f0f 100644
--- a/src/hasp/hasp.cpp
+++ b/src/hasp/hasp.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#include "hasplib.h"
diff --git a/src/hasp/hasp.h b/src/hasp/hasp.h
index 4b9b5217..bc786c50 100644
--- a/src/hasp/hasp.h
+++ b/src/hasp/hasp.h
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#ifndef HASP_H
diff --git a/src/hasp/hasp_attribute.cpp b/src/hasp/hasp_attribute.cpp
index 105cefce..f99a6e14 100644
--- a/src/hasp/hasp_attribute.cpp
+++ b/src/hasp/hasp_attribute.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#include "hasplib.h"
diff --git a/src/hasp/hasp_dispatch.cpp b/src/hasp/hasp_dispatch.cpp
index 3ffe667f..f478fa62 100644
--- a/src/hasp/hasp_dispatch.cpp
+++ b/src/hasp/hasp_dispatch.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#include
diff --git a/src/hasp/hasp_font.cpp b/src/hasp/hasp_font.cpp
index 1f50c81a..98a20c46 100644
--- a/src/hasp/hasp_font.cpp
+++ b/src/hasp/hasp_font.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#include
diff --git a/src/hasp/hasp_nvs.cpp b/src/hasp/hasp_nvs.cpp
index a2fd0b23..1ce54e93 100644
--- a/src/hasp/hasp_nvs.cpp
+++ b/src/hasp/hasp_nvs.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#ifdef ESP32
diff --git a/src/hasp/hasp_nvs.h b/src/hasp/hasp_nvs.h
index 809f65ca..ef87e5a6 100644
--- a/src/hasp/hasp_nvs.h
+++ b/src/hasp/hasp_nvs.h
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#ifndef HASP_NVS_H
diff --git a/src/hasp/hasp_object.h b/src/hasp/hasp_object.h
index cd1a0a20..5bfe157a 100644
--- a/src/hasp/hasp_object.h
+++ b/src/hasp/hasp_object.h
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#ifndef HASP_OBJECT_H
diff --git a/src/hasp/hasp_task.cpp b/src/hasp/hasp_task.cpp
index 23fb2027..a6d01900 100644
--- a/src/hasp/hasp_task.cpp
+++ b/src/hasp/hasp_task.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#include "hasplib.h"
diff --git a/src/hasp_config.cpp b/src/hasp_config.cpp
index 09ceea05..d3e55b1e 100644
--- a/src/hasp_config.cpp
+++ b/src/hasp_config.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#if HASP_USE_CONFIG > 0
diff --git a/src/hasp_config.h b/src/hasp_config.h
index 7effe4cd..8a667ed6 100644
--- a/src/hasp_config.h
+++ b/src/hasp_config.h
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#if HASP_USE_CONFIG > 0
diff --git a/src/hasp_debug.cpp b/src/hasp_debug.cpp
index 52977625..672c0ba2 100644
--- a/src/hasp_debug.cpp
+++ b/src/hasp_debug.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#include "hasplib.h"
diff --git a/src/hasp_filesystem.cpp b/src/hasp_filesystem.cpp
index 56c96cc3..ac39a344 100644
--- a/src/hasp_filesystem.cpp
+++ b/src/hasp_filesystem.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#ifdef ARDUINO
diff --git a/src/hasp_filesystem.h b/src/hasp_filesystem.h
index 3bb3d490..0299fc7f 100644
--- a/src/hasp_filesystem.h
+++ b/src/hasp_filesystem.h
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#ifndef HASP_FILESYSTEM_H
diff --git a/src/hasp_gui.cpp b/src/hasp_gui.cpp
index 3d05a80e..b69a1ee5 100644
--- a/src/hasp_gui.cpp
+++ b/src/hasp_gui.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#include "hasplib.h"
diff --git a/src/hasp_oobe.cpp b/src/hasp_oobe.cpp
index f816afbd..1e9cb932 100644
--- a/src/hasp_oobe.cpp
+++ b/src/hasp_oobe.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#if HASP_USE_CONFIG > 0
diff --git a/src/hasp_oobe.h b/src/hasp_oobe.h
index 931ab220..b5b5ad0e 100644
--- a/src/hasp_oobe.h
+++ b/src/hasp_oobe.h
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#if HASP_USE_CONFIG > 0
diff --git a/src/hasplib.h b/src/hasplib.h
index 1cd8691b..05ce613c 100644
--- a/src/hasplib.h
+++ b/src/hasplib.h
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#ifdef ARDUINO
diff --git a/src/main_arduino.cpp b/src/main_arduino.cpp
index 86b53902..8fc378b2 100644
--- a/src/main_arduino.cpp
+++ b/src/main_arduino.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#if !(defined(WINDOWS) || defined(POSIX))
diff --git a/src/mqtt/hasp_mqtt.h b/src/mqtt/hasp_mqtt.h
index 63e9ed9e..f5d57196 100644
--- a/src/mqtt/hasp_mqtt.h
+++ b/src/mqtt/hasp_mqtt.h
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#ifndef HASP_MQTT_H
diff --git a/src/mqtt/hasp_mqtt_esp.cpp b/src/mqtt/hasp_mqtt_esp.cpp
index 0b1c42ea..9fbac1e0 100644
--- a/src/mqtt/hasp_mqtt_esp.cpp
+++ b/src/mqtt/hasp_mqtt_esp.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#include "hasp_conf.h"
diff --git a/src/mqtt/hasp_mqtt_paho_single.cpp b/src/mqtt/hasp_mqtt_paho_single.cpp
index 0811e29d..17804f89 100644
--- a/src/mqtt/hasp_mqtt_paho_single.cpp
+++ b/src/mqtt/hasp_mqtt_paho_single.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
/* Single threaded synchronous paho client */
diff --git a/src/mqtt/hasp_mqtt_pubsubclient.cpp b/src/mqtt/hasp_mqtt_pubsubclient.cpp
index 8821fc59..29e11b2f 100644
--- a/src/mqtt/hasp_mqtt_pubsubclient.cpp
+++ b/src/mqtt/hasp_mqtt_pubsubclient.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#include "hasp_conf.h"
diff --git a/src/sys/gpio/hasp_gpio.cpp b/src/sys/gpio/hasp_gpio.cpp
index b27e3594..0094f80b 100644
--- a/src/sys/gpio/hasp_gpio.cpp
+++ b/src/sys/gpio/hasp_gpio.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#include "lv_conf.h" // For timing defines
diff --git a/src/sys/gpio/hasp_gpio.h b/src/sys/gpio/hasp_gpio.h
index 43a68376..df093048 100644
--- a/src/sys/gpio/hasp_gpio.h
+++ b/src/sys/gpio/hasp_gpio.h
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#ifndef HASP_GPIO_H
diff --git a/src/sys/net/hasp_time.cpp b/src/sys/net/hasp_time.cpp
index 0087a35c..3ad66a0f 100644
--- a/src/sys/net/hasp_time.cpp
+++ b/src/sys/net/hasp_time.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#include
diff --git a/src/sys/net/hasp_time.h b/src/sys/net/hasp_time.h
index 5d1b3e26..0448fd29 100644
--- a/src/sys/net/hasp_time.h
+++ b/src/sys/net/hasp_time.h
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#ifndef HASP_TIME_H
diff --git a/src/sys/net/hasp_wifi.cpp b/src/sys/net/hasp_wifi.cpp
index 36f69b26..dc6041e7 100644
--- a/src/sys/net/hasp_wifi.cpp
+++ b/src/sys/net/hasp_wifi.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#include
diff --git a/src/sys/net/hasp_wifi.h b/src/sys/net/hasp_wifi.h
index 1418efa0..03c98e06 100644
--- a/src/sys/net/hasp_wifi.h
+++ b/src/sys/net/hasp_wifi.h
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#ifndef HASP_WIFI_H
diff --git a/src/sys/svc/hasp_console.cpp b/src/sys/svc/hasp_console.cpp
index 9e7f1632..66312569 100644
--- a/src/sys/svc/hasp_console.cpp
+++ b/src/sys/svc/hasp_console.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#include "hasplib.h"
diff --git a/src/sys/svc/hasp_console.h b/src/sys/svc/hasp_console.h
index ac2e4223..10c17b69 100644
--- a/src/sys/svc/hasp_console.h
+++ b/src/sys/svc/hasp_console.h
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#ifndef HASP_CONSOLE_H
diff --git a/src/sys/svc/hasp_ftp.cpp b/src/sys/svc/hasp_ftp.cpp
index 0e1e8ef3..9b1e11ac 100644
--- a/src/sys/svc/hasp_ftp.cpp
+++ b/src/sys/svc/hasp_ftp.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#include "hasplib.h"
diff --git a/src/sys/svc/hasp_ftp.h b/src/sys/svc/hasp_ftp.h
index 11571a95..35f6b69f 100644
--- a/src/sys/svc/hasp_ftp.h
+++ b/src/sys/svc/hasp_ftp.h
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#ifndef HASP_FTP_H
diff --git a/src/sys/svc/hasp_http.cpp b/src/sys/svc/hasp_http.cpp
index 6139b177..e3737309 100644
--- a/src/sys/svc/hasp_http.cpp
+++ b/src/sys/svc/hasp_http.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#include "hasplib.h"
@@ -920,7 +920,7 @@ static void http_handle_about()
-openHASP Copyright 2019-2023 Francis Van RoieMIT License
+openHASP Copyright 2019-2024 Francis Van RoieMIT License
diff --git a/src/sys/svc/hasp_http.h b/src/sys/svc/hasp_http.h
index bdbe13c4..388bb67c 100644
--- a/src/sys/svc/hasp_http.h
+++ b/src/sys/svc/hasp_http.h
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#ifndef HASP_HTTP_H
diff --git a/src/sys/svc/hasp_http_async.cpp b/src/sys/svc/hasp_http_async.cpp
index d73f112f..2c8ec707 100644
--- a/src/sys/svc/hasp_http_async.cpp
+++ b/src/sys/svc/hasp_http_async.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
//#include "webServer.h"
diff --git a/src/sys/svc/hasp_mdns.h b/src/sys/svc/hasp_mdns.h
index 2f472814..82893e16 100644
--- a/src/sys/svc/hasp_mdns.h
+++ b/src/sys/svc/hasp_mdns.h
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#ifndef HASP_MDNS_H
diff --git a/src/sys/svc/hasp_ota.cpp b/src/sys/svc/hasp_ota.cpp
index f4c18f12..d42ccf61 100644
--- a/src/sys/svc/hasp_ota.cpp
+++ b/src/sys/svc/hasp_ota.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
diff --git a/src/sys/svc/hasp_telnet.cpp b/src/sys/svc/hasp_telnet.cpp
index da8f2e85..1f3d8a09 100644
--- a/src/sys/svc/hasp_telnet.cpp
+++ b/src/sys/svc/hasp_telnet.cpp
@@ -1,4 +1,4 @@
-/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
+/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#include "hasplib.h"
From 71c20b88d6bfa37a6d2a438df726f9a1610649cf Mon Sep 17 00:00:00 2001
From: fvanroie
Date: Fri, 2 Feb 2024 19:46:55 +0100
Subject: [PATCH 02/20] Update to ace.js v1.32.5
---
data/edit.htm | 2 +-
data/script.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/data/edit.htm b/data/edit.htm
index 2d2eec60..4a38aacd 100644
--- a/data/edit.htm
+++ b/data/edit.htm
@@ -1 +1 @@
-openHASP File Editor
New File Upload Files Edit Preview Download Delete
\ No newline at end of file
+openHASP File Editor
New File Upload Files Edit Preview Download Delete
\ No newline at end of file
diff --git a/data/script.js b/data/script.js
index 44b532f3..32b4159e 100644
--- a/data/script.js
+++ b/data/script.js
@@ -1 +1 @@
-var ctx_el;function _(e){return document.getElementById(e)}function hidectx(){_("ctx").style.display="none",ctx_el&&ctx_el.classList.remove("selitem"),ctx_el=void 0}function doesFontExist(e){var t=document.createElement("canvas"),n=t.getContext("2d"),o="abcdefghijklmnopqrstuvwxyz0123456789";n.font="72px monospace";var a=n.measureText(o).width;return n.font="72px '"+e+"', monospace",t=null,n.measureText(o).width!=a}function createEditor(e,t,n,o,a){function i(e){let t=/(?:\.([^.]+))?$/.exec(e)[1];if(void 0!==typeof t)switch(t){case"htm":case"html":return"html";case"js":return"javascript";case"cmd":case"json":case"jsonl":return"json";case"css":case"svg":case"xml":return t}return"plain_text"}void 0===n&&(n=i(t)),void 0===a&&(a="text/"+n);["basePath","modePath","themePath"].forEach((e=>{ace.config.set(e,"https://cdnjs.cloudflare.com/ajax/libs/ace/1.32.0")}));var c=ace.edit(e,{useWorker:!1,wrap:!0,indentedSoftWrap:!1,showPrintMargin:!1,highlightGutterLine:!0,useSoftTabs:!0,tabSize:2});c.setFontSize(parseFloat(getComputedStyle(document.documentElement).fontSize)),c.setReadOnly(!0),c.getSession().setUndoManager(new ace.UndoManager),void 0===o&&(o=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"monokai":"textmate");var s=_("save"),l=_("undo"),r=_("redo"),d=_("cut"),m=_("copy"),u=_("paste"),p=_("font"),f=_("fontsize"),g="none"!==_(e).display;f.value=parseFloat(c.getFontSize()).toFixed(1),p.onchange=function(){c.setOption("fontFamily","'"+p.value+"',monospace")},f.onchange=function(){var e=parseFloat(f.value);!isNaN(e)&&e>=9&&e<=40&&c.setFontSize(e),f.value=parseFloat(c.getFontSize()).toFixed(1)};function h(){let e=!g||c.session.getSelection().isEmpty();d.disabled=e,m.disabled=e}function y(){let e=c.session.getUndoManager();s.disabled=!g||e.isClean(),l.disabled=!g||!e.hasUndo(),r.disabled=!g||!e.hasRedo()}function v(){if(void 0===t)return;const e=function(e){var t=e.getValue();try{var n=JSON.parse(t);return JSON.stringify(n)}catch(e){return t+""}}(c),n=new FormData;n.append("data",new Blob([e],{type:a}),t),fetch("/edit",{method:"POST",body:n}).then((e=>e.ok?e.text().then((e=>{console.log("Save OK /edit "+e)})):e.text().then((e=>{throw console.log("Save FAIL /edit"),new Error(e)})))).then((e=>{console.log(e),generateToast({message:"Saved "+t,background:"#ddd",color:"#000"})})).catch((e=>{console.warn("AbortError"===e.name?"Promise Aborted":"Promise Rejected"),alert(e)})).finally((()=>{y()}))}function x(){var e=c.getCopyText();if(window.clipboardData&&window.clipboardData.setData)return window.clipboardData.setData("Text",e);if(document.queryCommandSupported&&document.queryCommandSupported("copy")){c.focus();try{return document.execCommand("copy")}catch(t){return console.warn("Copy to clipboard failed.",t),prompt("Copy to clipboard: Ctrl+C, Enter",e)}}}function w(e){_("name").innerHTML=e;fetch(e).then((t=>t.ok?(console.log("OK "+e),t.text()):t.text().then((e=>{throw console.log("ERROR "+url),new Error(e)})))).then((e=>{try{var t=JSON.parse(e);c.setValue(JSON.stringify(t,null,4)),console.log("parse json OK")}catch(t){c.setValue(e),console.log("parse json FAIL")}null!==_("editor")&&(_("editor").style.display="block"),null!==_("preview")&&(_("preview").style.display="none"),g=!0,c.setReadOnly(!1),c.focus(),y()})).catch((e=>{console.log(e),alert(e),c.setReadOnly(!0)})).finally((()=>{c.resize(!0),c.scrollToLine(1,!0,!0,(function(){})),c.gotoLine(1,0,!0),c.clearSelection(),c.session.getUndoManager().reset()}))}return["Courier New","Monaco","Lucida Console","Monospace","ui-monospace","Roboto Mono","Inconsolata","IBM Plex Mono","Space Mono","PT Mono","Ubuntu Mono","Nanum Gothic Coding","Cousine","Fira Mono","Share Tech Mono","Courier Prime","Anonymous Pro","Cutive Mono","Overpass Mono","Fira Code","VT323","DM Mono","Oxygen Mono","Nova Mono","B612 Mono","Spline Sans Mono","Noto Sans Mono","Major Mono Display","Azeret Mono","Red Hat Mono","Syne Mono","Xanh Mono"].sort().forEach((function(e,t){if(doesFontExist(e)){var n=document.createElement("option");n.text=e,p.add(n)}})),null!==s&&null!==l&&null!==r&&c.on("input",y),c.session.selection.on("changeCursor",h),s.onclick=v,l.onclick=e=>{c.undo()&&c.focus()},r.onclick=e=>{c.redo()&&c.focus()},d.onclick=e=>{x()&&c.execCommand("cut")},m.onclick=e=>{x()&&c.execCommand("copy")},u.onclick=function(){try{navigator.clipboard.readText().then((e=>{c.execCommand("paste",e)})).catch((e=>{u.disabled=!0}))}catch{u.disabled=!0}},c.loadUrl=(e,o)=>{n=i(t=e+o),a="text/"+n,"plain"!==n&&c.getSession().setMode("ace/mode/"+n),w(e+o)},c.hide=()=>{g=!1,y(),h(),_("editor").style.display="none"},"plain"!==n&&c.getSession().setMode("ace/mode/"+n),c.setTheme("ace/theme/"+o),c.$blockScrolling=1/0,c.commands.addCommand({name:"save",bindKey:{win:"Ctrl-S",mac:"Command-S"},exec:v,readOnly:!1}),c.commands.addCommand({name:"undo",bindKey:{win:"Ctrl-Z",mac:"Command-Z"},exec:function(){c.undo()}}),c.commands.addCommand({name:"redo",bindKey:{win:"Ctrl-Y",mac:"Command-Y"},exec:function(){c.redo()}}),void 0!==t&&w(t),c.resize(),c}function uploadFileAsync(e,t,n,o,a,i){fetchData("/edit","POST",e).then((e=>{generateToast({message:"Upload "+n+"/"+o+" "+t+" done.",background:"#ddd",color:"#000"}),n==o&&listFiles(a,i)}))}function doUpload(e,t){const n=_("upload"),o=n.files.length;if(0!==o)for(let a=0;a=0}function isText(e){if(isFolder(e))return!1;var t=/(?:\.([^.]+))?$/.exec(e.name)[1];if(void 0!==typeof t)switch(t){case"txt":case"cmd":case"json":case"jsonl":case"htm":case"html":case"js":case"c":case"cpp":case"css":case"svg":case"xml":return!0}return!1}function isImage(e){if(isFolder(e))return!1;var t=/(?:\.([^.]+))?$/.exec(e.name)[1];if(void 0!==typeof t)switch(t){case"bmp":case"png":case"jpg":case"gif":case"svg":return!0}return!1}function isAudio(e){if(isFolder(e))return!1;var t=/(?:\.([^.]+))?$/.exec(e.name)[1];if(void 0!==typeof t)switch(t){case"wav":case"mp3":case"aac":case"m4a":case"wma":return!0}return!1}function icon(e){if(isFolder(e))return"dir";if(isImage(e))return"image";if(isAudio(e))return"audio";var t=/(?:\.([^.]+))?$/.exec(e.name)[1];if(void 0!==typeof t)switch(t){case"cmd":case"css":case"json":case"jsonl":case"ttf":return t;case"zip":case"gz":return"zip";case"html":case"htm":return"html"}return"file"}function preview(e,t){if(isImage(e)){let n=t+e.name;const o=_("preview");o.innerHTML=' ',o.style.display="block",ace.edit("editor").hide(),_("name").innerHTML=n}}function edit(e,t){isText(e)&&(ace.edit("editor").loadUrl(t,e.name),_("preview").style.display="none")}function url(e,t){console.log("click "+t+e.name),isImage(e)?preview(e,t):isText(e)&&edit(e,t)}async function fetchData(e,t,n,o){await fetch(e,{method:t,body:n}).then((n=>n.ok?(console.log(t+" OK "+e),n.text()):n.text().then((n=>{throw console.log(t+" FAIL "+e),new Error(n)})))).then((e=>{o&&o.remove(),console.log(e)})).catch((e=>{console.warn("AbortError"===e.name?"Promise Aborted":"Promise Rejected"),alert(e)})).finally((()=>{}))}function download(e,t){console.log("download "+t+e.name),document.getElementById("download-frame").src=t+e.name+"?download=true"}function remove(e,t,n){let o=t+e.name;isFolder(e)&&(o+="/"),console.log("remove "+o);const a=new FormData;a.append("path",o),fetchData("/edit","DELETE",a,n)}function create(e,t,n){var o=window.prompt("Create File in "+e,"");if(null==o||""==o||o.includes("/"))return;const a=new FormData;a.append("path",e+o),fetchData("/edit","PUT",a),fetch("/api/files/").then((e=>e.json())).then((o=>{t&&t.remove(),listFiles(n,e),console.log(o)}))}function upload(e,t){_("upload").onchange=()=>{doUpload(e,t)},_("upload").click()}function ctx(e,t,n,o){e.preventDefault(),ctx_el=o;let a,i=isFolder(t),c=_("ctx");c.style.display="block",a=c.getElementsByTagName("li")[0],a.onclick=i?function(){hidectx(),create(n+t.name+"/",o.children.item(1),o)}:function(){hidectx(),create(n,o.parentNode,o.parentNode.parentNode)},a.style.display=i?"block":"none",a=c.getElementsByTagName("li")[1],i&&(a.onclick=function(){hidectx(),upload(o,n+t.name+"/")}),a.style.display=i?"block":"none",a=c.getElementsByTagName("li")[2],a.onclick=function(){edit(t,n),hidectx()},a.style.display=isText(t)?"block":"none",a=c.getElementsByTagName("li")[3],a.onclick=function(){preview(t,n),hidectx()},a.style.display=isImage(t)?"block":"none",a=c.getElementsByTagName("li")[4],a.onclick=function(){download(t,n),hidectx()},a.style.display=i?"none":"block",a=c.getElementsByTagName("li")[5],a.onclick=function(){remove(t,n,o),hidectx()},a.style.display=n?"block":"none";var s=document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop,l=document.body.scrollLeft?document.body.scrollLeft:document.documentElement.scrollLeft,r=e.clientX+l+10,d=e.clientY+s-20,m=(c.offsetWidth,c.offsetHeight),u=document.documentElement.clientHeight;d+m>u&&(d=u-m-20),c.style.left=r+"px",c.style.top=d+"px",o&&o.classList.add("selitem")}function drag(e,t,n){let o=n+t.name;isFolder(t)&&(o+="/"),e.dataTransfer.setData("text",o),console.log("drag start "+o)}function drop(e,t){let n=e.dataTransfer.getData("text");n.startsWith(t)||(e.preventDefault(),console.log("Move "+n+" to "+t))}function listFiles(e,t){return console.log("listFiles"),fetch("/api/files/?dir="+t).then((e=>e.json())).then((n=>{if(0==n.length)return!1;let o=e.getElementsByTagName("div")[0];o&&(o.onclick=n=>{i.remove(),o.onclick=()=>{listFiles(e,t)},n.stopPropagation()});let a=e.getElementsByTagName("ul");for(let e=0;e{drag(event,e,t)},a.appendChild(s),s.innerHTML=''+o+" ",isFolder(e)){let n=t+e.name+"/";s.classList.add("bold"),s.onclick=function(e){listFiles(a,n)},s.ondragover=e=>{e.preventDefault()},s.ondrop=e=>{drop(e,n)}}else(isText(e)||isImage(e)||isAudio(e))&&(s.onclick=function(n){url(e,t)});s.oncontextmenu=n=>{ctx(n,e,t,a)}}return e.scrollIntoView(),!0}))}function generateToast({message:e,background:t="#00214d",color:n="#fffffe",length:o="7000ms"}){_("toast").insertAdjacentHTML("afterbegin",`\n ${e}\n
`);const a=_("toast").firstElementChild;a.addEventListener("animationend",(()=>a.remove()))}document.addEventListener("blur",(function(){hidectx()})),document.addEventListener("DOMContentLoaded",(function(){createEditor("editor",void 0,void 0,void 0);listFiles(_("tree"),"/"),_("tree").getElementsByTagName("div")[0].oncontextmenu=e=>{ctx(e,{name:"",children:[]},"",_("tree"))},_("load").onclick=function(e){const t=new FormData;t.append("load",""),fetchData("/edit","PUT",t)},_("init").onclick=function(e){const t=new FormData;t.append("init",""),fetchData("/edit","PUT",t)},_("home").onclick=function(e){window.location.href="/"},_("page").onchange=function(e){const t=new FormData;t.append("page",_("page").value),fetchData("/edit","PUT",t)}})),document.addEventListener("DOMContentLoaded",(function(){const e=document.getElementById("dragMe"),t=e.previousElementSibling,n=e.nextElementSibling;let o=0,a=0,i=0;const c=function(a){const c=a.clientX-o,s=(a.clientY,100*(i+c)/e.parentNode.getBoundingClientRect().width);t.style.width=`${s}%`,t.style.right=t.style.width,e.style.cursor="col-resize",document.body.style.cursor="col-resize",t.style.userSelect="none",t.style.pointerEvents="none",n.style.userSelect="none",n.style.pointerEvents="none",ace.edit("editor").resize()},s=function(){e.style.removeProperty("cursor"),document.body.style.removeProperty("cursor"),t.style.removeProperty("user-select"),t.style.removeProperty("pointer-events"),n.style.removeProperty("user-select"),n.style.removeProperty("pointer-events"),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",s)};e.addEventListener("mousedown",(function(e){o=e.clientX,a=e.clientY,i=t.getBoundingClientRect().width,document.addEventListener("mousemove",c),document.addEventListener("mouseup",s)})),e.addEventListener("dblclick",(()=>{var e=t.style.visibility="hidden"===t.style.visibility;t.style.visibility=e?"unset":"hidden",t.style.position=e?"unset":"absolute",ace.edit("editor").resize()}))}));
\ No newline at end of file
+var ctx_el;function _(e){return document.getElementById(e)}function hidectx(){_("ctx").style.display="none",ctx_el&&ctx_el.classList.remove("selitem"),ctx_el=void 0}function doesFontExist(e){var t=document.createElement("canvas"),n=t.getContext("2d"),o="abcdefghijklmnopqrstuvwxyz0123456789";n.font="72px monospace";var a=n.measureText(o).width;return n.font="72px '"+e+"', monospace",t=null,n.measureText(o).width!=a}function createEditor(e,t,n,o,a){function i(e){let t=/(?:\.([^.]+))?$/.exec(e)[1];if(void 0!==typeof t)switch(t){case"htm":case"html":return"html";case"js":return"javascript";case"cmd":case"json":case"jsonl":return"json";case"css":case"svg":case"xml":return t}return"plain_text"}void 0===n&&(n=i(t)),void 0===a&&(a="text/"+n);["basePath","modePath","themePath"].forEach((e=>{ace.config.set(e,"https://cdnjs.cloudflare.com/ajax/libs/ace/1.32.5")}));var c=ace.edit(e,{useWorker:!1,wrap:!0,indentedSoftWrap:!1,showPrintMargin:!1,highlightGutterLine:!0,useSoftTabs:!0,tabSize:2});c.setFontSize(parseFloat(getComputedStyle(document.documentElement).fontSize)),c.setReadOnly(!0),c.getSession().setUndoManager(new ace.UndoManager),void 0===o&&(o=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"monokai":"textmate");var s=_("save"),l=_("undo"),r=_("redo"),d=_("cut"),m=_("copy"),u=_("paste"),p=_("font"),f=_("fontsize"),g="none"!==_(e).display;f.value=parseFloat(c.getFontSize()).toFixed(1),p.onchange=function(){c.setOption("fontFamily","'"+p.value+"',monospace")},f.onchange=function(){var e=parseFloat(f.value);!isNaN(e)&&e>=9&&e<=40&&c.setFontSize(e),f.value=parseFloat(c.getFontSize()).toFixed(1)};function h(){let e=!g||c.session.getSelection().isEmpty();d.disabled=e,m.disabled=e}function y(){let e=c.session.getUndoManager();s.disabled=!g||e.isClean(),l.disabled=!g||!e.hasUndo(),r.disabled=!g||!e.hasRedo()}function v(){if(void 0===t)return;const e=function(e){var t=e.getValue();try{var n=JSON.parse(t);return JSON.stringify(n)}catch(e){return t+""}}(c),n=new FormData;n.append("data",new Blob([e],{type:a}),t),fetch("/edit",{method:"POST",body:n}).then((e=>e.ok?e.text().then((e=>{console.log("Save OK /edit "+e)})):e.text().then((e=>{throw console.log("Save FAIL /edit"),new Error(e)})))).then((e=>{console.log(e),generateToast({message:"Saved "+t,background:"#ddd",color:"#000"})})).catch((e=>{console.warn("AbortError"===e.name?"Promise Aborted":"Promise Rejected"),alert(e)})).finally((()=>{y()}))}function x(){var e=c.getCopyText();if(window.clipboardData&&window.clipboardData.setData)return window.clipboardData.setData("Text",e);if(document.queryCommandSupported&&document.queryCommandSupported("copy")){c.focus();try{return document.execCommand("copy")}catch(t){return console.warn("Copy to clipboard failed.",t),prompt("Copy to clipboard: Ctrl+C, Enter",e)}}}function w(e){_("name").innerHTML=e;fetch(e).then((t=>t.ok?(console.log("OK "+e),t.text()):t.text().then((e=>{throw console.log("ERROR "+url),new Error(e)})))).then((e=>{try{var t=JSON.parse(e);c.setValue(JSON.stringify(t,null,4)),console.log("parse json OK")}catch(t){c.setValue(e),console.log("parse json FAIL")}null!==_("editor")&&(_("editor").style.display="block"),null!==_("preview")&&(_("preview").style.display="none"),g=!0,c.setReadOnly(!1),c.focus(),y()})).catch((e=>{console.log(e),alert(e),c.setReadOnly(!0)})).finally((()=>{c.resize(!0),c.scrollToLine(1,!0,!0,(function(){})),c.gotoLine(1,0,!0),c.clearSelection(),c.session.getUndoManager().reset()}))}return["Courier New","Monaco","Lucida Console","Monospace","ui-monospace","Roboto Mono","Inconsolata","IBM Plex Mono","Space Mono","PT Mono","Ubuntu Mono","Nanum Gothic Coding","Cousine","Fira Mono","Share Tech Mono","Courier Prime","Anonymous Pro","Cutive Mono","Overpass Mono","Fira Code","VT323","DM Mono","Oxygen Mono","Nova Mono","B612 Mono","Spline Sans Mono","Noto Sans Mono","Major Mono Display","Azeret Mono","Red Hat Mono","Syne Mono","Xanh Mono"].sort().forEach((function(e,t){if(doesFontExist(e)){var n=document.createElement("option");n.text=e,p.add(n)}})),null!==s&&null!==l&&null!==r&&c.on("input",y),c.session.selection.on("changeCursor",h),s.onclick=v,l.onclick=e=>{c.undo()&&c.focus()},r.onclick=e=>{c.redo()&&c.focus()},d.onclick=e=>{x()&&c.execCommand("cut")},m.onclick=e=>{x()&&c.execCommand("copy")},u.onclick=function(){try{navigator.clipboard.readText().then((e=>{c.execCommand("paste",e)})).catch((e=>{u.disabled=!0}))}catch{u.disabled=!0}},c.loadUrl=(e,o)=>{n=i(t=e+o),a="text/"+n,"plain"!==n&&c.getSession().setMode("ace/mode/"+n),w(e+o)},c.hide=()=>{g=!1,y(),h(),_("editor").style.display="none"},"plain"!==n&&c.getSession().setMode("ace/mode/"+n),c.setTheme("ace/theme/"+o),c.$blockScrolling=1/0,c.commands.addCommand({name:"save",bindKey:{win:"Ctrl-S",mac:"Command-S"},exec:v,readOnly:!1}),c.commands.addCommand({name:"undo",bindKey:{win:"Ctrl-Z",mac:"Command-Z"},exec:function(){c.undo()}}),c.commands.addCommand({name:"redo",bindKey:{win:"Ctrl-Y",mac:"Command-Y"},exec:function(){c.redo()}}),void 0!==t&&w(t),c.resize(),c}function uploadFileAsync(e,t,n,o,a,i){fetchData("/edit","POST",e).then((e=>{generateToast({message:"Upload "+n+"/"+o+" "+t+" done.",background:"#ddd",color:"#000"}),n==o&&listFiles(a,i)}))}function doUpload(e,t){const n=_("upload"),o=n.files.length;if(0!==o)for(let a=0;a=0}function isText(e){if(isFolder(e))return!1;var t=/(?:\.([^.]+))?$/.exec(e.name)[1];if(void 0!==typeof t)switch(t){case"txt":case"cmd":case"json":case"jsonl":case"htm":case"html":case"js":case"c":case"cpp":case"css":case"svg":case"xml":return!0}return!1}function isImage(e){if(isFolder(e))return!1;var t=/(?:\.([^.]+))?$/.exec(e.name)[1];if(void 0!==typeof t)switch(t){case"bmp":case"png":case"jpg":case"gif":case"svg":return!0}return!1}function isAudio(e){if(isFolder(e))return!1;var t=/(?:\.([^.]+))?$/.exec(e.name)[1];if(void 0!==typeof t)switch(t){case"wav":case"mp3":case"aac":case"m4a":case"wma":return!0}return!1}function icon(e){if(isFolder(e))return"dir";if(isImage(e))return"image";if(isAudio(e))return"audio";var t=/(?:\.([^.]+))?$/.exec(e.name)[1];if(void 0!==typeof t)switch(t){case"cmd":case"css":case"json":case"jsonl":case"ttf":return t;case"zip":case"gz":return"zip";case"html":case"htm":return"html"}return"file"}function preview(e,t){if(isImage(e)){let n=t+e.name;const o=_("preview");o.innerHTML=' ',o.style.display="block",ace.edit("editor").hide(),_("name").innerHTML=n}}function edit(e,t){isText(e)&&(ace.edit("editor").loadUrl(t,e.name),_("preview").style.display="none")}function url(e,t){console.log("click "+t+e.name),isImage(e)?preview(e,t):isText(e)&&edit(e,t)}async function fetchData(e,t,n,o){await fetch(e,{method:t,body:n}).then((n=>n.ok?(console.log(t+" OK "+e),n.text()):n.text().then((n=>{throw console.log(t+" FAIL "+e),new Error(n)})))).then((e=>{o&&o.remove(),console.log(e)})).catch((e=>{console.warn("AbortError"===e.name?"Promise Aborted":"Promise Rejected"),alert(e)})).finally((()=>{}))}function download(e,t){console.log("download "+t+e.name),document.getElementById("download-frame").src=t+e.name+"?download=true"}function remove(e,t,n){let o=t+e.name;isFolder(e)&&(o+="/"),console.log("remove "+o);const a=new FormData;a.append("path",o),fetchData("/edit","DELETE",a,n)}function create(e,t,n){var o=window.prompt("Create File in "+e,"");if(null==o||""==o||o.includes("/"))return;const a=new FormData;a.append("path",e+o),fetchData("/edit","PUT",a),fetch("/api/files/").then((e=>e.json())).then((o=>{t&&t.remove(),listFiles(n,e),console.log(o)}))}function upload(e,t){_("upload").onchange=()=>{doUpload(e,t)},_("upload").click()}function ctx(e,t,n,o){e.preventDefault(),ctx_el=o;let a,i=isFolder(t),c=_("ctx");c.style.display="block",a=c.getElementsByTagName("li")[0],a.onclick=i?function(){hidectx(),create(n+t.name+"/",o.children.item(1),o)}:function(){hidectx(),create(n,o.parentNode,o.parentNode.parentNode)},a.style.display=i?"block":"none",a=c.getElementsByTagName("li")[1],i&&(a.onclick=function(){hidectx(),upload(o,n+t.name+"/")}),a.style.display=i?"block":"none",a=c.getElementsByTagName("li")[2],a.onclick=function(){edit(t,n),hidectx()},a.style.display=isText(t)?"block":"none",a=c.getElementsByTagName("li")[3],a.onclick=function(){preview(t,n),hidectx()},a.style.display=isImage(t)?"block":"none",a=c.getElementsByTagName("li")[4],a.onclick=function(){download(t,n),hidectx()},a.style.display=i?"none":"block",a=c.getElementsByTagName("li")[5],a.onclick=function(){remove(t,n,o),hidectx()},a.style.display=n?"block":"none";var s=document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop,l=document.body.scrollLeft?document.body.scrollLeft:document.documentElement.scrollLeft,r=e.clientX+l+10,d=e.clientY+s-20,m=(c.offsetWidth,c.offsetHeight),u=document.documentElement.clientHeight;d+m>u&&(d=u-m-20),c.style.left=r+"px",c.style.top=d+"px",o&&o.classList.add("selitem")}function drag(e,t,n){let o=n+t.name;isFolder(t)&&(o+="/"),e.dataTransfer.setData("text",o),console.log("drag start "+o)}function drop(e,t){let n=e.dataTransfer.getData("text");n.startsWith(t)||(e.preventDefault(),console.log("Move "+n+" to "+t))}function listFiles(e,t){return console.log("listFiles"),fetch("/api/files/?dir="+t).then((e=>e.json())).then((n=>{if(0==n.length)return!1;let o=e.getElementsByTagName("div")[0];o&&(o.onclick=n=>{i.remove(),o.onclick=()=>{listFiles(e,t)},n.stopPropagation()});let a=e.getElementsByTagName("ul");for(let e=0;e{drag(event,e,t)},a.appendChild(s),s.innerHTML=''+o+" ",isFolder(e)){let n=t+e.name+"/";s.classList.add("bold"),s.onclick=function(e){listFiles(a,n)},s.ondragover=e=>{e.preventDefault()},s.ondrop=e=>{drop(e,n)}}else(isText(e)||isImage(e)||isAudio(e))&&(s.onclick=function(n){url(e,t)});s.oncontextmenu=n=>{ctx(n,e,t,a)}}return e.scrollIntoView(),!0}))}function generateToast({message:e,background:t="#00214d",color:n="#fffffe",length:o="7000ms"}){_("toast").insertAdjacentHTML("afterbegin",`\n ${e}\n
`);const a=_("toast").firstElementChild;a.addEventListener("animationend",(()=>a.remove()))}document.addEventListener("blur",(function(){hidectx()})),document.addEventListener("DOMContentLoaded",(function(){createEditor("editor",void 0,void 0,void 0);listFiles(_("tree"),"/"),_("tree").getElementsByTagName("div")[0].oncontextmenu=e=>{ctx(e,{name:"",children:[]},"",_("tree"))},_("load").onclick=function(e){const t=new FormData;t.append("load",""),fetchData("/edit","PUT",t)},_("init").onclick=function(e){const t=new FormData;t.append("init",""),fetchData("/edit","PUT",t)},_("home").onclick=function(e){window.location.href="/"},_("page").onchange=function(e){const t=new FormData;t.append("page",_("page").value),fetchData("/edit","PUT",t)}})),document.addEventListener("DOMContentLoaded",(function(){const e=document.getElementById("dragMe"),t=e.previousElementSibling,n=e.nextElementSibling;let o=0,a=0,i=0;const c=function(a){const c=a.clientX-o,s=(a.clientY,100*(i+c)/e.parentNode.getBoundingClientRect().width);t.style.width=`${s}%`,t.style.right=t.style.width,e.style.cursor="col-resize",document.body.style.cursor="col-resize",t.style.userSelect="none",t.style.pointerEvents="none",n.style.userSelect="none",n.style.pointerEvents="none",ace.edit("editor").resize()},s=function(){e.style.removeProperty("cursor"),document.body.style.removeProperty("cursor"),t.style.removeProperty("user-select"),t.style.removeProperty("pointer-events"),n.style.removeProperty("user-select"),n.style.removeProperty("pointer-events"),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",s)};e.addEventListener("mousedown",(function(e){o=e.clientX,a=e.clientY,i=t.getBoundingClientRect().width,document.addEventListener("mousemove",c),document.addEventListener("mouseup",s)})),e.addEventListener("dblclick",(()=>{var e=t.style.visibility="hidden"===t.style.visibility;t.style.visibility=e?"unset":"hidden",t.style.position=e?"unset":"absolute",ace.edit("editor").resize()}))}));
\ No newline at end of file
From 1364795f98c5e64e5958728df2b3e2d727da779b Mon Sep 17 00:00:00 2001
From: fvanroie
Date: Mon, 5 Feb 2024 19:15:22 +0100
Subject: [PATCH 03/20] Downgrade to Tasmota core 2023.10.02
---
user_setups/esp32s2/_esp32s2.ini | 3 ++-
user_setups/esp32s3/_esp32s3.ini | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/user_setups/esp32s2/_esp32s2.ini b/user_setups/esp32s2/_esp32s2.ini
index f21817b8..88bcf8a7 100644
--- a/user_setups/esp32s2/_esp32s2.ini
+++ b/user_setups/esp32s2/_esp32s2.ini
@@ -83,7 +83,8 @@ platform = https://github.com/tasmota/platform-espressif32/releases/download/202
[arduino_esp32s2-solo_v2]
framework = arduino
; platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.01.01/platform-espressif32.zip
-platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.10.03/platform-espressif32.zip
+; platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.10.03/platform-espressif32.zip
+platform = https://github.com/Jason2866/platform-espressif32/releases/download/2023.10.02/platform-espressif32-2023.10.02.zip
board_build.embed_files = ${esp32.board_build.embed_files}
board_build.filesystem = littlefs
; ----- crash reporter
diff --git a/user_setups/esp32s3/_esp32s3.ini b/user_setups/esp32s3/_esp32s3.ini
index 198975ba..13f7a122 100644
--- a/user_setups/esp32s3/_esp32s3.ini
+++ b/user_setups/esp32s3/_esp32s3.ini
@@ -17,4 +17,5 @@ extends = esp32s3
framework = arduino
; platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.05.01/platform-espressif32.zip
; platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.08.01/platform-espressif32.zip
-platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.10.03/platform-espressif32.zip
+; platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.10.03/platform-espressif32.zip
+platform = https://github.com/Jason2866/platform-espressif32/releases/download/2023.10.02/platform-espressif32-2023.10.02.zip
\ No newline at end of file
From b1716fbca1e4d7d8c84e80fb958506fee0f7dc69 Mon Sep 17 00:00:00 2001
From: fvanroie
Date: Tue, 6 Feb 2024 02:34:26 +0100
Subject: [PATCH 04/20] Prevent concurrently running scripts
---
src/hasp/hasp_dispatch.cpp | 63 +++++++++++++++++++++++++++++++++++---
src/hasp/hasp_dispatch.h | 9 ++++++
2 files changed, 68 insertions(+), 4 deletions(-)
diff --git a/src/hasp/hasp_dispatch.cpp b/src/hasp/hasp_dispatch.cpp
index f478fa62..2dacba77 100644
--- a/src/hasp/hasp_dispatch.cpp
+++ b/src/hasp/hasp_dispatch.cpp
@@ -269,6 +269,42 @@ static void dispatch_output(const char* topic, const char* payload)
#endif
}
+// static inline size_t dispatch_msg_length(size_t len)
+// {
+// return (len / 64) * 64 + 64;
+// }
+
+// void dispatch_enqueue_message(const char* topic, const char* payload, size_t payload_len, uint8_t source)
+// {
+// // Add new message to the queue
+// dispatch_message_t data;
+
+// size_t topic_len = strlen(topic);
+// data.topic = (char*)hasp_calloc(sizeof(char), dispatch_msg_length(topic_len + 1));
+// data.payload = (char*)hasp_calloc(sizeof(char), dispatch_msg_length(payload_len + 1));
+// data.source = source;
+
+// if(!data.topic || !data.payload) {
+// LOG_ERROR(TAG_MQTT_RCV, D_ERROR_OUT_OF_MEMORY);
+// hasp_free(data.topic);
+// hasp_free(data.payload);
+// return;
+// }
+// memcpy(data.topic, topic, topic_len);
+// memcpy(data.payload, payload, payload_len);
+
+// {
+// size_t attempt = 0;
+// while(xQueueSend(message_queue, &data, (TickType_t)0) == errQUEUE_FULL && attempt < 100) {
+// delay(5);
+// attempt++;
+// };
+// if(attempt >= 100) {
+// LOG_ERROR(TAG_MSGR, D_ERROR_OUT_OF_MEMORY);
+// }
+// }
+// }
+
// objectattribute=value
static void dispatch_command(const char* topic, const char* payload, bool update, uint8_t source)
{
@@ -765,6 +801,11 @@ void dispatch_run_script(const char*, const char* payload, uint8_t source)
return;
}
+ if(!gui_acquire(pdMS_TO_TICKS(500))) {
+ LOG_ERROR(TAG_MSGR, F(D_FILE_LOAD_FAILED), payload);
+ return;
+ }
+
// char buffer[512]; // use stack
String buffer((char*)0); // use heap
buffer.reserve(512);
@@ -788,6 +829,7 @@ void dispatch_run_script(const char*, const char* payload, uint8_t source)
}
}
+ gui_release();
cmdfile.close();
LOG_INFO(TAG_MSGR, F(D_FILE_LOADED), payload);
#else
@@ -1321,8 +1363,8 @@ void dispatch_current_state(uint8_t source)
bool dispatch_factory_reset()
{
bool formatted = true;
- bool erased = true;
- bool cleared = true;
+ bool erased = true;
+ bool cleared = true;
#if ESP32
erased = nvs_clear_user_config();
@@ -1519,7 +1561,20 @@ void dispatchSetup()
}
IRAM_ATTR void dispatchLoop()
-{}
+{
+ // UBaseType_t msg_count = uxQueueMessagesWaiting(message_queue));
+ // if(msg_count == 0) return;
+
+ // dispatch_message_t data;
+ // while(xQueueReceive(message_queue, &data, (TickType_t)0)) {
+ // LOG_WARNING(TAG_MSGR, F("[%d] QUE %s => %s"), msg_count, data.topic, data.payload);
+ // size_t length = strlen(data.payload);
+ // dispatch_topic_payload(data.topic, data.payload, length > 0, data.source);
+ // hasp_free(data.topic);
+ // hasp_free(data.payload);
+ // // delay(1);
+ // }
+}
#if 1 || ARDUINO
void dispatchEverySecond()
@@ -1551,7 +1606,7 @@ void everySecond()
{
if(dispatch_setings.teleperiod > 0) {
std::chrono::steady_clock::time_point end = std::chrono::steady_clock::now();
- std::chrono::seconds elapsed = std::chrono::duration_cast(end - begin);
+ std::chrono::seconds elapsed = std::chrono::duration_cast(end - begin);
if(elapsed.count() >= dispatch_setings.teleperiod) {
std::chrono::steady_clock::time_point begin = std::chrono::steady_clock::now();
diff --git a/src/hasp/hasp_dispatch.h b/src/hasp/hasp_dispatch.h
index 245da30c..13967871 100644
--- a/src/hasp/hasp_dispatch.h
+++ b/src/hasp/hasp_dispatch.h
@@ -5,6 +5,15 @@
#define HASP_DISPATCH_H
#include "hasplib.h"
+// #include "freertos/queue.h"
+
+// QueueHandle_t message_queue;
+// typedef struct
+// {
+// char* topic; //[64];
+// char* payload; //[512];
+// uint source;
+// } dispatch_message_t;
struct dispatch_conf_t
{
From 62f567773dca1c53c1dc5453c0878a2ac2574cbe Mon Sep 17 00:00:00 2001
From: fvanroie
Date: Wed, 7 Feb 2024 14:28:14 +0100
Subject: [PATCH 05/20] Disable fade #626
---
src/dev/esp32/esp32.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/dev/esp32/esp32.cpp b/src/dev/esp32/esp32.cpp
index 049f3c1b..7e20d8ba 100644
--- a/src/dev/esp32/esp32.cpp
+++ b/src/dev/esp32/esp32.cpp
@@ -275,7 +275,8 @@ bool Esp32Device::get_backlight_invert()
void Esp32Device::set_backlight_level(uint8_t level)
{
_backlight_level = level;
- update_backlight(true);
+ // update_backlight(true);
+ update_backlight(false);
}
uint8_t Esp32Device::get_backlight_level()
@@ -286,7 +287,8 @@ uint8_t Esp32Device::get_backlight_level()
void Esp32Device::set_backlight_power(bool power)
{
_backlight_power = power;
- update_backlight(true);
+ // update_backlight(true);
+ update_backlight(false);
}
bool Esp32Device::get_backlight_power()
From b9a435f0a460943f50162c4d2e6b8ef9d9d97a61 Mon Sep 17 00:00:00 2001
From: fvanroie
Date: Wed, 7 Feb 2024 14:29:13 +0100
Subject: [PATCH 06/20] Update to ace?js 1.32.6
---
data/edit.htm | 2 +-
data/script.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/data/edit.htm b/data/edit.htm
index 4a38aacd..ea1228a3 100644
--- a/data/edit.htm
+++ b/data/edit.htm
@@ -1 +1 @@
-openHASP File Editor
New File Upload Files Edit Preview Download Delete
\ No newline at end of file
+openHASP File Editor
New File Upload Files Edit Preview Download Delete
\ No newline at end of file
diff --git a/data/script.js b/data/script.js
index 32b4159e..baca1bb2 100644
--- a/data/script.js
+++ b/data/script.js
@@ -1 +1 @@
-var ctx_el;function _(e){return document.getElementById(e)}function hidectx(){_("ctx").style.display="none",ctx_el&&ctx_el.classList.remove("selitem"),ctx_el=void 0}function doesFontExist(e){var t=document.createElement("canvas"),n=t.getContext("2d"),o="abcdefghijklmnopqrstuvwxyz0123456789";n.font="72px monospace";var a=n.measureText(o).width;return n.font="72px '"+e+"', monospace",t=null,n.measureText(o).width!=a}function createEditor(e,t,n,o,a){function i(e){let t=/(?:\.([^.]+))?$/.exec(e)[1];if(void 0!==typeof t)switch(t){case"htm":case"html":return"html";case"js":return"javascript";case"cmd":case"json":case"jsonl":return"json";case"css":case"svg":case"xml":return t}return"plain_text"}void 0===n&&(n=i(t)),void 0===a&&(a="text/"+n);["basePath","modePath","themePath"].forEach((e=>{ace.config.set(e,"https://cdnjs.cloudflare.com/ajax/libs/ace/1.32.5")}));var c=ace.edit(e,{useWorker:!1,wrap:!0,indentedSoftWrap:!1,showPrintMargin:!1,highlightGutterLine:!0,useSoftTabs:!0,tabSize:2});c.setFontSize(parseFloat(getComputedStyle(document.documentElement).fontSize)),c.setReadOnly(!0),c.getSession().setUndoManager(new ace.UndoManager),void 0===o&&(o=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"monokai":"textmate");var s=_("save"),l=_("undo"),r=_("redo"),d=_("cut"),m=_("copy"),u=_("paste"),p=_("font"),f=_("fontsize"),g="none"!==_(e).display;f.value=parseFloat(c.getFontSize()).toFixed(1),p.onchange=function(){c.setOption("fontFamily","'"+p.value+"',monospace")},f.onchange=function(){var e=parseFloat(f.value);!isNaN(e)&&e>=9&&e<=40&&c.setFontSize(e),f.value=parseFloat(c.getFontSize()).toFixed(1)};function h(){let e=!g||c.session.getSelection().isEmpty();d.disabled=e,m.disabled=e}function y(){let e=c.session.getUndoManager();s.disabled=!g||e.isClean(),l.disabled=!g||!e.hasUndo(),r.disabled=!g||!e.hasRedo()}function v(){if(void 0===t)return;const e=function(e){var t=e.getValue();try{var n=JSON.parse(t);return JSON.stringify(n)}catch(e){return t+""}}(c),n=new FormData;n.append("data",new Blob([e],{type:a}),t),fetch("/edit",{method:"POST",body:n}).then((e=>e.ok?e.text().then((e=>{console.log("Save OK /edit "+e)})):e.text().then((e=>{throw console.log("Save FAIL /edit"),new Error(e)})))).then((e=>{console.log(e),generateToast({message:"Saved "+t,background:"#ddd",color:"#000"})})).catch((e=>{console.warn("AbortError"===e.name?"Promise Aborted":"Promise Rejected"),alert(e)})).finally((()=>{y()}))}function x(){var e=c.getCopyText();if(window.clipboardData&&window.clipboardData.setData)return window.clipboardData.setData("Text",e);if(document.queryCommandSupported&&document.queryCommandSupported("copy")){c.focus();try{return document.execCommand("copy")}catch(t){return console.warn("Copy to clipboard failed.",t),prompt("Copy to clipboard: Ctrl+C, Enter",e)}}}function w(e){_("name").innerHTML=e;fetch(e).then((t=>t.ok?(console.log("OK "+e),t.text()):t.text().then((e=>{throw console.log("ERROR "+url),new Error(e)})))).then((e=>{try{var t=JSON.parse(e);c.setValue(JSON.stringify(t,null,4)),console.log("parse json OK")}catch(t){c.setValue(e),console.log("parse json FAIL")}null!==_("editor")&&(_("editor").style.display="block"),null!==_("preview")&&(_("preview").style.display="none"),g=!0,c.setReadOnly(!1),c.focus(),y()})).catch((e=>{console.log(e),alert(e),c.setReadOnly(!0)})).finally((()=>{c.resize(!0),c.scrollToLine(1,!0,!0,(function(){})),c.gotoLine(1,0,!0),c.clearSelection(),c.session.getUndoManager().reset()}))}return["Courier New","Monaco","Lucida Console","Monospace","ui-monospace","Roboto Mono","Inconsolata","IBM Plex Mono","Space Mono","PT Mono","Ubuntu Mono","Nanum Gothic Coding","Cousine","Fira Mono","Share Tech Mono","Courier Prime","Anonymous Pro","Cutive Mono","Overpass Mono","Fira Code","VT323","DM Mono","Oxygen Mono","Nova Mono","B612 Mono","Spline Sans Mono","Noto Sans Mono","Major Mono Display","Azeret Mono","Red Hat Mono","Syne Mono","Xanh Mono"].sort().forEach((function(e,t){if(doesFontExist(e)){var n=document.createElement("option");n.text=e,p.add(n)}})),null!==s&&null!==l&&null!==r&&c.on("input",y),c.session.selection.on("changeCursor",h),s.onclick=v,l.onclick=e=>{c.undo()&&c.focus()},r.onclick=e=>{c.redo()&&c.focus()},d.onclick=e=>{x()&&c.execCommand("cut")},m.onclick=e=>{x()&&c.execCommand("copy")},u.onclick=function(){try{navigator.clipboard.readText().then((e=>{c.execCommand("paste",e)})).catch((e=>{u.disabled=!0}))}catch{u.disabled=!0}},c.loadUrl=(e,o)=>{n=i(t=e+o),a="text/"+n,"plain"!==n&&c.getSession().setMode("ace/mode/"+n),w(e+o)},c.hide=()=>{g=!1,y(),h(),_("editor").style.display="none"},"plain"!==n&&c.getSession().setMode("ace/mode/"+n),c.setTheme("ace/theme/"+o),c.$blockScrolling=1/0,c.commands.addCommand({name:"save",bindKey:{win:"Ctrl-S",mac:"Command-S"},exec:v,readOnly:!1}),c.commands.addCommand({name:"undo",bindKey:{win:"Ctrl-Z",mac:"Command-Z"},exec:function(){c.undo()}}),c.commands.addCommand({name:"redo",bindKey:{win:"Ctrl-Y",mac:"Command-Y"},exec:function(){c.redo()}}),void 0!==t&&w(t),c.resize(),c}function uploadFileAsync(e,t,n,o,a,i){fetchData("/edit","POST",e).then((e=>{generateToast({message:"Upload "+n+"/"+o+" "+t+" done.",background:"#ddd",color:"#000"}),n==o&&listFiles(a,i)}))}function doUpload(e,t){const n=_("upload"),o=n.files.length;if(0!==o)for(let a=0;a=0}function isText(e){if(isFolder(e))return!1;var t=/(?:\.([^.]+))?$/.exec(e.name)[1];if(void 0!==typeof t)switch(t){case"txt":case"cmd":case"json":case"jsonl":case"htm":case"html":case"js":case"c":case"cpp":case"css":case"svg":case"xml":return!0}return!1}function isImage(e){if(isFolder(e))return!1;var t=/(?:\.([^.]+))?$/.exec(e.name)[1];if(void 0!==typeof t)switch(t){case"bmp":case"png":case"jpg":case"gif":case"svg":return!0}return!1}function isAudio(e){if(isFolder(e))return!1;var t=/(?:\.([^.]+))?$/.exec(e.name)[1];if(void 0!==typeof t)switch(t){case"wav":case"mp3":case"aac":case"m4a":case"wma":return!0}return!1}function icon(e){if(isFolder(e))return"dir";if(isImage(e))return"image";if(isAudio(e))return"audio";var t=/(?:\.([^.]+))?$/.exec(e.name)[1];if(void 0!==typeof t)switch(t){case"cmd":case"css":case"json":case"jsonl":case"ttf":return t;case"zip":case"gz":return"zip";case"html":case"htm":return"html"}return"file"}function preview(e,t){if(isImage(e)){let n=t+e.name;const o=_("preview");o.innerHTML=' ',o.style.display="block",ace.edit("editor").hide(),_("name").innerHTML=n}}function edit(e,t){isText(e)&&(ace.edit("editor").loadUrl(t,e.name),_("preview").style.display="none")}function url(e,t){console.log("click "+t+e.name),isImage(e)?preview(e,t):isText(e)&&edit(e,t)}async function fetchData(e,t,n,o){await fetch(e,{method:t,body:n}).then((n=>n.ok?(console.log(t+" OK "+e),n.text()):n.text().then((n=>{throw console.log(t+" FAIL "+e),new Error(n)})))).then((e=>{o&&o.remove(),console.log(e)})).catch((e=>{console.warn("AbortError"===e.name?"Promise Aborted":"Promise Rejected"),alert(e)})).finally((()=>{}))}function download(e,t){console.log("download "+t+e.name),document.getElementById("download-frame").src=t+e.name+"?download=true"}function remove(e,t,n){let o=t+e.name;isFolder(e)&&(o+="/"),console.log("remove "+o);const a=new FormData;a.append("path",o),fetchData("/edit","DELETE",a,n)}function create(e,t,n){var o=window.prompt("Create File in "+e,"");if(null==o||""==o||o.includes("/"))return;const a=new FormData;a.append("path",e+o),fetchData("/edit","PUT",a),fetch("/api/files/").then((e=>e.json())).then((o=>{t&&t.remove(),listFiles(n,e),console.log(o)}))}function upload(e,t){_("upload").onchange=()=>{doUpload(e,t)},_("upload").click()}function ctx(e,t,n,o){e.preventDefault(),ctx_el=o;let a,i=isFolder(t),c=_("ctx");c.style.display="block",a=c.getElementsByTagName("li")[0],a.onclick=i?function(){hidectx(),create(n+t.name+"/",o.children.item(1),o)}:function(){hidectx(),create(n,o.parentNode,o.parentNode.parentNode)},a.style.display=i?"block":"none",a=c.getElementsByTagName("li")[1],i&&(a.onclick=function(){hidectx(),upload(o,n+t.name+"/")}),a.style.display=i?"block":"none",a=c.getElementsByTagName("li")[2],a.onclick=function(){edit(t,n),hidectx()},a.style.display=isText(t)?"block":"none",a=c.getElementsByTagName("li")[3],a.onclick=function(){preview(t,n),hidectx()},a.style.display=isImage(t)?"block":"none",a=c.getElementsByTagName("li")[4],a.onclick=function(){download(t,n),hidectx()},a.style.display=i?"none":"block",a=c.getElementsByTagName("li")[5],a.onclick=function(){remove(t,n,o),hidectx()},a.style.display=n?"block":"none";var s=document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop,l=document.body.scrollLeft?document.body.scrollLeft:document.documentElement.scrollLeft,r=e.clientX+l+10,d=e.clientY+s-20,m=(c.offsetWidth,c.offsetHeight),u=document.documentElement.clientHeight;d+m>u&&(d=u-m-20),c.style.left=r+"px",c.style.top=d+"px",o&&o.classList.add("selitem")}function drag(e,t,n){let o=n+t.name;isFolder(t)&&(o+="/"),e.dataTransfer.setData("text",o),console.log("drag start "+o)}function drop(e,t){let n=e.dataTransfer.getData("text");n.startsWith(t)||(e.preventDefault(),console.log("Move "+n+" to "+t))}function listFiles(e,t){return console.log("listFiles"),fetch("/api/files/?dir="+t).then((e=>e.json())).then((n=>{if(0==n.length)return!1;let o=e.getElementsByTagName("div")[0];o&&(o.onclick=n=>{i.remove(),o.onclick=()=>{listFiles(e,t)},n.stopPropagation()});let a=e.getElementsByTagName("ul");for(let e=0;e{drag(event,e,t)},a.appendChild(s),s.innerHTML=''+o+" ",isFolder(e)){let n=t+e.name+"/";s.classList.add("bold"),s.onclick=function(e){listFiles(a,n)},s.ondragover=e=>{e.preventDefault()},s.ondrop=e=>{drop(e,n)}}else(isText(e)||isImage(e)||isAudio(e))&&(s.onclick=function(n){url(e,t)});s.oncontextmenu=n=>{ctx(n,e,t,a)}}return e.scrollIntoView(),!0}))}function generateToast({message:e,background:t="#00214d",color:n="#fffffe",length:o="7000ms"}){_("toast").insertAdjacentHTML("afterbegin",`\n ${e}\n
`);const a=_("toast").firstElementChild;a.addEventListener("animationend",(()=>a.remove()))}document.addEventListener("blur",(function(){hidectx()})),document.addEventListener("DOMContentLoaded",(function(){createEditor("editor",void 0,void 0,void 0);listFiles(_("tree"),"/"),_("tree").getElementsByTagName("div")[0].oncontextmenu=e=>{ctx(e,{name:"",children:[]},"",_("tree"))},_("load").onclick=function(e){const t=new FormData;t.append("load",""),fetchData("/edit","PUT",t)},_("init").onclick=function(e){const t=new FormData;t.append("init",""),fetchData("/edit","PUT",t)},_("home").onclick=function(e){window.location.href="/"},_("page").onchange=function(e){const t=new FormData;t.append("page",_("page").value),fetchData("/edit","PUT",t)}})),document.addEventListener("DOMContentLoaded",(function(){const e=document.getElementById("dragMe"),t=e.previousElementSibling,n=e.nextElementSibling;let o=0,a=0,i=0;const c=function(a){const c=a.clientX-o,s=(a.clientY,100*(i+c)/e.parentNode.getBoundingClientRect().width);t.style.width=`${s}%`,t.style.right=t.style.width,e.style.cursor="col-resize",document.body.style.cursor="col-resize",t.style.userSelect="none",t.style.pointerEvents="none",n.style.userSelect="none",n.style.pointerEvents="none",ace.edit("editor").resize()},s=function(){e.style.removeProperty("cursor"),document.body.style.removeProperty("cursor"),t.style.removeProperty("user-select"),t.style.removeProperty("pointer-events"),n.style.removeProperty("user-select"),n.style.removeProperty("pointer-events"),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",s)};e.addEventListener("mousedown",(function(e){o=e.clientX,a=e.clientY,i=t.getBoundingClientRect().width,document.addEventListener("mousemove",c),document.addEventListener("mouseup",s)})),e.addEventListener("dblclick",(()=>{var e=t.style.visibility="hidden"===t.style.visibility;t.style.visibility=e?"unset":"hidden",t.style.position=e?"unset":"absolute",ace.edit("editor").resize()}))}));
\ No newline at end of file
+var ctx_el;function _(e){return document.getElementById(e)}function hidectx(){_("ctx").style.display="none",ctx_el&&ctx_el.classList.remove("selitem"),ctx_el=void 0}function doesFontExist(e){var t=document.createElement("canvas"),n=t.getContext("2d"),o="abcdefghijklmnopqrstuvwxyz0123456789";n.font="72px monospace";var a=n.measureText(o).width;return n.font="72px '"+e+"', monospace",t=null,n.measureText(o).width!=a}function createEditor(e,t,n,o,a){function i(e){let t=/(?:\.([^.]+))?$/.exec(e)[1];if(void 0!==typeof t)switch(t){case"htm":case"html":return"html";case"js":return"javascript";case"cmd":case"json":case"jsonl":return"json";case"css":case"svg":case"xml":return t}return"plain_text"}void 0===n&&(n=i(t)),void 0===a&&(a="text/"+n);["basePath","modePath","themePath"].forEach((e=>{ace.config.set(e,"https://cdnjs.cloudflare.com/ajax/libs/ace/1.32.6")}));var c=ace.edit(e,{useWorker:!1,wrap:!0,indentedSoftWrap:!1,showPrintMargin:!1,highlightGutterLine:!0,useSoftTabs:!0,tabSize:2});c.setFontSize(parseFloat(getComputedStyle(document.documentElement).fontSize)),c.setReadOnly(!0),c.getSession().setUndoManager(new ace.UndoManager),void 0===o&&(o=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"monokai":"textmate");var s=_("save"),l=_("undo"),r=_("redo"),d=_("cut"),m=_("copy"),u=_("paste"),p=_("font"),f=_("fontsize"),g="none"!==_(e).display;f.value=parseFloat(c.getFontSize()).toFixed(1),p.onchange=function(){c.setOption("fontFamily","'"+p.value+"',monospace")},f.onchange=function(){var e=parseFloat(f.value);!isNaN(e)&&e>=9&&e<=40&&c.setFontSize(e),f.value=parseFloat(c.getFontSize()).toFixed(1)};function h(){let e=!g||c.session.getSelection().isEmpty();d.disabled=e,m.disabled=e}function y(){let e=c.session.getUndoManager();s.disabled=!g||e.isClean(),l.disabled=!g||!e.hasUndo(),r.disabled=!g||!e.hasRedo()}function v(){if(void 0===t)return;const e=function(e){var t=e.getValue();try{var n=JSON.parse(t);return JSON.stringify(n)}catch(e){return t+""}}(c),n=new FormData;n.append("data",new Blob([e],{type:a}),t),fetch("/edit",{method:"POST",body:n}).then((e=>e.ok?e.text().then((e=>{console.log("Save OK /edit "+e)})):e.text().then((e=>{throw console.log("Save FAIL /edit"),new Error(e)})))).then((e=>{console.log(e),generateToast({message:"Saved "+t,background:"#ddd",color:"#000"})})).catch((e=>{console.warn("AbortError"===e.name?"Promise Aborted":"Promise Rejected"),alert(e)})).finally((()=>{y()}))}function x(){var e=c.getCopyText();if(window.clipboardData&&window.clipboardData.setData)return window.clipboardData.setData("Text",e);if(document.queryCommandSupported&&document.queryCommandSupported("copy")){c.focus();try{return document.execCommand("copy")}catch(t){return console.warn("Copy to clipboard failed.",t),prompt("Copy to clipboard: Ctrl+C, Enter",e)}}}function w(e){_("name").innerHTML=e;fetch(e).then((t=>t.ok?(console.log("OK "+e),t.text()):t.text().then((e=>{throw console.log("ERROR "+url),new Error(e)})))).then((e=>{try{var t=JSON.parse(e);c.setValue(JSON.stringify(t,null,4)),console.log("parse json OK")}catch(t){c.setValue(e),console.log("parse json FAIL")}null!==_("editor")&&(_("editor").style.display="block"),null!==_("preview")&&(_("preview").style.display="none"),g=!0,c.setReadOnly(!1),c.focus(),y()})).catch((e=>{console.log(e),alert(e),c.setReadOnly(!0)})).finally((()=>{c.resize(!0),c.scrollToLine(1,!0,!0,(function(){})),c.gotoLine(1,0,!0),c.clearSelection(),c.session.getUndoManager().reset()}))}return["Courier New","Monaco","Lucida Console","Monospace","ui-monospace","Roboto Mono","Inconsolata","IBM Plex Mono","Space Mono","PT Mono","Ubuntu Mono","Nanum Gothic Coding","Cousine","Fira Mono","Share Tech Mono","Courier Prime","Anonymous Pro","Cutive Mono","Overpass Mono","Fira Code","VT323","DM Mono","Oxygen Mono","Nova Mono","B612 Mono","Spline Sans Mono","Noto Sans Mono","Major Mono Display","Azeret Mono","Red Hat Mono","Syne Mono","Xanh Mono"].sort().forEach((function(e,t){if(doesFontExist(e)){var n=document.createElement("option");n.text=e,p.add(n)}})),null!==s&&null!==l&&null!==r&&c.on("input",y),c.session.selection.on("changeCursor",h),s.onclick=v,l.onclick=e=>{c.undo()&&c.focus()},r.onclick=e=>{c.redo()&&c.focus()},d.onclick=e=>{x()&&c.execCommand("cut")},m.onclick=e=>{x()&&c.execCommand("copy")},u.onclick=function(){try{navigator.clipboard.readText().then((e=>{c.execCommand("paste",e)})).catch((e=>{u.disabled=!0}))}catch{u.disabled=!0}},c.loadUrl=(e,o)=>{n=i(t=e+o),a="text/"+n,"plain"!==n&&c.getSession().setMode("ace/mode/"+n),w(e+o)},c.hide=()=>{g=!1,y(),h(),_("editor").style.display="none"},"plain"!==n&&c.getSession().setMode("ace/mode/"+n),c.setTheme("ace/theme/"+o),c.$blockScrolling=1/0,c.commands.addCommand({name:"save",bindKey:{win:"Ctrl-S",mac:"Command-S"},exec:v,readOnly:!1}),c.commands.addCommand({name:"undo",bindKey:{win:"Ctrl-Z",mac:"Command-Z"},exec:function(){c.undo()}}),c.commands.addCommand({name:"redo",bindKey:{win:"Ctrl-Y",mac:"Command-Y"},exec:function(){c.redo()}}),void 0!==t&&w(t),c.resize(),c}function uploadFileAsync(e,t,n,o,a,i){fetchData("/edit","POST",e).then((e=>{generateToast({message:"Upload "+n+"/"+o+" "+t+" done.",background:"#ddd",color:"#000"}),n==o&&listFiles(a,i)}))}function doUpload(e,t){const n=_("upload"),o=n.files.length;if(0!==o)for(let a=0;a=0}function isText(e){if(isFolder(e))return!1;var t=/(?:\.([^.]+))?$/.exec(e.name)[1];if(void 0!==typeof t)switch(t){case"txt":case"cmd":case"json":case"jsonl":case"htm":case"html":case"js":case"c":case"cpp":case"css":case"svg":case"xml":return!0}return!1}function isImage(e){if(isFolder(e))return!1;var t=/(?:\.([^.]+))?$/.exec(e.name)[1];if(void 0!==typeof t)switch(t){case"bmp":case"png":case"jpg":case"gif":case"svg":return!0}return!1}function isAudio(e){if(isFolder(e))return!1;var t=/(?:\.([^.]+))?$/.exec(e.name)[1];if(void 0!==typeof t)switch(t){case"wav":case"mp3":case"aac":case"m4a":case"wma":return!0}return!1}function icon(e){if(isFolder(e))return"dir";if(isImage(e))return"image";if(isAudio(e))return"audio";var t=/(?:\.([^.]+))?$/.exec(e.name)[1];if(void 0!==typeof t)switch(t){case"cmd":case"css":case"json":case"jsonl":case"ttf":return t;case"zip":case"gz":return"zip";case"html":case"htm":return"html"}return"file"}function preview(e,t){if(isImage(e)){let n=t+e.name;const o=_("preview");o.innerHTML=' ',o.style.display="block",ace.edit("editor").hide(),_("name").innerHTML=n}}function edit(e,t){isText(e)&&(ace.edit("editor").loadUrl(t,e.name),_("preview").style.display="none")}function url(e,t){console.log("click "+t+e.name),isImage(e)?preview(e,t):isText(e)&&edit(e,t)}async function fetchData(e,t,n,o){await fetch(e,{method:t,body:n}).then((n=>n.ok?(console.log(t+" OK "+e),n.text()):n.text().then((n=>{throw console.log(t+" FAIL "+e),new Error(n)})))).then((e=>{o&&o.remove(),console.log(e)})).catch((e=>{console.warn("AbortError"===e.name?"Promise Aborted":"Promise Rejected"),alert(e)})).finally((()=>{}))}function download(e,t){console.log("download "+t+e.name),document.getElementById("download-frame").src=t+e.name+"?download=true"}function remove(e,t,n){let o=t+e.name;isFolder(e)&&(o+="/"),console.log("remove "+o);const a=new FormData;a.append("path",o),fetchData("/edit","DELETE",a,n)}function create(e,t,n){var o=window.prompt("Create File in "+e,"");if(null==o||""==o||o.includes("/"))return;const a=new FormData;a.append("path",e+o),fetchData("/edit","PUT",a),fetch("/api/files/").then((e=>e.json())).then((o=>{t&&t.remove(),listFiles(n,e),console.log(o)}))}function upload(e,t){_("upload").onchange=()=>{doUpload(e,t)},_("upload").click()}function ctx(e,t,n,o){e.preventDefault(),ctx_el=o;let a,i=isFolder(t),c=_("ctx");c.style.display="block",a=c.getElementsByTagName("li")[0],a.onclick=i?function(){hidectx(),create(n+t.name+"/",o.children.item(1),o)}:function(){hidectx(),create(n,o.parentNode,o.parentNode.parentNode)},a.style.display=i?"block":"none",a=c.getElementsByTagName("li")[1],i&&(a.onclick=function(){hidectx(),upload(o,n+t.name+"/")}),a.style.display=i?"block":"none",a=c.getElementsByTagName("li")[2],a.onclick=function(){edit(t,n),hidectx()},a.style.display=isText(t)?"block":"none",a=c.getElementsByTagName("li")[3],a.onclick=function(){preview(t,n),hidectx()},a.style.display=isImage(t)?"block":"none",a=c.getElementsByTagName("li")[4],a.onclick=function(){download(t,n),hidectx()},a.style.display=i?"none":"block",a=c.getElementsByTagName("li")[5],a.onclick=function(){remove(t,n,o),hidectx()},a.style.display=n?"block":"none";var s=document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop,l=document.body.scrollLeft?document.body.scrollLeft:document.documentElement.scrollLeft,r=e.clientX+l+10,d=e.clientY+s-20,m=(c.offsetWidth,c.offsetHeight),u=document.documentElement.clientHeight;d+m>u&&(d=u-m-20),c.style.left=r+"px",c.style.top=d+"px",o&&o.classList.add("selitem")}function drag(e,t,n){let o=n+t.name;isFolder(t)&&(o+="/"),e.dataTransfer.setData("text",o),console.log("drag start "+o)}function drop(e,t){let n=e.dataTransfer.getData("text");n.startsWith(t)||(e.preventDefault(),console.log("Move "+n+" to "+t))}function listFiles(e,t){return console.log("listFiles"),fetch("/api/files/?dir="+t).then((e=>e.json())).then((n=>{if(0==n.length)return!1;let o=e.getElementsByTagName("div")[0];o&&(o.onclick=n=>{i.remove(),o.onclick=()=>{listFiles(e,t)},n.stopPropagation()});let a=e.getElementsByTagName("ul");for(let e=0;e{drag(event,e,t)},a.appendChild(s),s.innerHTML=''+o+" ",isFolder(e)){let n=t+e.name+"/";s.classList.add("bold"),s.onclick=function(e){listFiles(a,n)},s.ondragover=e=>{e.preventDefault()},s.ondrop=e=>{drop(e,n)}}else(isText(e)||isImage(e)||isAudio(e))&&(s.onclick=function(n){url(e,t)});s.oncontextmenu=n=>{ctx(n,e,t,a)}}return e.scrollIntoView(),!0}))}function generateToast({message:e,background:t="#00214d",color:n="#fffffe",length:o="7000ms"}){_("toast").insertAdjacentHTML("afterbegin",`\n ${e}\n
`);const a=_("toast").firstElementChild;a.addEventListener("animationend",(()=>a.remove()))}document.addEventListener("blur",(function(){hidectx()})),document.addEventListener("DOMContentLoaded",(function(){createEditor("editor",void 0,void 0,void 0);listFiles(_("tree"),"/"),_("tree").getElementsByTagName("div")[0].oncontextmenu=e=>{ctx(e,{name:"",children:[]},"",_("tree"))},_("load").onclick=function(e){const t=new FormData;t.append("load",""),fetchData("/edit","PUT",t)},_("init").onclick=function(e){const t=new FormData;t.append("init",""),fetchData("/edit","PUT",t)},_("home").onclick=function(e){window.location.href="/"},_("page").onchange=function(e){const t=new FormData;t.append("page",_("page").value),fetchData("/edit","PUT",t)}})),document.addEventListener("DOMContentLoaded",(function(){const e=document.getElementById("dragMe"),t=e.previousElementSibling,n=e.nextElementSibling;let o=0,a=0,i=0;const c=function(a){const c=a.clientX-o,s=(a.clientY,100*(i+c)/e.parentNode.getBoundingClientRect().width);t.style.width=`${s}%`,t.style.right=t.style.width,e.style.cursor="col-resize",document.body.style.cursor="col-resize",t.style.userSelect="none",t.style.pointerEvents="none",n.style.userSelect="none",n.style.pointerEvents="none",ace.edit("editor").resize()},s=function(){e.style.removeProperty("cursor"),document.body.style.removeProperty("cursor"),t.style.removeProperty("user-select"),t.style.removeProperty("pointer-events"),n.style.removeProperty("user-select"),n.style.removeProperty("pointer-events"),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",s)};e.addEventListener("mousedown",(function(e){o=e.clientX,a=e.clientY,i=t.getBoundingClientRect().width,document.addEventListener("mousemove",c),document.addEventListener("mouseup",s)})),e.addEventListener("dblclick",(()=>{var e=t.style.visibility="hidden"===t.style.visibility;t.style.visibility=e?"unset":"hidden",t.style.position=e?"unset":"absolute",ace.edit("editor").resize()}))}));
\ No newline at end of file
From 51f35e7d3602d2a619e6f11350eb735767ad02a7 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela
Date: Thu, 8 Feb 2024 14:21:41 +0100
Subject: [PATCH 07/20] wireguard - allow to set hostname for the remote peer
WireGuard-ESP32 library uses lwip_getaddrinfo() call to resolve
IP/hostname string, so it should work.
---
src/sys/net/hasp_wireguard.cpp | 2 +-
src/sys/svc/hasp_http.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/sys/net/hasp_wireguard.cpp b/src/sys/net/hasp_wireguard.cpp
index 36b05515..c2ca170a 100644
--- a/src/sys/net/hasp_wireguard.cpp
+++ b/src/sys/net/hasp_wireguard.cpp
@@ -12,7 +12,7 @@
char wg_ip[16] = WIREGUARD_IP;
char wg_private_key[45] = WIREGUARD_PRIVATE_KEY;
-char wg_ep_ip[16] = WIREGUARD_EP_IP;
+char wg_ep_ip[40] = WIREGUARD_EP_IP;
uint16_t wg_ep_port = WIREGUARD_EP_PORT;
char wg_ep_public_key[45] = WIREGUARD_EP_PUBLIC_KEY;
static WireGuard wg;
diff --git a/src/sys/svc/hasp_http.cpp b/src/sys/svc/hasp_http.cpp
index e3737309..1f78c7f8 100644
--- a/src/sys/svc/hasp_http.cpp
+++ b/src/sys/svc/hasp_http.cpp
@@ -2357,7 +2357,7 @@ static void http_handle_wireguard()
From 28152302b15a1b7433ed21feb31d124cb72eef68 Mon Sep 17 00:00:00 2001
From: fvanroie
Date: Thu, 8 Feb 2024 16:28:12 +0100
Subject: [PATCH 08/20] Update root CA certificates
---
data/cert/x509_crt_bundle.bin | Bin 63694 -> 66563 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
diff --git a/data/cert/x509_crt_bundle.bin b/data/cert/x509_crt_bundle.bin
index 77d8ea3e85b3c2b257ffe256f6231d116a0cc7b8..c4c74b8996dd1ad9ae6c80fb858e8ed7a6d8a6b8 100644
GIT binary patch
delta 5528
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
wNt<8
From ce116273081004c63f51901163654090a5c53f88 Mon Sep 17 00:00:00 2001
From: fvanroie
Date: Thu, 8 Feb 2024 16:35:44 +0100
Subject: [PATCH 09/20] Add root CA cert bundle to src
---
src/hasp/hasp_attribute.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/hasp/hasp_attribute.cpp b/src/hasp/hasp_attribute.cpp
index f99a6e14..c40063d0 100644
--- a/src/hasp/hasp_attribute.cpp
+++ b/src/hasp/hasp_attribute.cpp
@@ -19,6 +19,9 @@ LV_FONT_DECLARE(unscii_8_icon);
extern const char** btnmatrix_default_map; // memory pointer to lvgl default btnmatrix map
extern const char* msgbox_default_map[]; // memory pointer to lvgl default btnmatrix map
+extern const uint8_t rootca_crt_bundle_start[] asm("_binary_data_cert_x509_crt_bundle_bin_start");
+extern const uint8_t rootca_crt_bundle_end[] asm("_binary_data_cert_x509_crt_bundle_bin_end");
+
void my_image_release_resources(lv_obj_t* obj)
{
if(!obj) return;
@@ -1345,7 +1348,7 @@ static hasp_attribute_type_t special_attribute_src(lv_obj_t* obj, const char* pa
#if defined(ARDUINO) && defined(ARDUINO_ARCH_ESP32)
#if HASP_USE_WIFI > 0 || HASP_USE_ETHERNET > 0
HTTPClient http;
- http.begin(payload);
+ http.begin(payload, (const char*)rootca_crt_bundle_start);
http.setTimeout(5000);
http.setConnectTimeout(5000);
From b85542c9ada9e75d2651b6a6a43e3a5fd8d23cb7 Mon Sep 17 00:00:00 2001
From: fvanroie
Date: Thu, 8 Feb 2024 16:44:17 +0100
Subject: [PATCH 10/20] Update build actions to Node.js 20
---
.github/workflows/build.yaml | 16 ++++++++--------
.github/workflows/build_linux.yaml | 6 +++---
.github/workflows/release.yml | 6 +++---
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index ee4f01af..7fcc6234 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -64,23 +64,23 @@ jobs:
env: esp32-s3-4848S040
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
submodules: "true"
- name: Cache pip
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
- uses: actions/setup-python@v4
+ uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install PlatformIO
@@ -132,23 +132,23 @@ jobs:
linux_build:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
submodules: "true"
- name: Cache pip
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
- uses: actions/setup-python@v4
+ uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install PlatformIO
diff --git a/.github/workflows/build_linux.yaml b/.github/workflows/build_linux.yaml
index a4baea49..bfe4ede4 100644
--- a/.github/workflows/build_linux.yaml
+++ b/.github/workflows/build_linux.yaml
@@ -14,18 +14,18 @@ jobs:
- linux_sdl_64bits
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
submodules: 'true'
- name: Cache pip
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 62ef57b4..31a693c6 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -12,16 +12,16 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Cache pip
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
From 91b347c8d1ab5f351a6d742fb86c0eeec97d0590 Mon Sep 17 00:00:00 2001
From: fvanroie
Date: Thu, 8 Feb 2024 16:46:10 +0100
Subject: [PATCH 11/20] Bump RC version
---
platformio.ini | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/platformio.ini b/platformio.ini
index 7d61dc60..2edc4d34 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -75,7 +75,7 @@ build_flags =
-D HASP_VER_MAJ=0
-D HASP_VER_MIN=7
;-D HASP_VER_REV=4
- -D HASP_VER_REV=0-rc10
+ -D HASP_VER_REV=0-rc11
;-D HASP_VER_REV=4-rc1
${override.build_flags}
From 2038cce0507b336ba7d2600a324c3f388eb8d832 Mon Sep 17 00:00:00 2001
From: fvanroie
Date: Thu, 8 Feb 2024 16:57:23 +0100
Subject: [PATCH 12/20] Update build actions to Node.js 20
---
.github/workflows/build.yaml | 2 +-
.github/workflows/release.yml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 7fcc6234..e64de643 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -102,7 +102,7 @@ jobs:
- name: Run PlatformIO
run: pio run -e ${{ matrix.environment.env }}
- name: Upload output file
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: ${{ matrix.environment.out }}
path: build_output/firmware/*.bin
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 31a693c6..f4d093be 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -71,7 +71,7 @@ jobs:
- name: Run PlatformIO
run: pio run -e m5stack-core2
- name: Upload output file
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: openHASP firmware.zip
path: build_output/firmware/*.bin
From 7d804f8eab415ffed10108707c0aa88913e61ae4 Mon Sep 17 00:00:00 2001
From: fvanroie
Date: Thu, 8 Feb 2024 17:23:04 +0100
Subject: [PATCH 13/20] Update hostnames to openhasp.com
---
CHANGELOG.md | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fa53d7b7..e9b66efb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -168,23 +168,23 @@ Updated libraries to AceButton 1.9.1 and ArduinoJson 6.18.5
- Run `/online.cmd` or `/offline.cmd` script when the wifi status changed
### Objects
-- Add new *[line](https://openhasp.haswitchplate.com/0.6.1/design/objects/#line)* object
-- Add `val` to *[btnmatrix](https://openhasp.haswitchplate.com/0.6.1/design/objects/#button-matrix)* when `one_select` is set
-- Cache up to 20 *[images](https://openhasp.haswitchplate.com/0.6.1/design/objects/#image)* in PSram when available
-- Improve precision on the *[linemeter](https://openhasp.haswitchplate.com/0.6.1/design/objects/#line-meter)* scales
-- Fix *[dropdown](https://openhasp.haswitchplate.com/0.6.1/design/objects/#dropdown-list)* redraw bug
+- Add new *[line](https://www.openhasp.com/0.6.1/design/objects/#line)* object
+- Add `val` to *[btnmatrix](https://www.openhasp.com/0.6.1/design/objects/#button-matrix)* when `one_select` is set
+- Cache up to 20 *[images](https://www.openhasp.com/0.6.1/design/objects/#image)* in PSram when available
+- Improve precision on the *[linemeter](https://www.openhasp.com/0.6.1/design/objects/#line-meter)* scales
+- Fix *[dropdown](https://www.openhasp.com/0.6.1/design/objects/#dropdown-list)* redraw bug
### Devices
-- Fix [L8-HD dimmer](https://openhasp.haswitchplate.com/0.6.1/devices/lanbon-l8/) not responding correctly to mqtt after a reboot
-- Add [M5Stack Core2](https://openhasp.haswitchplate.com/0.6.1/devices/m5stack-core2/) backlight dimming
-- Add [Yeacreate Nscreen32](https://openhasp.haswitchplate.com/0.6.1/devices/yeacreate-nscreen32/)
-- Add [Makerfabs ESP32 TFT Touch](https://openhasp.haswitchplate.com/0.6.1/devices/makerfabs-tft-touch/) Capacitive
+- Fix [L8-HD dimmer](https://www.openhasp.com/0.6.1/devices/lanbon-l8/) not responding correctly to mqtt after a reboot
+- Add [M5Stack Core2](https://www.openhasp.com/0.6.1/devices/m5stack-core2/) backlight dimming
+- Add [Yeacreate Nscreen32](https://www.openhasp.com/0.6.1/devices/yeacreate-nscreen32/)
+- Add [Makerfabs ESP32 TFT Touch](https://www.openhasp.com/0.6.1/devices/makerfabs-tft-touch/) Capacitive
### Fonts
-- [Additional characters](https://openhasp.haswitchplate.com/0.6.1/design/fonts/#ascii): `²` (squared) and `³` (cubed)
-- [Additional icons](https://openhasp.haswitchplate.com/0.6.1/design/fonts/#built-in-icons): recycle-variant and additional weather icons
-- Use latin1 as default charset on [WT32-SC01](https://openhasp.haswitchplate.com/0.6.1/devices/wt32-sc01/)
-- Add [Greek font](https://openhasp.haswitchplate.com/0.6.1/design/fonts/#greek)
+- [Additional characters](https://www.openhasp.com/0.6.1/design/fonts/#ascii): `²` (squared) and `³` (cubed)
+- [Additional icons](https://www.openhasp.com/0.6.1/design/fonts/#built-in-icons): recycle-variant and additional weather icons
+- Use latin1 as default charset on [WT32-SC01](https://www.openhasp.com/0.6.1/devices/wt32-sc01/)
+- Add [Greek font](https://www.openhasp.com/0.6.1/design/fonts/#greek)
### Compiling
- Allow custom bootlogo
@@ -252,7 +252,7 @@ Updated libraries to lvgl 7.11.0, ArduinoJson 6.18.0 and TFT_eSPI 2.3.70
## v0.5.0
-Name changed to openHASP - https://openhasp.haswitchplate.com/
+Name changed to openHASP - https://www.openhasp.com/
> When using HomeAssistant also update the [openHASP Custom Component](https://github.com/HASwitchPlate/openHASP-custom-component/releases/tag/0.5.0)
- Switch built-in icons from FontAwesome to MaterialDesign icons #139
@@ -263,7 +263,7 @@ Name changed to openHASP - https://openhasp.haswitchplate.com/
- Add `back`, `prev`, `next` attributes to pages #114
- JSON Serialize text in payloads containing text attributes #140
- Add az-touch-mod-esp32_ili9341 config and allow for TFT_BACKLIGHT_ON set to LOW #131
-- Add [FreeTouchDeck](https://openhasp.haswitchplate.com/0.5/#devices/freetouchdeck/) and [ESP32-Touchdown](https://openhasp.haswitchplate.com/0.5/#devices/esp32-touchdown/) configs
+- Add [FreeTouchDeck](https://www.openhasp.com/0.5/#devices/freetouchdeck/) and [ESP32-Touchdown](https://www.openhasp.com/0.5/#devices/esp32-touchdown/) configs
- Add roller `mode` `infinite` attribute
- Add btnmatrix `toggle` and `one_check` attributes
- Rework all event handlers to reduce update events and prevent race condition #119 *(events have changed!)*
@@ -291,7 +291,7 @@ Changes:
- Remove HA auto-discovery in favor of the HA Custom Component
- Add `clearpage all` command option
- Add local page navigation and transitions
-- Add [scale properties](https://openhasp.haswitchplate.com/0.5/#styling/#scale)
+- Add [scale properties](https://www.openhasp.com/0.5/#styling/#scale)
- Add `config/gpio` command
- Allow for timezone setting in user_config_override.h (thanks @arovak)
- Start localizations for NL, HU and RO (thanks @nagyrobi)
From 1043f5ddd7169786228706de4efba0d64ca237ad Mon Sep 17 00:00:00 2001
From: fvanroie
Date: Thu, 8 Feb 2024 17:55:28 +0100
Subject: [PATCH 14/20] Update Changelog
---
CHANGELOG.md | 3 ++-
platformio.ini | 2 +-
user_setups/esp32/_esp32.ini | 3 +--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e9b66efb..c4e51e24 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,6 +20,7 @@
- Firmware files include the bitmapped font sizes 12, 16, 24 and 32pt
- Use embedded TrueType font for other font sizes (PSram highly recommended)
- Add glyphs from Cyrillic, Latin-2, Greek and Viernamese character sets to default fonts
+- Add 12 new MDI icons
### Web UI
- Update Web UI to petite-vue app
@@ -58,7 +59,7 @@
- Add support for ESP32-S3 and ESP32-C3 devices
- Deprecation of support for ESP32-S2 devices due to lack of sRAM
-Updated libraries to ArduinoJson 6.21.4, ArduinoStreamUtils 1.7.3, AceButton 1.10.1, TFT_eSPI 2.5.0, LovyanGFX 1.1.8 and SimpleFTPServer 2.1.5
+Updated libraries to ArduinoJson 6.21.5, ArduinoStreamUtils 1.8.0, AceButton 1.10.1, TFT_eSPI 2.5.34, LovyanGFX 1.1.8 and SimpleFTPServer 2.1.5
## v0.6.3
diff --git a/platformio.ini b/platformio.ini
index 2edc4d34..bcffa81c 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -82,7 +82,7 @@ build_flags =
; -- Shared library dependencies in all environments
; Warning : don't put comments after github links => causes infinite download loop
lib_deps =
- bblanchon/ArduinoJson@^6.21.4
+ bblanchon/ArduinoJson@^6.21.5
;git+https://github.com/fvanroie/ConsoleInput.git
;git+https://github.com/andrethomas/TasmotaSlave.git
;git+https://github.com/lvgl/lvgl.git
diff --git a/user_setups/esp32/_esp32.ini b/user_setups/esp32/_esp32.ini
index a7440eae..93c493ed 100644
--- a/user_setups/esp32/_esp32.ini
+++ b/user_setups/esp32/_esp32.ini
@@ -95,7 +95,7 @@ lib_deps =
git+https://github.com/fvanroie/ConsoleInput.git#dev
; lorol/LittleFS_esp32@^1.0.6 ; for Arduino v1 only
bxparks/AceButton@^1.10.1 ; GPIO button library
- bblanchon/StreamUtils@^1.7.3 ; for EEPromStream and BufferedTelnetClient
+ bblanchon/StreamUtils@^1.8.0 ; for EEPromStream and BufferedTelnetClient
; knolleary/PubSubClient@^2.8.0 ; MQTT client
extra_scripts =
@@ -144,7 +144,6 @@ framework = arduino
;platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.10.03/platform-espressif32.zip
;;;platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.11.01/platform-espressif32.zip
platform = https://github.com/Jason2866/platform-espressif32/releases/download/2023.10.02/platform-espressif32-2023.10.02.zip
-
lib_ignore =
${esp32.lib_ignore}
LittleFS_esp32 ; Not needed for Arduino v2
From 109f00368e3dbd79a78b2b910acef7cc18808697 Mon Sep 17 00:00:00 2001
From: fvanroie
Date: Thu, 8 Feb 2024 17:55:45 +0100
Subject: [PATCH 15/20] Remove root CA cert bundle
---
src/hasp/hasp_attribute.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/hasp/hasp_attribute.cpp b/src/hasp/hasp_attribute.cpp
index c40063d0..b903cc93 100644
--- a/src/hasp/hasp_attribute.cpp
+++ b/src/hasp/hasp_attribute.cpp
@@ -1348,7 +1348,8 @@ static hasp_attribute_type_t special_attribute_src(lv_obj_t* obj, const char* pa
#if defined(ARDUINO) && defined(ARDUINO_ARCH_ESP32)
#if HASP_USE_WIFI > 0 || HASP_USE_ETHERNET > 0
HTTPClient http;
- http.begin(payload, (const char*)rootca_crt_bundle_start);
+ // http.begin(payload, (const char*)rootca_crt_bundle_start);
+ http.begin(payload);
http.setTimeout(5000);
http.setConnectTimeout(5000);
From 1a5921080f8cf297b2999900dc52403dec5e1dd4 Mon Sep 17 00:00:00 2001
From: fvanroie
Date: Thu, 8 Feb 2024 18:21:22 +0100
Subject: [PATCH 16/20] Update Timezones
---
src/sys/net/hasp_time.cpp | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/sys/net/hasp_time.cpp b/src/sys/net/hasp_time.cpp
index 3ad66a0f..3a193049 100644
--- a/src/sys/net/hasp_time.cpp
+++ b/src/sys/net/hasp_time.cpp
@@ -110,9 +110,7 @@ String time_zone_to_possix(const char* timezone)
case TZ_ASIA_RIYADH:
case TZ_ETC_GMT__3:
case TZ_EUROPE_ISTANBUL:
- case TZ_EUROPE_KIROV:
case TZ_EUROPE_MINSK:
- case TZ_EUROPE_VOLGOGRAD:
return "<+03>-3";
case TZ_ASIA_TEHRAN:
return "<+0330>-3:30";
@@ -283,9 +281,9 @@ String time_zone_to_possix(const char* timezone)
return "<-03>3";
case TZ_AMERICA_MIQUELON:
return "<-03>3<-02>,M3.2.0,M11.1.0";
- case TZ_AMERICA_GODTHAB:
case TZ_AMERICA_NUUK:
- return "<-03>3<-02>,M3.4.6/22,J365/25";
+ case TZ_AMERICA_GODTHAB:
+ return "<-02>2<-01>,M3.5.0/-1,M10.5.0/0";
case TZ_AMERICA_BOA_VISTA:
case TZ_AMERICA_CAMPO_GRANDE:
case TZ_AMERICA_CARACAS:
@@ -482,10 +480,11 @@ String time_zone_to_possix(const char* timezone)
case TZ_INDIAN_COMORO:
case TZ_INDIAN_MAYOTTE:
return "EAT-3";
- case TZ_AFRICA_CAIRO:
case TZ_AFRICA_TRIPOLI:
case TZ_EUROPE_KALININGRAD:
return "EET-2";
+ case TZ_AFRICA_CAIRO:
+ return "EET-2EEST,M4.5.5/0,M10.5.4/24";
case TZ_EUROPE_CHISINAU:
return "EET-2EEST,M3.5.0,M10.5.0/3";
case TZ_ASIA_BEIRUT:
@@ -506,7 +505,7 @@ String time_zone_to_possix(const char* timezone)
return "EET-2EEST,M3.5.0/3,M10.5.0/4";
case TZ_ASIA_GAZA:
case TZ_ASIA_HEBRON:
- return "EET-2EEST,M3.5.6,M10.5.6";
+ return "EET-2EEST,M3.4.4/50,M10.4.4/50";
case TZ_AMERICA_ATIKOKAN:
case TZ_AMERICA_CANCUN:
case TZ_AMERICA_CAYMAN:
@@ -577,8 +576,10 @@ String time_zone_to_possix(const char* timezone)
case TZ_ASIA_PYONGYANG:
case TZ_ASIA_SEOUL:
return "KST-9";
+ case TZ_EUROPE_KIROV:
case TZ_EUROPE_MOSCOW:
case TZ_EUROPE_SIMFEROPOL:
+ case TZ_EUROPE_VOLGOGRAD:
return "MSK-3";
case TZ_AMERICA_CRESTON:
case TZ_AMERICA_DAWSON:
From 18a3f0bb7fc78adb0cb2370e5ba4a2946e819c81 Mon Sep 17 00:00:00 2001
From: fvanroie
Date: Thu, 8 Feb 2024 19:47:53 +0100
Subject: [PATCH 17/20] Fix macro
---
src/drv/touch/touch_driver_tftespi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/drv/touch/touch_driver_tftespi.h b/src/drv/touch/touch_driver_tftespi.h
index fc5895c8..8fc82a91 100644
--- a/src/drv/touch/touch_driver_tftespi.h
+++ b/src/drv/touch/touch_driver_tftespi.h
@@ -4,7 +4,7 @@
#ifndef HASP_TFTESPI_TOUCH_DRIVER_H
#define HASP_TFTESPI_TOUCH_DRIVER_H
-#ifdef ARDUINO && defined(USER_SETUP_LOADED)
+#if defined(ARDUINO) && defined(USER_SETUP_LOADED)
#include
#include "touch_driver.h" // base class
From f4f5ae0f0dae12e6a12fa3c592e7605530e2c5e3 Mon Sep 17 00:00:00 2001
From: fvanroie
Date: Thu, 8 Feb 2024 20:13:09 +0100
Subject: [PATCH 18/20] Update Graphics Libraries
---
CHANGELOG.md | 2 +-
platformio.ini | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c4e51e24..e9b368b6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -59,7 +59,7 @@
- Add support for ESP32-S3 and ESP32-C3 devices
- Deprecation of support for ESP32-S2 devices due to lack of sRAM
-Updated libraries to ArduinoJson 6.21.5, ArduinoStreamUtils 1.8.0, AceButton 1.10.1, TFT_eSPI 2.5.34, LovyanGFX 1.1.8 and SimpleFTPServer 2.1.5
+Updated libraries to Arduino_GFX v1.4.4, ArduinoJson 6.21.5, ArduinoStreamUtils 1.8.0, AceButton 1.10.1, TFT_eSPI 2.5.34, LovyanGFX 1.1.12 and SimpleFTPServer 2.1.5
## v0.6.3
diff --git a/platformio.ini b/platformio.ini
index bcffa81c..66bd9b3c 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -104,11 +104,11 @@ build_src_filter = +<*> -<.git/> - - - - -
Date: Fri, 9 Feb 2024 02:15:30 +0100
Subject: [PATCH 19/20] Fix broken scripts
---
src/hasp/hasp_dispatch.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/hasp/hasp_dispatch.cpp b/src/hasp/hasp_dispatch.cpp
index 2dacba77..d828b2b8 100644
--- a/src/hasp/hasp_dispatch.cpp
+++ b/src/hasp/hasp_dispatch.cpp
@@ -801,10 +801,10 @@ void dispatch_run_script(const char*, const char* payload, uint8_t source)
return;
}
- if(!gui_acquire(pdMS_TO_TICKS(500))) {
- LOG_ERROR(TAG_MSGR, F(D_FILE_LOAD_FAILED), payload);
- return;
- }
+ // if(!gui_acquire(pdMS_TO_TICKS(500))) {
+ // LOG_ERROR(TAG_MSGR, F(D_FILE_LOAD_FAILED), payload);
+ // return;
+ // }
// char buffer[512]; // use stack
String buffer((char*)0); // use heap
@@ -829,7 +829,7 @@ void dispatch_run_script(const char*, const char* payload, uint8_t source)
}
}
- gui_release();
+ // gui_release();
cmdfile.close();
LOG_INFO(TAG_MSGR, F(D_FILE_LOADED), payload);
#else
From 226a88f3dff1c5e9b17e299a333d9c6978463386 Mon Sep 17 00:00:00 2001
From: fvanroie
Date: Fri, 9 Feb 2024 02:15:55 +0100
Subject: [PATCH 20/20] Updated libraries and CHANGELOG
---
CHANGELOG.md | 2 +-
platformio.ini | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e9b368b6..23bfac23 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -59,7 +59,7 @@
- Add support for ESP32-S3 and ESP32-C3 devices
- Deprecation of support for ESP32-S2 devices due to lack of sRAM
-Updated libraries to Arduino_GFX v1.4.4, ArduinoJson 6.21.5, ArduinoStreamUtils 1.8.0, AceButton 1.10.1, TFT_eSPI 2.5.34, LovyanGFX 1.1.12 and SimpleFTPServer 2.1.5
+Updated libraries to Arduino_GFX v1.4.0, ArduinoJson 6.21.5, ArduinoStreamUtils 1.8.0, AceButton 1.10.1, TFT_eSPI 2.5.34, LovyanGFX 1.1.12 and SimpleFTPServer 2.1.5
## v0.6.3
diff --git a/platformio.ini b/platformio.ini
index 66bd9b3c..05f259ea 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -108,7 +108,7 @@ lib_deps =
[arduinogfx]
lib_deps =
- moononournation/GFX Library for Arduino@1.4.4
+ moononournation/GFX Library for Arduino@1.4.0 ; Update needs modification of custom PCA class
;git+https://github.com/moononournation/Arduino_GFX.git
[tft_espi]