From 16a4a28a1c356d979361e0d2c1407fa5c3406021 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Wed, 13 Nov 2024 18:59:42 +0100 Subject: [PATCH 01/55] chore: Update version --- include/hal.hpp | 2 +- lib/battery/battery.cpp | 2 +- lib/battery/battery.hpp | 2 +- lib/bme/bme.cpp | 2 +- lib/bme/bme.hpp | 2 +- lib/cli/utils.h | 2 +- lib/compass/compass.cpp | 2 +- lib/compass/compass.hpp | 2 +- lib/gps/gps.cpp | 2 +- lib/gps/gps.hpp | 2 +- lib/gps/timezone.hpp | 2 +- lib/gpx/src/addWaypoint.cpp | 2 +- lib/gpx/src/addWaypoint.hpp | 2 +- lib/gpx/src/deleteWaypoint.cpp | 2 +- lib/gpx/src/deleteWaypoint.hpp | 2 +- lib/gpx/src/editWaypoint.cpp | 2 +- lib/gpx/src/editWaypoint.hpp | 2 +- lib/gpx/src/globalGpxDef.h | 2 +- lib/gpx/src/loadWaypoint.cpp | 2 +- lib/gpx/src/loadWaypoint.hpp | 2 +- lib/gui/src/buttonBar.cpp | 2 +- lib/gui/src/buttonBar.hpp | 2 +- lib/gui/src/deviceSettingsScr.cpp | 2 +- lib/gui/src/deviceSettingsScr.hpp | 2 +- lib/gui/src/globalGuiDef.h | 2 +- lib/gui/src/mainScr.cpp | 2 +- lib/gui/src/mainScr.hpp | 2 +- lib/gui/src/mapSettingsScr.cpp | 2 +- lib/gui/src/mapSettingsScr.hpp | 2 +- lib/gui/src/navScr.cpp | 2 +- lib/gui/src/navScr.hpp | 2 +- lib/gui/src/notifyBar.cpp | 2 +- lib/gui/src/notifyBar.hpp | 2 +- lib/gui/src/satInfoScr.cpp | 2 +- lib/gui/src/satInfoScr.hpp | 2 +- lib/gui/src/searchSatScr.cpp | 2 +- lib/gui/src/searchSatScr.hpp | 2 +- lib/gui/src/settingsScr.cpp | 2 +- lib/gui/src/settingsScr.hpp | 2 +- lib/gui/src/splashScr.cpp | 2 +- lib/gui/src/splashScr.hpp | 2 +- lib/gui/src/waypointListScr.cpp | 2 +- lib/gui/src/waypointListScr.hpp | 2 +- lib/gui/src/waypointScr.cpp | 2 +- lib/gui/src/waypointScr.hpp | 2 +- lib/gui/src/widgets.cpp | 2 +- lib/gui/src/widgets.hpp | 2 +- lib/lvgl/src/lvglFuncs.cpp | 2 +- lib/lvgl/src/lvglFuncs.hpp | 2 +- lib/lvgl/src/lvglSetup.cpp | 2 +- lib/lvgl/src/lvglSetup.hpp | 2 +- lib/maps/src/globalMapsDef.h | 2 +- lib/maps/src/mapsDrawFunc.h | 2 +- lib/maps/src/renderMaps.cpp | 2 +- lib/maps/src/renderMaps.hpp | 2 +- lib/maps/src/vectorMaps.cpp | 2 +- lib/maps/src/vectorMaps.hpp | 2 +- lib/panel/ICENAV_BOARD.hpp | 2 +- lib/panel/ILI9341_XPT2046_SPI.hpp | 2 +- lib/panel/ILI9488_FT5x06_16B.hpp | 2 +- lib/panel/ILI9488_FT5x06_SPI.hpp | 2 +- lib/panel/ILI9488_NOTOUCH_8B.hpp | 2 +- lib/panel/ILI9488_XPT2046_SPI.hpp | 2 +- lib/panel/LILYGO_TDECK.hpp | 2 +- lib/power/power.cpp | 2 +- lib/power/power.hpp | 2 +- lib/settings/settings.cpp | 2 +- lib/settings/settings.hpp | 2 +- lib/storage/storage.cpp | 2 +- lib/storage/storage.hpp | 2 +- lib/tasks/tasks.cpp | 2 +- lib/tasks/tasks.hpp | 2 +- lib/tft/tft.cpp | 2 +- lib/tft/tft.hpp | 2 +- lib/utils/src/gpsMath.cpp | 2 +- lib/utils/src/gpsMath.hpp | 2 +- lib/webfile/src/webpage.h | 2 +- lib/webfile/src/webserver.h | 2 +- platformio.ini | 4 ++-- src/main.cpp | 4 ++-- 80 files changed, 82 insertions(+), 82 deletions(-) diff --git a/include/hal.hpp b/include/hal.hpp index 551f118b..a45074a8 100644 --- a/include/hal.hpp +++ b/include/hal.hpp @@ -2,7 +2,7 @@ * @file hal.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Boards Pin definitions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/battery/battery.cpp b/lib/battery/battery.cpp index 80ae3446..33010b99 100644 --- a/lib/battery/battery.cpp +++ b/lib/battery/battery.cpp @@ -2,7 +2,7 @@ * @file battery.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Battery monitor definition and functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/battery/battery.hpp b/lib/battery/battery.hpp index b85ed78d..b972fe63 100644 --- a/lib/battery/battery.hpp +++ b/lib/battery/battery.hpp @@ -2,7 +2,7 @@ * @file battery.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Battery monitor definition and functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/bme/bme.cpp b/lib/bme/bme.cpp index 59e72dad..5df81cc6 100644 --- a/lib/bme/bme.cpp +++ b/lib/bme/bme.cpp @@ -2,7 +2,7 @@ * @file bme.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief BME280 Sensor functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/bme/bme.hpp b/lib/bme/bme.hpp index d9b23178..c4d3a0e2 100644 --- a/lib/bme/bme.hpp +++ b/lib/bme/bme.hpp @@ -2,7 +2,7 @@ * @file bme.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief BME280 Sensor functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/cli/utils.h b/lib/cli/utils.h index 4e327594..51f0043f 100644 --- a/lib/cli/utils.h +++ b/lib/cli/utils.h @@ -2,7 +2,7 @@ * @file utils.h * @author @Hpsaturn * @brief Network CLI and custom internal commands - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/compass/compass.cpp b/lib/compass/compass.cpp index 73c55089..43f83d40 100644 --- a/lib/compass/compass.cpp +++ b/lib/compass/compass.cpp @@ -2,7 +2,7 @@ * @file compass.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Compass definition and functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/compass/compass.hpp b/lib/compass/compass.hpp index cf08bc33..f9b56c03 100644 --- a/lib/compass/compass.hpp +++ b/lib/compass/compass.hpp @@ -2,7 +2,7 @@ * @file compass.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Compass definition and functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gps/gps.cpp b/lib/gps/gps.cpp index 60c2284f..9a8f1f90 100644 --- a/lib/gps/gps.cpp +++ b/lib/gps/gps.cpp @@ -2,7 +2,7 @@ * @file gps.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief GPS definition and functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gps/gps.hpp b/lib/gps/gps.hpp index 88959c7c..f7c1a51c 100644 --- a/lib/gps/gps.hpp +++ b/lib/gps/gps.hpp @@ -2,7 +2,7 @@ * @file gps.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief GPS definition and functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gps/timezone.hpp b/lib/gps/timezone.hpp index 99d2d21e..2b9a6709 100644 --- a/lib/gps/timezone.hpp +++ b/lib/gps/timezone.hpp @@ -2,7 +2,7 @@ * @file timezone.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Time zone adjust - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gpx/src/addWaypoint.cpp b/lib/gpx/src/addWaypoint.cpp index 2b05770a..4e9a5d48 100644 --- a/lib/gpx/src/addWaypoint.cpp +++ b/lib/gpx/src/addWaypoint.cpp @@ -2,7 +2,7 @@ * @file addWaypoint.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Add Waypoint functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gpx/src/addWaypoint.hpp b/lib/gpx/src/addWaypoint.hpp index 809571b0..9a01b9cd 100644 --- a/lib/gpx/src/addWaypoint.hpp +++ b/lib/gpx/src/addWaypoint.hpp @@ -2,7 +2,7 @@ * @file addWaypoint.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Add Waypoint functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gpx/src/deleteWaypoint.cpp b/lib/gpx/src/deleteWaypoint.cpp index e453453a..ce9175f4 100644 --- a/lib/gpx/src/deleteWaypoint.cpp +++ b/lib/gpx/src/deleteWaypoint.cpp @@ -2,7 +2,7 @@ * @file deleteWaypoint.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Delete Waypoint functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gpx/src/deleteWaypoint.hpp b/lib/gpx/src/deleteWaypoint.hpp index d21ad13e..1111f5a0 100644 --- a/lib/gpx/src/deleteWaypoint.hpp +++ b/lib/gpx/src/deleteWaypoint.hpp @@ -2,7 +2,7 @@ * @file deleteWaypoint.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Delete Waypoint functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gpx/src/editWaypoint.cpp b/lib/gpx/src/editWaypoint.cpp index e3651712..155689ed 100644 --- a/lib/gpx/src/editWaypoint.cpp +++ b/lib/gpx/src/editWaypoint.cpp @@ -2,7 +2,7 @@ * @file editWaypoint.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Edit Waypoint functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gpx/src/editWaypoint.hpp b/lib/gpx/src/editWaypoint.hpp index fe4026e0..281742e0 100644 --- a/lib/gpx/src/editWaypoint.hpp +++ b/lib/gpx/src/editWaypoint.hpp @@ -2,7 +2,7 @@ * @file editWaypoint.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Edit Waypoint functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gpx/src/globalGpxDef.h b/lib/gpx/src/globalGpxDef.h index 04741142..5f43c37e 100644 --- a/lib/gpx/src/globalGpxDef.h +++ b/lib/gpx/src/globalGpxDef.h @@ -2,7 +2,7 @@ * @file globalGpxDef.h * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Global GPX Variables - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gpx/src/loadWaypoint.cpp b/lib/gpx/src/loadWaypoint.cpp index 2a8b4802..1152b58b 100644 --- a/lib/gpx/src/loadWaypoint.cpp +++ b/lib/gpx/src/loadWaypoint.cpp @@ -2,7 +2,7 @@ * @file loadWaypoint.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Load Waypoint functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gpx/src/loadWaypoint.hpp b/lib/gpx/src/loadWaypoint.hpp index 678dcf69..f27460b5 100644 --- a/lib/gpx/src/loadWaypoint.hpp +++ b/lib/gpx/src/loadWaypoint.hpp @@ -2,7 +2,7 @@ * @file loadWaypoint.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Load Waypoint functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/buttonBar.cpp b/lib/gui/src/buttonBar.cpp index 4c22c2b1..46aa87d1 100644 --- a/lib/gui/src/buttonBar.cpp +++ b/lib/gui/src/buttonBar.cpp @@ -2,7 +2,7 @@ * @file buttonBar.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Button Bar - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/buttonBar.hpp b/lib/gui/src/buttonBar.hpp index 04ed9a60..24f9a1db 100644 --- a/lib/gui/src/buttonBar.hpp +++ b/lib/gui/src/buttonBar.hpp @@ -2,7 +2,7 @@ * @file buttonBar.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Button Bar - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/deviceSettingsScr.cpp b/lib/gui/src/deviceSettingsScr.cpp index 52f428e2..00c2b7c3 100644 --- a/lib/gui/src/deviceSettingsScr.cpp +++ b/lib/gui/src/deviceSettingsScr.cpp @@ -2,7 +2,7 @@ * @file deviceSettingsScr.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Device Settings Screen - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/deviceSettingsScr.hpp b/lib/gui/src/deviceSettingsScr.hpp index 5ce3c2d6..248d6147 100644 --- a/lib/gui/src/deviceSettingsScr.hpp +++ b/lib/gui/src/deviceSettingsScr.hpp @@ -2,7 +2,7 @@ * @file deviceSettingsScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Device Settings Screen - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/globalGuiDef.h b/lib/gui/src/globalGuiDef.h index 23d977f9..92a12d53 100644 --- a/lib/gui/src/globalGuiDef.h +++ b/lib/gui/src/globalGuiDef.h @@ -1,7 +1,7 @@ /** * @file globalGuiDef.h * @brief Global GUI Variables - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/mainScr.cpp b/lib/gui/src/mainScr.cpp index 4ebfda2f..1627d2d1 100644 --- a/lib/gui/src/mainScr.cpp +++ b/lib/gui/src/mainScr.cpp @@ -2,7 +2,7 @@ * @file mainScr.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Main Screen - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/mainScr.hpp b/lib/gui/src/mainScr.hpp index b97532fe..4d8c9f2e 100644 --- a/lib/gui/src/mainScr.hpp +++ b/lib/gui/src/mainScr.hpp @@ -2,7 +2,7 @@ * @file mainScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Main Screen - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/mapSettingsScr.cpp b/lib/gui/src/mapSettingsScr.cpp index d0e52f66..110ff6a2 100644 --- a/lib/gui/src/mapSettingsScr.cpp +++ b/lib/gui/src/mapSettingsScr.cpp @@ -2,7 +2,7 @@ * @file mapSettingsScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Map Settings screen - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/mapSettingsScr.hpp b/lib/gui/src/mapSettingsScr.hpp index 2572245d..e09a6eac 100644 --- a/lib/gui/src/mapSettingsScr.hpp +++ b/lib/gui/src/mapSettingsScr.hpp @@ -2,7 +2,7 @@ * @file mapSettingsScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Map Settings screen - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/navScr.cpp b/lib/gui/src/navScr.cpp index ab96fc07..3e8754e6 100644 --- a/lib/gui/src/navScr.cpp +++ b/lib/gui/src/navScr.cpp @@ -2,7 +2,7 @@ * @file navScr.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Navigation screen - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/navScr.hpp b/lib/gui/src/navScr.hpp index a8bdd982..b53b8f69 100644 --- a/lib/gui/src/navScr.hpp +++ b/lib/gui/src/navScr.hpp @@ -2,7 +2,7 @@ * @file navScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Navigation screen - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/notifyBar.cpp b/lib/gui/src/notifyBar.cpp index 056d6cfc..cbcebce9 100644 --- a/lib/gui/src/notifyBar.cpp +++ b/lib/gui/src/notifyBar.cpp @@ -2,7 +2,7 @@ * @file notifyBar.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Notify Bar Screen - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/notifyBar.hpp b/lib/gui/src/notifyBar.hpp index fdf5c311..470bb14d 100644 --- a/lib/gui/src/notifyBar.hpp +++ b/lib/gui/src/notifyBar.hpp @@ -2,7 +2,7 @@ * @file notifyBar.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Notify Bar Screen - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/satInfoScr.cpp b/lib/gui/src/satInfoScr.cpp index b543e37a..c418a9b0 100644 --- a/lib/gui/src/satInfoScr.cpp +++ b/lib/gui/src/satInfoScr.cpp @@ -2,7 +2,7 @@ * @file satInfoScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Satellite info screen - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/satInfoScr.hpp b/lib/gui/src/satInfoScr.hpp index 659ece63..e66c44e4 100644 --- a/lib/gui/src/satInfoScr.hpp +++ b/lib/gui/src/satInfoScr.hpp @@ -2,7 +2,7 @@ * @file satInfoScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Satellite info screen - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/searchSatScr.cpp b/lib/gui/src/searchSatScr.cpp index 44fee130..87bdb7b3 100644 --- a/lib/gui/src/searchSatScr.cpp +++ b/lib/gui/src/searchSatScr.cpp @@ -2,7 +2,7 @@ * @file searchSatScr.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - GPS satellite search screen - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/searchSatScr.hpp b/lib/gui/src/searchSatScr.hpp index d2929e64..489b8335 100644 --- a/lib/gui/src/searchSatScr.hpp +++ b/lib/gui/src/searchSatScr.hpp @@ -2,7 +2,7 @@ * @file searchSatScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - GPS satellite search screen - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/settingsScr.cpp b/lib/gui/src/settingsScr.cpp index 3b351691..37fb9ae0 100644 --- a/lib/gui/src/settingsScr.cpp +++ b/lib/gui/src/settingsScr.cpp @@ -2,7 +2,7 @@ * @file settingsScr.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Settings Screen - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/settingsScr.hpp b/lib/gui/src/settingsScr.hpp index cf7f32e7..40ee59b7 100644 --- a/lib/gui/src/settingsScr.hpp +++ b/lib/gui/src/settingsScr.hpp @@ -2,7 +2,7 @@ * @file settingsScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Settings Screen - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/splashScr.cpp b/lib/gui/src/splashScr.cpp index 136cea6b..01a18a7d 100644 --- a/lib/gui/src/splashScr.cpp +++ b/lib/gui/src/splashScr.cpp @@ -2,7 +2,7 @@ * @file splashScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Splash screen - NOT LVGL - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/splashScr.hpp b/lib/gui/src/splashScr.hpp index 3d272514..b1519785 100644 --- a/lib/gui/src/splashScr.hpp +++ b/lib/gui/src/splashScr.hpp @@ -2,7 +2,7 @@ * @file splashScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Splash screen - NOT LVGL - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/waypointListScr.cpp b/lib/gui/src/waypointListScr.cpp index 22a00c9d..b726e052 100644 --- a/lib/gui/src/waypointListScr.cpp +++ b/lib/gui/src/waypointListScr.cpp @@ -2,7 +2,7 @@ * @file waypointListScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Waypoint list screen - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/waypointListScr.hpp b/lib/gui/src/waypointListScr.hpp index c312e8a6..31f566ae 100644 --- a/lib/gui/src/waypointListScr.hpp +++ b/lib/gui/src/waypointListScr.hpp @@ -2,7 +2,7 @@ * @file waypointListScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Waypoint list screen - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/waypointScr.cpp b/lib/gui/src/waypointScr.cpp index 23d73094..425bfcfd 100644 --- a/lib/gui/src/waypointScr.cpp +++ b/lib/gui/src/waypointScr.cpp @@ -2,7 +2,7 @@ * @file waypointScr.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Waypoint Screen - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/waypointScr.hpp b/lib/gui/src/waypointScr.hpp index 18db45c6..111f95c8 100644 --- a/lib/gui/src/waypointScr.hpp +++ b/lib/gui/src/waypointScr.hpp @@ -2,7 +2,7 @@ * @file waypointScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Add Waypoint Screen - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/widgets.cpp b/lib/gui/src/widgets.cpp index 12934720..a1885e78 100644 --- a/lib/gui/src/widgets.cpp +++ b/lib/gui/src/widgets.cpp @@ -2,7 +2,7 @@ * @file widgets.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Widgets - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/gui/src/widgets.hpp b/lib/gui/src/widgets.hpp index f02c241d..b3e7bfc3 100644 --- a/lib/gui/src/widgets.hpp +++ b/lib/gui/src/widgets.hpp @@ -2,7 +2,7 @@ * @file widgets.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Widgets - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/lvgl/src/lvglFuncs.cpp b/lib/lvgl/src/lvglFuncs.cpp index c98b40e2..59196ff2 100644 --- a/lib/lvgl/src/lvglFuncs.cpp +++ b/lib/lvgl/src/lvglFuncs.cpp @@ -2,7 +2,7 @@ * @file lvglFuncs.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL custom functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/lvgl/src/lvglFuncs.hpp b/lib/lvgl/src/lvglFuncs.hpp index 73f29959..1f8cf7b5 100644 --- a/lib/lvgl/src/lvglFuncs.hpp +++ b/lib/lvgl/src/lvglFuncs.hpp @@ -2,7 +2,7 @@ * @file lvglFuncs.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL custom functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/lvgl/src/lvglSetup.cpp b/lib/lvgl/src/lvglSetup.cpp index b5b623de..45b9af48 100644 --- a/lib/lvgl/src/lvglSetup.cpp +++ b/lib/lvgl/src/lvglSetup.cpp @@ -2,7 +2,7 @@ * @file lvglSetup.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL Screen implementation - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/lvgl/src/lvglSetup.hpp b/lib/lvgl/src/lvglSetup.hpp index c0588183..f38c237e 100644 --- a/lib/lvgl/src/lvglSetup.hpp +++ b/lib/lvgl/src/lvglSetup.hpp @@ -2,7 +2,7 @@ * @file lvglSetup.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL Screen implementation - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/maps/src/globalMapsDef.h b/lib/maps/src/globalMapsDef.h index 18151ba6..92f4a19f 100644 --- a/lib/maps/src/globalMapsDef.h +++ b/lib/maps/src/globalMapsDef.h @@ -1,7 +1,7 @@ /** * @file globalMapsDef.h * @brief Global Maps Variables - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/maps/src/mapsDrawFunc.h b/lib/maps/src/mapsDrawFunc.h index 0f2709bb..fffdff20 100644 --- a/lib/maps/src/mapsDrawFunc.h +++ b/lib/maps/src/mapsDrawFunc.h @@ -1,7 +1,7 @@ /** * @file mapsDrawFunc.h * @brief Extra Draw functions for maps - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/maps/src/renderMaps.cpp b/lib/maps/src/renderMaps.cpp index c71dadc1..ca28d0dc 100644 --- a/lib/maps/src/renderMaps.cpp +++ b/lib/maps/src/renderMaps.cpp @@ -2,7 +2,7 @@ * @file renderMaps.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Render maps draw functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/maps/src/renderMaps.hpp b/lib/maps/src/renderMaps.hpp index 0355c7c0..677ed4a7 100644 --- a/lib/maps/src/renderMaps.hpp +++ b/lib/maps/src/renderMaps.hpp @@ -2,7 +2,7 @@ * @file renderMaps.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Render maps draw functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/maps/src/vectorMaps.cpp b/lib/maps/src/vectorMaps.cpp index a162658c..85f1de10 100644 --- a/lib/maps/src/vectorMaps.cpp +++ b/lib/maps/src/vectorMaps.cpp @@ -2,7 +2,7 @@ * @file vectorMaps.cpp * @author @aresta - https://github.com/aresta/ESP32_GPS * @brief Vector maps draw functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/maps/src/vectorMaps.hpp b/lib/maps/src/vectorMaps.hpp index bbef50d4..a17d78ab 100644 --- a/lib/maps/src/vectorMaps.hpp +++ b/lib/maps/src/vectorMaps.hpp @@ -2,7 +2,7 @@ * @file vectorMaps.hpp * @author @aresta - https://github.com/aresta/ESP32_GPS * @brief Vector maps draw functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/panel/ICENAV_BOARD.hpp b/lib/panel/ICENAV_BOARD.hpp index a70a8a04..04790821 100644 --- a/lib/panel/ICENAV_BOARD.hpp +++ b/lib/panel/ICENAV_BOARD.hpp @@ -2,7 +2,7 @@ * @file ICENAV_BOARD.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LOVYANGFX TFT driver for IceNaV board - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/panel/ILI9341_XPT2046_SPI.hpp b/lib/panel/ILI9341_XPT2046_SPI.hpp index 43d3c2c0..97fc0003 100644 --- a/lib/panel/ILI9341_XPT2046_SPI.hpp +++ b/lib/panel/ILI9341_XPT2046_SPI.hpp @@ -2,7 +2,7 @@ // * @file ILI9341_XPT2046_SPI.hpp // * @author Jordi Gauchía (jgauchia@gmx.es) // * @brief LOVYANGFX TFT driver for ILI9341 SPI With XPT2046 Touch controller -// * @version 0.1.8 +// * @version 0.1.9_alpha // * @date 2024-11 // */ diff --git a/lib/panel/ILI9488_FT5x06_16B.hpp b/lib/panel/ILI9488_FT5x06_16B.hpp index 03d17c0e..5c886792 100644 --- a/lib/panel/ILI9488_FT5x06_16B.hpp +++ b/lib/panel/ILI9488_FT5x06_16B.hpp @@ -2,7 +2,7 @@ * @file ILI9488_FT5x06_16B.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LOVYANGFX TFT driver for ILI9488 16 Bits parallel With FT5x06 Touch controller - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/panel/ILI9488_FT5x06_SPI.hpp b/lib/panel/ILI9488_FT5x06_SPI.hpp index 0828819d..00d37723 100644 --- a/lib/panel/ILI9488_FT5x06_SPI.hpp +++ b/lib/panel/ILI9488_FT5x06_SPI.hpp @@ -2,7 +2,7 @@ * @file ILI9488_XPT2046_SPI.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LOVYANGFX TFT driver for ILI9488 SPI With XPT2046 Touch controller - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/panel/ILI9488_NOTOUCH_8B.hpp b/lib/panel/ILI9488_NOTOUCH_8B.hpp index 8dc3efc8..9ca36f08 100644 --- a/lib/panel/ILI9488_NOTOUCH_8B.hpp +++ b/lib/panel/ILI9488_NOTOUCH_8B.hpp @@ -2,7 +2,7 @@ * @file ILI9488_NOTOUCH_8B.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LOVYANGFX TFT driver for ILI9488 8 Bits parallel Without Touch controller - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/panel/ILI9488_XPT2046_SPI.hpp b/lib/panel/ILI9488_XPT2046_SPI.hpp index 5535bba2..c43300e8 100644 --- a/lib/panel/ILI9488_XPT2046_SPI.hpp +++ b/lib/panel/ILI9488_XPT2046_SPI.hpp @@ -2,7 +2,7 @@ * @file ILI9488_XPT2046_SPI.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LOVYANGFX TFT driver for ILI9488 SPI With XPT2046 Touch controller - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/panel/LILYGO_TDECK.hpp b/lib/panel/LILYGO_TDECK.hpp index effad505..9e1a5f09 100644 --- a/lib/panel/LILYGO_TDECK.hpp +++ b/lib/panel/LILYGO_TDECK.hpp @@ -2,7 +2,7 @@ * @file LILYGO_TDECK.hpp * @author Jordi Gauchía (jgauchia@gmx.es) and Antonio Vanegas @Hpsturn * @brief LOVYANGFX TFT driver for ST7789 SPI With GT911 Touch controller - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/power/power.cpp b/lib/power/power.cpp index 6641aac6..c5a51c91 100644 --- a/lib/power/power.cpp +++ b/lib/power/power.cpp @@ -2,7 +2,7 @@ * @file power.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief ESP32 Power Management functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/power/power.hpp b/lib/power/power.hpp index 6ad300aa..78192ab7 100644 --- a/lib/power/power.hpp +++ b/lib/power/power.hpp @@ -2,7 +2,7 @@ * @file power.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief ESP32 Power Management functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/settings/settings.cpp b/lib/settings/settings.cpp index 142625b7..2adfeea2 100644 --- a/lib/settings/settings.cpp +++ b/lib/settings/settings.cpp @@ -2,7 +2,7 @@ * @file settings.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Settings functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/settings/settings.hpp b/lib/settings/settings.hpp index 40df22e1..f4b64b36 100644 --- a/lib/settings/settings.hpp +++ b/lib/settings/settings.hpp @@ -2,7 +2,7 @@ * @file settings.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Settings functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/storage/storage.cpp b/lib/storage/storage.cpp index 5530f5ab..8a26730e 100644 --- a/lib/storage/storage.cpp +++ b/lib/storage/storage.cpp @@ -2,7 +2,7 @@ * @file storage.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Storage definition and functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/storage/storage.hpp b/lib/storage/storage.hpp index 166ba4d6..ec754c21 100644 --- a/lib/storage/storage.hpp +++ b/lib/storage/storage.hpp @@ -2,7 +2,7 @@ * @file storage.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Storage definition and functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/tasks/tasks.cpp b/lib/tasks/tasks.cpp index 8ecf3e8b..fe654cc3 100644 --- a/lib/tasks/tasks.cpp +++ b/lib/tasks/tasks.cpp @@ -2,7 +2,7 @@ * @file tasks.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Core Tasks functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/tasks/tasks.hpp b/lib/tasks/tasks.hpp index 2351aeac..0283d7d0 100644 --- a/lib/tasks/tasks.hpp +++ b/lib/tasks/tasks.hpp @@ -2,7 +2,7 @@ * @file tasks.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Core Tasks functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/tft/tft.cpp b/lib/tft/tft.cpp index b01896fa..9df780ca 100644 --- a/lib/tft/tft.cpp +++ b/lib/tft/tft.cpp @@ -2,7 +2,7 @@ * @file tft.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief TFT definition and functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/tft/tft.hpp b/lib/tft/tft.hpp index 9b9ab578..e94c0672 100644 --- a/lib/tft/tft.hpp +++ b/lib/tft/tft.hpp @@ -2,7 +2,7 @@ * @file tft.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief TFT definition and functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/utils/src/gpsMath.cpp b/lib/utils/src/gpsMath.cpp index d4a3248c..b168ec5a 100644 --- a/lib/utils/src/gpsMath.cpp +++ b/lib/utils/src/gpsMath.cpp @@ -2,7 +2,7 @@ * @file gpsMath.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Math and various functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/utils/src/gpsMath.hpp b/lib/utils/src/gpsMath.hpp index a87d9eda..e5242300 100644 --- a/lib/utils/src/gpsMath.hpp +++ b/lib/utils/src/gpsMath.hpp @@ -2,7 +2,7 @@ * @file gpsMath.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Math and various functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/webfile/src/webpage.h b/lib/webfile/src/webpage.h index 373c703e..99cd6a6c 100644 --- a/lib/webfile/src/webpage.h +++ b/lib/webfile/src/webpage.h @@ -2,7 +2,7 @@ * @file webpage.h * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Web file server page - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/lib/webfile/src/webserver.h b/lib/webfile/src/webserver.h index 11d88d56..600236b8 100644 --- a/lib/webfile/src/webserver.h +++ b/lib/webfile/src/webserver.h @@ -2,7 +2,7 @@ * @file webserver.h * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Web file server functions - * @version 0.1.8 + * @version 0.1.9_alpha * @date 2024-11 */ diff --git a/platformio.ini b/platformio.ini index 7587d769..7fe1ea36 100644 --- a/platformio.ini +++ b/platformio.ini @@ -15,7 +15,7 @@ default_envs = ICENAV_BOARD [common] platform = espressif32 framework = arduino -version = 0.1.8 +version = 0.1.9_alpha revision = 82 monitor_speed = 115200 ;monitor_rts = 0 @@ -25,7 +25,7 @@ monitor_filters = extra_scripts = pre:prebuild.py build_flags = -D LV_CONF_PATH="${PROJECT_DIR}/lib/lvgl/lv_conf.h" - -D CORE_DEBUG_LEVEL=0 + -D CORE_DEBUG_LEVEL=5 -D USE_LINE_BUFFER=1 -D DISABLE_RADIO=1 -D BAUDRATE=115200 diff --git a/src/main.cpp b/src/main.cpp index eeaff483..40b743f6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2,8 +2,8 @@ * @file main.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief ESP32 GPS Navigation main code - * @version 0.1.8 - * @date 2024-08 + * @version 0.1.9_alpha + * @date 2024-11 */ #include From 4b76d942fac6aae3a54c3387398312acf566a6a5 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Wed, 13 Nov 2024 20:14:08 +0100 Subject: [PATCH 02/55] build: Update libraries --- README.md | 8 ++++---- platformio.ini | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index d8ce1e5d..2d9180b8 100644 --- a/README.md +++ b/README.md @@ -107,10 +107,10 @@ To do this, simply include the following Build Flag in the required env in platf |:------------|:--------------|:-----------------------------------|:-------------------------------------------------------| | | 🔋 Batt. Monitor | ```-DADC1``` or ```-DADC2```
```-DBATT_PIN=ADCn_CHANNEL_x``` | | | AT6558D | 🛰️ GPS | ```-DAT6558D_GPS``` | | -| HMC5883L | 🧭 Compass | ```-DHMC5883L``` | ```dfrobot/DFRobot_QMC5883@^1.0.0``` | -| QMC5883 | 🧭 Compass | ```-DQMC5883``` | ```dfrobot/DFRobot_QMC5883@^1.0.0``` | -| MPU9250 | 🧭 IMU (Compass) | ```-DIMU_MPU9250``` | ```bolderflight/Bolder Flight Systems MPU9250@^1.0.2```| -| BME280 | 🌡️ Temp
☁️ Pres
💧 Hum | ```-DBME280``` | ```adafruit/Adafruit Unified Sensor@^1.1.14```
```adafruit/Adafruit BusIO@^1.16.1```
```adafruit/Adafruit BME280 Library@^2.2.4```| +| HMC5883L | 🧭 Compass | ```-DHMC5883L``` | ```dfrobot/DFRobot_QMC5883@1.0.0``` | +| QMC5883 | 🧭 Compass | ```-DQMC5883``` | ```dfrobot/DFRobot_QMC5883@1.0.0``` | +| MPU9250 | 🧭 IMU (Compass) | ```-DIMU_MPU9250``` | ```bolderflight/Bolder Flight Systems MPU9250@1.0.2```| +| BME280 | 🌡️ Temp
☁️ Pres
💧 Hum | ```-DBME280``` | ```adafruit/Adafruit Unified Sensor@1.1.14```
```adafruit/Adafruit BusIO@1.16.2```
```adafruit/Adafruit BME280 Library@2.2.4```| [^1]: For ELECROW board UART port is shared with USB connection, GPS pinout are mapped to IO19 and IO40 (Analog and Digital Port). If CLI isn't used is possible to attach GPS module to UART port but for upload the firmware (change pinout at **hal.hpp**), the module should be disconnected. [^2]: See **hal.hpp** for pinouts configuration diff --git a/platformio.ini b/platformio.ini index 7fe1ea36..b9828ab5 100644 --- a/platformio.ini +++ b/platformio.ini @@ -41,13 +41,13 @@ build_flags = lib_deps = ; slashdevin/NeoGPS@4.2.9 https://github.com/jgauchia/NeoGPS.git#43c4766 - lvgl/lvgl@9.2.0 + lvgl/lvgl@9.2.2 lovyan03/LovyanGFX@1.1.16 bblanchon/StreamUtils@1.9.0 - hpsaturn/EasyPreferences@0.1.2 - hpsaturn/ESP32 Wifi CLI@0.3.2 + hpsaturn/EasyPreferences@0.1.3 + hpsaturn/ESP32 Wifi CLI@0.3.3 kubafilinger/AsyncTCP@1.1.1 - esphome/ESPAsyncWebServer-esphome@2.1.0 + esphome/ESPAsyncWebServer-esphome@3.3.0 [esp32_common] extends = common @@ -58,7 +58,7 @@ board = icenav-esp32-s3 lib_deps = ${common.lib_deps} adafruit/Adafruit Unified Sensor@1.1.14 - adafruit/Adafruit BusIO@1.16.1 + adafruit/Adafruit BusIO@1.16.2 adafruit/Adafruit BME280 Library@2.2.4 dfrobot/DFRobot_QMC5883@1.0.0 build_flags = @@ -83,7 +83,7 @@ board = elecrow-esp32-s3-n16r8v-terminal lib_deps = ${common.lib_deps} ; adafruit/Adafruit Unified Sensor@1.1.14 -; adafruit/Adafruit BusIO@1.16.1 +; adafruit/Adafruit BusIO@1.16.2 ; adafruit/Adafruit BME280 Library@2.2.4 ; dfrobot/DFRobot_QMC5883@1.0.0 build_flags = @@ -122,7 +122,7 @@ board_build.partitions = default_16MB.csv lib_deps = ${common.lib_deps} ; adafruit/Adafruit Unified Sensor@1.1.14 -; adafruit/Adafruit BusIO@1.16.1 +; adafruit/Adafruit BusIO@1.16.2 ; adafruit/Adafruit BME280 Library@2.2.4 ; dfrobot/DFRobot_QMC5883@1.0.0 build_flags = @@ -143,7 +143,7 @@ board_build.partitions = default_16MB.csv lib_deps = ${common.lib_deps} ; adafruit/Adafruit Unified Sensor@1.1.14 -; adafruit/Adafruit BusIO@1.16.1 +; adafruit/Adafruit BusIO@1.16.2 ; adafruit/Adafruit BME280 Library@2.2.4 ; dfrobot/DFRobot_QMC5883@1.0.0 build_flags = From 487235911d686431e37cb9ecd7ed4d9a35495153 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Wed, 13 Nov 2024 20:40:06 +0100 Subject: [PATCH 03/55] fix(gps): Maintain last fixed coordinates after fix --- lib/gps/gps.cpp | 5 +++-- src/main.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/gps/gps.cpp b/lib/gps/gps.cpp index 9a8f1f90..74fcdd0d 100644 --- a/lib/gps/gps.cpp +++ b/lib/gps/gps.cpp @@ -151,8 +151,9 @@ void getGPSData() gpsData.speed = (uint16_t)fix.speed_kph(); // Latitude and Longitude - gpsData.latitude = getLat(); - gpsData.longitude = getLon(); + if (fix.valid.location) + gpsData.latitude = getLat(); + gpsData.longitude = getLon(); // Heading if (fix.valid.heading) diff --git a/src/main.cpp b/src/main.cpp index 40b743f6..ba693aea 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -104,6 +104,9 @@ void setup() mapTempSprite.deleteSprite(); mapTempSprite.createSprite(TILE_WIDTH, TILE_HEIGHT); + gpsData.latitude = getLat(); + gpsData.longitude = getLon(); + // Preload Map if (isVectorMap) { @@ -111,8 +114,6 @@ void setup() else { // Get init Latitude and Longitude - gpsData.latitude = getLat(); - gpsData.longitude = getLon(); tileSize = RENDER_TILE_SIZE; generateRenderMap(); } From 0ec35380ee58f8e16a8cdaf11004e40d80e0698d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jordi=20Gauch=C3=ADa?= Date: Thu, 14 Nov 2024 09:22:56 +0100 Subject: [PATCH 04/55] build: Fix espressif version --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index b9828ab5..4023d7c7 100644 --- a/platformio.ini +++ b/platformio.ini @@ -13,7 +13,7 @@ description = ESP32 GPS Navigator default_envs = ICENAV_BOARD [common] -platform = espressif32 +platform = espressif32@6.9.0 framework = arduino version = 0.1.9_alpha revision = 82 From 5a9e25979006674479c59a5ba04ff6df5de9a447 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Thu, 14 Nov 2024 23:00:19 +0100 Subject: [PATCH 05/55] feat(wpt): Add back button in waypoint add/edit screen --- lib/gui/src/waypointScr.cpp | 59 ++++++++++++++++++++++++++++++------- lib/gui/src/waypointScr.hpp | 1 + 2 files changed, 50 insertions(+), 10 deletions(-) diff --git a/lib/gui/src/waypointScr.cpp b/lib/gui/src/waypointScr.cpp index 425bfcfd..e56feb8b 100644 --- a/lib/gui/src/waypointScr.cpp +++ b/lib/gui/src/waypointScr.cpp @@ -55,8 +55,6 @@ static void waypointScreenEvent(lv_event_t *event) editWaypointName(loadWpt.name, newName); } break; - // default: - // break; } isMainScreen = true; @@ -106,8 +104,6 @@ static void waypointScreenEvent(lv_event_t *event) editWaypointName(loadWpt.name, newName); } break; - // default: - // break; } isMainScreen = true; @@ -155,6 +151,46 @@ static void rotateScreen(lv_event_t *event) lv_refr_now(display); } +/** + * @brief Waypoint Name event + * + * @param event + */ +static void waypointNameEvent(lv_event_t *event) +{ + lv_event_code_t code = lv_event_get_code(event); + if(code == LV_EVENT_CLICKED) + { + switch (wptAction) + { + case WPT_ADD: + addWpt.name = (char *)lv_textarea_get_text(waypointName); + + if ( strcmp(addWpt.name,"") != 0) + { + openGpxFile(wptFile); + vTaskDelay(100); + addWaypointToFile(wptFile,addWpt); + } + break; + case WPT_EDIT: + char *newName = (char *)lv_textarea_get_text(waypointName); + + if ( strcmp(loadWpt.name, newName) != 0) + { + editWaypointName(loadWpt.name, newName); + } + break; + } + + isMainScreen = true; + redrawMap = true; + wptAction = WPT_NONE; + lv_refr_now(display); + loadMainScreen(); + } +} + /** * @brief Update current waypoint postion to add * @@ -221,13 +257,16 @@ void createWaypointScreen() lv_obj_center(rotateScreenLbl); #endif - lv_obj_t* label; - label = lv_label_create(waypointScreen); - lv_obj_set_style_text_font(label, fontOptions, 0); - lv_label_set_text_static(label, "Waypoint Name:"); - lv_obj_center(label); - lv_obj_align(label,LV_ALIGN_TOP_LEFT,10,10); + lv_obj_t* labelWpt; + labelWpt = lv_label_create(waypointScreen); + lv_obj_set_style_text_font(labelWpt, fontOptions, 0); + lv_label_set_text_static(labelWpt, LV_SYMBOL_LEFT " Waypoint Name:"); + lv_obj_center(labelWpt); + lv_obj_align(labelWpt,LV_ALIGN_TOP_LEFT,10,10); + lv_obj_add_flag(labelWpt, LV_OBJ_FLAG_CLICKABLE); + lv_obj_add_event_cb(labelWpt, waypointNameEvent, LV_EVENT_ALL, NULL); + lv_obj_t* label; label = lv_label_create(waypointScreen); lv_obj_set_style_text_font(label, fontOptions, 0); lv_label_set_text_static(label, "Lat:"); diff --git a/lib/gui/src/waypointScr.hpp b/lib/gui/src/waypointScr.hpp index 111f95c8..593be18b 100644 --- a/lib/gui/src/waypointScr.hpp +++ b/lib/gui/src/waypointScr.hpp @@ -19,6 +19,7 @@ void loadMainScreen(); static void waypointScreenEvent(lv_event_t *event); static void rotateScreen(lv_event_t *event); +static void waypointNameEvent(lv_event_t *event); void updateWaypointPos(); void createWaypointScreen(); From 6877719369206cadb740d4dbf5a2e09b9c70b0b5 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Thu, 14 Nov 2024 23:23:52 +0100 Subject: [PATCH 06/55] fix(wpt): Fix waypoint add/edit rotation button size --- lib/gui/src/waypointScr.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/gui/src/waypointScr.cpp b/lib/gui/src/waypointScr.cpp index e56feb8b..e8bcb441 100644 --- a/lib/gui/src/waypointScr.cpp +++ b/lib/gui/src/waypointScr.cpp @@ -252,6 +252,7 @@ void createWaypointScreen() lv_obj_align(rotateScreenBtn, LV_ALIGN_TOP_RIGHT, -10, 5); lv_obj_add_flag(rotateScreenBtn, LV_OBJ_FLAG_CLICKABLE); lv_obj_add_event_cb(rotateScreenBtn, rotateScreen, LV_EVENT_CLICKED, NULL); + lv_obj_set_size(rotateScreenBtn, 40, 35); lv_obj_t *rotateScreenLbl = lv_label_create(rotateScreenBtn); lv_label_set_text(rotateScreenLbl, LV_SYMBOL_LOOP); lv_obj_center(rotateScreenLbl); From cff1c7a12ebda7b9cdcec51b3bc8fdbd27652b08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jordi=20Gauch=C3=ADa?= Date: Fri, 15 Nov 2024 07:29:26 +0100 Subject: [PATCH 07/55] docs: Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 2d9180b8..23fe16ca 100644 --- a/README.md +++ b/README.md @@ -84,8 +84,6 @@ If the board has a BOOT button (GPIO0) it is possible to use power saving functi To do this, simply include the following Build Flag in the required env in platformio.ini ```-DPOWER_SAVE```
-```-DARDUINO_RUNNING_CORE=1```
-```-DARDUINO_EVENT_RUNNING_CORE=1```
> [!IMPORTANT] > Currently, this project can run on any board with an ESP32S3 and at least a 320x480 TFT screen. The idea is to support all existing boards on the market that I can get to work, so if you don't want to use the specific IceNav board, please feel free to create an issue, and I will look into providing support. From fff3bfcde397a98559ef0ab0150890fd78ef0147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jordi=20Gauch=C3=ADa?= Date: Fri, 15 Nov 2024 07:31:11 +0100 Subject: [PATCH 08/55] fix(board): Fix elecrow board definition --- boards/elecrow-esp32-s3-n16r8v-terminal.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/boards/elecrow-esp32-s3-n16r8v-terminal.json b/boards/elecrow-esp32-s3-n16r8v-terminal.json index 730b6480..1bdd7ad9 100644 --- a/boards/elecrow-esp32-s3-n16r8v-terminal.json +++ b/boards/elecrow-esp32-s3-n16r8v-terminal.json @@ -8,9 +8,7 @@ "core": "esp32", "extra_flags": [ "-DBOARD_HAS_PSRAM", - "-DARDUINO_USB_MODE=1", - "-DARDUINO_RUNNING_CORE=1", - "-DARDUINO_EVENT_RUNNING_CORE=1" + "-DARDUINO_USB_MODE=1" ], "f_cpu": "240000000L", "f_flash": "80000000L", From 043dd1bc6328dbb601f3cb7ad95637ae0154a6e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jordi=20Gauch=C3=ADa?= Date: Fri, 15 Nov 2024 07:43:46 +0100 Subject: [PATCH 09/55] docs: Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 23fe16ca..607f783c 100644 --- a/README.md +++ b/README.md @@ -336,7 +336,7 @@ To access the Web File Server, simply use any browser and go to the following ad - [X] Vector maps - [ ] Google Maps navigation style - [x] Optimize code -- [ ] Fix bugs! +- [X] Fix bugs! - [X] Web file server From f91aed0f604e767ee5d4cdd5b9fdaa890d1a4334 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Fri, 15 Nov 2024 08:45:23 +0100 Subject: [PATCH 10/55] fix(board): Fix IceNav board definition --- boards/icenav-esp32-s3.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/boards/icenav-esp32-s3.json b/boards/icenav-esp32-s3.json index ef141a4a..19728ee6 100644 --- a/boards/icenav-esp32-s3.json +++ b/boards/icenav-esp32-s3.json @@ -11,8 +11,6 @@ "-DBOARD_HAS_PSRAM", "-DARDUINO_USB_MODE=1", "-DARDUINO_USB_CDC_ON_BOOT=1", - "-DARDUINO_RUNNING_CORE=1", - "-DARDUINO_EVENT_RUNNING_CORE=1", "-DPOWER_SAVE", "-DADC2", "-DBATT_PIN=ADC2_CHANNEL_6", From cd6d568188ffd694ce929389a9f63c9c3241ce59 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sat, 16 Nov 2024 12:34:41 +0100 Subject: [PATCH 11/55] refactor(cli): Delete settings option from CLI --- README.md | 3 --- lib/cli/cli.cpp | 43 ------------------------------------------- platformio.ini | 2 +- 3 files changed, 1 insertion(+), 47 deletions(-) diff --git a/README.md b/README.md index 607f783c..25c71863 100644 --- a/README.md +++ b/README.md @@ -246,7 +246,6 @@ outnmea: toggle GPS NMEA output (or Ctrl+C to stop) poweroff: perform a ESP32 deep sleep reboot: perform a ESP32 reboot scshot: screenshot to SD or sending a PC -settings: device settings waypoint: waypoint utilities webfile: enable/disable Web file server wipe: wipe preferences to factory default @@ -298,8 +297,6 @@ nc -l -p 8123 > screenshot.png Additionally, you can download the screenshot with webfile server. -**settings**: Device settings type `settings` for detailed options. - **waypoint**: type `waypoint` for detailed options. Additionally, this waypoint command can send the waypoint over WiFi using the following syntax (replace IP with your PC IP): diff --git a/lib/cli/cli.cpp b/lib/cli/cli.cpp index 6d836280..f5bacbf7 100644 --- a/lib/cli/cli.cpp +++ b/lib/cli/cli.cpp @@ -267,48 +267,6 @@ void wcli_waypoint(char *args, Stream *response) } } -void wcli_settings(char *args, Stream *response) -{ - Pair operands = wcli.parseCommand(args); - String commands = operands.first(); - String value = operands.second(); - int8_t gpio = -1; - - if (commands.isEmpty()) - { - response->println(""); - response->println(F( "\033[1;31m----\033[1;32m Available commands \033[1;31m----\033[0;37m\r\n" )); - response->println(F( "\033[1;32msetgpstx:\t\033[0;37mset GPS Tx GPIO")); - response->println(F( "\033[1;32msetgpsrx:\t\033[0;37mset GPS Rx GPIO")); - } - else if (commands.equals("setgpstx")) - { - if(value.isEmpty()) - response->println(F("Tx GPIO missing, use: setgpstx \033[1;32mGPIO\033[0;37m")); - else - { - gpio = value.toInt(); - saveGpsGpio(gpio, -1); - response->println(""); - response->printf("GPS \033[1;31mTx GPIO\033[0;37m set to: \033[1;32m%i\033[0;37m\r\n",gpio); - response->println("Please reboot device"); - } - } - else if (commands.equals("setgpsrx")) - { - if(value.isEmpty()) - response->println(F("Rx GPIO missing, use: setgpsrx \033[1;32mGPIO\033[0;37m")); - else - { - gpio = value.toInt(); - saveGpsGpio(-1, gpio); - response->println(""); - response->printf("GPS \033[1;31mRx GPIO\033[0;37m set to: \033[1;32m%i\033[0;37m\r\n",gpio); - response->println("Please reboot device"); - } - } -} - void wcli_outnmea (char *args, Stream *response){ nmea_output_enable = !nmea_output_enable; } @@ -365,7 +323,6 @@ void initShell(){ wcli.add("clear", &wcli_clear, "\t\tclear shell"); wcli.add("scshot", &wcli_scshot, "\tscreenshot to SD or sending a PC"); wcli.add("waypoint", &wcli_waypoint, "\twaypoint utilities"); - wcli.add("settings", &wcli_settings, "\tdevice settings"); wcli.add("webfile", &wcli_webfile, "\tenable/disable Web file server"); wcli.add("klist", &wcli_klist, "\t\tlist of user preferences. ('all' param show all)"); wcli.add("kset", &wcli_kset, "\t\tset an user extra preference"); diff --git a/platformio.ini b/platformio.ini index 4023d7c7..0c321b26 100644 --- a/platformio.ini +++ b/platformio.ini @@ -34,7 +34,7 @@ build_flags = -D SHELLMINATOR_BUFF_DIM=70 -D SHELLMINATOR_LOGO_COLOR=BLUE -D COMMANDER_MAX_COMMAND_SIZE=70 - -D WCLI_MAX_CMDS=14 # set n+1 of defined commands for CLI + -D WCLI_MAX_CMDS=12 # set n+1 of defined commands for CLI ; -D DISABLE_CLI_TELNET=1 # disable remote access via telnet. It needs CLI ; -D DISABLE_CLI=1 # removed CLI module. Config via Bluetooth only From 2a21a638eb0a35aab271baa766f3d7c8ce2154a9 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sat, 16 Nov 2024 12:44:32 +0100 Subject: [PATCH 12/55] fix(cli): Fix poweroff CLI option --- lib/cli/cli.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cli/cli.cpp b/lib/cli/cli.cpp index f5bacbf7..ebf19034 100644 --- a/lib/cli/cli.cpp +++ b/lib/cli/cli.cpp @@ -28,7 +28,7 @@ void wcli_reboot(char *args, Stream *response) } void wcli_poweroff(char *args, Stream *response) { - deviceSuspend(); + deviceShutdown(); } void wcli_info(char *args, Stream *response) From 6a029810ee6083324b524ade39c4361e3adb416f Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sat, 16 Nov 2024 22:20:19 +0100 Subject: [PATCH 13/55] fix(power): Fix deep sleep for IceNav board --- lib/power/power.cpp | 12 +++++++++--- src/main.cpp | 7 ++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/lib/power/power.cpp b/lib/power/power.cpp index c5a51c91..faa2ed60 100644 --- a/lib/power/power.cpp +++ b/lib/power/power.cpp @@ -21,9 +21,14 @@ void powerDeepSleep() esp_wifi_stop(); esp_deep_sleep_disable_rom_logging(); delay(10); - // If you need other peripherals to maintain power, please set the IO port to hold - // gpio_hold_en((gpio_num_t)BOARD_POWERON); - // gpio_deep_sleep_hold_en(); + + #ifdef ICENAV_BOARD + // If you need other peripherals to maintain power, please set the IO port to hold + gpio_hold_en((gpio_num_t)TFT_BL); + gpio_hold_en((gpio_num_t)BOARD_BOOT_PIN); + gpio_deep_sleep_hold_en(); + #endif + esp_sleep_enable_ext1_wakeup(1ull << BOARD_BOOT_PIN, ESP_EXT1_WAKEUP_ANY_LOW); esp_deep_sleep_start(); } @@ -83,6 +88,7 @@ void deviceShutdown() void powerOffPeripherals() { tftOff(); + tft.fillScreen(TFT_BLACK); SPI.end(); Wire.end(); } diff --git a/src/main.cpp b/src/main.cpp index ba693aea..ff18c3ea 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -59,7 +59,12 @@ void setup() // Force GPIO0 to internal PullUP during boot (avoid LVGL key read) #ifdef POWER_SAVE - pinMode(BOARD_BOOT_PIN,INPUT_PULLUP); + pinMode(BOARD_BOOT_PIN,INPUT_PULLUP); + #ifdef ICENAV_BOARD + gpio_hold_dis((gpio_num_t)TFT_BL); + gpio_hold_dis((gpio_num_t)BOARD_BOOT_PIN); + gpio_deep_sleep_hold_dis(); + #endif #endif #ifdef ARDUINO_USB_CDC_ON_BOOT From 8038ff6f3526cc9a4938d022b5bd5a3851bf266e Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sun, 17 Nov 2024 01:03:18 +0100 Subject: [PATCH 14/55] feat(cli): Add GMT user settings (kset) in CLI #159 --- README.md | 1 + lib/gps/timezone.hpp | 14 ++++++-------- lib/preferences/preferences-keys.h | 1 + lib/settings/settings.cpp | 2 ++ 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 25c71863..a57e1edc 100644 --- a/README.md +++ b/README.md @@ -267,6 +267,7 @@ Some extra details: VmaxBatt custom VminBatt custom tempOffs custom + defGMT custom ``` **kset KEYNAME**: Set user custom settings: diff --git a/lib/gps/timezone.hpp b/lib/gps/timezone.hpp index 2b9a6709..a380b818 100644 --- a/lib/gps/timezone.hpp +++ b/lib/gps/timezone.hpp @@ -9,14 +9,7 @@ #ifndef TIMEZONE_HPP #define TIMEZONE_HPP -// Set these values to the offset of your timezone from GMT - -static const int32_t zone_hours = 1L; -static const int32_t zone_minutes = 0L; // usually zero -static const NeoGPS::clock_t zone_offset = - zone_hours * NeoGPS::SECONDS_PER_HOUR + - zone_minutes * NeoGPS::SECONDS_PER_MINUTE; - +extern int32_t defGMT; // Default GMT offset // Uncomment one DST changeover rule, or define your own: @@ -51,6 +44,11 @@ static void adjustTime( NeoGPS::time_t & dt ) { NeoGPS::clock_t seconds = dt; // convert date/time structure to seconds + // Set these values to the offset of your timezone from GMT + static const int32_t zone_minutes = 0L; // usually zero + static const NeoGPS::clock_t zone_offset = (int32_t)defGMT * NeoGPS::SECONDS_PER_HOUR + + zone_minutes * NeoGPS::SECONDS_PER_MINUTE; + #ifdef CALCULATE_DST // Calculate DST changeover times once per reset and year! static NeoGPS::time_t changeover; diff --git a/lib/preferences/preferences-keys.h b/lib/preferences/preferences-keys.h index 88d13d00..09a1d110 100644 --- a/lib/preferences/preferences-keys.h +++ b/lib/preferences/preferences-keys.h @@ -29,4 +29,5 @@ X(KVMAX_BATT, "VmaxBatt", FLOAT) \ X(KVMIN_BATT, "VminBatt", FLOAT) \ X(KTEMP_OFFS, "tempOffs", INT) \ + X(KGMT_OFFS, "defGMT", INT) \ X(KCOUNT, "KCOUNT", UNKNOWN) diff --git a/lib/settings/settings.cpp b/lib/settings/settings.cpp index 2adfeea2..7a797369 100644 --- a/lib/settings/settings.cpp +++ b/lib/settings/settings.cpp @@ -31,6 +31,7 @@ uint8_t zoom = 0; // Actual Zoom Level bool isMapRotation = true; // Map Compass Rotation uint8_t defaultZoom = 0; // Default Zoom Value uint8_t defBright = 255; // Default Brightness +int32_t defGMT = 1; // Default GMT offset bool showMapCompass = true; // Compass in map screen bool isCompassRot = true; // Compass rotation in map screen bool showMapSpeed = true; // Speed in map screen @@ -81,6 +82,7 @@ void loadPreferences() speedPosY = cfg.getInt(PKEYS::KSPEED_Y, TFT_HEIGHT - 130); isVectorMap = cfg.getBool(PKEYS::KMAP_VECTOR, false); defBright = cfg.getUInt(PKEYS::KDEF_BRIGT, 254); + defGMT = cfg.getInt(PKEYS::KGMT_OFFS, 1); if (isVectorMap) { minZoom = 1; From 36bb08978d6d370e5b32cbc5f0c37e8bfc112e6f Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sun, 17 Nov 2024 11:56:25 +0100 Subject: [PATCH 15/55] refactor(storage): Refactor to class --- lib/gui/src/notifyBar.cpp | 5 +- lib/storage/storage.cpp | 107 +++++++++++++++++++++----------------- lib/storage/storage.hpp | 17 ++++-- src/main.cpp | 6 ++- 4 files changed, 80 insertions(+), 55 deletions(-) diff --git a/lib/gui/src/notifyBar.cpp b/lib/gui/src/notifyBar.cpp index cbcebce9..6c85b8fc 100644 --- a/lib/gui/src/notifyBar.cpp +++ b/lib/gui/src/notifyBar.cpp @@ -7,6 +7,7 @@ */ #include "notifyBar.hpp" +#include "storage.hpp" #include "font/lv_symbol_def.h" #include "misc/lv_event.h" @@ -14,6 +15,8 @@ lv_obj_t *mainScreen; lv_obj_t *notifyBarIcons; lv_obj_t *notifyBarHour; +Storage storage; + /** * @brief Update notify bar event * @@ -168,7 +171,7 @@ void createNotifyBar() lv_obj_add_event_cb(temp, updateNotifyBar, LV_EVENT_VALUE_CHANGED, NULL); #endif - if (isSdLoaded) + if (storage.getSdLoaded()) { sdCard = lv_label_create(notifyBarIcons); lv_label_set_text_static(sdCard, LV_SYMBOL_SD_CARD); diff --git a/lib/storage/storage.cpp b/lib/storage/storage.cpp index 8a26730e..e04ad8e6 100644 --- a/lib/storage/storage.cpp +++ b/lib/storage/storage.cpp @@ -10,74 +10,85 @@ #include "esp_err.h" #include "esp_spiffs.h" -bool isSdLoaded = false; +// Pin definitions (should be configurable if needed) extern const int SD_CS; extern const int SD_MISO; extern const int SD_MOSI; extern const int SD_CLK; -extern const int BOARD_TFT_CS; -extern const int RADIO_CS_PIN; + +Storage::Storage() : isSdLoaded(false) {} + /** * @brief SD Card init * */ -void initSD() +void Storage::initSD() { - bool SDInitOk = false; - pinMode(SD_CS,OUTPUT); - digitalWrite(SD_CS,LOW); + bool SDInitOk = false; + pinMode(SD_CS, OUTPUT); + digitalWrite(SD_CS, LOW); - SPI.begin(SD_CLK, SD_MISO, SD_MOSI); - SDInitOk = SD.begin(SD_CS, SPI, sdFreq); - - if (!SDInitOk) - { - log_e("SD Card Mount Failed"); - return; - } - else - { - log_v("SD Card Mounted"); - isSdLoaded = true; - } - } + SPI.begin(SD_CLK, SD_MISO, SD_MOSI); + + if (!SD.begin(SD_CS, SPI, sdFreq)) + { + log_e("SD Card Mount Failed"); + isSdLoaded = false; + } + else + { + log_v("SD Card Mounted"); + isSdLoaded = true; + } +} /** - * @brief SPIFFS Init + * @brief SPIFFS initialization * + * @return esp_err_t Error code for SPIFFS setup */ -esp_err_t initSPIFFS() +esp_err_t Storage::initSPIFFS() { - log_i("Initializing SPIFFS"); + log_i("Initializing SPIFFS"); - esp_vfs_spiffs_conf_t conf = { - .base_path = "/spiffs", - .partition_label = NULL, - .max_files = 5, - .format_if_mount_failed = false - }; + esp_vfs_spiffs_conf_t conf = + { + .base_path = "/spiffs", + .partition_label = NULL, + .max_files = 5, + .format_if_mount_failed = false + }; - esp_err_t ret = esp_vfs_spiffs_register(&conf); + esp_err_t ret = esp_vfs_spiffs_register(&conf); - if (ret !=ESP_OK) - { - if (ret == ESP_FAIL) - log_e("Failed to mount or format filesystem"); - else if (ret == ESP_ERR_NOT_FOUND) - log_e("Failed to find SPIFFS partition"); + if (ret != ESP_OK) + { + if (ret == ESP_FAIL) + log_e("Failed to mount or format filesystem"); + else if (ret == ESP_ERR_NOT_FOUND) + log_e("Failed to find SPIFFS partition"); + else + log_e("Failed to initialize SPIFFS (%s)", esp_err_to_name(ret)); + return ESP_FAIL; + } + + size_t total = 0, used = 0; + ret = esp_spiffs_info(NULL, &total, &used); + if (ret != ESP_OK) + log_e("Failed to get SPIFFS partition information (%s)", esp_err_to_name(ret)); else - log_e("Failed to initialize SPIFFS (%s)",esp_err_to_name(ret)); - return ESP_FAIL; - } + log_i("Partition size: total: %d used: %d", total, used); - size_t total = 0, used = 0; - ret = esp_spiffs_info(NULL, &total, &used); - if (ret!= ESP_OK) - log_e("Failed to get SPIFFS partition information (%s)", esp_err_to_name(ret)); - else - log_i("Partition size: total: %d used: %d", total, used); - - return ESP_OK; + return ESP_OK; } +/** + * @brief Get SD status + * + * @return true if SD card is loaded, false otherwise + */ +bool Storage::getSdLoaded() const +{ + return isSdLoaded; +} diff --git a/lib/storage/storage.hpp b/lib/storage/storage.hpp index ec754c21..35ccac5a 100644 --- a/lib/storage/storage.hpp +++ b/lib/storage/storage.hpp @@ -14,11 +14,20 @@ #include #include -static uint32_t sdFreq = 40000000; -extern bool isSdLoaded; +class Storage +{ +private: + bool isSdLoaded; + static const uint32_t sdFreq = 40000000; -void initSD(); -esp_err_t initSPIFFS(); +public: + Storage(); + + void initSD(); + esp_err_t initSPIFFS(); + + bool getSdLoaded() const; +}; #endif diff --git a/src/main.cpp b/src/main.cpp index ff18c3ea..ab043f91 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -40,6 +40,7 @@ #endif extern xSemaphoreHandle gpsMutex; +extern Storage storage; #include "webpage.h" #include "webserver.h" @@ -49,6 +50,7 @@ extern xSemaphoreHandle gpsMutex; #include "lvglSetup.hpp" #include "tasks.hpp" + /** * @brief Setup * @@ -97,8 +99,8 @@ void setup() #endif powerOn(); - initSD(); - initSPIFFS(); + storage.initSD(); + storage.initSPIFFS(); initTFT(); loadPreferences(); initGPS(); From 9a4ae4883c94c8d6ccf0e5aea1ad724a550b3d2a Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sun, 17 Nov 2024 13:38:00 +0100 Subject: [PATCH 16/55] refactor(battery): Refactor to class --- lib/battery/battery.cpp | 102 +++++++++++++++++++------------------- lib/battery/battery.hpp | 21 ++++---- lib/gui/src/notifyBar.cpp | 14 +++--- lib/gui/src/notifyBar.hpp | 7 ++- lib/settings/settings.cpp | 7 ++- lib/settings/settings.hpp | 2 - src/main.cpp | 8 ++- 7 files changed, 86 insertions(+), 75 deletions(-) diff --git a/lib/battery/battery.cpp b/lib/battery/battery.cpp index 33010b99..278e8f3d 100644 --- a/lib/battery/battery.cpp +++ b/lib/battery/battery.cpp @@ -9,73 +9,75 @@ #include "battery.hpp" -/** - * @brief Battery values - * - */ -uint8_t battLevel = 0; -uint8_t battLevelOld = 0; -float batteryMax = 4.2; // maximum voltage of battery -float batteryMin = 3.6; // minimum voltage of battery before shutdown + +// ADC characteristics (global for simplicity) +static esp_adc_cal_characteristics_t characteristics; + +Battery::Battery() {} /** * @brief Configure ADC Channel for battery reading * */ -void initADC() +void Battery::initADC() { - // When VDD_A is 3.3V: - // 0dB attenuation (ADC_ATTEN_DB_0) gives full-scale voltage 1.1V - // 2.5dB attenuation (ADC_ATTEN_DB_2_5) gives full-scale voltage 1.5V - // 6dB attenuation (ADC_ATTEN_DB_6) gives full-scale voltage 2.2V - // 12dB attenuation (ADC_ATTEN_DB_12) gives full-scale voltage 3.9V - - #ifdef ADC1 +#ifdef ADC1 adc1_config_width(ADC_WIDTH_BIT_12); - adc1_config_channel_atten(BATT_PIN, ADC_ATTEN_DB_12); - #endif + adc1_config_channel_atten(BATT_PIN, ADC_ATTEN_DB_12); +#endif - #ifdef ADC2 +#ifdef ADC2 adc2_config_channel_atten(BATT_PIN, ADC_ATTEN_DB_12); - #endif +#endif +} + +/** + * @brief Set battery voltage levels + * + * @param maxVoltage -> Full Charge voltage + * @param minVoltage -> Min Charge voltage + */ +void Battery::setBatteryLevels(float maxVoltage, float minVoltage) +{ + batteryMax = maxVoltage; + batteryMin = minVoltage; } /** - * @brief Read battery charge and return % + * @brief Read battery charge and return %. * * @return float -> % Charge */ -float batteryRead() +float Battery::readBattery() { - long sum = 0; // sum of samples taken - float voltage = 0.0; // calculated voltage - float output = 0.0; // output value - for (int i = 0; i < 100; i++) - { + long sum = 0; // Sum of samples taken + float voltage = 0.0; // Calculated voltage + float output = 0.0; // Output value + + for (int i = 0; i < 100; i++) + { + #ifdef ADC1 + sum += static_cast(adc1_get_raw(BATT_PIN)); + #endif + + #ifdef ADC2 + int readRaw; + esp_err_t r = adc2_get_raw(BATT_PIN, ADC_WIDTH_BIT_12, &readRaw); + if (r == ESP_OK) + sum += static_cast(readRaw); + #endif - #ifdef ADC1 - sum += (long)adc1_get_raw(BATT_PIN); - #endif + delayMicroseconds(150); + } - #ifdef ADC2 - int readRaw; - esp_err_t r = adc2_get_raw(BATT_PIN, ADC_WIDTH_BIT_12, &readRaw); - if (r == ESP_OK) - sum += (long)readRaw; - #endif + voltage = sum / 100.0; + // Custom board has a divider circuit + constexpr float R1 = 100000.0; // Resistance of R1 (100K) + constexpr float R2 = 100000.0; // Resistance of R2 (100K) + voltage = (voltage * V_REF) / 4096.0; + voltage = voltage / (R2 / (R1 + R2)); + voltage = roundf(voltage * 100) / 100; - delayMicroseconds(150); - } - voltage = sum / (float)100; - // custom board has a divider circuit - float R1 = 100000.0; // resistance of R1 (100K) - float R2 = 100000.0; // resistance of R2 (100K) - voltage = (voltage * V_REF) / 4096.0; - voltage = voltage / (R2 / (R1 + R2)); - voltage = roundf(voltage * 100) / 100; - output = ((voltage - batteryMin) / (batteryMax - batteryMin)) * 100; - if (output <= 160) - return output; - else - return 0.0f; + output = ((voltage - batteryMin) / (batteryMax - batteryMin)) * 100; + return (output <= 160) ? output : 0.0f; } diff --git a/lib/battery/battery.hpp b/lib/battery/battery.hpp index b972fe63..072f360e 100644 --- a/lib/battery/battery.hpp +++ b/lib/battery/battery.hpp @@ -13,16 +13,19 @@ #include #include -static esp_adc_cal_characteristics_t characteristics; -#define V_REF 3.9 // ADC reference voltage +class Battery +{ +private: + float batteryMax; + float batteryMin; + static constexpr float V_REF = 3.9; // ADC reference voltage -extern float batteryMax; // 4.2; // maximum voltage of battery -extern float batteryMin; // 3.6; // minimum voltage of battery before shutdown +public: + Battery(); -extern uint8_t battLevel; -extern uint8_t battLevelOld; - -void initADC(); -float batteryRead(); + void initADC(); + void setBatteryLevels(float maxVoltage, float minVoltage); + float readBattery(); +}; #endif diff --git a/lib/gui/src/notifyBar.cpp b/lib/gui/src/notifyBar.cpp index 6c85b8fc..06a8709a 100644 --- a/lib/gui/src/notifyBar.cpp +++ b/lib/gui/src/notifyBar.cpp @@ -7,7 +7,6 @@ */ #include "notifyBar.hpp" -#include "storage.hpp" #include "font/lv_symbol_def.h" #include "misc/lv_event.h" @@ -16,6 +15,7 @@ lv_obj_t *notifyBarIcons; lv_obj_t *notifyBarHour; Storage storage; +Battery battery; /** * @brief Update notify bar event @@ -37,7 +37,7 @@ void updateNotifyBar(lv_event_t *event) if (obj == gpsCount) lv_label_set_text_fmt(obj, LV_SYMBOL_GPS "%2d", gpsData.satellites); - if (obj == battery) + if (obj == battIcon) { if (battLevel <= 160 && battLevel > 140) lv_label_set_text_static(obj, " " LV_SYMBOL_CHARGE); @@ -118,10 +118,10 @@ void updateNotifyBarTimer(lv_timer_t *t) } #endif - battLevel = batteryRead(); + battLevel = battery.readBattery(); if (battLevel != battLevelOld) { - lv_obj_send_event(battery, LV_EVENT_VALUE_CHANGED, NULL); + lv_obj_send_event(battIcon, LV_EVENT_VALUE_CHANGED, NULL); battLevelOld = battLevel; } } @@ -191,9 +191,9 @@ void createNotifyBar() lv_label_set_text_static(gpsFixMode, "----"); lv_obj_add_event_cb(gpsFixMode, updateNotifyBar, LV_EVENT_VALUE_CHANGED, NULL); - battery = lv_label_create(notifyBarIcons); - lv_label_set_text_static(battery, LV_SYMBOL_BATTERY_EMPTY); - lv_obj_add_event_cb(battery, updateNotifyBar, LV_EVENT_VALUE_CHANGED, NULL); + battIcon = lv_label_create(notifyBarIcons); + lv_label_set_text_static(battIcon, LV_SYMBOL_BATTERY_EMPTY); + lv_obj_add_event_cb(battIcon, updateNotifyBar, LV_EVENT_VALUE_CHANGED, NULL); lv_timer_t *timerNotifyBar = lv_timer_create(updateNotifyBarTimer, UPDATE_NOTIFY_PERIOD, NULL); lv_timer_ready(timerNotifyBar); diff --git a/lib/gui/src/notifyBar.hpp b/lib/gui/src/notifyBar.hpp index 470bb14d..b0b9ba11 100644 --- a/lib/gui/src/notifyBar.hpp +++ b/lib/gui/src/notifyBar.hpp @@ -13,6 +13,8 @@ #include "globalGuiDef.h" #include "tasks.hpp" #include "storage.hpp" +#include "battery.hpp" +#include "settings.hpp" /** * @brief Notify Bar screen objects @@ -22,11 +24,14 @@ static lv_obj_t *gpsTime; // Time static lv_obj_t *gpsCount; // Satellite count static lv_obj_t *gpsFix; // Satellite fix static lv_obj_t *gpsFixMode; // Satellite fix mode -static lv_obj_t *battery; // Battery level +static lv_obj_t *battIcon; // Battery level static lv_obj_t *sdCard; // SD card icon static lv_obj_t *temp; // Temperature static lv_obj_t *wifi; // Wifi +static float battLevel = 0; +static float battLevelOld = 0; + #define UPDATE_NOTIFY_PERIOD 1000 // Notify Bar update time /** diff --git a/lib/settings/settings.cpp b/lib/settings/settings.cpp index 7a797369..315f3bfa 100644 --- a/lib/settings/settings.cpp +++ b/lib/settings/settings.cpp @@ -51,8 +51,8 @@ uint16_t speedPosY = 0; // Speed widget position Y bool enableWeb = true; // Enable/disable web file server bool showToolBar = false; // Show Map Toolbar int8_t tempOffset = 0; // BME Temperature offset -// float batteryMax = 0.0; // 4.2; // maximum voltage of battery -// float batteryMin = 0.0; // 3.6; // minimum voltage of battery before shutdown + +extern Battery battery; /** * @brief Load stored preferences @@ -114,8 +114,7 @@ void loadPreferences() speedPosY = cfg.isKey(CONFKEYS::KSPEED_Y) ? cfg.getInt(CONFKEYS::KSPEED_Y, speedPosY) : 94; #endif - batteryMax = cfg.getFloat(PKEYS::KVMAX_BATT,4.2); - batteryMin = cfg.getFloat(PKEYS::KVMIN_BATT,3.6); + battery.setBatteryLevels(cfg.getFloat(PKEYS::KVMAX_BATT,4.2),cfg.getFloat(PKEYS::KVMIN_BATT,3.6)); // compassPosX = 60; // compassPosY = 82; diff --git a/lib/settings/settings.hpp b/lib/settings/settings.hpp index f4b64b36..5da632cb 100644 --- a/lib/settings/settings.hpp +++ b/lib/settings/settings.hpp @@ -21,8 +21,6 @@ extern uint8_t defZoomRender; // Default Zoom Level for render map extern uint8_t defZoomVector; // Default Zoom Level for vector map extern uint8_t zoom; // Actual Zoom Level extern uint8_t defBright; // Default brightness -extern float batteryMax; // 4.2; // maximum voltage of battery -extern float batteryMin; // 3.6; // minimum voltage of battery before shutdown extern bool isMapRotation; // Map Compass Rotation extern uint8_t defaultZoom; // Default Zoom Value diff --git a/src/main.cpp b/src/main.cpp index ab043f91..072295cc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -40,11 +40,14 @@ #endif extern xSemaphoreHandle gpsMutex; -extern Storage storage; #include "webpage.h" #include "webserver.h" #include "battery.hpp" + +extern Storage storage; +extern Battery battery; + #include "power.hpp" #include "settings.hpp" #include "lvglSetup.hpp" @@ -101,11 +104,12 @@ void setup() powerOn(); storage.initSD(); storage.initSPIFFS(); + battery.initADC(); initTFT(); loadPreferences(); initGPS(); initLVGL(); - initADC(); + // Reserve PSRAM for buffer map mapTempSprite.deleteSprite(); From cf8ed80a6404d97006c9807e6fdf9967d03a0b18 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sun, 17 Nov 2024 14:28:21 +0100 Subject: [PATCH 17/55] build: Clear unused variables --- lib/battery/battery.cpp | 4 ---- lib/gui/src/mainScr.cpp | 1 - lib/gui/src/notifyBar.cpp | 2 -- lib/lvgl/src/lvglSetup.cpp | 2 -- lib/maps/src/vectorMaps.cpp | 2 -- lib/storage/storage.cpp | 1 - lib/webfile/src/webserver.h | 1 - 7 files changed, 13 deletions(-) diff --git a/lib/battery/battery.cpp b/lib/battery/battery.cpp index 278e8f3d..473306bd 100644 --- a/lib/battery/battery.cpp +++ b/lib/battery/battery.cpp @@ -9,10 +9,6 @@ #include "battery.hpp" - -// ADC characteristics (global for simplicity) -static esp_adc_cal_characteristics_t characteristics; - Battery::Battery() {} /** diff --git a/lib/gui/src/mainScr.cpp b/lib/gui/src/mainScr.cpp index 1627d2d1..671845cd 100644 --- a/lib/gui/src/mainScr.cpp +++ b/lib/gui/src/mainScr.cpp @@ -206,7 +206,6 @@ void updateMainScreen(lv_timer_t *t) */ void gestureEvent(lv_event_t *event) { - lv_obj_t *screen = (lv_obj_t *)lv_event_get_current_target(event); lv_dir_t dir = lv_indev_get_gesture_dir(lv_indev_get_act()); if (activeTile == MAP && isMainScreen) { diff --git a/lib/gui/src/notifyBar.cpp b/lib/gui/src/notifyBar.cpp index 06a8709a..d4ee873c 100644 --- a/lib/gui/src/notifyBar.cpp +++ b/lib/gui/src/notifyBar.cpp @@ -154,8 +154,6 @@ void createNotifyBar() lv_obj_add_style(notifyBarIcons, &styleBar, LV_PART_MAIN); lv_obj_add_style(notifyBarHour, &styleBar, LV_PART_MAIN); - lv_obj_t *label; - gpsTime = lv_label_create(notifyBarHour); lv_obj_set_style_text_font(gpsTime, fontLarge, 0); lv_label_set_text_fmt(gpsTime, timeFormat, 0, 0, 0); diff --git a/lib/lvgl/src/lvglSetup.cpp b/lib/lvgl/src/lvglSetup.cpp index 45b9af48..4b8e2acd 100644 --- a/lib/lvgl/src/lvglSetup.cpp +++ b/lib/lvgl/src/lvglSetup.cpp @@ -137,7 +137,6 @@ void IRAM_ATTR gpioRead(lv_indev_t *indev_driver, lv_indev_data_t *data) */ void gpioLongEvent(lv_event_t *event) { - lv_event_code_t code = lv_event_get_code(event); log_v("Shuting down device"); powerMsg = lv_msgbox_create(lv_scr_act()); lv_obj_set_width(powerMsg,TFT_WIDTH); @@ -158,7 +157,6 @@ void gpioLongEvent(lv_event_t *event) */ void gpioClickEvent(lv_event_t *event) { - lv_event_code_t code = lv_event_get_code(event); lv_indev_reset_long_press(lv_indev_active()); lv_indev_reset(NULL,lv_scr_act()); log_v("Entering sleep mode"); diff --git a/lib/maps/src/vectorMaps.cpp b/lib/maps/src/vectorMaps.cpp index 85f1de10..b6e5339b 100644 --- a/lib/maps/src/vectorMaps.cpp +++ b/lib/maps/src/vectorMaps.cpp @@ -204,7 +204,6 @@ BBox parseBbox(String str) MapBlock *readMapBlock(String fileName) { log_d("readMapBlock: %s", fileName.c_str()); - char c; char str[30]; MapBlock *mblock = new MapBlock(); fs::File file_ = SD.open(fileName + ".fmp"); @@ -236,7 +235,6 @@ MapBlock *readMapBlock(String fileName) uint32_t totalPoints = 0; Polygon polygon; Point16 p; - int16_t maxVectorZoom;// = 4; while (count > 0) { // log_d("line: %i", line); diff --git a/lib/storage/storage.cpp b/lib/storage/storage.cpp index e04ad8e6..faaa39d1 100644 --- a/lib/storage/storage.cpp +++ b/lib/storage/storage.cpp @@ -25,7 +25,6 @@ Storage::Storage() : isSdLoaded(false) {} */ void Storage::initSD() { - bool SDInitOk = false; pinMode(SD_CS, OUTPUT); digitalWrite(SD_CS, LOW); diff --git a/lib/webfile/src/webserver.h b/lib/webfile/src/webserver.h index 600236b8..a27abb39 100644 --- a/lib/webfile/src/webserver.h +++ b/lib/webfile/src/webserver.h @@ -237,7 +237,6 @@ String listFiles(bool ishtml, int page = 0) { String returnText = ""; - int fileIndex = 0; int startIdx = page * FILES_PER_PAGE; int endIdx = startIdx + FILES_PER_PAGE; From 2fc21c99b1b8bdcc4bb07a4224dd702a0f33b2de Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sun, 17 Nov 2024 16:23:36 +0100 Subject: [PATCH 18/55] refactor(power): Refactor to class --- lib/cli/cli.cpp | 4 ++- lib/lvgl/src/lvglSetup.cpp | 6 ++-- lib/power/power.cpp | 72 +++++++++++++++++++++++--------------- lib/power/power.hpp | 24 +++++++++---- lib/storage/storage.hpp | 1 - src/main.cpp | 5 +-- 6 files changed, 70 insertions(+), 42 deletions(-) diff --git a/lib/cli/cli.cpp b/lib/cli/cli.cpp index ebf19034..5cb46baa 100644 --- a/lib/cli/cli.cpp +++ b/lib/cli/cli.cpp @@ -22,13 +22,15 @@ const char logo[] = "" ; +extern Power power; + void wcli_reboot(char *args, Stream *response) { ESP.restart(); } void wcli_poweroff(char *args, Stream *response) { - deviceShutdown(); + power.deviceShutdown(); } void wcli_info(char *args, Stream *response) diff --git a/lib/lvgl/src/lvglSetup.cpp b/lib/lvgl/src/lvglSetup.cpp index 4b8e2acd..43f1e725 100644 --- a/lib/lvgl/src/lvglSetup.cpp +++ b/lib/lvgl/src/lvglSetup.cpp @@ -26,6 +26,8 @@ lv_group_t *scrGroup; // Screen group lv_group_t *keyGroup; // GPIO group lv_obj_t *powerMsg; // Power Message +Power power; + /** * @brief LVGL display update * @@ -148,7 +150,7 @@ void gpioLongEvent(lv_event_t *event) lv_obj_invalidate(powerMsg); lv_refr_now(display); vTaskDelay(2000); - deviceShutdown(); + power.deviceShutdown(); } /** @@ -170,7 +172,7 @@ void gpioClickEvent(lv_event_t *event) lv_obj_invalidate(powerMsg); lv_refr_now(display); vTaskDelay(2000); - deviceSuspend(); + power.deviceSuspend(); } /** diff --git a/lib/power/power.cpp b/lib/power/power.cpp index faa2ed60..62bdb978 100644 --- a/lib/power/power.cpp +++ b/lib/power/power.cpp @@ -10,11 +10,22 @@ extern const uint8_t BOARD_BOOT_PIN; +Power::Power() +{ + #ifdef DISABLE_RADIO + WiFi.disconnect(true); + WiFi.mode(WIFI_OFF); + btStop(); + esp_wifi_stop(); + esp_bt_controller_disable(); + #endif +} + /** * @brief Deep Sleep Mode * */ -void powerDeepSleep() +void Power::powerDeepSleep() { esp_bluedroid_disable(); esp_bt_controller_disable(); @@ -38,7 +49,7 @@ void powerDeepSleep() * * @param millis */ -void powerLightSleepTimer(int millis) +void Power::powerLightSleepTimer(int millis) { esp_sleep_enable_timer_wakeup(millis * 1000); esp_err_t rtc_gpio_hold_en(gpio_num_t GPIO_NUM_5); @@ -49,16 +60,27 @@ void powerLightSleepTimer(int millis) * @brief Sleep Mode * */ -void powerLightSleep() +void Power::powerLightSleep() { esp_sleep_enable_ext1_wakeup(1ull << BOARD_BOOT_PIN, ESP_EXT1_WAKEUP_ANY_LOW); esp_light_sleep_start(); } +/** + * @brief Power off peripherals devices + */ +void Power::powerOffPeripherals() +{ + tftOff(); + tft.fillScreen(TFT_BLACK); + SPI.end(); + Wire.end(); +} + /** * @brief Core light suspend and TFT off */ -void deviceSuspend() +void Power::deviceSuspend() { int brightness = tft.getBrightness(); lv_msgbox_close(powerMsg); @@ -75,35 +97,27 @@ void deviceSuspend() /** * @brief Power off peripherals and deep sleep + * */ -void deviceShutdown() +void Power::deviceShutdown() { powerOffPeripherals(); powerDeepSleep(); } -/** - * @brief Power off peripherals devices - */ -void powerOffPeripherals() -{ - tftOff(); - tft.fillScreen(TFT_BLACK); - SPI.end(); - Wire.end(); -} -/** - * @brief On Mode - * - */ -void powerOn() -{ -#ifdef DISABLE_RADIO - WiFi.disconnect(true); - WiFi.mode(WIFI_OFF); - btStop(); - esp_wifi_stop(); - esp_bt_controller_disable(); -#endif -} + +// /** +// * @brief On Mode +// * +// */ +// void powerOn() +// { +// #ifdef DISABLE_RADIO +// WiFi.disconnect(true); +// WiFi.mode(WIFI_OFF); +// btStop(); +// esp_wifi_stop(); +// esp_bt_controller_disable(); +// #endif +// } diff --git a/lib/power/power.hpp b/lib/power/power.hpp index 78192ab7..bc9e7db0 100644 --- a/lib/power/power.hpp +++ b/lib/power/power.hpp @@ -19,12 +19,22 @@ #include "lvgl.h" #include "globalGuiDef.h" -void powerDeepSeep(); -void powerLightSleepTimer(int millis); -void powerLightSleep(); -void powerOffPeripherals(); -void deviceSuspend(); -void deviceShutdown(); -void powerOn(); +// void powerOn(); + +class Power +{ +private: + void powerDeepSleep(); + void powerLightSleepTimer(int millis); + void powerLightSleep(); + void powerOffPeripherals(); + +public: + Power(); + + void deviceSuspend(); + void deviceShutdown(); +}; + #endif \ No newline at end of file diff --git a/lib/storage/storage.hpp b/lib/storage/storage.hpp index 35ccac5a..aa42897a 100644 --- a/lib/storage/storage.hpp +++ b/lib/storage/storage.hpp @@ -14,7 +14,6 @@ #include #include - class Storage { private: diff --git a/src/main.cpp b/src/main.cpp index 072295cc..f768ccd3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -44,11 +44,12 @@ extern xSemaphoreHandle gpsMutex; #include "webpage.h" #include "webserver.h" #include "battery.hpp" +#include "power.hpp" extern Storage storage; extern Battery battery; +extern Power power; -#include "power.hpp" #include "settings.hpp" #include "lvglSetup.hpp" #include "tasks.hpp" @@ -101,7 +102,7 @@ void setup() initCompass(); #endif - powerOn(); + // powerOn(); storage.initSD(); storage.initSPIFFS(); battery.initADC(); From 4b4f19904155b21ac67386cfc577efb2e28da681 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sun, 24 Nov 2024 11:37:01 +0100 Subject: [PATCH 19/55] refactor: Clean Code --- lib/gpx/src/addWaypoint.cpp | 2 +- lib/gpx/src/addWaypoint.hpp | 6 +----- lib/gpx/src/deleteWaypoint.hpp | 4 ---- lib/gpx/src/editWaypoint.hpp | 4 ---- lib/gpx/src/loadWaypoint.hpp | 5 ----- lib/gui/src/buttonBar.cpp | 5 ----- lib/gui/src/buttonBar.hpp | 2 ++ lib/gui/src/deviceSettingsScr.cpp | 1 - lib/gui/src/deviceSettingsScr.hpp | 2 -- lib/gui/src/globalGuiDef.h | 9 ++------- lib/gui/src/mainScr.cpp | 29 ++++------------------------- lib/gui/src/mainScr.hpp | 9 +++------ lib/gui/src/mapSettingsScr.cpp | 2 -- lib/gui/src/mapSettingsScr.hpp | 1 - lib/gui/src/navScr.hpp | 1 - lib/gui/src/notifyBar.cpp | 2 -- lib/gui/src/notifyBar.hpp | 1 - lib/gui/src/satInfoScr.cpp | 1 - lib/gui/src/satInfoScr.hpp | 1 - lib/gui/src/searchSatScr.cpp | 1 - lib/gui/src/searchSatScr.hpp | 1 - lib/gui/src/settingsScr.cpp | 1 - lib/gui/src/settingsScr.hpp | 2 -- lib/gui/src/splashScr.hpp | 1 - lib/gui/src/waypointListScr.hpp | 4 ---- lib/gui/src/waypointScr.cpp | 6 ------ lib/gui/src/waypointScr.hpp | 2 +- lib/gui/src/widgets.hpp | 2 -- lib/lvgl/src/lvglFuncs.hpp | 3 --- lib/lvgl/src/lvglSetup.cpp | 4 ---- lib/lvgl/src/lvglSetup.hpp | 19 ++++--------------- lib/maps/src/mapsDrawFunc.h | 4 ++-- lib/maps/src/renderMaps.cpp | 8 -------- lib/maps/src/renderMaps.hpp | 6 ------ lib/maps/src/vectorMaps.hpp | 7 ------- lib/power/power.hpp | 2 -- lib/settings/settings.cpp | 9 --------- lib/storage/storage.cpp | 10 ++++------ lib/storage/storage.hpp | 4 +--- lib/tasks/tasks.cpp | 2 -- lib/tasks/tasks.hpp | 6 +++++- lib/tft/tft.cpp | 6 ------ 42 files changed, 30 insertions(+), 167 deletions(-) diff --git a/lib/gpx/src/addWaypoint.cpp b/lib/gpx/src/addWaypoint.cpp index 4e9a5d48..b2355171 100644 --- a/lib/gpx/src/addWaypoint.cpp +++ b/lib/gpx/src/addWaypoint.cpp @@ -8,7 +8,7 @@ #include "addWaypoint.hpp" -extern const int SD_CS; +extern const uint8_t SD_CS; wayPoint addWpt = {0, 0, 0, (char *)"", (char *)"", (char *)"", (char *)"", (char *)"", (char *)"", 0, 0, 0, 0}; wayPoint loadWpt = {0, 0, 0, (char *)"", (char *)"", (char *)"", (char *)"", (char *)"", (char *)"", 0, 0, 0, 0}; diff --git a/lib/gpx/src/addWaypoint.hpp b/lib/gpx/src/addWaypoint.hpp index 9a01b9cd..2ae526cf 100644 --- a/lib/gpx/src/addWaypoint.hpp +++ b/lib/gpx/src/addWaypoint.hpp @@ -9,12 +9,8 @@ #ifndef ADDWAYPOINT_HPP #define ADDWAYPOINT_HPP -#include "globalGpxDef.h" #include "SD.h" -#include "FS.h" -#include "tft.hpp" -#include "storage.hpp" -#include "lvgl.h" +#include "globalGpxDef.h" extern wayPoint addWpt; diff --git a/lib/gpx/src/deleteWaypoint.hpp b/lib/gpx/src/deleteWaypoint.hpp index 1111f5a0..a610cf04 100644 --- a/lib/gpx/src/deleteWaypoint.hpp +++ b/lib/gpx/src/deleteWaypoint.hpp @@ -10,10 +10,6 @@ #define DELETEWAYPOINT_HPP #include "SD.h" -#include "FS.h" -#include "tft.hpp" -#include "storage.hpp" -#include "globalGuiDef.h" #include "globalGpxDef.h" void deleteWaypointName(char * wpt); diff --git a/lib/gpx/src/editWaypoint.hpp b/lib/gpx/src/editWaypoint.hpp index 281742e0..e8b9ee31 100644 --- a/lib/gpx/src/editWaypoint.hpp +++ b/lib/gpx/src/editWaypoint.hpp @@ -10,10 +10,6 @@ #define EDITWAYPOINT_HPP #include "SD.h" -#include "FS.h" -#include "tft.hpp" -#include "storage.hpp" -#include "globalGuiDef.h" #include "globalGpxDef.h" void editWaypointName(char* oldName, char *newName); diff --git a/lib/gpx/src/loadWaypoint.hpp b/lib/gpx/src/loadWaypoint.hpp index f27460b5..1fcfadf7 100644 --- a/lib/gpx/src/loadWaypoint.hpp +++ b/lib/gpx/src/loadWaypoint.hpp @@ -9,11 +9,6 @@ #ifndef LOADWAYPOINT_HPP #define LOADWAYPOINT_HPP -#include "SD.h" -#include "FS.h" -#include "tft.hpp" -#include "storage.hpp" -#include "globalGuiDef.h" #include "globalGpxDef.h" extern wayPoint loadWpt; diff --git a/lib/gui/src/buttonBar.cpp b/lib/gui/src/buttonBar.cpp index 46aa87d1..f7bc133e 100644 --- a/lib/gui/src/buttonBar.cpp +++ b/lib/gui/src/buttonBar.cpp @@ -7,10 +7,6 @@ */ #include "buttonBar.hpp" -#include "waypointScr.hpp" -#include "waypointListScr.hpp" -#include "display/lv_display.h" -#include "globalGuiDef.h" bool isWaypointOpt = false; bool isTrackOpt = false; @@ -59,7 +55,6 @@ void buttonBarEvent(lv_event_t *event) if (strcmp(option,"waypoint") == 0) { log_v("Waypoint"); - // isMainScreen = false; isWaypointOpt = true; isTrackOpt = false; if (!isOptionLoaded) diff --git a/lib/gui/src/buttonBar.hpp b/lib/gui/src/buttonBar.hpp index 24f9a1db..30a579f3 100644 --- a/lib/gui/src/buttonBar.hpp +++ b/lib/gui/src/buttonBar.hpp @@ -11,6 +11,8 @@ #include "globalGuiDef.h" #include "mainScr.hpp" +#include "waypointScr.hpp" +#include "waypointListScr.hpp" static const char *waypointIconFile PROGMEM = "/wpt.bin"; // Waypoint icon static const char *trackIconFile PROGMEM = "/track.bin"; // Track icon diff --git a/lib/gui/src/deviceSettingsScr.cpp b/lib/gui/src/deviceSettingsScr.cpp index 00c2b7c3..3ad66778 100644 --- a/lib/gui/src/deviceSettingsScr.cpp +++ b/lib/gui/src/deviceSettingsScr.cpp @@ -7,7 +7,6 @@ */ #include "deviceSettingsScr.hpp" -#include "globalGuiDef.h" lv_obj_t *deviceSettingsScreen; // Device Settings Screen diff --git a/lib/gui/src/deviceSettingsScr.hpp b/lib/gui/src/deviceSettingsScr.hpp index 248d6147..5ecec47d 100644 --- a/lib/gui/src/deviceSettingsScr.hpp +++ b/lib/gui/src/deviceSettingsScr.hpp @@ -10,8 +10,6 @@ #define DEVICESETTINGSCR_HPP #include "globalGuiDef.h" -#include "gps.hpp" -#include "settings.hpp" #include "lvglSetup.hpp" static lv_obj_t *deviceSettingsOptions; diff --git a/lib/gui/src/globalGuiDef.h b/lib/gui/src/globalGuiDef.h index 92a12d53..858caf17 100644 --- a/lib/gui/src/globalGuiDef.h +++ b/lib/gui/src/globalGuiDef.h @@ -89,14 +89,9 @@ static bool getPngSize(const char* filename, uint16_t *width, uint16_t *height) return false; } - byte table[32]; + uint8_t table[32]; - // for (int i = 0; file.available() && i < 32; i++) - // { - // table[i] = file.read(); - // } - - fread(table, sizeof(byte), 32, file); + fread(table, sizeof(uint8_t), 32, file); *width=table[16]*256*256*256+table[17]*256*256+table[18]*256+table[19]; *height=table[20]*256*256*256+table[21]*256*256+table[22]*256+table[23]; diff --git a/lib/gui/src/mainScr.cpp b/lib/gui/src/mainScr.cpp index 671845cd..dab9ec3f 100644 --- a/lib/gui/src/mainScr.cpp +++ b/lib/gui/src/mainScr.cpp @@ -7,16 +7,6 @@ */ #include "mainScr.hpp" -#include "buttonBar.hpp" -#include "core/lv_obj.h" -#include "core/lv_obj_pos.h" -#include "globalGuiDef.h" -#include "globalMapsDef.h" -#include "settings.hpp" -#include "tft.hpp" - -extern const int SD_CS; -extern const uint8_t TFT_SPI_CS; bool isMainScreen = false; // Flag to indicate main screen is selected bool isScrolled = true; // Flag to indicate when tileview was scrolled @@ -27,12 +17,12 @@ uint8_t wptAction = WPT_NONE; // Current Waypoint Action int wptPosX, wptPosY = 0; // Waypoint position on map #ifdef LARGE_SCREEN - int toolBarOffset = 100; - int toolBarSpace = 60; + uint8_t toolBarOffset = 100; + uint8_t toolBarSpace = 60; #endif #ifndef LARGE_SCREEN - int toolBarOffset = 80; - int toolBarSpace = 50; + uint8_t toolBarOffset = 80; + uint8_t toolBarSpace = 50; #endif lv_obj_t *tilesScreen; @@ -59,10 +49,8 @@ void updateCompassScr(lv_event_t * event) lv_obj_t *obj = (lv_obj_t *)lv_event_get_current_target(event); if (obj==compassHeading) { - //#ifdef ENABLE_COMPASS lv_label_set_text_fmt(compassHeading, "%5d\xC2\xB0", heading); lv_img_set_angle(compassImg, -(heading * 10)); - //#endif } if (obj==latitude) lv_label_set_text_fmt(latitude, "%s", latFormatString(gpsData.latitude)); @@ -86,11 +74,6 @@ void getActTile(lv_event_t *event) isScrolled = true; redrawMap = true; - if (activeTile == SATTRACK) - { - // createSatSprite(spriteSat); - // createConstelSprite(constelSprite); - } if (activeTile == MAP) { createMapScrSprites(); @@ -240,8 +223,6 @@ void updateMap(lv_event_t *event) getMapBlocks(viewPort.bbox, memCache); - // deleteMapScrSprites(); - // createMapScrSprites(); generateVectorMap(viewPort, memCache, mapTempSprite); isPosMoved = false; @@ -418,9 +399,7 @@ void updateNavEvent(lv_event_t *event) if (wptDistance == 0) { lv_img_set_src(arrowNav, &navfinish); - //#ifdef ENABLE_COMPASS lv_img_set_angle(arrowNav, 0); - //#endif } else { diff --git a/lib/gui/src/mainScr.hpp b/lib/gui/src/mainScr.hpp index 4d8c9f2e..a147f139 100644 --- a/lib/gui/src/mainScr.hpp +++ b/lib/gui/src/mainScr.hpp @@ -10,13 +10,9 @@ #define MAINSCR_HPP #include "globalGuiDef.h" -#include "lvglFuncs.hpp" -#include "misc/lv_color.h" -#include "notifyBar.hpp" #include "buttonBar.hpp" #include "renderMaps.hpp" #include "vectorMaps.hpp" -#include "addWaypoint.hpp" #include "loadWaypoint.hpp" #include "deleteWaypoint.hpp" #include "editWaypoint.hpp" @@ -57,13 +53,14 @@ extern lv_obj_t *satTrackTile; extern lv_obj_t *btnFullScreen; extern lv_obj_t *btnZoomIn; extern lv_obj_t *btnZoomOut; -extern int toolBarOffset; -extern int toolBarSpace; +extern uint8_t toolBarOffset; +extern uint8_t toolBarSpace; void updateCompassScr(lv_event_t * event); void deleteMapScrSprites(); void createMapScrSprites(); +void displayMap(uint16_t tileSize); void getActTile(lv_event_t *event); void scrollTile(lv_event_t *event); diff --git a/lib/gui/src/mapSettingsScr.cpp b/lib/gui/src/mapSettingsScr.cpp index 110ff6a2..29db0312 100644 --- a/lib/gui/src/mapSettingsScr.cpp +++ b/lib/gui/src/mapSettingsScr.cpp @@ -7,8 +7,6 @@ */ #include "mapSettingsScr.hpp" -#include "core/lv_obj.h" -#include "settings.hpp" lv_obj_t *mapSettingsScreen; // Map Settings Screen diff --git a/lib/gui/src/mapSettingsScr.hpp b/lib/gui/src/mapSettingsScr.hpp index e09a6eac..6168abf5 100644 --- a/lib/gui/src/mapSettingsScr.hpp +++ b/lib/gui/src/mapSettingsScr.hpp @@ -10,7 +10,6 @@ #define MAPSETTINGSCR_HPP #include "globalGuiDef.h" -#include "settings.hpp" #include "lvglFuncs.hpp" #include "vectorMaps.hpp" #include "renderMaps.hpp" diff --git a/lib/gui/src/navScr.hpp b/lib/gui/src/navScr.hpp index b53b8f69..5fea2489 100644 --- a/lib/gui/src/navScr.hpp +++ b/lib/gui/src/navScr.hpp @@ -9,7 +9,6 @@ #ifndef NAVSCR_HPP #define NAVSCR_HPP -#include "lvgl.h" #include "globalGuiDef.h" #include "navup.c" diff --git a/lib/gui/src/notifyBar.cpp b/lib/gui/src/notifyBar.cpp index d4ee873c..507d67fd 100644 --- a/lib/gui/src/notifyBar.cpp +++ b/lib/gui/src/notifyBar.cpp @@ -7,8 +7,6 @@ */ #include "notifyBar.hpp" -#include "font/lv_symbol_def.h" -#include "misc/lv_event.h" lv_obj_t *mainScreen; lv_obj_t *notifyBarIcons; diff --git a/lib/gui/src/notifyBar.hpp b/lib/gui/src/notifyBar.hpp index b0b9ba11..cb7c5e7b 100644 --- a/lib/gui/src/notifyBar.hpp +++ b/lib/gui/src/notifyBar.hpp @@ -9,7 +9,6 @@ #ifndef NOTIFYBAR_HPP #define NOTIFYBAR_HPP -#include #include "globalGuiDef.h" #include "tasks.hpp" #include "storage.hpp" diff --git a/lib/gui/src/satInfoScr.cpp b/lib/gui/src/satInfoScr.cpp index c418a9b0..cfd41f9b 100644 --- a/lib/gui/src/satInfoScr.cpp +++ b/lib/gui/src/satInfoScr.cpp @@ -35,7 +35,6 @@ void drawTextOnLayer(const char * text, lv_layer_t * layer, lv_point_t * p, lv_a lv_draw_rect_dsc_t draw_rect_dsc; lv_draw_rect_dsc_init(&draw_rect_dsc); - //draw_rect_dsc.bg_color = lv_color_black(); draw_rect_dsc.bg_opa = LV_OPA_TRANSP; draw_rect_dsc.radius = 0; draw_rect_dsc.bg_image_symbol_font = font; diff --git a/lib/gui/src/satInfoScr.hpp b/lib/gui/src/satInfoScr.hpp index e66c44e4..ac98ccfd 100644 --- a/lib/gui/src/satInfoScr.hpp +++ b/lib/gui/src/satInfoScr.hpp @@ -9,7 +9,6 @@ #ifndef SATINFOSCR_HPP #define SATINFOSCR_HPP -#include "lvgl.h" #include "globalGuiDef.h" #include "gps.hpp" diff --git a/lib/gui/src/searchSatScr.cpp b/lib/gui/src/searchSatScr.cpp index 87bdb7b3..596e92ab 100644 --- a/lib/gui/src/searchSatScr.cpp +++ b/lib/gui/src/searchSatScr.cpp @@ -26,7 +26,6 @@ void buttonEvent(lv_event_t *event) } if (strcmp(option,"settings") == 0) { - //isMainScreen = false; lv_screen_load(settingsScreen); } } diff --git a/lib/gui/src/searchSatScr.hpp b/lib/gui/src/searchSatScr.hpp index 489b8335..5f211cac 100644 --- a/lib/gui/src/searchSatScr.hpp +++ b/lib/gui/src/searchSatScr.hpp @@ -9,7 +9,6 @@ #ifndef SEARCHSATSCR_HPP #define SEARCHSATSCR_HPP -#include #include "gps.hpp" #include "globalGuiDef.h" diff --git a/lib/gui/src/settingsScr.cpp b/lib/gui/src/settingsScr.cpp index 37fb9ae0..c55e26b9 100644 --- a/lib/gui/src/settingsScr.cpp +++ b/lib/gui/src/settingsScr.cpp @@ -7,7 +7,6 @@ */ #include "settingsScr.hpp" -#include "globalGuiDef.h" bool needReboot = false; diff --git a/lib/gui/src/settingsScr.hpp b/lib/gui/src/settingsScr.hpp index 40ee59b7..c68ee7bf 100644 --- a/lib/gui/src/settingsScr.hpp +++ b/lib/gui/src/settingsScr.hpp @@ -11,9 +11,7 @@ #include "globalGuiDef.h" #include "mainScr.hpp" -#include "compass.hpp" #include "searchSatScr.hpp" -#include "settings.hpp" void loadMainScreen(); diff --git a/lib/gui/src/splashScr.hpp b/lib/gui/src/splashScr.hpp index b1519785..61d22b61 100644 --- a/lib/gui/src/splashScr.hpp +++ b/lib/gui/src/splashScr.hpp @@ -9,7 +9,6 @@ #ifndef SPLASHSCR_HPP #define SPLASHSCR_HPP -#include "tft.hpp" #include "globalGuiDef.h" #include "settings.hpp" diff --git a/lib/gui/src/waypointListScr.hpp b/lib/gui/src/waypointListScr.hpp index 31f566ae..db3599b9 100644 --- a/lib/gui/src/waypointListScr.hpp +++ b/lib/gui/src/waypointListScr.hpp @@ -9,11 +9,7 @@ #ifndef WAYPOINTLISTSCR_HPP #define WAYPOINTLISTSCR_HPP -#include "globalGuiDef.h" -#include "globalGpxDef.h" #include "mainScr.hpp" -#include "storage.hpp" -#include void loadMainScreen(); void updateWaypointPos(); diff --git a/lib/gui/src/waypointScr.cpp b/lib/gui/src/waypointScr.cpp index e8bcb441..aed687a0 100644 --- a/lib/gui/src/waypointScr.cpp +++ b/lib/gui/src/waypointScr.cpp @@ -7,11 +7,6 @@ */ #include "waypointScr.hpp" -#include "core/lv_obj_pos.h" -#include "display/lv_display.h" -#include "globalGuiDef.h" -#include "tft.hpp" -#include "addWaypoint.hpp" lv_obj_t *waypointScreen; // Add Waypoint Screen lv_obj_t *waypointName; @@ -238,7 +233,6 @@ void createWaypointScreen() #ifdef TDECK_ESP32S3 lv_group_add_obj(scrGroup, waypointName); lv_group_focus_obj(waypointName); - //lv_group_add_obj(scrGroup, waypointScreen); #endif #ifndef TDECK_ESP32S3 diff --git a/lib/gui/src/waypointScr.hpp b/lib/gui/src/waypointScr.hpp index 593be18b..4a2fff4d 100644 --- a/lib/gui/src/waypointScr.hpp +++ b/lib/gui/src/waypointScr.hpp @@ -9,7 +9,7 @@ #ifndef waypointScr_HPP #define waypointScr_HPP -#include "globalGuiDef.h" +#include "addWaypoint.hpp" #include "mainScr.hpp" extern lv_obj_t *waypointName; diff --git a/lib/gui/src/widgets.hpp b/lib/gui/src/widgets.hpp index b3e7bfc3..5e15f6ee 100644 --- a/lib/gui/src/widgets.hpp +++ b/lib/gui/src/widgets.hpp @@ -9,8 +9,6 @@ #ifndef WIDGETS_HPP #define WIDGETS_HPP -#include "lvgl.h" -#include "globalGuiDef.h" #include "globalMapsDef.h" #include "lvglFuncs.hpp" #include "gpsMath.hpp" diff --git a/lib/lvgl/src/lvglFuncs.hpp b/lib/lvgl/src/lvglFuncs.hpp index 1f8cf7b5..0df59194 100644 --- a/lib/lvgl/src/lvglFuncs.hpp +++ b/lib/lvgl/src/lvglFuncs.hpp @@ -9,9 +9,6 @@ #ifndef LVGLFUNCS_HPP #define LVGLFUNCS_HPP -#include -#include "tft.hpp" -#include "lvgl.h" #include "globalGuiDef.h" void objHideCursor(_lv_obj_t *obj); diff --git a/lib/lvgl/src/lvglSetup.cpp b/lib/lvgl/src/lvglSetup.cpp index 43f1e725..32819911 100644 --- a/lib/lvgl/src/lvglSetup.cpp +++ b/lib/lvgl/src/lvglSetup.cpp @@ -6,11 +6,7 @@ * @date 2024-11 */ -#include "lvgl_private.h" #include "lvglSetup.hpp" -#include "waypointScr.hpp" -#include "waypointListScr.hpp" -#include "globalGuiDef.h" ViewPort viewPort; // Vector map viewport MemCache memCache; // Vector map Memory Cache diff --git a/lib/lvgl/src/lvglSetup.hpp b/lib/lvgl/src/lvglSetup.hpp index f38c237e..386e02d9 100644 --- a/lib/lvgl/src/lvglSetup.hpp +++ b/lib/lvgl/src/lvglSetup.hpp @@ -9,28 +9,17 @@ #ifndef LVGLSETUP_HPP #define LVGLSETUP_HPP -#include - -#include "esp_attr.h" -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#ifdef TDECK_ESP32S3 - #include "Wire.h" -#endif - #define LV_TICK_PERIOD_MS 5 -#include "globalGuiDef.h" +#include "lvgl_private.h" +// #ifdef TDECK_ESP32S3 +// #include "Wire.h" +// #endif #include "splashScr.hpp" -#include "searchSatScr.hpp" #include "notifyBar.hpp" -#include "widgets.hpp" -#include "mainScr.hpp" -#include "buttonBar.hpp" #include "settingsScr.hpp" #include "deviceSettingsScr.hpp" #include "mapSettingsScr.hpp" -#include "waypointScr.hpp" /** * @brief Default display driver definition diff --git a/lib/maps/src/mapsDrawFunc.h b/lib/maps/src/mapsDrawFunc.h index fffdff20..b8428995 100644 --- a/lib/maps/src/mapsDrawFunc.h +++ b/lib/maps/src/mapsDrawFunc.h @@ -94,8 +94,8 @@ static void drawMapWidgets() mapHeight = MAP_HEIGHT; - int toolBarOffset = 0; - int toolBarSpace = 0; + uint8_t toolBarOffset = 0; + uint8_t toolBarSpace = 0; #ifdef LARGE_SCREEN toolBarOffset = 100; toolBarSpace = 60; diff --git a/lib/maps/src/renderMaps.cpp b/lib/maps/src/renderMaps.cpp index ca28d0dc..fe8ef46a 100644 --- a/lib/maps/src/renderMaps.cpp +++ b/lib/maps/src/renderMaps.cpp @@ -7,9 +7,6 @@ */ #include "renderMaps.hpp" -#include "mapsDrawFunc.h" - -extern const int SD_CS; MapTile oldMapTile = {(char*)"", 0, 0, 0}; // Old Map tile coordinates and zoom MapTile currentMapTile = {(char*)"", 0, 0, 0}; // Current Map tile coordinates and zoom @@ -20,8 +17,6 @@ bool isMapFound = false; tileBounds totalBounds = { 90.0, -90.0, 180.0, -180.0}; - - /** * @brief Tile size for position calculation * @@ -172,9 +167,6 @@ void generateRenderMap() if (strcmp(currentMapTile.file, oldMapTile.file) != 0 || currentMapTile.zoom != oldMapTile.zoom || currentMapTile.tilex != oldMapTile.tilex || currentMapTile.tiley != oldMapTile.tiley) { - // deleteMapScrSprites(); - // createMapScrSprites(); - isMapFound = mapTempSprite.drawPngFile(SD, currentMapTile.file, tileSize, tileSize); if (!isMapFound) diff --git a/lib/maps/src/renderMaps.hpp b/lib/maps/src/renderMaps.hpp index 677ed4a7..e225b12b 100644 --- a/lib/maps/src/renderMaps.hpp +++ b/lib/maps/src/renderMaps.hpp @@ -9,11 +9,7 @@ #ifndef RENDERMAPS_HPP #define RENDERMAPS_HPP -#include -#include "tft.hpp" -#include "compass.hpp" #include "settings.hpp" -#include "globalMapsDef.h" #include "mapsDrawFunc.h" /** @@ -45,8 +41,6 @@ tileBounds getTileBounds(uint32_t tileX, uint32_t tileY, uint8_t zoom); bool isCoordInBounds(double lat, double lon, tileBounds bound); void coords2map(double lat, double lon, tileBounds bound, int *pixelX, int *pixelY); MapTile getMapTile(double lon, double lat, uint8_t zoomLevel, int16_t offsetX, int16_t offsetY); -void drawMapWidgets(); void generateRenderMap(); -void initSD(); #endif diff --git a/lib/maps/src/vectorMaps.hpp b/lib/maps/src/vectorMaps.hpp index a17d78ab..2fa746d6 100644 --- a/lib/maps/src/vectorMaps.hpp +++ b/lib/maps/src/vectorMaps.hpp @@ -9,17 +9,10 @@ #ifndef VECTORMAPS_HPP #define VECTORMAPS_HPP -#include -#include #include -#include -#include #include -#include -#include #include #include "globalMapsDef.h" -#include "tft.hpp" #include "gpsMath.hpp" #include "settings.hpp" diff --git a/lib/power/power.hpp b/lib/power/power.hpp index bc9e7db0..3c421a4d 100644 --- a/lib/power/power.hpp +++ b/lib/power/power.hpp @@ -19,8 +19,6 @@ #include "lvgl.h" #include "globalGuiDef.h" -// void powerOn(); - class Power { private: diff --git a/lib/settings/settings.cpp b/lib/settings/settings.cpp index 315f3bfa..dbf380c3 100644 --- a/lib/settings/settings.cpp +++ b/lib/settings/settings.cpp @@ -116,15 +116,6 @@ void loadPreferences() battery.setBatteryLevels(cfg.getFloat(PKEYS::KVMAX_BATT,4.2),cfg.getFloat(PKEYS::KVMIN_BATT,3.6)); - // compassPosX = 60; - // compassPosY = 82; - // coordPosX = 66; - // coordPosY = 29; - // altitudePosX = 8; - // altitudePosY = 293; - // speedPosX = 1; - // speedPosY = 337; - printSettings(); } diff --git a/lib/storage/storage.cpp b/lib/storage/storage.cpp index faaa39d1..df920ad6 100644 --- a/lib/storage/storage.cpp +++ b/lib/storage/storage.cpp @@ -7,14 +7,12 @@ */ #include "storage.hpp" -#include "esp_err.h" -#include "esp_spiffs.h" // Pin definitions (should be configurable if needed) -extern const int SD_CS; -extern const int SD_MISO; -extern const int SD_MOSI; -extern const int SD_CLK; +extern const uint8_t SD_CS; +extern const uint8_t SD_MISO; +extern const uint8_t SD_MOSI; +extern const uint8_t SD_CLK; Storage::Storage() : isSdLoaded(false) {} diff --git a/lib/storage/storage.hpp b/lib/storage/storage.hpp index aa42897a..b6e88cba 100644 --- a/lib/storage/storage.hpp +++ b/lib/storage/storage.hpp @@ -10,9 +10,8 @@ #define STORAGE_HPP #include "esp_spiffs.h" +#include "esp_err.h" #include -#include -#include class Storage { @@ -25,7 +24,6 @@ class Storage void initSD(); esp_err_t initSPIFFS(); - bool getSdLoaded() const; }; diff --git a/lib/tasks/tasks.cpp b/lib/tasks/tasks.cpp index fe654cc3..37296df7 100644 --- a/lib/tasks/tasks.cpp +++ b/lib/tasks/tasks.cpp @@ -7,8 +7,6 @@ */ #include "tasks.hpp" -#include "Arduino.h" -#include "freertos/FreeRTOS.h" TaskHandle_t LVGLTaskHandler; xSemaphoreHandle gpsMutex; diff --git a/lib/tasks/tasks.hpp b/lib/tasks/tasks.hpp index 0283d7d0..df460316 100644 --- a/lib/tasks/tasks.hpp +++ b/lib/tasks/tasks.hpp @@ -24,6 +24,10 @@ void gpsTask(void *pvParameters); void initGpsTask(); -void initCLITask(); + +#ifndef DISABLE_CLI + void cliTask(void *param); + void initCLITask(); +#endif #endif diff --git a/lib/tft/tft.cpp b/lib/tft/tft.cpp index 9df780ca..565fb761 100644 --- a/lib/tft/tft.cpp +++ b/lib/tft/tft.cpp @@ -14,12 +14,6 @@ uint16_t TFT_WIDTH = 0; uint16_t TFT_HEIGHT = 0; bool waitScreenRefresh = false; -#ifdef TDECK_ESP32S3 - extern const uint8_t TFT_SPI_BL; -#endif - - - /** * @brief Turn on TFT Sleep Mode for ILI9488 * From e13d5cf018c1afeaa8e675d2ba00c044c8838cd3 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sun, 24 Nov 2024 12:42:47 +0100 Subject: [PATCH 20/55] fix(webserver): Fix drag an drop upload background and file names --- lib/webfile/src/webpage.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/webfile/src/webpage.h b/lib/webfile/src/webpage.h index 99cd6a6c..3b461d81 100644 --- a/lib/webfile/src/webpage.h +++ b/lib/webfile/src/webpage.h @@ -219,7 +219,7 @@ function dropped(e) formData.append("file" + i, fls[i]); } var z = document.getElementById("drag"); - z.style.backgroundColor = "white"; + z.style.backgroundColor = "black"; var fileNames = ""; for (var i = 0; i < fls.length; i++) From e9c84cf840e0355d76b291a5529c8fa725a9ae89 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sun, 24 Nov 2024 12:48:37 +0100 Subject: [PATCH 21/55] fix(webfile): Fix file delete message --- lib/webfile/src/webpage.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/webfile/src/webpage.h b/lib/webfile/src/webpage.h index 3b461d81..66963ff8 100644 --- a/lib/webfile/src/webpage.h +++ b/lib/webfile/src/webpage.h @@ -175,7 +175,8 @@ function downloadDeleteButton(filename, action) xhr.open("GET", urltocall, false); xhr.send(); sessionStorage.setItem("msgStatus",xhr.responseText); - _("details").innerHTML = xhr.responseText; + _("status").innerHTML = ""; + _("details").innerHTML = "Deleting file: " + filename; document.location.reload(true); } if (action == "download") From 60cabcb7bb9843bb8b2622c77af574102a99247e Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sun, 24 Nov 2024 14:55:49 +0100 Subject: [PATCH 22/55] feat(cli): Add set DST zone CLI command --- README.md | 1 + lib/cli/cli.cpp | 62 +++++++++++++++++++++++++-- lib/gps/timezone.hpp | 69 ++++++++++++++++-------------- lib/preferences/preferences-keys.h | 1 + lib/settings/settings.cpp | 8 ++++ lib/settings/settings.hpp | 2 + platformio.ini | 2 +- 7 files changed, 109 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index a57e1edc..c36cfd39 100644 --- a/README.md +++ b/README.md @@ -246,6 +246,7 @@ outnmea: toggle GPS NMEA output (or Ctrl+C to stop) poweroff: perform a ESP32 deep sleep reboot: perform a ESP32 reboot scshot: screenshot to SD or sending a PC +setdstzone: set DST (Daylight Saving Time zone: NONE, EU or USA) waypoint: waypoint utilities webfile: enable/disable Web file server wipe: wipe preferences to factory default diff --git a/lib/cli/cli.cpp b/lib/cli/cli.cpp index ebf19034..55895c8d 100644 --- a/lib/cli/cli.cpp +++ b/lib/cli/cli.cpp @@ -22,15 +22,25 @@ const char logo[] = "" ; +/** + * @brief Reboot ESP + */ void wcli_reboot(char *args, Stream *response) { ESP.restart(); } -void wcli_poweroff(char *args, Stream *response) { +/** + * @brief ESP Deep Sleep/shutdown + */ +void wcli_poweroff(char *args, Stream *response) +{ deviceShutdown(); } +/** + * @brief Display device info + */ void wcli_info(char *args, Stream *response) { setlocale(LC_NUMERIC, ""); @@ -62,6 +72,9 @@ void wcli_info(char *args, Stream *response) response->printf("GPS Rx GPIO:\t: %i\r\n",GPS_RX); } +/** + * @brief Clear user settings + */ void wcli_swipe(char *args, Stream *response) { Pair operands = wcli.parseCommand(args); @@ -72,11 +85,17 @@ void wcli_swipe(char *args, Stream *response) response->println("done"); } +/** + * @brief Clear CLI console + */ void wcli_clear(char *args, Stream *response) { wcli.shell->clear(); } +/** + * @brief Take a screenshot + */ void wcli_scshot(char *args, Stream *response) { Pair operands = wcli.parseCommand(args); @@ -143,6 +162,9 @@ void wcli_kset(char *args, Stream *response) } } +/** + * @brief Waypoint list, download or delete + */ void wcli_waypoint(char *args, Stream *response) { Pair operands = wcli.parseCommand(args); @@ -267,11 +289,19 @@ void wcli_waypoint(char *args, Stream *response) } } -void wcli_outnmea (char *args, Stream *response){ +/** + * @brief Output NMEA sentences in CLI + */ +void wcli_outnmea (char *args, Stream *response) +{ nmea_output_enable = !nmea_output_enable; } -void wcli_abort_handler () { +/** + * @brief Cancel NMEA Output + */ +void wcli_abort_handler () +{ if (nmea_output_enable) { nmea_output_enable = false; delay(100); @@ -279,6 +309,9 @@ void wcli_abort_handler () { } } +/** + * @brief Webfile server enable/disable option + */ void wcli_webfile(char *args, Stream *response) { Pair operands = wcli.parseCommand(args); @@ -305,6 +338,25 @@ void wcli_webfile(char *args, Stream *response) } } +/** + * @brief Set DST (daylight saving time) zone EU or USA + */ +void wcli_setdst(char *args, Stream *response) +{ + Pair operands = wcli.parseCommand(args); + String commands = operands.first(); + if (commands.isEmpty()) + response->println(F("missing parameter use: setdstzone \033[1;32mNONE/EU/USA\033[0;37m")); + else + { + commands.toUpperCase(); + if(commands.equals("NONE") || commands.equals("EU") || commands.equals("USA") ) + cfg.saveAuto("defDST",commands); + else + response->println(F("wrong parameter use: \033[1;32mNONE/EU/USA\033[0;37m")); + } +} + void initRemoteShell() { #ifndef DISABLE_CLI_TELNET @@ -312,7 +364,8 @@ void initRemoteShell() #endif } -void initShell(){ +void initShell() +{ wcli.shell->attachLogo(logo); wcli.setSilentMode(true); // Main Commands: @@ -327,6 +380,7 @@ void initShell(){ wcli.add("klist", &wcli_klist, "\t\tlist of user preferences. ('all' param show all)"); wcli.add("kset", &wcli_kset, "\t\tset an user extra preference"); wcli.add("outnmea", &wcli_outnmea, "\ttoggle GPS NMEA output (or Ctrl+C to stop)"); + wcli.add("setdstzone", &wcli_setdst, "\tset DST (Daylight Saving Time zone: NONE, EU or USA)"); wcli.shell->overrideAbortKey(&wcli_abort_handler); wcli.begin("IceNav"); } diff --git a/lib/gps/timezone.hpp b/lib/gps/timezone.hpp index a380b818..14e12c07 100644 --- a/lib/gps/timezone.hpp +++ b/lib/gps/timezone.hpp @@ -10,33 +10,22 @@ #define TIMEZONE_HPP extern int32_t defGMT; // Default GMT offset +extern String defDST; // Default DST zone +extern bool calculateDST; // Calculate DST flag -// Uncomment one DST changeover rule, or define your own: +// Calculate DST changeover times once per reset and year! +static NeoGPS::time_t changeover; +static NeoGPS::clock_t springForward, fallBack; -//#define USA_DST -#define EU_DST - -#if defined(USA_DST) - static const uint8_t springMonth = 3; - static const uint8_t springDate = 14; // latest 2nd Sunday - static const uint8_t springHour = 2; - static const uint8_t fallMonth = 11; - static const uint8_t fallDate = 7; // latest 1st Sunday - static const uint8_t fallHour = 2; - #define CALCULATE_DST - -#elif defined(EU_DST) - static const uint8_t springMonth = 3; - static const uint8_t springDate = 31; // latest last Sunday - static const uint8_t springHour = 2; - static const uint8_t fallMonth = 10; - static const uint8_t fallDate = 31; // latest last Sunday - static const uint8_t fallHour = 1; - #define CALCULATE_DST -#endif +static uint8_t springMonth = 0; +static uint8_t springDate = 0; // latest last Sunday +static uint8_t springHour = 0; +static uint8_t fallMonth = 0; +static uint8_t fallDate = 0; // latest last Sunday +static uint8_t fallHour = 0; /** - * @brief Update notify bar event + * @brief Adjust Time (GMT and DST) * * @param dt -> GPS Time */ @@ -49,12 +38,29 @@ static void adjustTime( NeoGPS::time_t & dt ) static const NeoGPS::clock_t zone_offset = (int32_t)defGMT * NeoGPS::SECONDS_PER_HOUR + zone_minutes * NeoGPS::SECONDS_PER_MINUTE; - #ifdef CALCULATE_DST - // Calculate DST changeover times once per reset and year! - static NeoGPS::time_t changeover; - static NeoGPS::clock_t springForward, fallBack; + if (calculateDST) + { + if (defDST.equals("USA")) + { + springMonth = 3; + springDate = 14; // latest 2nd Sunday + springHour = 2; + fallMonth = 11; + fallDate = 7; // latest 1st Sunday + fallHour = 2; + } + if (defDST.equals("EU")) + { + springMonth = 3; + springDate = 31; // latest last Sunday + springHour = 2; + fallMonth = 10; + fallDate = 31; // latest last Sunday + fallHour = 1; + } - if ((springForward == 0) || (changeover.year != dt.year)) { + if ((springForward == 0) || (changeover.year != dt.year)) + { // Calculate the spring changeover time (seconds) changeover.year = dt.year; @@ -77,16 +83,17 @@ static void adjustTime( NeoGPS::time_t & dt ) changeover.date -= (changeover.day - NeoGPS::time_t::SUNDAY); fallBack = (NeoGPS::clock_t) changeover; } - #endif + } // First, offset from UTC to the local timezone seconds += zone_offset; - #ifdef CALCULATE_DST + if (calculateDST) + { // Then add an hour if DST is in effect if ((springForward <= seconds) && (seconds < fallBack)) seconds += NeoGPS::SECONDS_PER_HOUR; - #endif + } dt = seconds; // convert seconds back to a date/time structure diff --git a/lib/preferences/preferences-keys.h b/lib/preferences/preferences-keys.h index 09a1d110..6adddf0e 100644 --- a/lib/preferences/preferences-keys.h +++ b/lib/preferences/preferences-keys.h @@ -19,6 +19,7 @@ X(KGPS_SPEED, "GPS_speed", SHORT) \ X(KGPS_RATE, "GPS_rate", SHORT) \ X(KWEB_FILE, "Web_file", BOOL) \ + X(KDST_ZONE, "defDST", STRING) \ X(KUSER, "-----", UNKNOWN) \ X(KDEF_ZOOM, "defZoom", UINT) \ X(KGPS_TX, "gpsTX", UINT) \ diff --git a/lib/settings/settings.cpp b/lib/settings/settings.cpp index 7a797369..2aa5697c 100644 --- a/lib/settings/settings.cpp +++ b/lib/settings/settings.cpp @@ -51,6 +51,8 @@ uint16_t speedPosY = 0; // Speed widget position Y bool enableWeb = true; // Enable/disable web file server bool showToolBar = false; // Show Map Toolbar int8_t tempOffset = 0; // BME Temperature offset +String defDST = "NONE"; // default DST zone +bool calculateDST = false; // Calculate DST flag // float batteryMax = 0.0; // 4.2; // maximum voltage of battery // float batteryMin = 0.0; // 3.6; // minimum voltage of battery before shutdown @@ -126,6 +128,12 @@ void loadPreferences() // speedPosX = 1; // speedPosY = 337; + defDST = cfg.getString(PKEYS::KDST_ZONE, "EU"); + if (defDST.equals("NONE")) + calculateDST = false; + else + calculateDST = true; + printSettings(); } diff --git a/lib/settings/settings.hpp b/lib/settings/settings.hpp index f4b64b36..9bd16196 100644 --- a/lib/settings/settings.hpp +++ b/lib/settings/settings.hpp @@ -45,6 +45,8 @@ extern uint16_t speedPosX; // Speed widget position X extern uint16_t speedPosY; // Speed widget position Y extern bool enableWeb; // Enable/disable web file server extern int8_t tempOffset; // BME Temperature offset +extern String defDST; // default DST zone +extern bool calculateDST; // Calculate DST flag void loadPreferences(); void saveMapRotation(bool zoomRotation); diff --git a/platformio.ini b/platformio.ini index 0c321b26..742e855d 100644 --- a/platformio.ini +++ b/platformio.ini @@ -34,7 +34,7 @@ build_flags = -D SHELLMINATOR_BUFF_DIM=70 -D SHELLMINATOR_LOGO_COLOR=BLUE -D COMMANDER_MAX_COMMAND_SIZE=70 - -D WCLI_MAX_CMDS=12 # set n+1 of defined commands for CLI + -D WCLI_MAX_CMDS=13 # set n+1 of defined commands for CLI ; -D DISABLE_CLI_TELNET=1 # disable remote access via telnet. It needs CLI ; -D DISABLE_CLI=1 # removed CLI module. Config via Bluetooth only From 373f4ec40c95082b1d71165b8b6384f0938db691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jordi=20Gauch=C3=ADa?= Date: Sun, 24 Nov 2024 15:08:16 +0100 Subject: [PATCH 23/55] Update cli.cpp --- lib/cli/cli.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cli/cli.cpp b/lib/cli/cli.cpp index 4a61fa2a..e0be1bd6 100644 --- a/lib/cli/cli.cpp +++ b/lib/cli/cli.cpp @@ -37,7 +37,7 @@ void wcli_reboot(char *args, Stream *response) */ void wcli_poweroff(char *args, Stream *response) { - deviceShutdown(); + power.deviceShutdown(); } /** From dc0cc6f83e7b61e629f0473de2b6ac0b7f91ef0c Mon Sep 17 00:00:00 2001 From: jgauchia Date: Mon, 25 Nov 2024 19:57:44 +0100 Subject: [PATCH 24/55] feat(webserver): Add folder upload --- lib/webfile/src/webpage.h | 142 ++++++++++++++++++++++++++---------- lib/webfile/src/webserver.h | 48 ++++++++++++ 2 files changed, 150 insertions(+), 40 deletions(-) diff --git a/lib/webfile/src/webpage.h b/lib/webfile/src/webpage.h index 66963ff8..641770cd 100644 --- a/lib/webfile/src/webpage.h +++ b/lib/webfile/src/webpage.h @@ -93,6 +93,8 @@ const char index_html[] PROGMEM = R"rawliteral( background-color: black; border: 1px solid #aaaaaa; text-align: center; + overflow-y: auto; + overflow-x: hidden; } @@ -100,11 +102,11 @@ const char index_html[] PROGMEM = R"rawliteral( - + @@ -122,7 +124,7 @@ const char index_html[] PROGMEM = R"rawliteral(

diff --git a/lib/webfile/src/webserver.h b/lib/webfile/src/webserver.h index a27abb39..286be7a6 100644 --- a/lib/webfile/src/webserver.h +++ b/lib/webfile/src/webserver.h @@ -19,6 +19,10 @@ String oldDir; String newDir; String currentDir; + +String createDir; +uint8_t nextSlash = 0; + bool updateList = true; const int FILES_PER_PAGE = 10; @@ -298,6 +302,37 @@ String listFiles(bool ishtml, int page = 0) return returnText; } +/** + * @brief Create directories if needed for upload + * + * @param filepath -> Full file path + * @return true/false if successful + */ +bool createDirectories(String filepath) +{ + uint8_t lastSlash = 0; + while (true) + { + nextSlash = filepath.indexOf('/', lastSlash + 1); + String dir = filepath.substring(0, nextSlash); + + if (!SD.exists(oldDir + "/" + dir)) + { + if (!SD.mkdir(oldDir + "/" + dir)) + { + log_e("Directory %s creation error", dir.c_str()); + return false; + } + log_v("Directory %s created",dir.c_str()); + } + if (nextSlash == 255) break; + lastSlash = nextSlash; + + esp_task_wdt_reset(); + } + return true; +} + /** * @brief Upload file handle * @@ -310,12 +345,25 @@ String listFiles(bool ishtml, int page = 0) void handleUpload(AsyncWebServerRequest *request, String filename, size_t index, uint8_t *data, size_t len, bool final) { waitScreenRefresh = true; + uint8_t lastSlashIndex = filename.lastIndexOf("/"); + + if (lastSlashIndex != -1) + { + String path = filename.substring(0, lastSlashIndex); + if (createDir != path) + { + if (!createDirectories(path)) + log_e("Directory creation error"); + createDir = path; + } + } if (!index) { request->client()->setRxTimeout(15000); request->_tempFile = SD.open(oldDir + "/" + filename, "w"); } + if (len) request->_tempFile.write(data, len); From f2a2581eec142556c6c73e8b29f6d759c2229f38 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Mon, 25 Nov 2024 20:15:11 +0100 Subject: [PATCH 25/55] fix(webserver): Fix single file upload --- lib/webfile/src/webserver.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/webfile/src/webserver.h b/lib/webfile/src/webserver.h index 286be7a6..f80b4084 100644 --- a/lib/webfile/src/webserver.h +++ b/lib/webfile/src/webserver.h @@ -347,16 +347,19 @@ void handleUpload(AsyncWebServerRequest *request, String filename, size_t index, waitScreenRefresh = true; uint8_t lastSlashIndex = filename.lastIndexOf("/"); - if (lastSlashIndex != -1) + if (lastSlashIndex != 255) { String path = filename.substring(0, lastSlashIndex); if (createDir != path) { + log_v("%s",path.c_str()); if (!createDirectories(path)) log_e("Directory creation error"); createDir = path; } } + + log_v("%s", filename.c_str()); if (!index) { From bed83a32a0ad5bd20396e71e0723c7b2490743a1 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Tue, 26 Nov 2024 19:56:04 +0100 Subject: [PATCH 26/55] feat(webserver): Add folder delete button --- lib/webfile/src/webpage.h | 9 +++++ lib/webfile/src/webserver.h | 71 ++++++++++++++++++++++++++++++++++++- 2 files changed, 79 insertions(+), 1 deletion(-) diff --git a/lib/webfile/src/webpage.h b/lib/webfile/src/webpage.h index 641770cd..75066b7f 100644 --- a/lib/webfile/src/webpage.h +++ b/lib/webfile/src/webpage.h @@ -181,6 +181,15 @@ function downloadDeleteButton(filename, action) _("details").innerHTML = "Deleting file: " + filename; document.location.reload(true); } + if (action == "deldir") + { + xhr.open("GET", urltocall, false); + xhr.send(); + sessionStorage.setItem("msgStatus",xhr.responseText); + _("status").innerHTML = ""; + _("details").innerHTML = "Deleting folder: " + filename; + document.location.reload(true); + } if (action == "download") { _("status").innerHTML = ""; diff --git a/lib/webfile/src/webserver.h b/lib/webfile/src/webserver.h index f80b4084..387a9768 100644 --- a/lib/webfile/src/webserver.h +++ b/lib/webfile/src/webserver.h @@ -266,7 +266,9 @@ String listFiles(bool ishtml, int page = 0) if (entry.isDirectory) { returnText += " " + entry.name + ""; - returnText += "dir"; + returnText += "dir"; + returnText += ""; + returnText += ""; } else { @@ -399,6 +401,66 @@ void sendSpiffsImage(const char *imageFile,AsyncWebServerRequest *request) free(buffer); } +/** + * @brief Delete directory recursive + * + * @param dirPath -> directory path + * @return true/false if successful + */ +bool deleteDirRecursive(const char *dirPath) +{ + File dir = SD.open(dirPath); + if (!dir || !dir.isDirectory()) + { + log_e("Error: %s isn't a directory or can't open", dirPath); + return false; + } + + while (true) + { + File entry = dir.openNextFile(); + if (!entry) + break; + + if (entry.isDirectory()) + { + char subDirPath[128]; + snprintf(subDirPath, sizeof(subDirPath), "%s/%s", dirPath, entry.name()); + + if (!deleteDirRecursive(subDirPath)) + { + entry.close(); + return false; + } + } + else + { + char fileName[255]; + snprintf(fileName, sizeof(fileName), "%s",entry.name()); + if (!SD.remove(fileName)) + { + log_e("Error deleting file: %s",entry.name()); + entry.close(); + return false; + } + log_v("Deleted file: %s",entry.name()); + } + entry.close(); + } + + + dir.rewindDirectory(); + dir.close(); + if (!SD.rmdir(dirPath)) + { + log_e("Error deleting directory: %s",dirPath); + return false; + } + + log_v("Deleted directory: %s",dirPath); + return true; +} + /** * @brief Configure Web Server * @@ -496,6 +558,13 @@ void configureWebServer() logMessage += " downloaded"; request->send(SD, path, "application/octet-stream"); } + if (strcmp(fileAction, "deldir") == 0) + { + logMessage += " deleted"; + deleteDirRecursive(path.c_str()); + request->send(200, "text/plain", "Deleted Folder: " + String(fileName)); + updateList = true; + } else if (strcmp(fileAction, "delete") == 0) { logMessage += " deleted"; From 91132b9e9bbcd08d13a10c565ee086de1faabc0b Mon Sep 17 00:00:00 2001 From: jgauchia Date: Tue, 26 Nov 2024 20:25:02 +0100 Subject: [PATCH 27/55] fix(webserver): Fix folder upload browser compat. --- lib/webfile/src/webpage.h | 84 +++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 47 deletions(-) diff --git a/lib/webfile/src/webpage.h b/lib/webfile/src/webpage.h index 75066b7f..05813d25 100644 --- a/lib/webfile/src/webpage.h +++ b/lib/webfile/src/webpage.h @@ -243,10 +243,12 @@ function dragged(e) function dropped(e) { - dragged(e); + e.preventDefault(); + e.stopPropagation(); + var dt = e.dataTransfer; var items = dt.items; - var n = 0, uploads = []; + var uploads = []; var formData = new FormData(); var fileNames = ""; @@ -256,21 +258,14 @@ function dropped(e) xhr.addEventListener("error", errorHandler, false); xhr.addEventListener("abort", abortHandler, false); - function processFiles(files) + async function processFiles(files) { - for (file of files) + for (const file of files) { - if (file.webkitRelativePath === "") - { - formData.append("file[]", file, file.name); - fileNames += file.name + ", "; - } - else - { - formData.append("file[]", file, file.webkitRelativePath); - fileNames += file.webkitRelativePath + ", "; - } + formData.append("file[]", file, file.name); + fileNames += file.name + ", "; } + var z = document.getElementById("drag"); z.style.backgroundColor = "black"; z.textContent = fileNames; @@ -279,52 +274,47 @@ function dropped(e) xhr.send(formData); } - function traverseFileTree(item, path) + async function traverseFileTree(item, path = "") { - var handleFiles = function handleFiles(item, path) - { - path = path || ""; + return new Promise((resolve) => { if (item.isFile) { - item.file(function(file) - { - uploads.push(file); // file exist, but don't append - // console.log(file, n, uploads.length); // show info - // if (uploads.length === n - 1 || n === 0) - { - var files = uploads.slice(0); - n = uploads.length = 0; - processFiles(files) - } + item.file((file) => { + const relativePath = path + file.name; + const newFile = new File([file], relativePath, { type: file.type }); + uploads.push(newFile); + resolve(); }); - } - else if (item.isDirectory) + } else if (item.isDirectory) { - var dirReader = item.createReader(); - dirReader.readEntries(function(entries) - { - n += entries.length; - for (var i = 0; i < entries.length; i++) { - handleFiles(entries[i], path + item.name + "/"); + const dirReader = item.createReader(); + dirReader.readEntries(async (entries) => { + for (const entry of entries) { + await traverseFileTree(entry, path + item.name + "/"); } + resolve(); }); } - } - handleFiles(item, path); - } - - if (n !== 0 && uploads.length !== 0) - { - n = uploads.length = 0; + }); } - for (var i = 0; i < items.length; i++) + async function handleItems(items) { - var item = items[i].webkitGetAsEntry(); - if (item) + const promises = []; + for (let i = 0; i < items.length; i++) { - traverseFileTree(item, "", i); + const item = items[i].webkitGetAsEntry(); + if (item) + { + promises.push(traverseFileTree(item)); + } } + await Promise.all(promises); + processFiles(uploads); + } + + if (items && items.length > 0) { + handleItems(items); } } From 0c6e704a2210c72a5bbe6daabf19ea9b941270f9 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Wed, 27 Nov 2024 18:47:26 +0100 Subject: [PATCH 28/55] feat(webserver): Delete folders --- lib/webfile/src/webpage.h | 4 +- lib/webfile/src/webserver.h | 90 +++++++++++++++++-------------------- 2 files changed, 45 insertions(+), 49 deletions(-) diff --git a/lib/webfile/src/webpage.h b/lib/webfile/src/webpage.h index 05813d25..c7689b9b 100644 --- a/lib/webfile/src/webpage.h +++ b/lib/webfile/src/webpage.h @@ -170,10 +170,11 @@ function listFilesButton() function downloadDeleteButton(filename, action) { - var urltocall = "/file?name=/" + filename + "&action=" + action; + var urltocall = ""; xhr = new XMLHttpRequest(); if (action == "delete") { + urltocall = "/file?name=/" + filename + "&action=" + action; xhr.open("GET", urltocall, false); xhr.send(); sessionStorage.setItem("msgStatus",xhr.responseText); @@ -183,6 +184,7 @@ function downloadDeleteButton(filename, action) } if (action == "deldir") { + urltocall = "/file?name=" + filename + "&action=" + action; xhr.open("GET", urltocall, false); xhr.send(); sessionStorage.setItem("msgStatus",xhr.responseText); diff --git a/lib/webfile/src/webserver.h b/lib/webfile/src/webserver.h index 387a9768..41c81bdd 100644 --- a/lib/webfile/src/webserver.h +++ b/lib/webfile/src/webserver.h @@ -361,8 +361,6 @@ void handleUpload(AsyncWebServerRequest *request, String filename, size_t index, } } - log_v("%s", filename.c_str()); - if (!index) { request->client()->setRxTimeout(15000); @@ -409,56 +407,57 @@ void sendSpiffsImage(const char *imageFile,AsyncWebServerRequest *request) */ bool deleteDirRecursive(const char *dirPath) { - File dir = SD.open(dirPath); - if (!dir || !dir.isDirectory()) - { - log_e("Error: %s isn't a directory or can't open", dirPath); - return false; - } + String basePath = (String)dirPath; - while (true) - { - File entry = dir.openNextFile(); - if (!entry) - break; + File dir = SD.open(dirPath); + if (!dir || !dir.isDirectory()) + { + log_e("Error: %s isn't a directory or can't open", dirPath); + return false; + } - if (entry.isDirectory()) + while (true) { - char subDirPath[128]; - snprintf(subDirPath, sizeof(subDirPath), "%s/%s", dirPath, entry.name()); - - if (!deleteDirRecursive(subDirPath)) - { + File entry = dir.openNextFile(); + if (!entry) + break; + + if (entry.isDirectory()) + { + String subDirPath = basePath + "/" + entry.name(); + log_v("New directory found: %s", subDirPath.c_str()); + if (!deleteDirRecursive(subDirPath.c_str())) + { + entry.close(); + return false; + } + } + else + { + if (!SD.remove(basePath + "/" + entry.name())) + { + log_e("Error deleting file: %s", entry.name()); + entry.close(); + return false; + } + log_v("Deleted file: %s/%s", basePath.c_str(), entry.name()); + } entry.close(); - return false; - } - } - else + } + + esp_task_wdt_reset(); + + dir.close(); + + if (!SD.rmdir(basePath)) { - char fileName[255]; - snprintf(fileName, sizeof(fileName), "%s",entry.name()); - if (!SD.remove(fileName)) - { - log_e("Error deleting file: %s",entry.name()); - entry.close(); + log_e("Error deleting directory: %s", basePath.c_str()); return false; - } - log_v("Deleted file: %s",entry.name()); } - entry.close(); - } - - dir.rewindDirectory(); - dir.close(); - if (!SD.rmdir(dirPath)) - { - log_e("Error deleting directory: %s",dirPath); - return false; - } + log_v("Deleted directory: %s", basePath.c_str()); + return true; - log_v("Deleted directory: %s",dirPath); - return true; } /** @@ -468,11 +467,6 @@ bool deleteDirRecursive(const char *dirPath) void configureWebServer() { - // if (!MDNS.begin(hostname)) - // log_e("nDNS init error"); - - // log_i("mDNS initialized"); - server.onNotFound(webNotFound); server.onFileUpload(handleUpload); oldDir = "/"; From e411138837f825ed40ee69b6fc81ae86d7fba738 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Wed, 27 Nov 2024 20:16:58 +0100 Subject: [PATCH 29/55] fix(webserver): Fix delete folder --- lib/webfile/src/webserver.h | 92 +++++++++++++++++++++---------------- 1 file changed, 53 insertions(+), 39 deletions(-) diff --git a/lib/webfile/src/webserver.h b/lib/webfile/src/webserver.h index 41c81bdd..0e730e3f 100644 --- a/lib/webfile/src/webserver.h +++ b/lib/webfile/src/webserver.h @@ -407,57 +407,71 @@ void sendSpiffsImage(const char *imageFile,AsyncWebServerRequest *request) */ bool deleteDirRecursive(const char *dirPath) { - String basePath = (String)dirPath; + String basePath = dirPath; - File dir = SD.open(dirPath); - if (!dir || !dir.isDirectory()) + log_v("Processing directory: %s", basePath.c_str()); + + File dir = SD.open(basePath.c_str()); + if (!dir || !dir.isDirectory()) + { + log_e("Error: %s isn't a directory or can't open", basePath.c_str()); + return false; + } + + while (true) + { + File entry = dir.openNextFile(); + if (!entry) { - log_e("Error: %s isn't a directory or can't open", dirPath); - return false; + break; } - while (true) + if (!basePath.endsWith("/")) { - File entry = dir.openNextFile(); - if (!entry) - break; - - if (entry.isDirectory()) - { - String subDirPath = basePath + "/" + entry.name(); - log_v("New directory found: %s", subDirPath.c_str()); - if (!deleteDirRecursive(subDirPath.c_str())) - { - entry.close(); - return false; - } - } - else - { - if (!SD.remove(basePath + "/" + entry.name())) - { - log_e("Error deleting file: %s", entry.name()); - entry.close(); - return false; - } - log_v("Deleted file: %s/%s", basePath.c_str(), entry.name()); - } - entry.close(); + basePath += "/"; } - esp_task_wdt_reset(); - - dir.close(); + String entryPath = basePath + entry.name(); - if (!SD.rmdir(basePath)) + if (entry.isDirectory()) + { + + log_v("Found subdirectory: %s", entryPath.c_str()); + if (!deleteDirRecursive(entryPath.c_str())) + { + entry.close(); + return false; + } + } + else { - log_e("Error deleting directory: %s", basePath.c_str()); + log_v("Found file: %s", entryPath.c_str()); + if (!SD.remove(entryPath.c_str())) + { + log_e("Error deleting file: %s", entryPath.c_str()); + entry.close(); return false; + } + log_v("Deleted file: %s", entryPath.c_str()); } + entry.close(); + } - log_v("Deleted directory: %s", basePath.c_str()); - return true; + dir.close(); + if (basePath.endsWith("/")) + { + basePath = dirPath; + } + + if (!SD.rmdir(basePath.c_str())) + { + log_e("Error deleting directory: %s", basePath.c_str()); + return false; + } + + log_v("Deleted directory: %s", basePath.c_str()); + return true; } /** @@ -537,7 +551,7 @@ void configureWebServer() logMessage = "Client:" + request->client()->remoteIP().toString() + " " + request->url() + "?name=" + String(fileName) + "&action=" + String(fileAction); - String path = oldDir + String(fileName); + String path = oldDir + "/" + String(fileName); log_i("%s",path.c_str()); if (!SD.exists(path)) From 5c1f0e625088a5080e8a26b5eae0fb102a5b8d16 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Wed, 27 Nov 2024 20:22:28 +0100 Subject: [PATCH 30/55] fix(webserver): Fix download file --- lib/webfile/src/webpage.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/webfile/src/webpage.h b/lib/webfile/src/webpage.h index c7689b9b..0b39d1c2 100644 --- a/lib/webfile/src/webpage.h +++ b/lib/webfile/src/webpage.h @@ -194,6 +194,7 @@ function downloadDeleteButton(filename, action) } if (action == "download") { + urltocall = "/file?name=/" + filename + "&action=" + action; _("status").innerHTML = ""; window.open(urltocall,"_blank"); } From 92530911c88e8233fdc5ac6a2fc5b84ca8cb6eae Mon Sep 17 00:00:00 2001 From: jgauchia Date: Wed, 27 Nov 2024 22:16:30 +0100 Subject: [PATCH 31/55] feat(webserver): Add pagination --- lib/webfile/src/webserver.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/webfile/src/webserver.h b/lib/webfile/src/webserver.h index 0e730e3f..b535b4f0 100644 --- a/lib/webfile/src/webserver.h +++ b/lib/webfile/src/webserver.h @@ -291,12 +291,18 @@ String listFiles(bool ishtml, int page = 0) returnText += ""; if (page > 0) + { + returnText += ""; returnText += ""; + } - returnText += " Page " + String(page + 1) + " "; + returnText += " Page " + String(page + 1) + "/" + String((fileCache.size() / 10)+1) + " "; if (fileCache.size() > endIdx) + { returnText += ""; + returnText += ""; + } returnText += "

"; } From b21dce6567eb20cdb3d88f94c7e8849e8c835d73 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Wed, 27 Nov 2024 22:32:49 +0100 Subject: [PATCH 32/55] feat(webserver): Add path info in status --- lib/webfile/src/webserver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/webfile/src/webserver.h b/lib/webfile/src/webserver.h index b535b4f0..9d35a22f 100644 --- a/lib/webfile/src/webserver.h +++ b/lib/webfile/src/webserver.h @@ -617,7 +617,7 @@ void configureWebServer() if (oldDir == "") oldDir = "/"; currentDir = ""; - request->send(200, "text/plain", "Directory changed successfully"); + request->send(200, "text/plain", "Path:" + oldDir ); } else { @@ -632,7 +632,7 @@ void configureWebServer() else oldDir = newDir; currentDir = ""; - request->send(200, "text/plain", "Directory changed successfully"); + request->send(200, "text/plain", "Path:" + oldDir); } cacheDirectoryContent(oldDir); From 6f0114f190eb31325576a67a1b8105743c3add2b Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sun, 1 Dec 2024 11:50:06 +0100 Subject: [PATCH 33/55] feat: Add Sunrise and Sunset Calculation --- README.md | 3 ++- lib/gps/gps.cpp | 6 ++++++ lib/gps/gps.hpp | 3 +++ lib/gps/timezone.hpp | 22 ++++++++++++++++++++++ platformio.ini | 1 + src/main.cpp | 25 ++++++++++++++++++++++++- 6 files changed, 58 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c36cfd39..f0f5e2fc 100644 --- a/README.md +++ b/README.md @@ -359,7 +359,8 @@ To access the Web File Server, simply use any browser and go to the following ad * OSM to binary vectorial maps [OSM_Extract](https://github.com/aresta/OSM_Extract) thanks to [@aresta](https://github.com/aresta) * Preferences Library [Easy Preferences](https://github.com/hpsaturn/easy-preferences) thanks to [@hpsaturn](https://github.com/hpsaturn) * Wifi CLI manager [esp32-wifi-cli](https://github.com/hpsaturn/esp32-wifi-cli) thanks to [@hpsaturn](https://github.com/hpsaturn) -* Web file server based in [@smford](https://github.com/smford) [esp32-asyncwebserver-fileupload-example ](https://github.com/smford/esp32-asyncwebserver-fileupload-example) +* Web file server based in [@smford](https://github.com/smford) [esp32-asyncwebserver-fileupload-example](https://github.com/smford/esp32-asyncwebserver-fileupload-example) +* Solar sunset and sunrise [SolarCalculator](https://github.com/jpb10/SolarCalculator) thanks to [@jpb10](https://github.com/jpb10) --- diff --git a/lib/gps/gps.cpp b/lib/gps/gps.cpp index 74fcdd0d..d3d50d74 100644 --- a/lib/gps/gps.cpp +++ b/lib/gps/gps.cpp @@ -140,6 +140,12 @@ void getGPSData() { adjustTime( fix.dateTime ); localTime = fix.dateTime; + // Calculate Sunrise and Sunset only one time when date & time was valid + if (calcSun) + { + calculateSun(); + calcSun = false; + } } // Altitude diff --git a/lib/gps/gps.hpp b/lib/gps/gps.hpp index f7c1a51c..2d936ac3 100644 --- a/lib/gps/gps.hpp +++ b/lib/gps/gps.hpp @@ -78,6 +78,9 @@ struct GPSDATA extern GPSDATA gpsData; +static bool calcSun = true; +void calculateSun(); + void initGPS(); double getLat(); double getLon(); diff --git a/lib/gps/timezone.hpp b/lib/gps/timezone.hpp index 14e12c07..3890e20b 100644 --- a/lib/gps/timezone.hpp +++ b/lib/gps/timezone.hpp @@ -98,4 +98,26 @@ static void adjustTime( NeoGPS::time_t & dt ) dt = seconds; // convert seconds back to a date/time structure } + +/** + * @brief convert hour to HH:MM rounded + * + * @param h -> hour + * @param str -> HH:MM text format + */ +static char * hoursToString(double h, char *str) +{ + int m = int(round(h * 60)); + int hr = (m / 60) % 24; + int mn = m % 60; + + str[0] = (hr / 10) % 10 + '0'; + str[1] = (hr % 10) + '0'; + str[2] = ':'; + str[3] = (mn / 10) % 10 + '0'; + str[4] = (mn % 10) + '0'; + str[5] = '\0'; + return str; +} + #endif \ No newline at end of file diff --git a/platformio.ini b/platformio.ini index 742e855d..4c50a5b0 100644 --- a/platformio.ini +++ b/platformio.ini @@ -48,6 +48,7 @@ lib_deps = hpsaturn/ESP32 Wifi CLI@0.3.3 kubafilinger/AsyncTCP@1.1.1 esphome/ESPAsyncWebServer-esphome@3.3.0 + jpb10/SolarCalculator@2.0.1 [esp32_common] extends = common diff --git a/src/main.cpp b/src/main.cpp index f768ccd3..336a9092 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -16,6 +16,7 @@ #include #include #include +#include // Hardware includes #include "hal.hpp" @@ -50,10 +51,32 @@ extern Storage storage; extern Battery battery; extern Power power; +/** + * @brief Sunrise and Sunset + * + */ +static double transit, sunrise, sunset; + #include "settings.hpp" #include "lvglSetup.hpp" #include "tasks.hpp" +/** + * @brief Calculate Sunrise and Sunset + * Must be a global function + * + */ +void calculateSun() +{ + calcSunriseSunset(2000 + localTime.year, localTime.month, localTime.date, + gpsData.latitude, gpsData.longitude, + transit, sunrise, sunset); + + char str[6]; + log_v("%d/%d/%d",2000 + localTime.year, localTime.month, localTime.date); + log_v("Sunrise: %s",hoursToString(sunrise + defGMT, str)); + log_v("Sunset: %s", hoursToString(sunset + defGMT, str)); +} /** * @brief Setup @@ -116,6 +139,7 @@ void setup() mapTempSprite.deleteSprite(); mapTempSprite.createSprite(TILE_WIDTH, TILE_HEIGHT); + // Get init Latitude and Longitude gpsData.latitude = getLat(); gpsData.longitude = getLon(); @@ -125,7 +149,6 @@ void setup() } else { - // Get init Latitude and Longitude tileSize = RENDER_TILE_SIZE; generateRenderMap(); } From b8dfd00a11dbbd3dca6a9a7c5b42cc3559da7237 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sun, 1 Dec 2024 11:59:02 +0100 Subject: [PATCH 34/55] build: Update LovyanGFX library --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 742e855d..ca63839b 100644 --- a/platformio.ini +++ b/platformio.ini @@ -42,7 +42,7 @@ lib_deps = ; slashdevin/NeoGPS@4.2.9 https://github.com/jgauchia/NeoGPS.git#43c4766 lvgl/lvgl@9.2.2 - lovyan03/LovyanGFX@1.1.16 + lovyan03/LovyanGFX@1.2.0 bblanchon/StreamUtils@1.9.0 hpsaturn/EasyPreferences@0.1.3 hpsaturn/ESP32 Wifi CLI@0.3.3 From 311436c8cae06f64e837496bb6178e43e360818f Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sun, 1 Dec 2024 13:26:16 +0100 Subject: [PATCH 35/55] feat: Change default Tile if Search satellite skipped --- lib/gui/src/mainScr.cpp | 4 ++++ lib/gui/src/searchSatScr.cpp | 3 +++ lib/lvgl/src/lvglSetup.cpp | 1 + 3 files changed, 8 insertions(+) diff --git a/lib/gui/src/mainScr.cpp b/lib/gui/src/mainScr.cpp index dab9ec3f..c33f8144 100644 --- a/lib/gui/src/mainScr.cpp +++ b/lib/gui/src/mainScr.cpp @@ -141,6 +141,10 @@ void scrollTile(lv_event_t *event) */ void updateMainScreen(lv_timer_t *t) { + log_v("scrolled %d", isScrolled); + log_v("tile %d",activeTile); + log_v("main scr %d", isMainScreen); + if (isScrolled && isMainScreen) { switch (activeTile) diff --git a/lib/gui/src/searchSatScr.cpp b/lib/gui/src/searchSatScr.cpp index 596e92ab..5fa9eaa7 100644 --- a/lib/gui/src/searchSatScr.cpp +++ b/lib/gui/src/searchSatScr.cpp @@ -11,6 +11,7 @@ static unsigned long millisActual = 0; static bool skipSearch = false; bool isSearchingSat = true; +extern uint8_t activeTile; /** * @brief Button events @@ -51,6 +52,8 @@ void searchGPS(lv_timer_t *searchTimer) lv_timer_del(searchTimer); isSearchingSat = false; zoom = defaultZoom; + activeTile = 3; + lv_tileview_set_tile_by_index(tilesScreen, 3, 0, LV_ANIM_OFF); loadMainScreen(); } } diff --git a/lib/lvgl/src/lvglSetup.cpp b/lib/lvgl/src/lvglSetup.cpp index 32819911..c1c0396c 100644 --- a/lib/lvgl/src/lvglSetup.cpp +++ b/lib/lvgl/src/lvglSetup.cpp @@ -346,6 +346,7 @@ void initLVGL() void loadMainScreen() { isMainScreen = true; + isScrolled = true; isSearchingSat = false; wptAction = WPT_NONE; lv_screen_load(mainScreen); From 483923ebf4964e47b1f6714600f4a1f0e847e5b0 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sun, 1 Dec 2024 13:44:33 +0100 Subject: [PATCH 36/55] fix(timer): Fix main app Timer init. --- lib/gui/src/mainScr.cpp | 4 ---- lib/gui/src/mainScr.hpp | 2 +- lib/gui/src/searchSatScr.cpp | 4 ++++ lib/gui/src/settingsScr.cpp | 3 +++ 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/gui/src/mainScr.cpp b/lib/gui/src/mainScr.cpp index c33f8144..dab9ec3f 100644 --- a/lib/gui/src/mainScr.cpp +++ b/lib/gui/src/mainScr.cpp @@ -141,10 +141,6 @@ void scrollTile(lv_event_t *event) */ void updateMainScreen(lv_timer_t *t) { - log_v("scrolled %d", isScrolled); - log_v("tile %d",activeTile); - log_v("main scr %d", isMainScreen); - if (isScrolled && isMainScreen) { switch (activeTile) diff --git a/lib/gui/src/mainScr.hpp b/lib/gui/src/mainScr.hpp index a147f139..06f3eb82 100644 --- a/lib/gui/src/mainScr.hpp +++ b/lib/gui/src/mainScr.hpp @@ -20,7 +20,7 @@ #include "navScr.hpp" #include "satInfoScr.hpp" -static lv_timer_t *mainTimer; // Main Screen Timer +extern lv_timer_t *mainTimer; // Main Screen Timer #define UPDATE_MAINSCR_PERIOD 30 // Main Screen update time extern bool isMainScreen; // Flag to indicate main screen is selected diff --git a/lib/gui/src/searchSatScr.cpp b/lib/gui/src/searchSatScr.cpp index 5fa9eaa7..29856b36 100644 --- a/lib/gui/src/searchSatScr.cpp +++ b/lib/gui/src/searchSatScr.cpp @@ -12,6 +12,7 @@ static unsigned long millisActual = 0; static bool skipSearch = false; bool isSearchingSat = true; extern uint8_t activeTile; +lv_timer_t *mainTimer; // Main Screen Timer /** * @brief Button events @@ -29,6 +30,7 @@ void buttonEvent(lv_event_t *event) { lv_screen_load(settingsScreen); } + lv_timer_resume(mainTimer); } /** @@ -43,6 +45,7 @@ void searchGPS(lv_timer_t *searchTimer) while (millis() < millisActual + 500) ; lv_timer_del(searchTimer); + lv_timer_resume(mainTimer); isSearchingSat = false; loadMainScreen(); } @@ -66,6 +69,7 @@ void createSearchSatScr() { searchTimer = lv_timer_create(searchGPS, 100, NULL); lv_timer_ready(searchTimer); + lv_timer_pause(mainTimer); searchSatScreen = lv_obj_create(NULL); diff --git a/lib/gui/src/settingsScr.cpp b/lib/gui/src/settingsScr.cpp index c55e26b9..518fda83 100644 --- a/lib/gui/src/settingsScr.cpp +++ b/lib/gui/src/settingsScr.cpp @@ -18,7 +18,10 @@ bool needReboot = false; static void back(lv_event_t *event) { if (isSearchingSat) + { + lv_timer_pause(mainTimer); lv_screen_load(searchSatScreen); + } else loadMainScreen(); } From acaf54964fcac69db66b7a6f1230a44debe74fa9 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sun, 1 Dec 2024 13:52:34 +0100 Subject: [PATCH 37/55] refactor(settings): Refactor device settings code --- lib/gui/src/deviceSettingsScr.cpp | 33 +++++++++++++++++-------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/lib/gui/src/deviceSettingsScr.cpp b/lib/gui/src/deviceSettingsScr.cpp index 3ad66778..a015eeed 100644 --- a/lib/gui/src/deviceSettingsScr.cpp +++ b/lib/gui/src/deviceSettingsScr.cpp @@ -37,7 +37,11 @@ void deviceSettingsEvent(lv_event_t *event) } } -void lv_brightness_cb(lv_event_t *e) +/** + * @brief Brightness callback + * + */ +void brightnessEvent(lv_event_t *e) { lv_obj_t *obj =(lv_obj_t*) lv_event_get_target(e); defBright = lv_slider_get_value(obj); @@ -45,17 +49,11 @@ void lv_brightness_cb(lv_event_t *e) tft.setBrightness(defBright); } -// void lv_background_opa_cb(lv_event_t *e) -// { -// lv_obj_t *obj =(lv_obj_t*) lv_event_get_target(e); -// uint8_t val = lv_slider_get_value(obj); -// std::vector::iterator it; -// for (it = sub_section.begin(); it != sub_section.end(); it++) { -// lv_obj_set_style_bg_opa(*it, val, LV_PART_MAIN); -// } -// } - -static lv_obj_t *create_text(lv_obj_t *parent, const char *icon, const char *txt) +/** + * @brief Create brightness text + * + */ +static lv_obj_t *createBrightText(lv_obj_t *parent, const char *icon, const char *txt) { lv_obj_t *obj = lv_menu_cont_create(parent); @@ -82,10 +80,14 @@ static lv_obj_t *create_text(lv_obj_t *parent, const char *icon, const char *txt return obj; } -static lv_obj_t *create_slider(lv_obj_t *parent, const char *icon, const char *txt, int32_t min, int32_t max, +/** + * @brief Create brightness slider + * + */ +static lv_obj_t *createBrightSlider(lv_obj_t *parent, const char *icon, const char *txt, int32_t min, int32_t max, int32_t val, lv_event_cb_t cb, lv_event_code_t filter) { - lv_obj_t *obj = create_text(parent, icon, txt); + lv_obj_t *obj = createBrightText(parent, icon, txt); lv_obj_t *slider = lv_slider_create(obj); lv_obj_set_width(slider,TFT_WIDTH - 80); @@ -153,7 +155,8 @@ void createDeviceSettingsScr() lv_obj_align_to(dropdown, list, LV_ALIGN_OUT_RIGHT_MID, 0, 0); lv_obj_add_event_cb(dropdown, deviceSettingsEvent, LV_EVENT_VALUE_CHANGED, (char*)"rate"); - create_slider(deviceSettingsOptions, LV_SYMBOL_SETTINGS, "Brightness", 5, 255, defBright, lv_brightness_cb, LV_EVENT_VALUE_CHANGED); + // Brightness Slider + createBrightSlider(deviceSettingsOptions, LV_SYMBOL_SETTINGS, "Brightness", 5, 255, defBright, brightnessEvent, LV_EVENT_VALUE_CHANGED); // Back button btn = lv_btn_create(deviceSettingsScreen); From 4ac533ec9460431761bf5819fd8ab73c47e5c20d Mon Sep 17 00:00:00 2001 From: jgauchia Date: Mon, 2 Dec 2024 19:39:27 +0100 Subject: [PATCH 38/55] feat(firmware): Add firmware upgrade from SD Card --- README.md | 2 +- images/dev/devicesettings.jpg | Bin 11276 -> 0 bytes images/dev/devicesettings.png | Bin 0 -> 7306 bytes lib/gui/src/deviceSettingsScr.cpp | 38 +++++++++++- lib/gui/src/deviceSettingsScr.hpp | 4 ++ lib/gui/src/upgradeScr.cpp | 89 +++++++++++++++++++++++++++ lib/gui/src/upgradeScr.hpp | 26 ++++++++ lib/upgrade/src/firmUpgrade.cpp | 98 ++++++++++++++++++++++++++++++ lib/upgrade/src/firmUpgrade.hpp | 26 ++++++++ lib/webfile/src/webserver.h | 2 +- 10 files changed, 280 insertions(+), 5 deletions(-) delete mode 100644 images/dev/devicesettings.jpg create mode 100644 images/dev/devicesettings.png create mode 100644 lib/gui/src/upgradeScr.cpp create mode 100644 lib/gui/src/upgradeScr.hpp create mode 100644 lib/upgrade/src/firmUpgrade.cpp create mode 100644 lib/upgrade/src/firmUpgrade.hpp diff --git a/README.md b/README.md index c36cfd39..1c31fcd8 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ ESP32 Based GPS Navigator (LVGL - LovyanGFX). |:-:|:-:|:-:| | Add Waypoint | Add Waypoint (landscape) | Waypoint List | -|||||| +|||||| |:-:|:-:|:-:|:-:|:-:| | Settings | Compass Calibration | Touch Calibration | Map Settings | Device Settings | diff --git a/images/dev/devicesettings.jpg b/images/dev/devicesettings.jpg deleted file mode 100644 index 8547b0dbd4fb5807a5e48ddda5929113545e41b9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11276 zcmeHs2Ut|g(%_juk}xyGANy+qeGv?)%^U_xr!y?e4EmS9Nur>gulUI(_zr_r?LZjy6#n z0D(XNft-Q85kM1wLLmDE3V~8Up%j#ds3^&ap5_qsAs9Uz4x@)LAefNM2u3zW1{ez$ z3mZE-CnqPInVXlJgBQuc$+0g41f`&$q@bjuqN3wKzz`h&a@uPF5Y(V?kQxMp0l)|l z1OeJ>131a50+4-me3`osW&wdAdv5_c2nYbfA#gIj*wT>UqKH zD!z+mIjwST5TQ`-;;`0 zO6$D>8gg{V5+MA_p<}xd&`gJ^=dVT#o1$C9-NCC33*+auzD?TQvka=%yJ0Whr=OUT zs!K|=vqz?C^BexGB+O&%?byvj%+R;O$QAx)I8#}SWdT**gA65=VC9m}8Mb`~ih^Rh zzb*L->sZEz|Hux#OTViY`0=&G`Ox@aMeYYoRk99OngF^DvT+i4G#6~2e%J9@A9@!w z?J_nO!*^)drQ^f=d;jCS@3Zwxbq$h=j=8j72{ny4miWM>&HVDpr2(Fp=}ZZfxAvEw zZyq(ni`7mK224f4eqAx25?C68ZW-E}@Ev5yom`nslWLlx#Aj_*#hN1UXKhmDbpPAR zSE)ggbK=2h_D#Q^Kql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R zTu+&A?cv9V6WAo8>BQ%Yp!q<&nx{qArglq`TFx;V6dXZ^bEi#Ya0`kjfUwvvyR`c< z_=oEjn*{rh^y0lwPYzqy3DnWY zYQ|Id08R2>HJqOpX|f9qxCgOEavo z6D@6gvMMAnNQ2&9u~@@oP;!_iT2tu)O5t43xmZrd!|jJwziGku)$piD_*N)*8`G$+VC*g(Oqg@rZ-H-vcP}3`)Ky_|CX}p1uxO?bUk@ZhhXw zY7C<60Sp5Guax>jx&Hs1rXAFN_k- zhrdVFp+JCG19Jd?j=2m?eg4OEXW9p)laf4GaqNEOZT0p?5IB$@(o3|%OwdLROwdHi zEUFh4BB+sSaKcq|Bb>xe3!u(sQ3}|>K2;OOf&F~@U%V`D z1n7&-bwj;+-Z1NSobSe4FE!w{jarGr@1xBHHgCovWt;MpsFdw8UfSOo>=Dnt<;+qK`& z^qVyH=tzpfpp@kpb=n`-cJ@#qy_pF?P@5b-by0qh?YpO0-~bltxI@}~>^`&xk_uhU zW~|9lXe%?89)zwBsET zegTj)B=|I4hhN6H4J_6+Ow-Jzc?4=TeZ5^qrbE)xstnExQqH@I%U0vks)|GN+fOoC}4h}EskUdW5ZD+nymDJ}N+=notHII#|ntsmey3l2<>xq8ZL z%p@L|3Y_vct7j=~cPY1=`ztCX4^aVB-L@OFaHjFtG)jEoEyi3E9g?9i-=C?%J$7>z zAE|&Y9^uybRZsppdL*zrZqu(FUr#`Mr16I;gsbNWP{R@xgVY@;n@3~QUvd|ZGcxq! z86+*dq=Ur$fYw-JCv7-N1**1v?-zP3-0uxFxc4jVZbAHy*xEpRwOuy+h4ko%XG5-Q zhQhePe0*&lmq@2vG?~%LIadtv_#F92NC1_o2<4%T^*9K17$p??iyB)HF?knHDH~#|x3lGKs diff --git a/images/dev/devicesettings.png b/images/dev/devicesettings.png new file mode 100644 index 0000000000000000000000000000000000000000..1d59e1556e7717c6d9a597c05f57ccda69a9e49a GIT binary patch literal 7306 zcmeHsXH=8hwl)Mp?gGP?07*L~7{L z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Scr.cpp @@ -15,7 +15,7 @@ lv_obj_t *deviceSettingsScreen; // Device Settings Screen * * @param event */ -void deviceSettingsEvent(lv_event_t *event) +static void deviceSettingsEvent(lv_event_t *event) { lv_obj_t *obj = (lv_obj_t*)lv_event_get_target(event); char *option = (char *)lv_event_get_user_data(event); @@ -40,8 +40,9 @@ void deviceSettingsEvent(lv_event_t *event) /** * @brief Brightness callback * + * @param e */ -void brightnessEvent(lv_event_t *e) +static void brightnessEvent(lv_event_t *e) { lv_obj_t *obj =(lv_obj_t*) lv_event_get_target(e); defBright = lv_slider_get_value(obj); @@ -49,6 +50,27 @@ void brightnessEvent(lv_event_t *e) tft.setBrightness(defBright); } +/** + * @brief Upgrade firmware event + * + * @param event + */ +static void upgradeEvent(lv_event_t *event) +{ + createMsgUpgrade(); + lv_screen_load(msgUpgrade); + if (!checkFileUpgrade()) + { + lv_label_set_text_static(msgUprgdText, LV_SYMBOL_WARNING " No Firmware found!"); + } + else + { + lv_label_set_text_static(msgUprgdText, LV_SYMBOL_WARNING " Firmware found!"); + lv_obj_clear_flag(btnMsgUpgrade,LV_OBJ_FLAG_HIDDEN); + lv_obj_clear_flag(contMeter,LV_OBJ_FLAG_HIDDEN); + } +} + /** * @brief Create brightness text * @@ -155,10 +177,20 @@ void createDeviceSettingsScr() lv_obj_align_to(dropdown, list, LV_ALIGN_OUT_RIGHT_MID, 0, 0); lv_obj_add_event_cb(dropdown, deviceSettingsEvent, LV_EVENT_VALUE_CHANGED, (char*)"rate"); + // Upgrade button + list = lv_list_add_btn(deviceSettingsOptions, NULL, NULL); + btn = lv_btn_create(list); + lv_obj_set_size(btn, TFT_WIDTH - 45, 40 * scale); + label = lv_label_create(btn); + lv_obj_set_style_text_font(label, fontLarge, 0); + lv_label_set_text_static(label, "Firmware Upgrade"); + lv_obj_center(label); + lv_obj_add_event_cb(btn, upgradeEvent, LV_EVENT_CLICKED, NULL); + // Brightness Slider createBrightSlider(deviceSettingsOptions, LV_SYMBOL_SETTINGS, "Brightness", 5, 255, defBright, brightnessEvent, LV_EVENT_VALUE_CHANGED); - // Back button + // Back button btn = lv_btn_create(deviceSettingsScreen); lv_obj_set_size(btn, TFT_WIDTH - 30, 40 * scale); label = lv_label_create(btn); diff --git a/lib/gui/src/deviceSettingsScr.hpp b/lib/gui/src/deviceSettingsScr.hpp index 5ecec47d..66adb6ff 100644 --- a/lib/gui/src/deviceSettingsScr.hpp +++ b/lib/gui/src/deviceSettingsScr.hpp @@ -10,11 +10,15 @@ #define DEVICESETTINGSCR_HPP #include "globalGuiDef.h" +#include "upgradeScr.hpp" #include "lvglSetup.hpp" +#include "firmUpgrade.hpp" static lv_obj_t *deviceSettingsOptions; static void deviceSettingsEvent(lv_event_t *event); +static void brightnessEvent(lv_event_t *e); +static void upgradeEvent(lv_event_t *event); void createDeviceSettingsScr(); #endif diff --git a/lib/gui/src/upgradeScr.cpp b/lib/gui/src/upgradeScr.cpp new file mode 100644 index 00000000..984a3f87 --- /dev/null +++ b/lib/gui/src/upgradeScr.cpp @@ -0,0 +1,89 @@ +/** + * @file upgradeScr.cpp + * @author Jordi Gauchía (jgauchia@gmx.es) + * @brief LVGL Firmware upgrade messages + * @version 0.1.9_alpha + * @date 2024-11 + */ + + #include "upgradeScr.hpp" + + lv_obj_t *msgUpgrade; + lv_obj_t *msgUprgdText; + lv_obj_t *btnMsgBack; + lv_obj_t *btnMsgUpgrade; + lv_obj_t *contMeter; + +/** + * @brief Upgrade Back Message Event + * + */ +void msgBackEvent(lv_event_t *event) +{ + lv_screen_load(deviceSettingsScreen); +} + +/** + * @brief Upgrade Message Event + * + */ +void msgUpgrdEvent(lv_event_t *event) +{ + log_v("Upgrade firmware"); + lv_obj_add_flag(btnMsgBack,LV_OBJ_FLAG_HIDDEN); + lv_obj_add_flag(btnMsgUpgrade, LV_OBJ_FLAG_HIDDEN); + onUpgrdStart(); + onUpgrdEnd(); +} + + +/** + * @brief Create Upgrade Message + * + */ +void createMsgUpgrade() +{ + msgUpgrade = lv_obj_create(NULL); + lv_obj_t *msgBox = lv_msgbox_create(msgUpgrade); + lv_msgbox_add_title(msgBox, "Firmware Upgrade"); + lv_obj_t *content = lv_msgbox_get_content(msgBox); + lv_obj_set_flex_flow(content, LV_FLEX_FLOW_COLUMN); + lv_obj_set_flex_align(content, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER); + lv_obj_set_height(msgBox,200); + + lv_obj_t *contText = lv_obj_create(content); + lv_obj_set_size(contText, lv_pct(100), LV_SIZE_CONTENT); + lv_obj_set_flex_flow(contText, LV_FLEX_FLOW_COLUMN); + lv_obj_set_flex_align(contText, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_CENTER); + lv_obj_clear_flag(contText,LV_OBJ_FLAG_SCROLLABLE); + lv_obj_set_style_border_color(contText,lv_color_black(),0); + + msgUprgdText = lv_label_create(contText); + lv_label_set_text_static(msgUprgdText,""); + lv_obj_set_style_text_font(msgUprgdText, fontLarge, 0); + + contMeter = lv_obj_create(content); + lv_obj_set_size(contMeter, lv_pct(100), LV_SIZE_CONTENT); + lv_obj_set_flex_flow(contMeter, LV_FLEX_FLOW_COLUMN); + lv_obj_set_flex_align(contMeter, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_CENTER); + lv_obj_clear_flag(contMeter,LV_OBJ_FLAG_SCROLLABLE); + lv_obj_set_style_border_color(contMeter,lv_color_black(),0); + lv_obj_add_flag(contMeter,LV_OBJ_FLAG_HIDDEN); + + static uint32_t objectColor = 0x303030; + static lv_style_t styleBtn; + lv_style_init(&styleBtn); + lv_style_set_bg_color(&styleBtn, lv_color_hex(objectColor)); + lv_style_set_border_color(&styleBtn, lv_color_hex(objectColor)); + + btnMsgBack = lv_msgbox_add_footer_button(msgBox, "Back"); + lv_obj_add_event_cb(btnMsgBack, msgBackEvent, LV_EVENT_CLICKED, NULL); + lv_obj_set_style_text_font(btnMsgBack, fontLarge, 0); + lv_obj_add_style(btnMsgBack, &styleBtn, 0); + + btnMsgUpgrade = lv_msgbox_add_footer_button(msgBox, "UPGRADE"); + lv_obj_add_event_cb(btnMsgUpgrade, msgUpgrdEvent, LV_EVENT_CLICKED, NULL); + lv_obj_set_style_text_font(btnMsgUpgrade, fontLarge, 0); + lv_obj_add_style(btnMsgUpgrade, &styleBtn, 0); + lv_obj_add_flag(btnMsgUpgrade,LV_OBJ_FLAG_HIDDEN); +} \ No newline at end of file diff --git a/lib/gui/src/upgradeScr.hpp b/lib/gui/src/upgradeScr.hpp new file mode 100644 index 00000000..be0f2a49 --- /dev/null +++ b/lib/gui/src/upgradeScr.hpp @@ -0,0 +1,26 @@ +/** + * @file upgradeScr.hpp + * @author Jordi Gauchía (jgauchia@gmx.es) + * @brief LVGL Firmware upgrade messages + * @version 0.1.9_alpha + * @date 2024-11 + */ + +#ifndef UPGRADESCR_HPP +#define UPGRADESCR_HPP + +#include "lvgl.h" +#include "firmUpgrade.hpp" +#include "globalGuiDef.h" + +extern lv_obj_t *msgUpgrade; +extern lv_obj_t *msgUprgdText; +extern lv_obj_t *btnMsgBack; +extern lv_obj_t *btnMsgUpgrade; +extern lv_obj_t *contMeter; + +void msgBackEvent(lv_event_t *event); +void msgUpgrdEvent(lv_event_t *event); +void createMsgUpgrade(); + +#endif \ No newline at end of file diff --git a/lib/upgrade/src/firmUpgrade.cpp b/lib/upgrade/src/firmUpgrade.cpp new file mode 100644 index 00000000..6ca008d9 --- /dev/null +++ b/lib/upgrade/src/firmUpgrade.cpp @@ -0,0 +1,98 @@ +/** + * @file firmUpgrade.cpp + * @author Jordi Gauchía (jgauchia@gmx.es) + * @brief Firmware upgrade from SD functions + * @version 0.1.9_alpha + * @date 2024-11 + */ + + #include "firmUpgrade.hpp" + +/** + * @brief Check if firmware file exist + * + * @return true/false + */ +bool checkFileUpgrade() +{ +if (SD.exists(upgrdFile)) + return true; +else + return false; +} + +/** + * @brief Firmware upgrade start callback + * + */ +void onUpgrdStart() +{ + log_v("Try to upgrade firmware..."); + File firmware = SD.open(upgrdFile); + Update.onProgress(onUpgrdProcess); + Update.begin(firmware.size(), U_FLASH); + Update.writeStream(firmware); + if (Update.end()) + { + log_v("Upgrade finished!"); + } + else + { + log_e("Upgrade error!"); + lv_label_set_text_static(msgUprgdText, LV_SYMBOL_WARNING " Upgrade error!"); + lv_obj_clear_flag(btnMsgBack,LV_OBJ_FLAG_HIDDEN); + lv_obj_add_flag(contMeter,LV_OBJ_FLAG_HIDDEN); + } + firmware.close(); +} + +/** + * @brief Draw progress bar + * + * @param x -> X Position + * @param y -> Y Position + * @param w -> Bar width + * @param h -> Bar height + * @param percent -> Percent to show + * @param frameColor -> Bar frame color + * @param barColor -> Bar color + */ +void drawProgressBar(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint8_t percent, uint16_t frameColor, uint16_t barColor) +{ + if (percent == 0) + tft.fillRoundRect(x, y, w, h, 3, TFT_BLACK); + uint8_t margin = 2; + uint16_t barHeight = h - 2 * margin; + uint16_t barWidth = w - 2 * margin; + tft.drawRoundRect(x, y, w, h, 3, frameColor); + tft.fillRect(x + margin, y + margin, barWidth * percent / 100.0, barHeight, barColor); +} + +/** + * @brief Firmware upgrade process callback + * + * @param currSize -> Current size from file + * @param totalSize -> Total size from file + */ +void onUpgrdProcess(size_t currSize, size_t totalSize) +{ + float progress = (currSize * 100) / totalSize; + log_v("Firmware Upgrade process %d ...", (int)progress); + char strProgress[30]; + sprintf(strProgress,"Upgrading... %d%%",(int)progress); + tft.drawCenterString(strProgress, tft.width() >> 1, (tft.height() >> 1)+25, &fonts::FreeSansBold9pt7b); + drawProgressBar(40,tft.height() >> 1,TFT_WIDTH - 80,20,(int)progress,TFT_WHITE,TFT_BLUE); + if ((int)progress == 100) + tft.drawCenterString("Upgrade complete", tft.width() >> 1, (tft.height() >> 1)+25, &fonts::FreeSansBold9pt7b); +} + +/** + * @brief Firmware upgrade end callback + * + */ +void onUpgrdEnd() +{ + delay(500); + log_i("Rebooting ESP32: "); + ESP.restart(); +} \ No newline at end of file diff --git a/lib/upgrade/src/firmUpgrade.hpp b/lib/upgrade/src/firmUpgrade.hpp new file mode 100644 index 00000000..6e5f2b04 --- /dev/null +++ b/lib/upgrade/src/firmUpgrade.hpp @@ -0,0 +1,26 @@ +/** + * @file firmUpgrade.hpp + * @author Jordi Gauchía (jgauchia@gmx.es) + * @brief Firmware upgrade from SD functions + * @version 0.1.9_alpha + * @date 2024-11 + */ + +#ifndef FIRMUPGRADE_HPP +#define FIRMUPGRADE_HPP + +#include +#include "tft.hpp" +#include "lvgl.h" +#include "upgradeScr.hpp" +#include "SD.h" + +static const char *upgrdFile PROGMEM = "/firmware.bin"; // Firmware upgrade file + +bool checkFileUpgrade(); +void onUpgrdStart(); +void drawProgressBar(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint8_t percent, uint16_t frameColor, uint16_t barColor); +void onUpgrdProcess(size_t currSize, size_t totalSize); +void onUpgrdEnd(); + +#endif \ No newline at end of file diff --git a/lib/webfile/src/webserver.h b/lib/webfile/src/webserver.h index 9d35a22f..a50a8e49 100644 --- a/lib/webfile/src/webserver.h +++ b/lib/webfile/src/webserver.h @@ -572,7 +572,7 @@ void configureWebServer() logMessage += " downloaded"; request->send(SD, path, "application/octet-stream"); } - if (strcmp(fileAction, "deldir") == 0) + else if (strcmp(fileAction, "deldir") == 0) { logMessage += " deleted"; deleteDirRecursive(path.c_str()); From 4b9a158acbeab19a1743a4bfd68fd329b1cbe157 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Mon, 2 Dec 2024 19:49:51 +0100 Subject: [PATCH 39/55] fix(firmware): Fix upgrade progress typo --- lib/upgrade/src/firmUpgrade.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/upgrade/src/firmUpgrade.cpp b/lib/upgrade/src/firmUpgrade.cpp index 6ca008d9..d5cb834e 100644 --- a/lib/upgrade/src/firmUpgrade.cpp +++ b/lib/upgrade/src/firmUpgrade.cpp @@ -80,10 +80,10 @@ void onUpgrdProcess(size_t currSize, size_t totalSize) log_v("Firmware Upgrade process %d ...", (int)progress); char strProgress[30]; sprintf(strProgress,"Upgrading... %d%%",(int)progress); - tft.drawCenterString(strProgress, tft.width() >> 1, (tft.height() >> 1)+25, &fonts::FreeSansBold9pt7b); + tft.drawCenterString(strProgress, tft.width() >> 1, (tft.height() >> 1)+25, &fonts::FreeSans9pt7b); drawProgressBar(40,tft.height() >> 1,TFT_WIDTH - 80,20,(int)progress,TFT_WHITE,TFT_BLUE); if ((int)progress == 100) - tft.drawCenterString("Upgrade complete", tft.width() >> 1, (tft.height() >> 1)+25, &fonts::FreeSansBold9pt7b); + tft.drawCenterString("Upgrade complete", tft.width() >> 1, (tft.height() >> 1)+25, &fonts::FreeSans9pt7b); } /** From 6167e27d96885b2f5d5bfa14be4c29410cb013fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jordi=20Gauch=C3=ADa?= Date: Mon, 2 Dec 2024 19:54:14 +0100 Subject: [PATCH 40/55] docs: Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 1c31fcd8..f5a6863c 100644 --- a/README.md +++ b/README.md @@ -208,6 +208,8 @@ Please follow the instructions provided by [OSM_Extract](https://github.com/ares > pio run --target uploadfs > ``` +> [!TIP] +> Optional, firmware upgrade is possible from SD Card, please see [PR #259](https://github.com/jgauchia/IceNav-v3/pull/259) for detailed instructions > [!TIP] > Optional, for map debugging with specific coordinates, or when you are in indoors, you are able to set the defaults coordinates, on two ways: From f25a4d7055155686dec22bacbc5cca6068106317 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Tue, 3 Dec 2024 20:23:55 +0100 Subject: [PATCH 41/55] feat(widgets): Add sunrise/sunset widget --- data/sunrise.bin | Bin 0 -> 1612 bytes data/sunset.bin | Bin 0 -> 1612 bytes images/dev/compass.jpg | Bin 20884 -> 25779 bytes lib/gps/gps.cpp | 4 +-- lib/gps/gps.hpp | 2 ++ lib/gui/src/mainScr.cpp | 10 ++++++++ lib/gui/src/widgets.cpp | 39 +++++++++++++++++++++++++++++ lib/gui/src/widgets.hpp | 13 +++++++--- lib/lvgl/lv_conf.h | 2 +- lib/preferences/preferences-keys.h | 2 ++ lib/settings/settings.cpp | 6 +++++ lib/settings/settings.hpp | 2 ++ src/main.cpp | 8 +++--- 13 files changed, 77 insertions(+), 11 deletions(-) create mode 100644 data/sunrise.bin create mode 100644 data/sunset.bin diff --git a/data/sunrise.bin b/data/sunrise.bin new file mode 100644 index 0000000000000000000000000000000000000000..6a70faa7806712604eba8963f1edae4586ae4fc4 GIT binary patch literal 1612 zcmb2-VqlN}Lk0$)0(XYb(-b~4O#gp?VcP#ApQkG10@)6qrzv&-=>{O~xL7LL@M(&I zKTuuXmud2bpQb7P{W3+~0Lb?IG)>{R_3QutFO^CDXPEK-KTzL)###UW3#|YDUuy6F z|Hk+K|L0rt|G(u+AietkevM)7DEjHZEsNdpYj2iz=J&Eyy0 z1(rJ)fQL~;gpm(Jn1O{&M1&2iNg^VcszD;S#IdVpU|{FKD#I=;j4r{-&d$yx3MOUwR)91LgSF{RaVtQ9K$3qiJAZ(f|YXfrtopGqH;^ zv5APVF=6W9WfT!%-U0y0<- zx`0ZBMa9I$#YBM&b`)_*2|*x`kwz1jlmZD03Q9>Mt7jGks|HEPhyn{|C}0;B0|`NZ fJls`4TV-LQf`W2T=W+^R0h|mBxWr+WP)Gv+Z5{Sv literal 0 HcmV?d00001 diff --git a/images/dev/compass.jpg b/images/dev/compass.jpg index 1bc9290d4516d0a0d863373321e0b4fecf913ee8..952c33af60644b611f7f63ac2e3565a248ff0574 100644 GIT binary patch literal 25779 zcmeFYbyyrr&^J0b1lQp1&f*#Z1X$c1f-UY2ApsIRxNES*g1baWf(6&$Az1L>5Hz_% za&pdjzvq?bKHvTCzRm1TRoAbot81!fx|`XbGe4IAJSBOkJb-|J04Rcgz|Uo%`hlOl z4FEu)>;O6d0B8UK0uq1#Qnw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yhwN7SBeS6(=u7j1M-t4 zW#^GnM06ATx+1sPGN|s>F|J_f6+QJmY&-h6O|e$xyYtDcr2DdWb6hoW`hF*uGvR&G zjMX@2&6hdXB%mb#j2K*J#1E2%)`d{ZOS{4z&-@E-+5x`_(2fD^R#D25N(pVeY+G3JOW5wOd}lu>ZW@;dJeEmeBpDC z_C)a%3DIXVr+tDHd!MngqjNt`$4^}=Y+&898bBwjOvZ>V-9Tb_?qfGSeu7;L81@|r zqli&(A|%ouCEvJWmc&*A6AID{3kuHZdeQsi^OyK{7L)r$*jKN%qE1Gj_K68$w4dGd ztoabYA`}*Hp9R57kssc@XWKc)MVbH6@^mRIa8#Auae-ltwv(DHJ5e*gsyV;Le{P1f zh8Xy?0#j8B`Q&D>Hi+g6vznm@d-VNl9SZ Date: Wed, 4 Dec 2024 18:38:19 +0100 Subject: [PATCH 42/55] fix(main): Fix splash screen memory free info --- src/main.cpp | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index e1324256..baff4734 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -134,7 +134,28 @@ void setup() initGPS(); initLVGL(); - + #ifndef DISABLE_CLI + initCLI(); + initCLITask(); + #endif + + if (WiFi.status() == WL_CONNECTED) + { + if (!MDNS.begin(hostname)) + log_e("nDNS init error"); + + log_i("mDNS initialized"); + } + + if (WiFi.status() == WL_CONNECTED && enableWeb) + { + configureWebServer(); + server.begin(); + } + + if(WiFi.getMode() == WIFI_OFF) + ESP_ERROR_CHECK(esp_event_loop_create_default()); + // Reserve PSRAM for buffer map mapTempSprite.deleteSprite(); mapTempSprite.createSprite(TILE_WIDTH, TILE_HEIGHT); @@ -157,28 +178,6 @@ void setup() initGpsTask(); lv_screen_load(searchSatScreen); - - #ifndef DISABLE_CLI - initCLI(); - initCLITask(); - #endif - - if (WiFi.status() == WL_CONNECTED) - { - if (!MDNS.begin(hostname)) - log_e("nDNS init error"); - - log_i("mDNS initialized"); - } - - if (WiFi.status() == WL_CONNECTED && enableWeb) - { - configureWebServer(); - server.begin(); - } - - if(WiFi.getMode() == WIFI_OFF) - ESP_ERROR_CHECK(esp_event_loop_create_default()); } /** From e1475c2bdb636ae6fd55393c49e25de07e2eed22 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Wed, 4 Dec 2024 19:30:19 +0100 Subject: [PATCH 43/55] fix(vectormap): Fix memory free after map is loaded --- lib/maps/src/vectorMaps.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/maps/src/vectorMaps.cpp b/lib/maps/src/vectorMaps.cpp index b6e5339b..c7a78b07 100644 --- a/lib/maps/src/vectorMaps.cpp +++ b/lib/maps/src/vectorMaps.cpp @@ -66,7 +66,6 @@ void getPosition(double lat, double lon) Coord pos; pos.lat = lat; pos.lng = lon; - if (abs(pos.lat - prevLat) > 0.00005 && abs(pos.lng - prevLng) > 0.00005) { point.x = lon2x(pos.lng); @@ -571,6 +570,10 @@ void generateVectorMap(ViewPort &viewPort, MemCache &memCache, TFT_eSprite &map) // TILE_WIDTH / 2, TILE_HEIGHT / 2 - 6, // RED); log_d("Draw done! %i", millis()); + + MapBlock *firstBlock = memCache.blocks.front(); + delete firstBlock; + memCache.blocks.erase(memCache.blocks.begin()); } else { From 787a0a1d0165fef8995e9c787c83a34536aa58cf Mon Sep 17 00:00:00 2001 From: jgauchia Date: Wed, 4 Dec 2024 19:34:39 +0100 Subject: [PATCH 44/55] feat(vectormap): Preload vectorized map --- src/main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index baff4734..48542fc8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -167,6 +167,15 @@ void setup() // Preload Map if (isVectorMap) { + getPosition(gpsData.latitude, gpsData.longitude); + tileSize = VECTOR_TILE_SIZE; + viewPort.setCenter(point); + + getMapBlocks(viewPort.bbox, memCache); + + generateVectorMap(viewPort, memCache, mapTempSprite); + + isPosMoved = false; } else { From 1a2471364d5c64fdcb33f4818a60ba62e19705b5 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Wed, 4 Dec 2024 19:49:38 +0100 Subject: [PATCH 45/55] fix(gps): Fix GPS Task init order --- lib/gps/gps.cpp | 6 +----- src/main.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/lib/gps/gps.cpp b/lib/gps/gps.cpp index 307d8351..6b2c67ca 100644 --- a/lib/gps/gps.cpp +++ b/lib/gps/gps.cpp @@ -141,11 +141,7 @@ void getGPSData() adjustTime( fix.dateTime ); localTime = fix.dateTime; // Calculate Sunrise and Sunset only one time when date & time was valid - if (calcSun) - { - calculateSun(); - calcSun = false; - } + calculateSun(); } // Altitude diff --git a/src/main.cpp b/src/main.cpp index 48542fc8..9e01d702 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -134,6 +134,12 @@ void setup() initGPS(); initLVGL(); + // Get init Latitude and Longitude + gpsData.latitude = getLat(); + gpsData.longitude = getLon(); + + initGpsTask(); + #ifndef DISABLE_CLI initCLI(); initCLITask(); @@ -160,10 +166,6 @@ void setup() mapTempSprite.deleteSprite(); mapTempSprite.createSprite(TILE_WIDTH, TILE_HEIGHT); - // Get init Latitude and Longitude - gpsData.latitude = getLat(); - gpsData.longitude = getLon(); - // Preload Map if (isVectorMap) { @@ -184,8 +186,6 @@ void setup() } splashScreen(); - initGpsTask(); - lv_screen_load(searchSatScreen); } From bad4e38c7012023df61bb4d75204dcea24d02a77 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Wed, 4 Dec 2024 20:35:48 +0100 Subject: [PATCH 46/55] fix(gps): Fix GPS time, sunrise and sunset acquire --- lib/gps/gps.cpp | 11 ++++++++--- src/main.cpp | 3 --- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/gps/gps.cpp b/lib/gps/gps.cpp index 6b2c67ca..7f4dfe49 100644 --- a/lib/gps/gps.cpp +++ b/lib/gps/gps.cpp @@ -138,10 +138,15 @@ void getGPSData() // Time and Date if (fix.valid.time && fix.valid.date) { - adjustTime( fix.dateTime ); + adjustTime( fix.dateTime ); localTime = fix.dateTime; - // Calculate Sunrise and Sunset only one time when date & time was valid - calculateSun(); + if (calcSun) + { + // Calculate Sunrise and Sunset only one time when date & time was valid + calculateSun(); + log_v("Get date, time, Sunrise and Sunset"); + calcSun = false; + } } // Altitude diff --git a/src/main.cpp b/src/main.cpp index 9e01d702..647e4c0b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -71,11 +71,8 @@ void calculateSun() calcSunriseSunset(2000 + localTime.year, localTime.month, localTime.date, gpsData.latitude, gpsData.longitude, transit, sunrise, sunset); - log_v("%d/%d/%d",2000 + localTime.year, localTime.month, localTime.date); hoursToString(sunrise + defGMT, gpsData.sunriseHour); hoursToString(sunset + defGMT, gpsData.sunsetHour); - log_v("Sunrise: %s",gpsData.sunriseHour); - log_v("Sunset: %s",gpsData.sunsetHour); } /** From c2787c2a5ae64f88a07ed833ce333a9577d5720d Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sat, 7 Dec 2024 19:57:26 +0100 Subject: [PATCH 47/55] feat(vectormap): Add boundaries for vectorized map --- lib/gui/src/mainScr.cpp | 2 +- lib/maps/src/vectorMaps.cpp | 8 ++++++++ lib/maps/src/vectorMaps.hpp | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/gui/src/mainScr.cpp b/lib/gui/src/mainScr.cpp index 57df19d0..427525de 100644 --- a/lib/gui/src/mainScr.cpp +++ b/lib/gui/src/mainScr.cpp @@ -228,7 +228,7 @@ void updateMap(lv_event_t *event) viewPort.setCenter(point); getMapBlocks(viewPort.bbox, memCache); - + generateVectorMap(viewPort, memCache, mapTempSprite); isPosMoved = false; diff --git a/lib/maps/src/vectorMaps.cpp b/lib/maps/src/vectorMaps.cpp index c7a78b07..276c99f6 100644 --- a/lib/maps/src/vectorMaps.cpp +++ b/lib/maps/src/vectorMaps.cpp @@ -574,6 +574,14 @@ void generateVectorMap(ViewPort &viewPort, MemCache &memCache, TFT_eSprite &map) MapBlock *firstBlock = memCache.blocks.front(); delete firstBlock; memCache.blocks.erase(memCache.blocks.begin()); + + totalBounds.lat_min = mercatorY2lat(viewPort.bbox.min.y); + totalBounds.lat_max = mercatorY2lat(viewPort.bbox.max.y); + totalBounds.lon_min = mercatorX2lon(viewPort.bbox.min.x); + totalBounds.lon_max = mercatorX2lon(viewPort.bbox.max.x); + + log_i("Total Bounds: Lat Min: %f, Lat Max: %f, Lon Min: %f, Lon Max: %f", + totalBounds.lat_min, totalBounds.lat_max, totalBounds.lon_min, totalBounds.lon_max); } else { diff --git a/lib/maps/src/vectorMaps.hpp b/lib/maps/src/vectorMaps.hpp index 2fa746d6..ca149824 100644 --- a/lib/maps/src/vectorMaps.hpp +++ b/lib/maps/src/vectorMaps.hpp @@ -54,6 +54,8 @@ const int32_t MAPFOLDER_MASK = pow(2, MAPFOLDER_SIZE_BITS) - 1; // ...00001111 static double lat2y(double lat) { return log(tan(DEG2RAD(lat) / 2 + M_PI / 4)) * EARTH_RADIUS; } static double lon2x(double lon) { return DEG2RAD(lon) * EARTH_RADIUS; } +static double mercatorX2lon(double x) { return (x / EARTH_RADIUS) * (180.0 / M_PI); } +static double mercatorY2lat(double y) { return (atan(sinh(y / EARTH_RADIUS))) * (180.0 / M_PI); } /** * @brief Point in 16 bits projected coordinates (x,y) From dcc59e630d5317ac52d2ca69ec192d9525493b9c Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sat, 7 Dec 2024 20:15:42 +0100 Subject: [PATCH 48/55] feat(vectormap): Add waypoint mark in vectorized map --- lib/maps/src/globalMapsDef.h | 6 ++++++ lib/maps/src/mapsDrawFunc.h | 3 +++ lib/maps/src/renderMaps.hpp | 3 --- lib/maps/src/vectorMaps.cpp | 10 +++++++++- lib/maps/src/vectorMaps.hpp | 3 ++- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/lib/maps/src/globalMapsDef.h b/lib/maps/src/globalMapsDef.h index 92f4a19f..2b3d91b0 100644 --- a/lib/maps/src/globalMapsDef.h +++ b/lib/maps/src/globalMapsDef.h @@ -133,5 +133,11 @@ struct tileBounds */ extern tileBounds totalBounds; +/** + * @brief Waypoint destination latitude and longitude + * + */ +extern double destLat; +extern double destLon; #endif diff --git a/lib/maps/src/mapsDrawFunc.h b/lib/maps/src/mapsDrawFunc.h index b8428995..a6cb2563 100644 --- a/lib/maps/src/mapsDrawFunc.h +++ b/lib/maps/src/mapsDrawFunc.h @@ -183,7 +183,10 @@ static void displayMap(uint16_t tileSize) } if (tileSize == VECTOR_TILE_SIZE) + { + mapTempSprite.pushImage(wptPosX-8, wptPosY-8, 16 ,16 ,(uint16_t*)waypoint, TFT_BLACK); mapTempSprite.setPivot(tileSize , tileSize ); + } mapTempSprite.pushRotated(&mapSprite, 360 - mapHeading, TFT_TRANSPARENT); //mapTempSprite.pushRotated(&mapSprite, 0, TFT_TRANSPARENT); diff --git a/lib/maps/src/renderMaps.hpp b/lib/maps/src/renderMaps.hpp index e225b12b..9e69b53b 100644 --- a/lib/maps/src/renderMaps.hpp +++ b/lib/maps/src/renderMaps.hpp @@ -30,9 +30,6 @@ extern MapTile oldMapTile; // Old Map tile coordinates and zoom extern MapTile currentMapTile; // Current Map tile coordinates and zoom extern MapTile roundMapTile; // Boundaries Map tiles -extern double destLat; -extern double destLon; - uint32_t lon2tilex(double f_lon, uint8_t zoom); uint32_t lat2tiley(double f_lat, uint8_t zoom); double tilex2lon(uint32_t tileX, uint8_t zoom); diff --git a/lib/maps/src/vectorMaps.cpp b/lib/maps/src/vectorMaps.cpp index 276c99f6..b90b1037 100644 --- a/lib/maps/src/vectorMaps.cpp +++ b/lib/maps/src/vectorMaps.cpp @@ -579,9 +579,17 @@ void generateVectorMap(ViewPort &viewPort, MemCache &memCache, TFT_eSprite &map) totalBounds.lat_max = mercatorY2lat(viewPort.bbox.max.y); totalBounds.lon_min = mercatorX2lon(viewPort.bbox.min.x); totalBounds.lon_max = mercatorX2lon(viewPort.bbox.max.x); - + log_i("Total Bounds: Lat Min: %f, Lat Max: %f, Lon Min: %f, Lon Max: %f", totalBounds.lat_min, totalBounds.lat_max, totalBounds.lon_min, totalBounds.lon_max); + + if(isCoordInBounds(destLat,destLon,totalBounds)) + coords2map(destLat, destLon, totalBounds, &wptPosX, &wptPosY); + else + { + wptPosX = -1; + wptPosY = -1; + } } else { diff --git a/lib/maps/src/vectorMaps.hpp b/lib/maps/src/vectorMaps.hpp index ca149824..6403be93 100644 --- a/lib/maps/src/vectorMaps.hpp +++ b/lib/maps/src/vectorMaps.hpp @@ -13,6 +13,7 @@ #include #include #include "globalMapsDef.h" +#include "renderMaps.hpp" #include "gpsMath.hpp" #include "settings.hpp" @@ -182,7 +183,7 @@ struct MemBlocks }; /** - * @brief Point in geografic (lat,lon) coordinates and other gps data + * @brief Point in geographic (lat,lon) coordinates and other gps data * */ struct Coord From 750bd838d8b30d80d7451a034f4ae84d8c295ba0 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sun, 8 Dec 2024 11:22:22 +0100 Subject: [PATCH 49/55] fix(vectormap): Fix vectormap refresh after waypoint selected --- lib/gui/src/waypointListScr.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/gui/src/waypointListScr.cpp b/lib/gui/src/waypointListScr.cpp index b726e052..717f38de 100644 --- a/lib/gui/src/waypointListScr.cpp +++ b/lib/gui/src/waypointListScr.cpp @@ -56,6 +56,8 @@ void waypointListEvent(lv_event_t * event) else lv_obj_add_flag(navTile,LV_OBJ_FLAG_HIDDEN); + isPosMoved = true; + loadMainScreen(); break; case WPT_EDIT: From c0b4e93fc0873c6c79a89c6bf3cfed45a76531be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jordi=20Gauch=C3=ADa?= Date: Sun, 8 Dec 2024 19:42:45 +0100 Subject: [PATCH 50/55] docs: Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 076bde87..f0fc0bef 100644 --- a/README.md +++ b/README.md @@ -368,4 +368,4 @@ To access the Web File Server, simply use any browser and go to the following ad --- Map data is available thanks to the great OpenStreetMap project and contributors. The map data is available under the Open Database License. -© OpenStreetMap contributors +[© OpenStreetMap contributors](https://www.openstreetmap.org/copyright) From daf695b83200c7f47f525ba46fba2650ada06a9c Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sun, 8 Dec 2024 21:12:06 +0100 Subject: [PATCH 51/55] fix(splashscr): Add OpenStreetMap attribution --- lib/gui/src/splashScr.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/gui/src/splashScr.cpp b/lib/gui/src/splashScr.cpp index 01a18a7d..61aed5bd 100644 --- a/lib/gui/src/splashScr.cpp +++ b/lib/gui/src/splashScr.cpp @@ -25,9 +25,15 @@ void splashScreen() getPngSize(logoFile,&pngWidth,&pngHeight); tft.drawPngFile(logoFile, (tft.width() / 2) - (pngWidth/2), (tft.height() / 2) - pngHeight); + + tft.setTextSize(1); + tft.setTextColor(TFT_WHITE, TFT_BLACK); + + tft.drawString("Map data from OpenStreetMap.",0, TFT_HEIGHT - 120 ); + tft.drawString("(c) OpenStreetMap",0, TFT_HEIGHT - 110 ); + tft.drawString("(c) OpenStreetMap contributors",0, TFT_HEIGHT - 100 ); char statusString[50] = ""; - tft.setTextSize(1); tft.setTextColor(TFT_YELLOW, TFT_BLACK); memset(&statusString[0], 0, sizeof(statusString)); @@ -63,6 +69,10 @@ void splashScreen() ; } + millisActual = millis(); + while (millis() < millisActual + 100) + ; + for (uint8_t fadeOut = maxBrightness; fadeOut > 0; fadeOut--) { tft.setBrightness(fadeOut); From 74fc51ffa19a1dc6280f69cf4160828052d40d98 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Sun, 8 Dec 2024 21:43:17 +0100 Subject: [PATCH 52/55] fix(splashscr): Center attribution text --- lib/gui/src/splashScr.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/gui/src/splashScr.cpp b/lib/gui/src/splashScr.cpp index 61aed5bd..bb65bebc 100644 --- a/lib/gui/src/splashScr.cpp +++ b/lib/gui/src/splashScr.cpp @@ -29,9 +29,9 @@ void splashScreen() tft.setTextSize(1); tft.setTextColor(TFT_WHITE, TFT_BLACK); - tft.drawString("Map data from OpenStreetMap.",0, TFT_HEIGHT - 120 ); - tft.drawString("(c) OpenStreetMap",0, TFT_HEIGHT - 110 ); - tft.drawString("(c) OpenStreetMap contributors",0, TFT_HEIGHT - 100 ); + tft.drawCenterString("Map data from OpenStreetMap.",tft.width() >> 1, TFT_HEIGHT - 120 ); + tft.drawCenterString("(c) OpenStreetMap",tft.width() >> 1, TFT_HEIGHT - 110 ); + tft.drawCenterString("(c) OpenStreetMap contributors",tft.width() >> 1, TFT_HEIGHT - 100 ); char statusString[50] = ""; tft.setTextColor(TFT_YELLOW, TFT_BLACK); From be2f89c573a6843cf01ec1679b5f54f7a8d0d375 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Wed, 11 Dec 2024 18:37:16 +0100 Subject: [PATCH 53/55] fix(lvgl): Fix touch width screen when rotated --- lib/lvgl/src/lvglSetup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lvgl/src/lvglSetup.cpp b/lib/lvgl/src/lvglSetup.cpp index c1c0396c..67279d5f 100644 --- a/lib/lvgl/src/lvglSetup.cpp +++ b/lib/lvgl/src/lvglSetup.cpp @@ -59,7 +59,7 @@ void IRAM_ATTR touchRead(lv_indev_t *indev_driver, lv_indev_data_t *data) } else if (lv_display_get_rotation(display) == LV_DISPLAY_ROTATION_270) { - data->point.x = 320 - touchY; + data->point.x = TFT_WIDTH - touchY; data->point.y = touchX; } data->state = LV_INDEV_STATE_PRESSED; From bdf355835d473a2b3a66d70a5278bbb9587d9724 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Wed, 11 Dec 2024 18:45:36 +0100 Subject: [PATCH 54/55] chore: Update version --- include/hal.hpp | 4 ++-- lib/battery/battery.cpp | 4 ++-- lib/battery/battery.hpp | 4 ++-- lib/bme/bme.cpp | 4 ++-- lib/bme/bme.hpp | 4 ++-- lib/cli/cli.cpp | 2 +- lib/cli/cli.hpp | 2 +- lib/cli/utils.h | 4 ++-- lib/compass/compass.cpp | 4 ++-- lib/compass/compass.hpp | 4 ++-- lib/gps/gps.cpp | 4 ++-- lib/gps/gps.hpp | 4 ++-- lib/gps/timezone.hpp | 4 ++-- lib/gpx/src/addWaypoint.cpp | 4 ++-- lib/gpx/src/addWaypoint.hpp | 4 ++-- lib/gpx/src/deleteWaypoint.cpp | 4 ++-- lib/gpx/src/deleteWaypoint.hpp | 4 ++-- lib/gpx/src/editWaypoint.cpp | 4 ++-- lib/gpx/src/editWaypoint.hpp | 4 ++-- lib/gpx/src/globalGpxDef.h | 4 ++-- lib/gpx/src/loadWaypoint.cpp | 4 ++-- lib/gpx/src/loadWaypoint.hpp | 4 ++-- lib/gui/src/buttonBar.cpp | 4 ++-- lib/gui/src/buttonBar.hpp | 4 ++-- lib/gui/src/deviceSettingsScr.cpp | 4 ++-- lib/gui/src/deviceSettingsScr.hpp | 4 ++-- lib/gui/src/globalGuiDef.h | 4 ++-- lib/gui/src/mainScr.cpp | 4 ++-- lib/gui/src/mainScr.hpp | 4 ++-- lib/gui/src/mapSettingsScr.cpp | 4 ++-- lib/gui/src/mapSettingsScr.hpp | 4 ++-- lib/gui/src/navScr.cpp | 4 ++-- lib/gui/src/navScr.hpp | 4 ++-- lib/gui/src/notifyBar.cpp | 4 ++-- lib/gui/src/notifyBar.hpp | 4 ++-- lib/gui/src/satInfoScr.cpp | 4 ++-- lib/gui/src/satInfoScr.hpp | 4 ++-- lib/gui/src/searchSatScr.cpp | 4 ++-- lib/gui/src/searchSatScr.hpp | 4 ++-- lib/gui/src/settingsScr.cpp | 4 ++-- lib/gui/src/settingsScr.hpp | 4 ++-- lib/gui/src/splashScr.cpp | 4 ++-- lib/gui/src/splashScr.hpp | 4 ++-- lib/gui/src/upgradeScr.cpp | 4 ++-- lib/gui/src/upgradeScr.hpp | 4 ++-- lib/gui/src/waypointListScr.cpp | 4 ++-- lib/gui/src/waypointListScr.hpp | 4 ++-- lib/gui/src/waypointScr.cpp | 4 ++-- lib/gui/src/waypointScr.hpp | 4 ++-- lib/gui/src/widgets.cpp | 4 ++-- lib/gui/src/widgets.hpp | 4 ++-- lib/lvgl/src/lvglFuncs.cpp | 4 ++-- lib/lvgl/src/lvglFuncs.hpp | 4 ++-- lib/lvgl/src/lvglSetup.cpp | 4 ++-- lib/lvgl/src/lvglSetup.hpp | 4 ++-- lib/maps/src/globalMapsDef.h | 4 ++-- lib/maps/src/mapsDrawFunc.h | 4 ++-- lib/maps/src/renderMaps.cpp | 4 ++-- lib/maps/src/renderMaps.hpp | 4 ++-- lib/maps/src/vectorMaps.cpp | 4 ++-- lib/maps/src/vectorMaps.hpp | 4 ++-- lib/panel/ICENAV_BOARD.hpp | 4 ++-- lib/panel/ILI9341_XPT2046_SPI.hpp | 4 ++-- lib/panel/ILI9488_FT5x06_16B.hpp | 4 ++-- lib/panel/ILI9488_FT5x06_SPI.hpp | 4 ++-- lib/panel/ILI9488_NOTOUCH_8B.hpp | 4 ++-- lib/panel/ILI9488_XPT2046_SPI.hpp | 4 ++-- lib/panel/LILYGO_TDECK.hpp | 4 ++-- lib/power/power.cpp | 4 ++-- lib/power/power.hpp | 4 ++-- lib/settings/settings.cpp | 4 ++-- lib/settings/settings.hpp | 4 ++-- lib/storage/storage.cpp | 4 ++-- lib/storage/storage.hpp | 4 ++-- lib/tasks/tasks.cpp | 4 ++-- lib/tasks/tasks.hpp | 4 ++-- lib/tft/tft.cpp | 4 ++-- lib/tft/tft.hpp | 4 ++-- lib/upgrade/src/firmUpgrade.cpp | 4 ++-- lib/upgrade/src/firmUpgrade.hpp | 4 ++-- lib/utils/src/gpsMath.cpp | 4 ++-- lib/utils/src/gpsMath.hpp | 4 ++-- lib/webfile/src/webpage.h | 4 ++-- lib/webfile/src/webserver.h | 4 ++-- platformio.ini | 4 ++-- src/main.cpp | 4 ++-- 86 files changed, 170 insertions(+), 170 deletions(-) diff --git a/include/hal.hpp b/include/hal.hpp index a45074a8..d96d0f30 100644 --- a/include/hal.hpp +++ b/include/hal.hpp @@ -2,8 +2,8 @@ * @file hal.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Boards Pin definitions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef HAL_HPP diff --git a/lib/battery/battery.cpp b/lib/battery/battery.cpp index 473306bd..fc9baecd 100644 --- a/lib/battery/battery.cpp +++ b/lib/battery/battery.cpp @@ -2,8 +2,8 @@ * @file battery.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Battery monitor definition and functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ diff --git a/lib/battery/battery.hpp b/lib/battery/battery.hpp index 072f360e..70f729db 100644 --- a/lib/battery/battery.hpp +++ b/lib/battery/battery.hpp @@ -2,8 +2,8 @@ * @file battery.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Battery monitor definition and functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef BATTERY_HPP diff --git a/lib/bme/bme.cpp b/lib/bme/bme.cpp index 5df81cc6..e85c31ac 100644 --- a/lib/bme/bme.cpp +++ b/lib/bme/bme.cpp @@ -2,8 +2,8 @@ * @file bme.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief BME280 Sensor functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "bme.hpp" diff --git a/lib/bme/bme.hpp b/lib/bme/bme.hpp index c4d3a0e2..b7e404b8 100644 --- a/lib/bme/bme.hpp +++ b/lib/bme/bme.hpp @@ -2,8 +2,8 @@ * @file bme.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief BME280 Sensor functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef BME_HPP diff --git a/lib/cli/cli.cpp b/lib/cli/cli.cpp index e0be1bd6..860f0e35 100644 --- a/lib/cli/cli.cpp +++ b/lib/cli/cli.cpp @@ -3,7 +3,7 @@ * @author @Hpsaturn * @brief Network CLI and custom internal commands * @version Using https://github.com/hpsaturn/esp32-wifi-cli.git - * @date 2024-11 + * @date 2024-12 */ #ifndef DISABLE_CLI diff --git a/lib/cli/cli.hpp b/lib/cli/cli.hpp index 88d87a2c..6dcf0586 100644 --- a/lib/cli/cli.hpp +++ b/lib/cli/cli.hpp @@ -3,7 +3,7 @@ * @author @Hpsaturn * @brief Network CLI and custom internal commands * @version Using https://github.com/hpsaturn/esp32-wifi-cli.git - * @date 2024-11 + * @date 2024-12 */ #ifndef CLI_HPP diff --git a/lib/cli/utils.h b/lib/cli/utils.h index 51f0043f..4fb9b613 100644 --- a/lib/cli/utils.h +++ b/lib/cli/utils.h @@ -2,8 +2,8 @@ * @file utils.h * @author @Hpsaturn * @brief Network CLI and custom internal commands - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef UTILS_H diff --git a/lib/compass/compass.cpp b/lib/compass/compass.cpp index 43f83d40..8ab3893d 100644 --- a/lib/compass/compass.cpp +++ b/lib/compass/compass.cpp @@ -2,8 +2,8 @@ * @file compass.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Compass definition and functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "compass.hpp" diff --git a/lib/compass/compass.hpp b/lib/compass/compass.hpp index f9b56c03..2a747622 100644 --- a/lib/compass/compass.hpp +++ b/lib/compass/compass.hpp @@ -2,8 +2,8 @@ * @file compass.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Compass definition and functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef COMPASS_HPP diff --git a/lib/gps/gps.cpp b/lib/gps/gps.cpp index 7f4dfe49..e7bdf80c 100644 --- a/lib/gps/gps.cpp +++ b/lib/gps/gps.cpp @@ -2,8 +2,8 @@ * @file gps.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief GPS definition and functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "gps.hpp" diff --git a/lib/gps/gps.hpp b/lib/gps/gps.hpp index fb890c6c..aa03bdb7 100644 --- a/lib/gps/gps.hpp +++ b/lib/gps/gps.hpp @@ -2,8 +2,8 @@ * @file gps.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief GPS definition and functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef GPS_HPP diff --git a/lib/gps/timezone.hpp b/lib/gps/timezone.hpp index 3890e20b..95951e66 100644 --- a/lib/gps/timezone.hpp +++ b/lib/gps/timezone.hpp @@ -2,8 +2,8 @@ * @file timezone.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Time zone adjust - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef TIMEZONE_HPP diff --git a/lib/gpx/src/addWaypoint.cpp b/lib/gpx/src/addWaypoint.cpp index b2355171..4bd29f64 100644 --- a/lib/gpx/src/addWaypoint.cpp +++ b/lib/gpx/src/addWaypoint.cpp @@ -2,8 +2,8 @@ * @file addWaypoint.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Add Waypoint functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "addWaypoint.hpp" diff --git a/lib/gpx/src/addWaypoint.hpp b/lib/gpx/src/addWaypoint.hpp index 2ae526cf..c97ffdc8 100644 --- a/lib/gpx/src/addWaypoint.hpp +++ b/lib/gpx/src/addWaypoint.hpp @@ -2,8 +2,8 @@ * @file addWaypoint.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Add Waypoint functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef ADDWAYPOINT_HPP diff --git a/lib/gpx/src/deleteWaypoint.cpp b/lib/gpx/src/deleteWaypoint.cpp index ce9175f4..b93ebd5d 100644 --- a/lib/gpx/src/deleteWaypoint.cpp +++ b/lib/gpx/src/deleteWaypoint.cpp @@ -2,8 +2,8 @@ * @file deleteWaypoint.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Delete Waypoint functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "deleteWaypoint.hpp" diff --git a/lib/gpx/src/deleteWaypoint.hpp b/lib/gpx/src/deleteWaypoint.hpp index a610cf04..49b73b59 100644 --- a/lib/gpx/src/deleteWaypoint.hpp +++ b/lib/gpx/src/deleteWaypoint.hpp @@ -2,8 +2,8 @@ * @file deleteWaypoint.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Delete Waypoint functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef DELETEWAYPOINT_HPP diff --git a/lib/gpx/src/editWaypoint.cpp b/lib/gpx/src/editWaypoint.cpp index 155689ed..8802c56f 100644 --- a/lib/gpx/src/editWaypoint.cpp +++ b/lib/gpx/src/editWaypoint.cpp @@ -2,8 +2,8 @@ * @file editWaypoint.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Edit Waypoint functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "editWaypoint.hpp" diff --git a/lib/gpx/src/editWaypoint.hpp b/lib/gpx/src/editWaypoint.hpp index e8b9ee31..939833c6 100644 --- a/lib/gpx/src/editWaypoint.hpp +++ b/lib/gpx/src/editWaypoint.hpp @@ -2,8 +2,8 @@ * @file editWaypoint.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Edit Waypoint functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef EDITWAYPOINT_HPP diff --git a/lib/gpx/src/globalGpxDef.h b/lib/gpx/src/globalGpxDef.h index 5f43c37e..2dc545ec 100644 --- a/lib/gpx/src/globalGpxDef.h +++ b/lib/gpx/src/globalGpxDef.h @@ -2,8 +2,8 @@ * @file globalGpxDef.h * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Global GPX Variables - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ diff --git a/lib/gpx/src/loadWaypoint.cpp b/lib/gpx/src/loadWaypoint.cpp index 1152b58b..c14ae479 100644 --- a/lib/gpx/src/loadWaypoint.cpp +++ b/lib/gpx/src/loadWaypoint.cpp @@ -2,8 +2,8 @@ * @file loadWaypoint.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Load Waypoint functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "loadWaypoint.hpp" diff --git a/lib/gpx/src/loadWaypoint.hpp b/lib/gpx/src/loadWaypoint.hpp index 1fcfadf7..182ee6d6 100644 --- a/lib/gpx/src/loadWaypoint.hpp +++ b/lib/gpx/src/loadWaypoint.hpp @@ -2,8 +2,8 @@ * @file loadWaypoint.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Load Waypoint functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef LOADWAYPOINT_HPP diff --git a/lib/gui/src/buttonBar.cpp b/lib/gui/src/buttonBar.cpp index f7bc133e..26552b77 100644 --- a/lib/gui/src/buttonBar.cpp +++ b/lib/gui/src/buttonBar.cpp @@ -2,8 +2,8 @@ * @file buttonBar.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Button Bar - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "buttonBar.hpp" diff --git a/lib/gui/src/buttonBar.hpp b/lib/gui/src/buttonBar.hpp index 30a579f3..5ff40902 100644 --- a/lib/gui/src/buttonBar.hpp +++ b/lib/gui/src/buttonBar.hpp @@ -2,8 +2,8 @@ * @file buttonBar.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Button Bar - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef BUTTONBAR_HPP diff --git a/lib/gui/src/deviceSettingsScr.cpp b/lib/gui/src/deviceSettingsScr.cpp index dab1bda3..970aae4a 100644 --- a/lib/gui/src/deviceSettingsScr.cpp +++ b/lib/gui/src/deviceSettingsScr.cpp @@ -2,8 +2,8 @@ * @file deviceSettingsScr.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Device Settings Screen - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "deviceSettingsScr.hpp" diff --git a/lib/gui/src/deviceSettingsScr.hpp b/lib/gui/src/deviceSettingsScr.hpp index 66adb6ff..e7a2b15e 100644 --- a/lib/gui/src/deviceSettingsScr.hpp +++ b/lib/gui/src/deviceSettingsScr.hpp @@ -2,8 +2,8 @@ * @file deviceSettingsScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Device Settings Screen - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef DEVICESETTINGSCR_HPP diff --git a/lib/gui/src/globalGuiDef.h b/lib/gui/src/globalGuiDef.h index 858caf17..6ee0d2b7 100644 --- a/lib/gui/src/globalGuiDef.h +++ b/lib/gui/src/globalGuiDef.h @@ -1,8 +1,8 @@ /** * @file globalGuiDef.h * @brief Global GUI Variables - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef GLOBALGUIDEF_H diff --git a/lib/gui/src/mainScr.cpp b/lib/gui/src/mainScr.cpp index 427525de..8a8dc58a 100644 --- a/lib/gui/src/mainScr.cpp +++ b/lib/gui/src/mainScr.cpp @@ -2,8 +2,8 @@ * @file mainScr.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Main Screen - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "mainScr.hpp" diff --git a/lib/gui/src/mainScr.hpp b/lib/gui/src/mainScr.hpp index 06f3eb82..0b401472 100644 --- a/lib/gui/src/mainScr.hpp +++ b/lib/gui/src/mainScr.hpp @@ -2,8 +2,8 @@ * @file mainScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Main Screen - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef MAINSCR_HPP diff --git a/lib/gui/src/mapSettingsScr.cpp b/lib/gui/src/mapSettingsScr.cpp index 29db0312..e646df29 100644 --- a/lib/gui/src/mapSettingsScr.cpp +++ b/lib/gui/src/mapSettingsScr.cpp @@ -2,8 +2,8 @@ * @file mapSettingsScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Map Settings screen - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "mapSettingsScr.hpp" diff --git a/lib/gui/src/mapSettingsScr.hpp b/lib/gui/src/mapSettingsScr.hpp index 6168abf5..7cf4e78a 100644 --- a/lib/gui/src/mapSettingsScr.hpp +++ b/lib/gui/src/mapSettingsScr.hpp @@ -2,8 +2,8 @@ * @file mapSettingsScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Map Settings screen - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef MAPSETTINGSCR_HPP diff --git a/lib/gui/src/navScr.cpp b/lib/gui/src/navScr.cpp index 3e8754e6..58537641 100644 --- a/lib/gui/src/navScr.cpp +++ b/lib/gui/src/navScr.cpp @@ -2,8 +2,8 @@ * @file navScr.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Navigation screen - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "navScr.hpp" diff --git a/lib/gui/src/navScr.hpp b/lib/gui/src/navScr.hpp index 5fea2489..efbfb179 100644 --- a/lib/gui/src/navScr.hpp +++ b/lib/gui/src/navScr.hpp @@ -2,8 +2,8 @@ * @file navScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Navigation screen - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef NAVSCR_HPP diff --git a/lib/gui/src/notifyBar.cpp b/lib/gui/src/notifyBar.cpp index 507d67fd..408bf0b1 100644 --- a/lib/gui/src/notifyBar.cpp +++ b/lib/gui/src/notifyBar.cpp @@ -2,8 +2,8 @@ * @file notifyBar.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Notify Bar Screen - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "notifyBar.hpp" diff --git a/lib/gui/src/notifyBar.hpp b/lib/gui/src/notifyBar.hpp index cb7c5e7b..6243b975 100644 --- a/lib/gui/src/notifyBar.hpp +++ b/lib/gui/src/notifyBar.hpp @@ -2,8 +2,8 @@ * @file notifyBar.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Notify Bar Screen - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef NOTIFYBAR_HPP diff --git a/lib/gui/src/satInfoScr.cpp b/lib/gui/src/satInfoScr.cpp index cfd41f9b..cff1159e 100644 --- a/lib/gui/src/satInfoScr.cpp +++ b/lib/gui/src/satInfoScr.cpp @@ -2,8 +2,8 @@ * @file satInfoScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Satellite info screen - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "satInfoScr.hpp" diff --git a/lib/gui/src/satInfoScr.hpp b/lib/gui/src/satInfoScr.hpp index ac98ccfd..be90d78e 100644 --- a/lib/gui/src/satInfoScr.hpp +++ b/lib/gui/src/satInfoScr.hpp @@ -2,8 +2,8 @@ * @file satInfoScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Satellite info screen - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef SATINFOSCR_HPP diff --git a/lib/gui/src/searchSatScr.cpp b/lib/gui/src/searchSatScr.cpp index 29856b36..baba24d8 100644 --- a/lib/gui/src/searchSatScr.cpp +++ b/lib/gui/src/searchSatScr.cpp @@ -2,8 +2,8 @@ * @file searchSatScr.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - GPS satellite search screen - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "searchSatScr.hpp" diff --git a/lib/gui/src/searchSatScr.hpp b/lib/gui/src/searchSatScr.hpp index 5f211cac..93b98a47 100644 --- a/lib/gui/src/searchSatScr.hpp +++ b/lib/gui/src/searchSatScr.hpp @@ -2,8 +2,8 @@ * @file searchSatScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - GPS satellite search screen - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef SEARCHSATSCR_HPP diff --git a/lib/gui/src/settingsScr.cpp b/lib/gui/src/settingsScr.cpp index 518fda83..fd38ced0 100644 --- a/lib/gui/src/settingsScr.cpp +++ b/lib/gui/src/settingsScr.cpp @@ -2,8 +2,8 @@ * @file settingsScr.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Settings Screen - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "settingsScr.hpp" diff --git a/lib/gui/src/settingsScr.hpp b/lib/gui/src/settingsScr.hpp index c68ee7bf..e02f9d43 100644 --- a/lib/gui/src/settingsScr.hpp +++ b/lib/gui/src/settingsScr.hpp @@ -2,8 +2,8 @@ * @file settingsScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Settings Screen - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef SETTINGSSCR_HPP diff --git a/lib/gui/src/splashScr.cpp b/lib/gui/src/splashScr.cpp index bb65bebc..98557039 100644 --- a/lib/gui/src/splashScr.cpp +++ b/lib/gui/src/splashScr.cpp @@ -2,8 +2,8 @@ * @file splashScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Splash screen - NOT LVGL - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "splashScr.hpp" diff --git a/lib/gui/src/splashScr.hpp b/lib/gui/src/splashScr.hpp index 61d22b61..298d60e5 100644 --- a/lib/gui/src/splashScr.hpp +++ b/lib/gui/src/splashScr.hpp @@ -2,8 +2,8 @@ * @file splashScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Splash screen - NOT LVGL - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef SPLASHSCR_HPP diff --git a/lib/gui/src/upgradeScr.cpp b/lib/gui/src/upgradeScr.cpp index 984a3f87..76c8e509 100644 --- a/lib/gui/src/upgradeScr.cpp +++ b/lib/gui/src/upgradeScr.cpp @@ -2,8 +2,8 @@ * @file upgradeScr.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL Firmware upgrade messages - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "upgradeScr.hpp" diff --git a/lib/gui/src/upgradeScr.hpp b/lib/gui/src/upgradeScr.hpp index be0f2a49..3fef0e70 100644 --- a/lib/gui/src/upgradeScr.hpp +++ b/lib/gui/src/upgradeScr.hpp @@ -2,8 +2,8 @@ * @file upgradeScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL Firmware upgrade messages - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef UPGRADESCR_HPP diff --git a/lib/gui/src/waypointListScr.cpp b/lib/gui/src/waypointListScr.cpp index 717f38de..2c495408 100644 --- a/lib/gui/src/waypointListScr.cpp +++ b/lib/gui/src/waypointListScr.cpp @@ -2,8 +2,8 @@ * @file waypointListScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Waypoint list screen - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "waypointListScr.hpp" diff --git a/lib/gui/src/waypointListScr.hpp b/lib/gui/src/waypointListScr.hpp index db3599b9..f24fbcc8 100644 --- a/lib/gui/src/waypointListScr.hpp +++ b/lib/gui/src/waypointListScr.hpp @@ -2,8 +2,8 @@ * @file waypointListScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Waypoint list screen - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef WAYPOINTLISTSCR_HPP diff --git a/lib/gui/src/waypointScr.cpp b/lib/gui/src/waypointScr.cpp index aed687a0..d9ecaad0 100644 --- a/lib/gui/src/waypointScr.cpp +++ b/lib/gui/src/waypointScr.cpp @@ -2,8 +2,8 @@ * @file waypointScr.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Waypoint Screen - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "waypointScr.hpp" diff --git a/lib/gui/src/waypointScr.hpp b/lib/gui/src/waypointScr.hpp index 4a2fff4d..166350cc 100644 --- a/lib/gui/src/waypointScr.hpp +++ b/lib/gui/src/waypointScr.hpp @@ -2,8 +2,8 @@ * @file waypointScr.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Add Waypoint Screen - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef waypointScr_HPP diff --git a/lib/gui/src/widgets.cpp b/lib/gui/src/widgets.cpp index 2c39a0e4..16fd2c89 100644 --- a/lib/gui/src/widgets.cpp +++ b/lib/gui/src/widgets.cpp @@ -2,8 +2,8 @@ * @file widgets.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Widgets - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "widgets.hpp" diff --git a/lib/gui/src/widgets.hpp b/lib/gui/src/widgets.hpp index d7131ec8..1319a2a8 100644 --- a/lib/gui/src/widgets.hpp +++ b/lib/gui/src/widgets.hpp @@ -2,8 +2,8 @@ * @file widgets.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL - Widgets - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef WIDGETS_HPP diff --git a/lib/lvgl/src/lvglFuncs.cpp b/lib/lvgl/src/lvglFuncs.cpp index 59196ff2..ce08fea9 100644 --- a/lib/lvgl/src/lvglFuncs.cpp +++ b/lib/lvgl/src/lvglFuncs.cpp @@ -2,8 +2,8 @@ * @file lvglFuncs.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL custom functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "lvglFuncs.hpp" diff --git a/lib/lvgl/src/lvglFuncs.hpp b/lib/lvgl/src/lvglFuncs.hpp index 0df59194..3edf2803 100644 --- a/lib/lvgl/src/lvglFuncs.hpp +++ b/lib/lvgl/src/lvglFuncs.hpp @@ -2,8 +2,8 @@ * @file lvglFuncs.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL custom functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef LVGLFUNCS_HPP diff --git a/lib/lvgl/src/lvglSetup.cpp b/lib/lvgl/src/lvglSetup.cpp index 67279d5f..2cb234ac 100644 --- a/lib/lvgl/src/lvglSetup.cpp +++ b/lib/lvgl/src/lvglSetup.cpp @@ -2,8 +2,8 @@ * @file lvglSetup.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL Screen implementation - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "lvglSetup.hpp" diff --git a/lib/lvgl/src/lvglSetup.hpp b/lib/lvgl/src/lvglSetup.hpp index 386e02d9..32d3d341 100644 --- a/lib/lvgl/src/lvglSetup.hpp +++ b/lib/lvgl/src/lvglSetup.hpp @@ -2,8 +2,8 @@ * @file lvglSetup.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LVGL Screen implementation - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef LVGLSETUP_HPP diff --git a/lib/maps/src/globalMapsDef.h b/lib/maps/src/globalMapsDef.h index 2b3d91b0..baaee1f4 100644 --- a/lib/maps/src/globalMapsDef.h +++ b/lib/maps/src/globalMapsDef.h @@ -1,8 +1,8 @@ /** * @file globalMapsDef.h * @brief Global Maps Variables - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef GLOBALMAPSDEF_H diff --git a/lib/maps/src/mapsDrawFunc.h b/lib/maps/src/mapsDrawFunc.h index a6cb2563..0db1ed15 100644 --- a/lib/maps/src/mapsDrawFunc.h +++ b/lib/maps/src/mapsDrawFunc.h @@ -1,8 +1,8 @@ /** * @file mapsDrawFunc.h * @brief Extra Draw functions for maps - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef MAPSDRAWFUNC_H diff --git a/lib/maps/src/renderMaps.cpp b/lib/maps/src/renderMaps.cpp index fe8ef46a..8a4c1168 100644 --- a/lib/maps/src/renderMaps.cpp +++ b/lib/maps/src/renderMaps.cpp @@ -2,8 +2,8 @@ * @file renderMaps.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Render maps draw functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "renderMaps.hpp" diff --git a/lib/maps/src/renderMaps.hpp b/lib/maps/src/renderMaps.hpp index 9e69b53b..d61a9be0 100644 --- a/lib/maps/src/renderMaps.hpp +++ b/lib/maps/src/renderMaps.hpp @@ -2,8 +2,8 @@ * @file renderMaps.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Render maps draw functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef RENDERMAPS_HPP diff --git a/lib/maps/src/vectorMaps.cpp b/lib/maps/src/vectorMaps.cpp index b90b1037..230ef737 100644 --- a/lib/maps/src/vectorMaps.cpp +++ b/lib/maps/src/vectorMaps.cpp @@ -2,8 +2,8 @@ * @file vectorMaps.cpp * @author @aresta - https://github.com/aresta/ESP32_GPS * @brief Vector maps draw functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "vectorMaps.hpp" diff --git a/lib/maps/src/vectorMaps.hpp b/lib/maps/src/vectorMaps.hpp index 6403be93..ff507ed1 100644 --- a/lib/maps/src/vectorMaps.hpp +++ b/lib/maps/src/vectorMaps.hpp @@ -2,8 +2,8 @@ * @file vectorMaps.hpp * @author @aresta - https://github.com/aresta/ESP32_GPS * @brief Vector maps draw functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef VECTORMAPS_HPP diff --git a/lib/panel/ICENAV_BOARD.hpp b/lib/panel/ICENAV_BOARD.hpp index 04790821..6e4e2ac4 100644 --- a/lib/panel/ICENAV_BOARD.hpp +++ b/lib/panel/ICENAV_BOARD.hpp @@ -2,8 +2,8 @@ * @file ICENAV_BOARD.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LOVYANGFX TFT driver for IceNaV board - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef ICENAV_BOARD_HPP diff --git a/lib/panel/ILI9341_XPT2046_SPI.hpp b/lib/panel/ILI9341_XPT2046_SPI.hpp index 97fc0003..a810e5b2 100644 --- a/lib/panel/ILI9341_XPT2046_SPI.hpp +++ b/lib/panel/ILI9341_XPT2046_SPI.hpp @@ -2,8 +2,8 @@ // * @file ILI9341_XPT2046_SPI.hpp // * @author Jordi Gauchía (jgauchia@gmx.es) // * @brief LOVYANGFX TFT driver for ILI9341 SPI With XPT2046 Touch controller -// * @version 0.1.9_alpha -// * @date 2024-11 +// * @version 0.1.9 +// * @date 2024-12 // */ #ifndef ILI9341_XPT2046_SPI_HPP diff --git a/lib/panel/ILI9488_FT5x06_16B.hpp b/lib/panel/ILI9488_FT5x06_16B.hpp index 5c886792..60f08979 100644 --- a/lib/panel/ILI9488_FT5x06_16B.hpp +++ b/lib/panel/ILI9488_FT5x06_16B.hpp @@ -2,8 +2,8 @@ * @file ILI9488_FT5x06_16B.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LOVYANGFX TFT driver for ILI9488 16 Bits parallel With FT5x06 Touch controller - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef ILI9488_FT5x06_16B_HPP diff --git a/lib/panel/ILI9488_FT5x06_SPI.hpp b/lib/panel/ILI9488_FT5x06_SPI.hpp index 00d37723..c1ec522a 100644 --- a/lib/panel/ILI9488_FT5x06_SPI.hpp +++ b/lib/panel/ILI9488_FT5x06_SPI.hpp @@ -2,8 +2,8 @@ * @file ILI9488_XPT2046_SPI.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LOVYANGFX TFT driver for ILI9488 SPI With XPT2046 Touch controller - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef ILI9488_XPT2046_SPI_HPP diff --git a/lib/panel/ILI9488_NOTOUCH_8B.hpp b/lib/panel/ILI9488_NOTOUCH_8B.hpp index 9ca36f08..e9d4edff 100644 --- a/lib/panel/ILI9488_NOTOUCH_8B.hpp +++ b/lib/panel/ILI9488_NOTOUCH_8B.hpp @@ -2,8 +2,8 @@ * @file ILI9488_NOTOUCH_8B.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LOVYANGFX TFT driver for ILI9488 8 Bits parallel Without Touch controller - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef ILI9488_NOTOUCH_8B_HPP diff --git a/lib/panel/ILI9488_XPT2046_SPI.hpp b/lib/panel/ILI9488_XPT2046_SPI.hpp index c43300e8..f7b90152 100644 --- a/lib/panel/ILI9488_XPT2046_SPI.hpp +++ b/lib/panel/ILI9488_XPT2046_SPI.hpp @@ -2,8 +2,8 @@ * @file ILI9488_XPT2046_SPI.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief LOVYANGFX TFT driver for ILI9488 SPI With XPT2046 Touch controller - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef ILI9488_XPT2046_SPI_HPP diff --git a/lib/panel/LILYGO_TDECK.hpp b/lib/panel/LILYGO_TDECK.hpp index 9e1a5f09..0428757b 100644 --- a/lib/panel/LILYGO_TDECK.hpp +++ b/lib/panel/LILYGO_TDECK.hpp @@ -2,8 +2,8 @@ * @file LILYGO_TDECK.hpp * @author Jordi Gauchía (jgauchia@gmx.es) and Antonio Vanegas @Hpsturn * @brief LOVYANGFX TFT driver for ST7789 SPI With GT911 Touch controller - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef LILYGO_TDECK_HPP diff --git a/lib/power/power.cpp b/lib/power/power.cpp index 62bdb978..26b09aaf 100644 --- a/lib/power/power.cpp +++ b/lib/power/power.cpp @@ -2,8 +2,8 @@ * @file power.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief ESP32 Power Management functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "power.hpp" diff --git a/lib/power/power.hpp b/lib/power/power.hpp index 3c421a4d..caf37a18 100644 --- a/lib/power/power.hpp +++ b/lib/power/power.hpp @@ -2,8 +2,8 @@ * @file power.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief ESP32 Power Management functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef POWER_HPP diff --git a/lib/settings/settings.cpp b/lib/settings/settings.cpp index bda2fd24..9abb2ad2 100644 --- a/lib/settings/settings.cpp +++ b/lib/settings/settings.cpp @@ -2,8 +2,8 @@ * @file settings.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Settings functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "settings.hpp" diff --git a/lib/settings/settings.hpp b/lib/settings/settings.hpp index 06726325..8501c63f 100644 --- a/lib/settings/settings.hpp +++ b/lib/settings/settings.hpp @@ -2,8 +2,8 @@ * @file settings.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Settings functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef SETTINGS_HPP diff --git a/lib/storage/storage.cpp b/lib/storage/storage.cpp index df920ad6..d784369b 100644 --- a/lib/storage/storage.cpp +++ b/lib/storage/storage.cpp @@ -2,8 +2,8 @@ * @file storage.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Storage definition and functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "storage.hpp" diff --git a/lib/storage/storage.hpp b/lib/storage/storage.hpp index b6e88cba..01d688b6 100644 --- a/lib/storage/storage.hpp +++ b/lib/storage/storage.hpp @@ -2,8 +2,8 @@ * @file storage.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Storage definition and functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef STORAGE_HPP diff --git a/lib/tasks/tasks.cpp b/lib/tasks/tasks.cpp index 37296df7..95643cee 100644 --- a/lib/tasks/tasks.cpp +++ b/lib/tasks/tasks.cpp @@ -2,8 +2,8 @@ * @file tasks.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Core Tasks functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "tasks.hpp" diff --git a/lib/tasks/tasks.hpp b/lib/tasks/tasks.hpp index df460316..25c4648e 100644 --- a/lib/tasks/tasks.hpp +++ b/lib/tasks/tasks.hpp @@ -2,8 +2,8 @@ * @file tasks.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Core Tasks functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef TASKS_HPP diff --git a/lib/tft/tft.cpp b/lib/tft/tft.cpp index 565fb761..0e85f065 100644 --- a/lib/tft/tft.cpp +++ b/lib/tft/tft.cpp @@ -2,8 +2,8 @@ * @file tft.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief TFT definition and functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "tft.hpp" diff --git a/lib/tft/tft.hpp b/lib/tft/tft.hpp index e94c0672..97600ec7 100644 --- a/lib/tft/tft.hpp +++ b/lib/tft/tft.hpp @@ -2,8 +2,8 @@ * @file tft.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief TFT definition and functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef TFT_HPP diff --git a/lib/upgrade/src/firmUpgrade.cpp b/lib/upgrade/src/firmUpgrade.cpp index d5cb834e..1a96d9d7 100644 --- a/lib/upgrade/src/firmUpgrade.cpp +++ b/lib/upgrade/src/firmUpgrade.cpp @@ -2,8 +2,8 @@ * @file firmUpgrade.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Firmware upgrade from SD functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "firmUpgrade.hpp" diff --git a/lib/upgrade/src/firmUpgrade.hpp b/lib/upgrade/src/firmUpgrade.hpp index 6e5f2b04..8c7a5d7c 100644 --- a/lib/upgrade/src/firmUpgrade.hpp +++ b/lib/upgrade/src/firmUpgrade.hpp @@ -2,8 +2,8 @@ * @file firmUpgrade.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Firmware upgrade from SD functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef FIRMUPGRADE_HPP diff --git a/lib/utils/src/gpsMath.cpp b/lib/utils/src/gpsMath.cpp index b168ec5a..2c371fa3 100644 --- a/lib/utils/src/gpsMath.cpp +++ b/lib/utils/src/gpsMath.cpp @@ -2,8 +2,8 @@ * @file gpsMath.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Math and various functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "gpsMath.hpp" diff --git a/lib/utils/src/gpsMath.hpp b/lib/utils/src/gpsMath.hpp index e5242300..6766f231 100644 --- a/lib/utils/src/gpsMath.hpp +++ b/lib/utils/src/gpsMath.hpp @@ -2,8 +2,8 @@ * @file gpsMath.hpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Math and various functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #ifndef GPSMATH_HPP diff --git a/lib/webfile/src/webpage.h b/lib/webfile/src/webpage.h index 0b39d1c2..0fc0fefa 100644 --- a/lib/webfile/src/webpage.h +++ b/lib/webfile/src/webpage.h @@ -2,8 +2,8 @@ * @file webpage.h * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Web file server page - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ diff --git a/lib/webfile/src/webserver.h b/lib/webfile/src/webserver.h index a50a8e49..58d99c79 100644 --- a/lib/webfile/src/webserver.h +++ b/lib/webfile/src/webserver.h @@ -2,8 +2,8 @@ * @file webserver.h * @author Jordi Gauchía (jgauchia@gmx.es) * @brief Web file server functions - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include "SPIFFS.h" diff --git a/platformio.ini b/platformio.ini index 1a7a8b0c..5fe3e8f1 100644 --- a/platformio.ini +++ b/platformio.ini @@ -15,8 +15,8 @@ default_envs = ICENAV_BOARD [common] platform = espressif32@6.9.0 framework = arduino -version = 0.1.9_alpha -revision = 82 +version = 0.1.9 +revision = 83 monitor_speed = 115200 ;monitor_rts = 0 ;monitor_dtr = 0 diff --git a/src/main.cpp b/src/main.cpp index 647e4c0b..af90edef 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2,8 +2,8 @@ * @file main.cpp * @author Jordi Gauchía (jgauchia@gmx.es) * @brief ESP32 GPS Navigation main code - * @version 0.1.9_alpha - * @date 2024-11 + * @version 0.1.9 + * @date 2024-12 */ #include From 1bf0a321140ab518e262c516b3afd39c85ea1c99 Mon Sep 17 00:00:00 2001 From: jgauchia Date: Wed, 11 Dec 2024 18:51:45 +0100 Subject: [PATCH 55/55] chore: Change debug level --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 5fe3e8f1..871edbaa 100644 --- a/platformio.ini +++ b/platformio.ini @@ -25,7 +25,7 @@ monitor_filters = extra_scripts = pre:prebuild.py build_flags = -D LV_CONF_PATH="${PROJECT_DIR}/lib/lvgl/lv_conf.h" - -D CORE_DEBUG_LEVEL=5 + -D CORE_DEBUG_LEVEL=0 -D USE_LINE_BUFFER=1 -D DISABLE_RADIO=1 -D BAUDRATE=115200