Skip to content

Commit

Permalink
Merge branch 'MarlinFirmware:bugfix-2.1.x' into ParseSafetyCommandsEv…
Browse files Browse the repository at this point in the history
…enWithEParser
  • Loading branch information
InsanityAutomation authored Apr 7, 2024
2 parents b616b0a + a3434de commit 1117aff
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 41 deletions.
4 changes: 2 additions & 2 deletions Marlin/src/gcode/calibrate/G34_M422.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ void GcodeSuite::G34() {
}

const float z_auto_align_accuracy = parser.floatval('T', Z_STEPPER_ALIGN_ACC);
if (!WITHIN(z_auto_align_accuracy, 0.01f, 1.0f)) {
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(T)arget accuracy out of bounds (0.01-1.0)."));
if (!WITHIN(z_auto_align_accuracy, 0.001f, 1.0f)) {
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(T)arget accuracy out of bounds (0.001-1.0)."));
break;
}

Expand Down
4 changes: 0 additions & 4 deletions Marlin/src/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -1852,10 +1852,6 @@
#if NONE(TFT_TOUCH_DEVICE_GT911, TFT_TOUCH_DEVICE_XPT2046)
#define TFT_TOUCH_DEVICE_XPT2046 // ADS7843/XPT2046 ADC Touchscreen such as ILI9341 2.8
#endif
#if ENABLED(TFT_TOUCH_DEVICE_GT911) // GT911 Capacitive touch screen such as BIQU_BX_TFT70
#undef TOUCH_SCREEN_CALIBRATION
#undef TOUCH_CALIBRATION_AUTO_SAVE
#endif
#if !HAS_GRAPHICAL_TFT
#undef TOUCH_SCREEN
#if ENABLED(TFT_CLASSIC_UI)
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Conditionals_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,7 @@
* currently HAL.h must be included ahead of pins.h.
*/
#if LCD_IS_SERIAL_HOST && !defined(LCD_SERIAL_PORT)
#if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_MINI_E3_V3_0, BTT_SKR_MINI_E3_V3_0_1, BTT_SKR_E3_TURBO, BTT_OCTOPUS_V1_1, AQUILA_V101)
#if MB(MKS_MONSTER8_V1, BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_MINI_E3_V3_0, BTT_SKR_MINI_E3_V3_0_1, BTT_SKR_E3_TURBO, BTT_OCTOPUS_V1_1, AQUILA_V101)
#define LCD_SERIAL_PORT 1
#elif MB(CREALITY_V24S1_301, CREALITY_V24S1_301F4, CREALITY_F401RE, CREALITY_V423, CREALITY_CR4NTXXC10, MKS_ROBIN, PANOWIN_CUTLASS, KODAMA_BARDO)
#define LCD_SERIAL_PORT 2
Expand Down
6 changes: 6 additions & 0 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -3617,6 +3617,7 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive."
#error "Z_STEPPER_ALIGN_STEPPER_XY requires 3 or 4 Z steppers."
#endif
#endif
static_assert(WITHIN(Z_STEPPER_ALIGN_ACC, 0.001, 1.0), "Z_STEPPER_ALIGN_ACC needs to be between 0.001 and 1.0");
#endif

#if ENABLED(MECHANICAL_GANTRY_CALIBRATION)
Expand Down Expand Up @@ -3918,6 +3919,11 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive."
#error "TOUCH_CALIBRATION_[XY] and TOUCH_OFFSET_[XY] are required for resistive touch screens with TOUCH_SCREEN_CALIBRATION disabled."
#endif

// GT911 Capacitive touch screen such as BIQU_BX_TFT70
#if ALL(TFT_TOUCH_DEVICE_GT911, TOUCH_SCREEN_CALIBRATION)
#error "TOUCH_SCREEN_CALIBRATION is not supported by the selected LCD controller."
#endif

/**
* Sanity check WiFi options
*/
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/e3v2/proui/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4014,7 +4014,7 @@ void drawMaxAccelMenu() {
BACK_ITEM(drawPrepareMenu);
MENU_ITEM(ICON_Homing, MSG_AUTO_HOME, onDrawMenuItem, autoHome);
MENU_ITEM(ICON_AxisD, MSG_MOVE_NOZZLE_TO_BED, onDrawMenuItem, setMoveZto0);
EDIT_ITEM(ICON_Zoffset, MSG_XATC_UPDATE_Z_OFFSET, onDrawPFloat2Menu, setZOffset, &BABY_Z_VAR);
EDIT_ITEM(ICON_Zoffset, MSG_ZPROBE_ZOFFSET, onDrawPFloat2Menu, setZOffset, &BABY_Z_VAR);
}
updateMenu(zOffsetWizMenu);
if (!axis_is_trusted(Z_AXIS)) LCD_MESSAGE_F("WARNING: Z position unknown, move Z to home");
Expand Down
8 changes: 7 additions & 1 deletion Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@
*/
#pragma once

#include "env_validate.h"
// The Octopus Pro V1 has shipped with both STM32F4 and STM32H7 MCUs.
// Ensure the correct env_validate.h file is included based on the build environment used.
#if NOT_TARGET(STM32H7)
#include "env_validate.h"
#else
#include "../stm32h7/env_validate.h"
#endif

#define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support
#define USES_DIAG_JUMPERS
Expand Down
122 changes: 90 additions & 32 deletions Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,39 @@

#include "env_validate.h"

#define BOARD_WEBSITE_URL "github.com/bigtreetech/BIQU-BX"
#define DEFAULT_MACHINE_NAME "BIQU BX"

#define USES_DIAG_JUMPERS

// Onboard I2C EEPROM
#define I2C_EEPROM
#define MARLIN_EEPROM_SIZE 0x1000 // 4K (24C32)

#define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support
//#define SWD_DEBUG // Use pins PA13 and PA14 on STM32H7 for the SWD debugger

//
// Trinamic Stallguard pins
//
#define X_DIAG_PIN PB11 // X-
#define Y_DIAG_PIN PB12 // Y-
#define Z_DIAG_PIN PD12 // Z-
#define E0_DIAG_PIN PD13 // X+
#define E1_DIAG_PIN PB13 // Y+

//
// Limit Switches
//
#define X_MIN_PIN PB11
#define X_MAX_PIN PD13
#define Y_MIN_PIN PB12
#define Y_MAX_PIN PB13
#define Z_MIN_PIN PD12
#define Z_MAX_PIN PD11
#define X_MIN_PIN X_DIAG_PIN // X-
#define X_MAX_PIN E0_DIAG_PIN // X+
#define Y_MIN_PIN Y_DIAG_PIN // Y-
#define Y_MAX_PIN E1_DIAG_PIN // Y+
#define Z_MIN_PIN Z_DIAG_PIN // Z-
#define Z_MAX_PIN PD11 // Z+

#define FIL_RUNOUT_PIN PD13
#define FIL_RUNOUT2_PIN PB13
#define FIL_RUNOUT_PIN E0_DIAG_PIN // X+
#define FIL_RUNOUT2_PIN E1_DIAG_PIN // Y+

#ifndef SWD_DEBUG
#define LED_PIN PA13
Expand All @@ -53,13 +65,13 @@
#define POWER_MONITOR_PIN PB0
#define RPI_POWER_PIN PE5

#define SERVO0_PIN PA2
#define SERVO0_PIN PA2 // PROBE

//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN PH2 // Probe
#define Z_MIN_PROBE_PIN PH2 // PROBE
#endif

//
Expand All @@ -72,30 +84,44 @@
//
// Steppers
//
#define X_STEP_PIN PG13
#define X_STEP_PIN PG13 // X
#define X_DIR_PIN PG12
#define X_ENABLE_PIN PG14
#define X_CS_PIN PG10

#define Y_STEP_PIN PB3
#define Y_STEP_PIN PB3 // Y
#define Y_DIR_PIN PD3
#define Y_ENABLE_PIN PB4
#define Y_CS_PIN PD4

#define Z_STEP_PIN PD7
#define Z_DIR_PIN PD6
#define Z_ENABLE_PIN PG9
#define Z_CS_PIN PD5
#ifdef BX_SWAP_ZM_E1M
#define Z_STEP_PIN PA8 // E1
#define Z_DIR_PIN PC9
#define Z_ENABLE_PIN PD2
#define Z_CS_PIN PC8
#else
#define Z_STEP_PIN PD7 // Z1
#define Z_DIR_PIN PD6
#define Z_ENABLE_PIN PG9
#define Z_CS_PIN PD5
#endif

#define E0_STEP_PIN PC14
#define E0_STEP_PIN PC14 // E0
#define E0_DIR_PIN PC13
#define E0_ENABLE_PIN PC15
#define E0_CS_PIN PI8

#define E1_STEP_PIN PA8
#define E1_DIR_PIN PC9
#define E1_ENABLE_PIN PD2
#define E1_CS_PIN PC8
#ifdef BX_SWAP_ZM_E1M
#define E1_STEP_PIN PD7 // Z1
#define E1_DIR_PIN PD6
#define E1_ENABLE_PIN PG9
#define E1_CS_PIN PD5
#else
#define E1_STEP_PIN PA8 // E1
#define E1_DIR_PIN PC9
#define E1_ENABLE_PIN PD2
#define E1_CS_PIN PC8
#endif

//
// SPI pins for TMC2130 stepper drivers
Expand Down Expand Up @@ -138,14 +164,24 @@
#define Y_SERIAL_TX_PIN PD4
#define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN

#define Z_SERIAL_TX_PIN PD5
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
#ifdef BX_SWAP_ZM_E1M
#define Z_SERIAL_TX_PIN PC8
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
#else
#define Z_SERIAL_TX_PIN PD5
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
#endif

#define E0_SERIAL_TX_PIN PI8
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN

#define E1_SERIAL_TX_PIN PC8
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
#ifdef BX_SWAP_ZM_E1M
#define E1_SERIAL_TX_PIN PD5
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
#else
#define E1_SERIAL_TX_PIN PC8
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
#endif

// Reduce baud rate to improve software serial reliability
#ifndef TMC_BAUD_RATE
Expand All @@ -164,15 +200,15 @@
//
// Heaters / Fans
//
#define HEATER_0_PIN PC4
#define HEATER_1_PIN PC5
#define HEATER_BED_PIN PA4
#define HEATER_0_PIN PC4 // HE0
#define HEATER_1_PIN PC5 // HE1
#define HEATER_BED_PIN PA4 // BED

#define FAN0_PIN PA5 // "FAN0"
#define FAN1_PIN PA6 // "FAN1"
#define FAN2_PIN PA7 // "FAN2"
#define FAN0_PIN PA5 // FAN0
#define FAN1_PIN PA6 // FAN1
#define FAN2_PIN PA7 // FAN2 / DCOT

#define BOARD_NEOPIXEL_PIN PH3
#define BOARD_NEOPIXEL_PIN PH3 // RGB
#define NEOPIXEL2_PIN PB1

#if HAS_LTDC_TFT
Expand Down Expand Up @@ -238,3 +274,25 @@
#define SD_MISO_PIN PC11
#define SD_MOSI_PIN PC12
#define SD_DETECT_PIN PI3

#if ENABLED(WIFISUPPORT)
//
// WIFI
//

/**
* -----
* (ESP-RX4) PA1 | 1 8 | GND
* (ESP-EN) -- | 2 7 | -- (ESP-IO2)
* (ESP-RST) -- | 3 6 | -- (ESP-IO0)
* 3.3V | 4 5 | PA0 (ESP-TX4)
* -----
* WIFI-ESP01
*/
#define ESP_WIFI_MODULE_COM 4 // Must also set either SERIAL_PORT / SERIAL_PORT_2 / SERIAL_PORT_3 to this
#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT / SERIAL_PORT_2 / SERIAL_PORT_3
#define ESP_WIFI_MODULE_RESET_PIN -1
#define ESP_WIFI_MODULE_ENABLE_PIN -1
#define ESP_WIFI_MODULE_GPIO0_PIN -1
#define ESP_WIFI_MODULE_GPIO2_PIN -1
#endif

0 comments on commit 1117aff

Please sign in to comment.