From 50cb4f629446cd45fb5e2170e35cff4a347c48c8 Mon Sep 17 00:00:00 2001 From: Luc <8822552+luc-github@users.noreply.github.com> Date: Thu, 15 Oct 2020 10:11:23 +0200 Subject: [PATCH] Add PSRAM detection in ESP420 Stop hardware when starting board to allow http working at boot thanks Seppel --- esp3d/src/core/settings_esp3d.cpp | 4 ++++ esp3d/src/include/version.h | 2 +- esp3d/src/modules/network/netservices.cpp | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/esp3d/src/core/settings_esp3d.cpp b/esp3d/src/core/settings_esp3d.cpp index 2c0d4f31..4665a1d9 100644 --- a/esp3d/src/core/settings_esp3d.cpp +++ b/esp3d/src/core/settings_esp3d.cpp @@ -1240,7 +1240,11 @@ String Settings_ESP3D::IPtoString(uint32_t ip_int) const char * Settings_ESP3D::TargetBoard() { #ifdef ARDUINO_ARCH_ESP32 +#ifdef BOARD_HAS_PSRAM + return "ESP32 (PSRAM)"; +#else return "ESP32"; +#endif //BOARD_HAS_PSRAM #endif //ARDUINO_ARCH_ESP32 #ifdef ARDUINO_ARCH_ESP8266 return "ESP82XX"; diff --git a/esp3d/src/include/version.h b/esp3d/src/include/version.h index 4fc4e3d8..2f229c61 100644 --- a/esp3d/src/include/version.h +++ b/esp3d/src/include/version.h @@ -22,7 +22,7 @@ #define _VERSION_ESP3D_H //version and sources location -#define FW_VERSION "3.0.0.a63" +#define FW_VERSION "3.0.0.a64" #define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0" #endif //_VERSION_ESP3D_H diff --git a/esp3d/src/modules/network/netservices.cpp b/esp3d/src/modules/network/netservices.cpp index f5e2803f..9844b0fd 100644 --- a/esp3d/src/modules/network/netservices.cpp +++ b/esp3d/src/modules/network/netservices.cpp @@ -268,7 +268,7 @@ bool NetServices::begin() #ifdef CAMERA_DEVICE if (!esp3d_camera.begin()) { output.printMSG("Failed start camera streaming server"); - } + } else esp3d_camera.stopHardware(); #endif //CAMERA_DEVICE if (!res) { end();