diff --git a/platformio.ini b/platformio.ini index b690b90..877989c 100644 --- a/platformio.ini +++ b/platformio.ini @@ -166,6 +166,38 @@ board_build.embed_txtfiles = html/index.min.htm html/test.min.htm +[env:gravity32s2-release] +framework = ${common_env_data.framework} +platform = ${common_env_data.platform32} +upload_speed = ${common_env_data.upload_speed} +monitor_speed = ${common_env_data.monitor_speed} +extra_scripts = ${common_env_data.extra_scripts} +build_unflags = + ${common_env_data.build_unflags} +build_flags = + -Wl,-Map,output.map + ${common_env_data.build_flags} + -DLOG_LEVEL=0 + -DCORE_DEBUG_LEVEL=0 + -DESP32S2 + -DARDUINO_ESP32S2_DEV + -DUSE_SERIAL0 +lib_deps = + ${common_env_data.lib_deps} +lib_ignore = +board = lolin_s2_mini +build_type = release +board_build.partitions = part32.csv +board_build.filesystem = littlefs +board_build.embed_txtfiles = + html/calibration.min.htm + html/config.min.htm + html/firmware.min.htm + html/format.min.htm + html/about.min.htm + html/index.min.htm + html/test.min.htm + [env:gravity32c3-debug] framework = ${common_env_data.framework} platform = ${common_env_data.platform32} @@ -214,34 +246,3 @@ board_build.embed_txtfiles = html/index.min.htm html/test.min.htm -; [env:gravity32s2-release] -; framework = ${common_env_data.framework} -; platform = ${common_env_data.platform32} -; upload_speed = ${common_env_data.upload_speed} -; monitor_speed = ${common_env_data.monitor_speed} -; extra_scripts = ${common_env_data.extra_scripts} -; build_unflags = -; ${common_env_data.build_unflags} -; build_flags = -; -Wl,-Map,output.map -; ${common_env_data.build_flags} -; -DLOG_LEVEL=5 -; -DCORE_DEBUG_LEVEL=0 -; -DESP32S2 -; -DARDUINO_ESP32S2_DEV -; lib_deps = -; ${common_env_data.lib_deps} -; ${common_env_data.lib_deps32} -; lib_ignore = -; board = lolin_s2_mini -; build_type = debug -; board_build.partitions = part32.csv -; board_build.filesystem = littlefs -; board_build.embed_txtfiles = -; html/calibration.min.htm -; html/config.min.htm -; html/firmware.min.htm -; html/format.min.htm -; html/about.min.htm -; html/index.min.htm -; html/test.min.htm diff --git a/src/config.hpp b/src/config.hpp index 0c8594a..9dc7ad6 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -148,7 +148,7 @@ class Config { #elif defined(ESP32C3) float _voltageFactor = 1.3; #elif defined(ESP32S2) - float _voltageFactor = 1.3; + float _voltageFactor = 0.59; #else // ESP32 float _voltageFactor = 1.3; #endif diff --git a/src/helper.cpp b/src/helper.cpp index a2cbf34..12acba4 100644 --- a/src/helper.cpp +++ b/src/helper.cpp @@ -120,8 +120,7 @@ void checkResetReason() { } Log.notice(F("HELP: Last reset cause '%s' (%d)" CR), rStr.c_str(), r); - -#warning "TODO: Implement logging of crashes for esp32" + // Havent found a good way to get exception cause from an ESP32 #endif } diff --git a/src/main.hpp b/src/main.hpp index d222a48..87bd57b 100644 --- a/src/main.hpp +++ b/src/main.hpp @@ -48,7 +48,6 @@ extern RunMode runMode; #elif defined(ESP32C3) #include #include - #include "esp32c3/rom/rtc.h" #define ESPhttpUpdate httpUpdate #define ESP_RESET ESP.restart @@ -60,31 +59,27 @@ extern RunMode runMode; #else #define PIN_SDA 7 #define PIN_SCL 6 -#endif +#endif // JTAG_DEBUG #define PIN_DS A3 #define PIN_A0 A0 // This should be the LED_BUILTIN, but that is also connected SDA (Gyro) so we // cannot use both. So we point LED to pin 8 which is not used. #define PIN_LED 8 -/* #elif defined(ESP32S2) #include #include - #include "esp32s2/rom/rtc.h" #define ESPhttpUpdate httpUpdate #define ESP_RESET ESP.restart #define ESP8266WebServer WebServer -#define PIN_SDA SDA -#define PIN_SCL SCL +#define PIN_SDA A17 +#define PIN_SCL A15 #define PIN_DS A8 #define PIN_A0 A2 #define PIN_LED LED_BUILTIN -*/ #else // defined (ESP32) #include #include - #include "esp32/rom/rtc.h" #define ESPhttpUpdate httpUpdate #define ESP_RESET ESP.restart diff --git a/src/webserver.cpp b/src/webserver.cpp index 24b17dc..a9e119a 100644 --- a/src/webserver.cpp +++ b/src/webserver.cpp @@ -90,7 +90,7 @@ void WebServerHandler::webHandleConfig() { #elif defined(ESP32C3) doc[PARAM_PLATFORM] = "esp32c3"; #elif defined(ESP32S2) - doc[PARAM_PLATFORM] = "esp32s3"; + doc[PARAM_PLATFORM] = "esp32s2"; #else // esp32 mini doc[PARAM_PLATFORM] = "esp32"; #endif @@ -273,7 +273,7 @@ void WebServerHandler::webHandleStatus() { #elif defined(ESP32C3) doc[PARAM_PLATFORM] = "esp32c3"; #elif defined(ESP32S2) - doc[PARAM_PLATFORM] = "esp32s3"; + doc[PARAM_PLATFORM] = "esp32s2"; #else // esp32 mini doc[PARAM_PLATFORM] = "esp32"; #endif diff --git a/src_docs/source/hardware.rst b/src_docs/source/hardware.rst index b2e1900..1f3ef7e 100644 --- a/src_docs/source/hardware.rst +++ b/src_docs/source/hardware.rst @@ -61,7 +61,7 @@ Here is an image of where I added the resistor for the voltage divider. ESP32s2 mini ++++++++++++ -Work in progress... +This is model is now fully supported by gravitymon. Same setup as for ESP32C3 mini. ESP32 d1 mini +++++++++++++ diff --git a/src_docs/source/releases.rst b/src_docs/source/releases.rst index ab600a5..825b953 100644 --- a/src_docs/source/releases.rst +++ b/src_docs/source/releases.rst @@ -3,6 +3,13 @@ Releases ######## +v1.2.0 - beta2 +============== + +Features +++++++++ +* Added support for the ESP32 S2 mini board + v1.2.0 - beta1 ==============