Browse Source

Some ESP32 patches (#16297)

Luc 4 years ago
parent
commit
24eaf2d7e0

+ 7
- 5
Marlin/src/HAL/HAL_ESP32/WebSocketSerial.h View File

25
 
25
 
26
 #include <Stream.h>
26
 #include <Stream.h>
27
 
27
 
28
-#ifndef RX_BUFFER_SIZE
29
-  #define RX_BUFFER_SIZE 128
30
-#endif
31
 #ifndef TX_BUFFER_SIZE
28
 #ifndef TX_BUFFER_SIZE
32
   #define TX_BUFFER_SIZE 32
29
   #define TX_BUFFER_SIZE 32
33
 #endif
30
 #endif
34
-#if TX_BUFFER_SIZE <= 0
35
-  #error "TX_BUFFER_SIZE is required for the WebSocket."
31
+#if ENABLED(WIFISUPPORT)
32
+  #ifndef RX_BUFFER_SIZE
33
+    #define RX_BUFFER_SIZE 128
34
+  #endif
35
+  #if TX_BUFFER_SIZE <= 0
36
+    #error "TX_BUFFER_SIZE is required for the WebSocket."
37
+  #endif
36
 #endif
38
 #endif
37
 
39
 
38
 typedef uint16_t ring_buffer_pos_t;
40
 typedef uint16_t ring_buffer_pos_t;

+ 1
- 1
Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp View File

201
 U8G_PB_DEV(u8g_dev_st7920_128x64_HAL_hw_spi, LCD_PIXEL_WIDTH, LCD_PIXEL_HEIGHT, PAGE_HEIGHT, u8g_dev_st7920_128x64_HAL_fn, U8G_COM_ST7920_HAL_HW_SPI);
201
 U8G_PB_DEV(u8g_dev_st7920_128x64_HAL_hw_spi, LCD_PIXEL_WIDTH, LCD_PIXEL_HEIGHT, PAGE_HEIGHT, u8g_dev_st7920_128x64_HAL_fn, U8G_COM_ST7920_HAL_HW_SPI);
202
 u8g_dev_t u8g_dev_st7920_128x64_HAL_4x_hw_spi = { u8g_dev_st7920_128x64_HAL_4x_fn, &u8g_dev_st7920_128x64_HAL_4x_pb, U8G_COM_ST7920_HAL_HW_SPI };
202
 u8g_dev_t u8g_dev_st7920_128x64_HAL_4x_hw_spi = { u8g_dev_st7920_128x64_HAL_4x_fn, &u8g_dev_st7920_128x64_HAL_4x_pb, U8G_COM_ST7920_HAL_HW_SPI };
203
 
203
 
204
-#if NONE(__AVR__, ARDUINO_ARCH_STM32) || defined(U8G_HAL_LINKS)
204
+#if NONE(__AVR__, ARDUINO_ARCH_STM32, ARDUINO_ARCH_ESP32) || defined(U8G_HAL_LINKS)
205
   // Also use this device for HAL version of rrd class. This results in the same device being used
205
   // Also use this device for HAL version of rrd class. This results in the same device being used
206
   // for the ST7920 for HAL systems no matter what is selected in ultralcd_impl_DOGM.h.
206
   // for the ST7920 for HAL systems no matter what is selected in ultralcd_impl_DOGM.h.
207
   u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = { u8g_dev_st7920_128x64_HAL_4x_fn, &u8g_dev_st7920_128x64_HAL_4x_pb, U8G_COM_ST7920_HAL_SW_SPI };
207
   u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = { u8g_dev_st7920_128x64_HAL_4x_fn, &u8g_dev_st7920_128x64_HAL_4x_pb, U8G_COM_ST7920_HAL_SW_SPI };

+ 1
- 1
Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp View File

25
 
25
 
26
 #include "../../inc/MarlinConfigPre.h"
26
 #include "../../inc/MarlinConfigPre.h"
27
 
27
 
28
-#if !defined(U8G_HAL_LINKS) && ANY(__AVR__, ARDUINO_ARCH_STM32)
28
+#if !defined(U8G_HAL_LINKS) && ANY(__AVR__, ARDUINO_ARCH_STM32, ARDUINO_ARCH_ESP32)
29
 
29
 
30
 #include "../../inc/MarlinConfig.h"
30
 #include "../../inc/MarlinConfig.h"
31
 
31
 

+ 1
- 1
Marlin/src/module/stepper.cpp View File

2276
       (axis == CORE_AXIS_2
2276
       (axis == CORE_AXIS_2
2277
         ? CORESIGN(count_position[CORE_AXIS_1] - count_position[CORE_AXIS_2])
2277
         ? CORESIGN(count_position[CORE_AXIS_1] - count_position[CORE_AXIS_2])
2278
         : count_position[CORE_AXIS_1] + count_position[CORE_AXIS_2]
2278
         : count_position[CORE_AXIS_1] + count_position[CORE_AXIS_2]
2279
-      ) * 0.5f
2279
+      ) * double(0.5)
2280
     #else // !IS_CORE
2280
     #else // !IS_CORE
2281
       count_position[axis]
2281
       count_position[axis]
2282
     #endif
2282
     #endif

+ 1
- 1
platformio.ini View File

715
 platform      = espressif32
715
 platform      = espressif32
716
 board         = esp32dev
716
 board         = esp32dev
717
 build_flags   = ${common.build_flags} -DCORE_DEBUG_LEVEL=0
717
 build_flags   = ${common.build_flags} -DCORE_DEBUG_LEVEL=0
718
-lib_deps      =
718
+lib_deps      = ${common.lib_deps}
719
   AsyncTCP=https://github.com/me-no-dev/AsyncTCP/archive/master.zip
719
   AsyncTCP=https://github.com/me-no-dev/AsyncTCP/archive/master.zip
720
   ESPAsyncWebServer=https://github.com/me-no-dev/ESPAsyncWebServer/archive/master.zip
720
   ESPAsyncWebServer=https://github.com/me-no-dev/ESPAsyncWebServer/archive/master.zip
721
 lib_ignore    = LiquidCrystal, LiquidTWI2, SailfishLCD, SailfishRGB_LED
721
 lib_ignore    = LiquidCrystal, LiquidTWI2, SailfishLCD, SailfishRGB_LED

Loading…
Cancel
Save