luc-github / ESP3DLib

ESP3D library for Marlin and ESP32 boards
GNU General Public License v3.0
97 stars 32 forks source link

[BUG NOTE]Marlin 2.1.2.2/ bugfix 2.1.x is broken for ESP3DLib 1.0 #75

Open luc-github opened 6 months ago

luc-github commented 6 months ago

https://github.com/MarlinFirmware/Marlin/commit/fecadaca82e49c2558b42684382ede121274bfea removed all configurations flags access for ESP3DLib

In Configuration_adv.h

Latest changes prevent ESP3D_WIFISUPPORT to use :

#define WEBSUPPORT          // Start a webserver (which may include auto-discovery) using SPIFFS
#define OTASUPPORT          // Support over-the-air firmware updates
#define WIFI_CUSTOM_COMMAND // Accept feature config commands (e.g., WiFi ESP3D) from the host

You need to replace/put back: #if ENABLED(WIFISUPPORT) by #if ANY(WIFISUPPORT, ESP3D_WIFISUPPORT)

Or add the flags outside of the #if ENABLED(WIFISUPPORT)

If not, ESP3DLib cannot communicate with Marlin and is not setup for web access

In SanityCheck.h

change

/**
 * Sanity check WiFi options
 */
#if ALL(WIFISUPPORT, ESP3D_WIFISUPPORT)
  #error "Enable only one of WIFISUPPORT or ESP3D_WIFISUPPORT."
#elif ENABLED(ESP3D_WIFISUPPORT) && DISABLED(ARDUINO_ARCH_ESP32)
  #error "ESP3D_WIFISUPPORT requires an ESP32 motherboard."
#elif ALL(ARDUINO_ARCH_ESP32, WIFISUPPORT)
  #if !(defined(WIFI_SSID) && defined(WIFI_PWD))
    #error "ESP32 motherboard with WIFISUPPORT requires WIFI_SSID and WIFI_PWD."
  #endif
#elif ENABLED(WIFI_CUSTOM_COMMAND)
  #error "WIFI_CUSTOM_COMMAND requires an ESP32 motherboard and WIFISUPPORT."
#elif ENABLED(OTASUPPORT)
  #error "OTASUPPORT requires an ESP32 motherboard and WIFISUPPORT."
#elif defined(WIFI_SSID) || defined(WIFI_PWD)
  #error "WIFI_SSID and WIFI_PWD only apply to ESP32 motherboard with WIFISUPPORT."
#endif

by

/**
 * Sanity check WiFi options
 */
#if ALL(WIFISUPPORT, ESP3D_WIFISUPPORT)
  #error "Enable only one of WIFISUPPORT or ESP3D_WIFISUPPORT."
#elif ENABLED(ESP3D_WIFISUPPORT) && DISABLED(ARDUINO_ARCH_ESP32)
  #error "ESP3D_WIFISUPPORT requires an ESP32 motherboard."
#elif ALL(ARDUINO_ARCH_ESP32, WIFISUPPORT)
  #if !(defined(WIFI_SSID) && defined(WIFI_PWD))
    #error "ESP32 motherboard with WIFISUPPORT requires WIFI_SSID and WIFI_PWD."
  #endif
#elif ENABLED(WIFI_CUSTOM_COMMAND) && DISABLED(ESP3D_WIFISUPPORT) && DISABLED(WIFISUPPORT)
  #error "WIFI_CUSTOM_COMMAND requires an ESP32 motherboard and WIFISUPPORT."
#elif ENABLED(OTASUPPORT) && DISABLED(ESP3D_WIFISUPPORT) && DISABLED(WIFISUPPORT)
  #error "OTASUPPORT requires an ESP32 motherboard and WIFISUPPORT."
#elif (defined(WIFI_SSID) || defined(WIFI_PWD)) && DISABLED(ESP3D_WIFISUPPORT) && DISABLED(WIFISUPPORT)
  #error "WIFI_SSID and WIFI_PWD only apply to ESP32 motherboard with WIFISUPPORT."
#endif

Or compilation will failed

luc-github commented 4 months ago

https://github.com/MarlinFirmware/Marlin/issues/26786#issuecomment-1961813818

thisiskeithb commented 3 months ago

Hi Luc! Sorry about that.

2.1.2.2 may not get retagged with fixes, but hopefully my PR (https://github.com/MarlinFirmware/Marlin/pull/26822) will get merged into bugfix-2.1.x soon and it'll restore ESP3D support.

luc-github commented 3 months ago

Hi @thisiskeithb thank you, no worry thank you for your help