mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
update modules
This commit is contained in:
@@ -16,33 +16,43 @@
|
||||
; my_build_flags = -DEMSESP_DEBUG -DEMSESP_TEST -DEMSESP_PINGTEST
|
||||
|
||||
[platformio]
|
||||
; default_envs = esp32_4M
|
||||
default_envs = esp32_4M
|
||||
; default_envs = esp32_16M
|
||||
default_envs = lolin_s3
|
||||
; default_envs = standalone
|
||||
; default_envs = lolin_s3
|
||||
; default_envs = native
|
||||
; default_envs = debug
|
||||
; default_envs = custom
|
||||
|
||||
[env]
|
||||
; upload settings
|
||||
upload_protocol = custom
|
||||
; for USB
|
||||
upload_protocol = esptool
|
||||
upload_port = /dev/ttyUSB*
|
||||
; for OTA
|
||||
; upload_protocol = custom
|
||||
custom_emsesp_ip = 10.10.10.173
|
||||
; custom_emsesp_ip = ems-esp.local
|
||||
custom_username = admin
|
||||
custom_password = admin
|
||||
upload_port = /dev/ttyUSB*
|
||||
; uncomment this next line if using the github repo
|
||||
lib_deps = file://../../modules/EMS-ESP-Modules
|
||||
|
||||
[env:native]
|
||||
extra_scripts =
|
||||
; pre:scripts/refresh_module_library_native.py
|
||||
; post:scripts/run_native.py
|
||||
|
||||
[env:esp32_4M]
|
||||
extra_scripts =
|
||||
pre:scripts/build_interface.py ; comment out if you don't want to re-build the WebUI each time
|
||||
; pre:scripts/build_interface.py ; comment out if you don't want to re-build the WebUI each time
|
||||
scripts/rename_fw.py
|
||||
; scripts/upload.py
|
||||
scripts/upload.py
|
||||
|
||||
[env:lolin_s3]
|
||||
extra_scripts =
|
||||
pre:scripts/build_interface.py ; comment out if you don't want to re-build the WebUI each time
|
||||
scripts/rename_fw.py
|
||||
; scripts/upload.py
|
||||
scripts/upload.py
|
||||
|
||||
[env:custom]
|
||||
; use for basic ESP boards with 4MB flash
|
||||
@@ -60,7 +70,7 @@ board_upload.use_1200bps_touch = false
|
||||
board_upload.wait_for_upload_port = true
|
||||
upload_port = /dev/ttyUSB0
|
||||
extra_scripts =
|
||||
; pre:scripts/build_interface.py
|
||||
pre:scripts/build_interface.py
|
||||
scripts/rename_fw.py
|
||||
build_unflags = ${common.unbuild_flags}
|
||||
build_flags =
|
||||
|
||||
@@ -12,7 +12,7 @@ extra_configs =
|
||||
pio_local.ini
|
||||
|
||||
[common]
|
||||
core_build_flags = -std=gnu++2a
|
||||
core_build_flags = -std=gnu++2a -Isrc
|
||||
core_unbuild_flags = -std=gnu++11
|
||||
|
||||
; my_build_flags is set in pio_local.ini
|
||||
@@ -64,10 +64,11 @@ extra_scripts =
|
||||
|
||||
[env]
|
||||
monitor_speed = 115200
|
||||
monitor_filters = direct, esp32_exception_decoder
|
||||
monitor_filters = direct
|
||||
upload_speed = 921600
|
||||
build_type = release
|
||||
lib_ldf_mode = chain+
|
||||
lib_deps = https://github.com/emsesp/EMS-ESP-Modules.git
|
||||
check_tool = cppcheck, clangtidy
|
||||
check_severity = high, medium
|
||||
check_flags =
|
||||
@@ -205,15 +206,13 @@ build_flags =
|
||||
-D CONFIG_UART_ISR_IN_IRAM
|
||||
-D CONFIG_ASYNC_TCP_STACK_SIZE=5120
|
||||
|
||||
; to build and run: pio run -e standalone -t exec
|
||||
[env:standalone]
|
||||
; to build and run: pio run -e native -t exec
|
||||
[env:native]
|
||||
platform = native
|
||||
build_flags =
|
||||
-DARDUINOJSON_ENABLE_STD_STRING=1 -DARDUINOJSON_ENABLE_PROGMEM=1 -DARDUINOJSON_ENABLE_ARDUINO_STRING -DARDUINOJSON_USE_DOUBLE=0
|
||||
-DEMSESP_DEBUG -DEMSESP_STANDALONE -DEMSESP_TEST
|
||||
-DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.7.0-dev.0\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\"
|
||||
-lpthread
|
||||
-D__linux__
|
||||
-std=gnu++14 -Og -ggdb
|
||||
build_src_flags =
|
||||
-Wall -Wextra -Werror
|
||||
|
||||
11
scripts/refresh_module_library_native.py
Normal file
11
scripts/refresh_module_library_native.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import os
|
||||
|
||||
Import("env")
|
||||
|
||||
def refresh_module():
|
||||
print("Fetching latest module for Native target...")
|
||||
os.system("pio pkg install -f -s -e native -l file://../../modules/EMS-ESP-Modules")
|
||||
|
||||
if not (env.IsCleanTarget()):
|
||||
refresh_module()
|
||||
|
||||
11
scripts/run_native.py
Normal file
11
scripts/run_native.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import os
|
||||
|
||||
Import("env")
|
||||
|
||||
def run_native():
|
||||
print("Running native...")
|
||||
os.system("pio run -e native")
|
||||
|
||||
if not (env.IsCleanTarget()):
|
||||
run_native()
|
||||
|
||||
@@ -636,15 +636,15 @@ void EMSESPShell::stopped() {
|
||||
// show welcome banner
|
||||
void EMSESPShell::display_banner() {
|
||||
println();
|
||||
printfln("┌──────────────────────────────────────────┐");
|
||||
printfln("│ %sEMS-ESP version %-12s%s │", COLOR_BOLD_ON, EMSESP_APP_VERSION, COLOR_BOLD_OFF);
|
||||
printfln("┌───────────────────────────────────────┐");
|
||||
printfln("│ %sEMS-ESP version %-20s%s │", COLOR_BOLD_ON, EMSESP_APP_VERSION, COLOR_BOLD_OFF);
|
||||
printfln("│ │");
|
||||
printfln("│ %shelp%s to show available commands │", COLOR_UNDERLINE, COLOR_RESET);
|
||||
printfln("│ %ssu%s to access admin commands │", COLOR_UNDERLINE, COLOR_RESET);
|
||||
printfln("│ │");
|
||||
printfln("│ %s%shttps://github.com/emsesp/EMS-ESP32%s │", COLOR_BRIGHT_GREEN, COLOR_UNDERLINE, COLOR_RESET);
|
||||
printfln("│ │");
|
||||
printfln("└──────────────────────────────────────────┘");
|
||||
printfln("└───────────────────────────────────────┘");
|
||||
println();
|
||||
|
||||
// set console name
|
||||
|
||||
@@ -75,6 +75,7 @@ TemperatureSensor EMSESP::temperaturesensor_; // Temperature sensors
|
||||
AnalogSensor EMSESP::analogsensor_; // Analog sensors
|
||||
Shower EMSESP::shower_; // Shower logic
|
||||
Preferences EMSESP::nvs_; // NV Storage
|
||||
ModuleLibrary EMSESP::module_; // Module Library
|
||||
|
||||
// static/common variables
|
||||
uint16_t EMSESP::watch_id_ = WATCH_ID_NONE; // for when log is TRACE. 0 means no trace set
|
||||
@@ -1645,6 +1646,8 @@ void EMSESP::start() {
|
||||
#endif
|
||||
|
||||
webServer.begin(); // start the web server
|
||||
|
||||
module_.setup(this); // setup the external library modules
|
||||
}
|
||||
|
||||
// main loop calling all services
|
||||
|
||||
@@ -65,6 +65,10 @@
|
||||
#include "command.h"
|
||||
#include "version.h"
|
||||
|
||||
// Load external modules
|
||||
class Module {}; // forward declaration
|
||||
#include <ModuleLibrary.h>
|
||||
|
||||
#define WATCH_ID_NONE 0 // no watch id set
|
||||
|
||||
// helpers for callback functions
|
||||
@@ -218,6 +222,7 @@ class EMSESP {
|
||||
static RxService rxservice_;
|
||||
static TxService txservice_;
|
||||
static Preferences nvs_;
|
||||
static ModuleLibrary module_;
|
||||
|
||||
// web controllers
|
||||
static ESP8266React esp8266React;
|
||||
|
||||
@@ -1 +1 @@
|
||||
#define EMSESP_APP_VERSION "3.7.0-dev.11"
|
||||
#define EMSESP_APP_VERSION "3.7.0-dev.11m"
|
||||
|
||||
Reference in New Issue
Block a user