Skip to content

Commit

Permalink
AsyncElegantOTA -> legantOTA
Browse files Browse the repository at this point in the history
  • Loading branch information
lefty01 committed Dec 2, 2024
1 parent ac6a9f3 commit 120564f
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 111 deletions.
2 changes: 2 additions & 0 deletions include/common.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef _ESP32_TTGO_FTMS_H_
#define _ESP32_TTGO_FTMS_H_

#undef ARDUINO_RASPBERRY_PI_PICO_W

//#define DEBUG 1
//#define DEBUG_MQTT 1
//#include "debug_print.h"
Expand Down
4 changes: 2 additions & 2 deletions include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#define _CONFIG_H_

#include <Arduino.h> // for string type
#warning fix include error for string type remove arduino (use std:string?? it might be faster)
//#include <string.h>
//#warning fix include error for string type remove arduino (use std:string?? it might be faster)
//#include <string.h>

extern const char* VERSION;

Expand Down
88 changes: 34 additions & 54 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,24 @@
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[platformio]
default_envs = ESP32_WT32-SC01

[common_env_data]
lib_deps_ext =
ayushsharma82/AsyncElegantOTA @ ^2.2.6
lib_deps_ext =
h2zero/NimBLE-Arduino @ ^1.3.1
;h2zero/esp-nimble-cpp TODO: what is difference between NimBLE-Arduino and esp-nimble-cpp!?
ottowinter/ESPAsyncWebServer-esphome @ ^2.0.1
knolleary/PubSubClient @ ^2.8
bblanchon/ArduinoJson @ ^6.18.5
lennarthennigs/Button2 @ ^1.6.5
lennarthennigs/Button2
paulstoffregen/Time @ ^1.6.1
rfetick/MPU6050_light @ ^1.1.0
https://github.com/alanswx/ESPAsyncWiFiManager.git
build_flags_settings =
ayushsharma82/ElegantOTA@^3.1.6
build_flags_settings =
-Os
-DCORE_DEBUG_LEVEL=0
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
-I include/

;treadmill=Northtrack12_2_Si
;treadmill=SoleF85
treadmill=Taurus9_5

lib_compat_mode = strict
lib_ldf_mode = chain
treadmill = Taurus9_5

[env:ESP32_TTGO_DISPLAY]
platform = espressif32
Expand All @@ -42,18 +36,17 @@ framework = arduino
monitor_speed = 115200
upload_speed = 921600
board_build.partitions = no_ota.csv
lib_deps =
lib_deps =
${common_env_data.lib_deps_ext}
lovyan03/LovyanGFX@>=0.4.10
lvgl/lvgl@^8.1.0

build_flags =
mathieucarbou/ESPAsyncWebServer@^3.3.23
mathieucarbou/AsyncTCP@^3.2.14
build_flags =
-DTARGET_TTGO_T_DISPLAY
-DLGFX_TTGO_TDISPLAY
-DLGFX_USE_V1
-DGUI_LVGL
;-DBUTTON_1=35
;-DBUTTON_2=0
${common_env_data.build_flags_settings}

[env:ESP32_TTGO_DISPLAY_SSL]
Expand All @@ -65,26 +58,22 @@ framework = arduino
monitor_speed = 115200
upload_speed = 921600
board_build.partitions = ssl_app.csv

lib_deps =
WiFiClientSecure
lib_deps =
WiFiClientSecure
${common_env_data.lib_deps_ext}
lovyan03/LovyanGFX@>=0.4.10
lvgl/lvgl@^8.1.0

build_flags =
mathieucarbou/ESPAsyncWebServer@^3.3.23
mathieucarbou/AsyncTCP@^3.2.14
build_flags =
-DMQTT_USE_SSL
-DTARGET_TTGO_T_DISPLAY
-DLGFX_TTGO_TDISPLAY
-DLGFX_USE_V1
-DGUI_LVGL
;-DBUTTON_1=35
;-DBUTTON_2=0
${common_env_data.build_flags_settings}

[env:ESP32_WT32-SC01]
; 4MB SPI Flash, 8MB PSRAM
; Screen model: WT-352215-A2
platform = espressif32
board = esp-wrover-kit
board_build.filesystem = littlefs
Expand All @@ -93,18 +82,16 @@ board_build.partitions = no_ota.csv
framework = arduino
upload_protocol = esptool
monitor_speed = 115200
upload_speed = 921600
;upload_port = /dev/ttyUSB0
;monitor_port = /dev/ttyUSB0
; Set optimization level and amount of debug information generated by the compiler
upload_speed = 921600
debug_build_flags = -O0 -ggdb3 -g3

lib_deps =
lib_deps =
${common_env_data.lib_deps_ext}
lovyan03/LovyanGFX@>=0.4.10
lvgl/lvgl@^8.1.0

build_flags =
mathieucarbou/ESPAsyncWebServer@^3.3.23
mathieucarbou/AsyncTCP@^3.2.14
build_flags =
-DMQTT_USE_SSL
-DTARGET_WT32_SC01
-DLGFX_WT32_SC01
-DLGFX_USE_V1
Expand All @@ -116,8 +103,6 @@ build_flags =
${common_env_data.build_flags_settings}

[env:ESP32_WT32-SC01_OLD_TFT_GUI]
; 4MB SPI Flash, 8MB PSRAM
; Screen model: WT-352215-A2
platform = espressif32
board = esp-wrover-kit
board_build.filesystem = littlefs
Expand All @@ -126,17 +111,14 @@ board_build.partitions = no_ota.csv
framework = arduino
upload_protocol = esptool
monitor_speed = 115200
upload_speed = 921600
;upload_port = /dev/ttyUSB0
;monitor_port = /dev/ttyUSB0
; Set optimization level and amount of debug information generated by the compiler
upload_speed = 921600
debug_build_flags = -O0 -ggdb3 -g3

lib_deps =
lib_deps =
${common_env_data.lib_deps_ext}
lovyan03/LovyanGFX@>=0.4.10

build_flags =
mathieucarbou/ESPAsyncWebServer@^3.3.23
mathieucarbou/AsyncTCP@^3.2.14
build_flags =
-DTARGET_WT32_SC01
-DLGFX_WT32_SC01
-DLGFX_USE_V1
Expand All @@ -151,9 +133,7 @@ build_flags =
-DTFT_BL=23
${common_env_data.build_flags_settings}


[env:ESP32_TTGO_T4]
; ILI9341
platform = espressif32
board = esp-wrover-kit
board_build.partitions = ssl_app.csv
Expand All @@ -162,15 +142,13 @@ extra_scripts = post:scripts/prepare_littlefs.py
framework = arduino
monitor_speed = 115200
upload_speed = 921600

lib_deps =
lib_deps =
${common_env_data.lib_deps_ext}
ottowinter/ESPAsyncWebServer-esphome @ ^2.1.0
;lovyan03/LovyanGFX@>=0.4.10 -> change back once my pr gets merged!
https://github.com/lefty01/LovyanGFX
lvgl/lvgl@^8.1.0

build_flags =
mathieucarbou/ESPAsyncWebServer@^3.3.23
mathieucarbou/AsyncTCP@^3.2.14
build_flags =
-DTARGET_TTGO_T4
-DLGFX_TTGO_T4_DISPLAY
-DLGFX_USE_V1
Expand Down Expand Up @@ -206,6 +184,8 @@ monitor_speed = 115200
upload_speed = 921600
lib_deps =
${common_env_data.lib_deps_ext}
mathieucarbou/ESPAsyncWebServer@^3.3.23
mathieucarbou/AsyncTCP@^3.2.14
build_flags =
-DTARGET_WT32_WROOMD
-DNO_DISPLAY
Expand Down
8 changes: 7 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
idf_component_register(SRCS "net-control.cpp" "display.cpp" "Hardware.cpp" "config.cpp" "ESP32_TTGO_FTMS.cpp")
idf_component_register( SRCS
"net-control.cpp"
"display.cpp"
"Hardware.cpp"
"config.cpp"
"ESP32_TTGO_FTMS.cpp"
)
6 changes: 3 additions & 3 deletions src/gui-LVGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ static void showGfxTopBar(lv_obj_t *parent)
gfxLvTopText = lv_label_create(gfxLvTopBar);
gfxLvVersionText = lv_label_create(gfxLvTopBar);
//lv_obj_set_width(gfxLvTopText, lv_pct(100));
lv_label_set_text(gfxLvTopText, "FTMS");
lv_obj_set_flex_grow(gfxLvTopText, 1);
lv_label_set_text(gfxLvTopText, "FTMS by lefty01");
lv_obj_set_flex_grow(gfxLvTopText, 1);

gfxLvLedSpeed = lv_led_create(gfxLvTopBar);
lv_obj_set_size(gfxLvLedSpeed, 12, 12);
Expand Down Expand Up @@ -116,7 +116,7 @@ static lv_obj_t * createScreenBoot() {
lv_obj_add_state(gfxLvLogTextArea, LV_STATE_FOCUSED); // show "cursor"
lv_obj_set_size(gfxLvLogTextArea, lv_pct(100), lv_pct(100));
lv_obj_center(gfxLvLogTextArea);
lv_obj_set_flex_grow(gfxLvLogTextArea, 1);
lv_obj_set_flex_grow(gfxLvLogTextArea, 1);

// TODO Could be good to have some progressbar also.
return screenBoot;
Expand Down
Loading

0 comments on commit 120564f

Please sign in to comment.