Skip to content

Commit 18f4e13

Browse files
thinkyheadEvilGremlin
authored andcommitted
🔧 Clarify WIFISUPPORT (MarlinFirmware#26097)
1 parent 450e419 commit 18f4e13

File tree

5 files changed

+33
-19
lines changed

5 files changed

+33
-19
lines changed

Marlin/Configuration_adv.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4222,13 +4222,17 @@
42224222
#endif
42234223

42244224
/**
4225-
* WiFi Support (Espressif ESP32 WiFi)
4225+
* Native ESP32 board with WiFi or add-on ESP32 WiFi-101 module
42264226
*/
4227-
//#define WIFISUPPORT // Marlin embedded WiFi management
4227+
//#define WIFISUPPORT // Marlin embedded WiFi management. Not needed for simple WiFi serial port.
42284228
//#define ESP3D_WIFISUPPORT // ESP3D Library WiFi management (https://github.com/luc-github/ESP3DLib)
42294229

4230-
#if ANY(WIFISUPPORT, ESP3D_WIFISUPPORT)
4231-
//#define WEBSUPPORT // Start a webserver (which may include auto-discovery)
4230+
/**
4231+
* Extras for an ESP32-based motherboard with WIFISUPPORT
4232+
* These options don't apply to add-on WiFi modules based on ESP32 WiFi101.
4233+
*/
4234+
#if ENABLED(WIFISUPPORT)
4235+
//#define WEBSUPPORT // Start a webserver (which may include auto-discovery) using SPIFFS
42324236
//#define OTASUPPORT // Support over-the-air firmware updates
42334237
//#define WIFI_CUSTOM_COMMAND // Accept feature config commands (e.g., WiFi ESP3D) from the host
42344238

Marlin/src/inc/SanityCheck.h

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3810,12 +3810,20 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive."
38103810
/**
38113811
* Sanity check WiFi options
38123812
*/
3813-
#if ENABLED(ESP3D_WIFISUPPORT) && DISABLED(ARDUINO_ARCH_ESP32)
3814-
#error "ESP3D_WIFISUPPORT requires an ESP32 MOTHERBOARD."
3815-
#elif ENABLED(WEBSUPPORT) && NONE(ARDUINO_ARCH_ESP32, WIFISUPPORT)
3816-
#error "WEBSUPPORT requires WIFISUPPORT and an ESP32 MOTHERBOARD."
3817-
#elif ALL(ESP3D_WIFISUPPORT, WIFISUPPORT)
3818-
#error "Enable only one of ESP3D_WIFISUPPORT or WIFISUPPORT."
3813+
#if ALL(WIFISUPPORT, ESP3D_WIFISUPPORT)
3814+
#error "Enable only one of WIFISUPPORT or ESP3D_WIFISUPPORT."
3815+
#elif ENABLED(ESP3D_WIFISUPPORT) && DISABLED(ARDUINO_ARCH_ESP32)
3816+
#error "ESP3D_WIFISUPPORT requires an ESP32 motherboard."
3817+
#elif ALL(ARDUINO_ARCH_ESP32, WIFISUPPORT)
3818+
#if !(defined(WIFI_SSID) && defined(WIFI_PWD))
3819+
#error "ESP32 motherboard with WIFISUPPORT requires WIFI_SSID and WIFI_PWD."
3820+
#endif
3821+
#elif ENABLED(WIFI_CUSTOM_COMMAND)
3822+
#error "WIFI_CUSTOM_COMMAND requires an ESP32 motherboard and WIFISUPPORT."
3823+
#elif ENABLED(OTASUPPORT)
3824+
#error "OTASUPPORT requires an ESP32 motherboard and WIFISUPPORT."
3825+
#elif defined(WIFI_SSID) || defined(WIFI_PWD)
3826+
#error "WIFI_SSID and WIFI_PWD only apply to ESP32 motherboard with WIFISUPPORT."
38193827
#endif
38203828

38213829
/**

Marlin/src/module/temperature.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3080,7 +3080,9 @@ void Temperature::init() {
30803080
#if HAS_THERMAL_PROTECTION
30813081

30823082
#pragma GCC diagnostic push
3083-
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
3083+
#if __has_cpp_attribute(fallthrough)
3084+
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
3085+
#endif
30843086

30853087
Temperature::tr_state_machine_t Temperature::tr_state_machine[NR_HEATER_RUNAWAY]; // = { { TRInactive, 0 } };
30863088

@@ -3978,7 +3980,9 @@ void Temperature::isr() {
39783980
switch (adc_sensor_state) {
39793981

39803982
#pragma GCC diagnostic push
3981-
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
3983+
#if __has_cpp_attribute(fallthrough)
3984+
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
3985+
#endif
39823986

39833987
case SensorsReady: {
39843988
// All sensors have been read. Stay in this state for a few

buildroot/tests/esp32

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ set -e
1212
restore_configs
1313
opt_set MOTHERBOARD BOARD_ESPRESSIF_ESP32 TX_BUFFER_SIZE 64 \
1414
WIFI_SSID '"ssid"' WIFI_PWD '"password"'
15-
opt_enable WIFISUPPORT WEBSUPPORT GCODE_MACROS BAUD_RATE_GCODE M115_GEOMETRY_REPORT REPETIER_GCODE_M360
16-
exec_test $1 $2 "ESP32 with WIFISUPPORT and WEBSUPPORT" "$3"
15+
opt_enable WIFISUPPORT WEBSUPPORT OTASUPPORT GCODE_MACROS BAUD_RATE_GCODE M115_GEOMETRY_REPORT REPETIER_GCODE_M360
16+
exec_test $1 $2 "ESP32 with WIFISUPPORT and WEBSUPPORT and OTASUPPORT" "$3"
1717

1818
#
1919
# Build with TMC drivers using hardware serial

buildroot/tests/mks_tinybee

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ set -e
1010
# Build with ESP3D WiFi, OTA and custom WIFI commands support
1111
#
1212
restore_configs
13-
opt_set MOTHERBOARD BOARD_MKS_TINYBEE TX_BUFFER_SIZE 64 \
14-
WIFI_SSID '"ssid"' WIFI_PWD '"password"' \
15-
SERIAL_PORT_2 -1 BAUDRATE_2 250000
16-
opt_enable ESP3D_WIFISUPPORT WEBSUPPORT OTASUPPORT WIFI_CUSTOM_COMMAND
17-
exec_test $1 "$2" "MKS TinyBee with ESP3D_WIFISUPPORT" "$3"
13+
opt_set MOTHERBOARD BOARD_MKS_TINYBEE TX_BUFFER_SIZE 64 SERIAL_PORT_2 -1 BAUDRATE_2 250000
14+
opt_enable ESP3D_WIFISUPPORT
15+
exec_test $1 $2 "MKS TinyBee with ESP3D_WIFISUPPORT" "$3"
1816

1917
#
2018
# Build with LCD, SD support and Speaker support

0 commit comments

Comments
 (0)