mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-03-10 00:23:01 +00:00
🚸 Disable FT Motion during Biqu Microprobe use (#27368)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
parent
12d491c5f7
commit
7e0208940b
10 changed files with 63 additions and 7 deletions
|
@ -1511,7 +1511,6 @@
|
||||||
* For information about this sensor https://github.com/bigtreetech/MicroProbe
|
* For information about this sensor https://github.com/bigtreetech/MicroProbe
|
||||||
*
|
*
|
||||||
* Also requires PROBE_ENABLE_DISABLE
|
* Also requires PROBE_ENABLE_DISABLE
|
||||||
* With FT_MOTION requires ENDSTOP_INTERRUPTS_FEATURE
|
|
||||||
*/
|
*/
|
||||||
//#define BIQU_MICROPROBE_V1 // Triggers HIGH
|
//#define BIQU_MICROPROBE_V1 // Triggers HIGH
|
||||||
//#define BIQU_MICROPROBE_V2 // Triggers LOW
|
//#define BIQU_MICROPROBE_V2 // Triggers LOW
|
||||||
|
|
|
@ -48,6 +48,10 @@
|
||||||
#include "../hilbert_curve.h"
|
#include "../hilbert_curve.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if FT_MOTION_DISABLE_FOR_PROBING
|
||||||
|
#include "../../../module/ft_motion.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#define UBL_G29_P31
|
#define UBL_G29_P31
|
||||||
|
@ -309,6 +313,10 @@ void unified_bed_leveling::G29() {
|
||||||
const uint8_t p_val = parser.byteval('P');
|
const uint8_t p_val = parser.byteval('P');
|
||||||
const bool may_move = p_val == 1 || p_val == 2 || p_val == 4 || parser.seen_test('J');
|
const bool may_move = p_val == 1 || p_val == 2 || p_val == 4 || parser.seen_test('J');
|
||||||
|
|
||||||
|
#if FT_MOTION_DISABLE_FOR_PROBING
|
||||||
|
FTMotionDisableInScope FT_Disabler; // Disable Fixed-Time Motion for probing
|
||||||
|
#endif
|
||||||
|
|
||||||
// Check for commands that require the printer to be homed
|
// Check for commands that require the printer to be homed
|
||||||
if (may_move) {
|
if (may_move) {
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
|
|
|
@ -59,6 +59,10 @@
|
||||||
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
#include "../../../core/debug_out.h"
|
#include "../../../core/debug_out.h"
|
||||||
|
|
||||||
|
#if DISABLED(PROBE_MANUALLY) && FT_MOTION_DISABLE_FOR_PROBING
|
||||||
|
#include "../../../module/ft_motion.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ABL_USES_GRID
|
#if ABL_USES_GRID
|
||||||
#if ENABLED(PROBE_Y_FIRST)
|
#if ENABLED(PROBE_Y_FIRST)
|
||||||
#define PR_OUTER_VAR abl.meshCount.x
|
#define PR_OUTER_VAR abl.meshCount.x
|
||||||
|
@ -280,6 +284,10 @@ G29_TYPE GcodeSuite::G29() {
|
||||||
// Set and report "probing" state to host
|
// Set and report "probing" state to host
|
||||||
TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_PROBE, false));
|
TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_PROBE, false));
|
||||||
|
|
||||||
|
#if DISABLED(PROBE_MANUALLY) && FT_MOTION_DISABLE_FOR_PROBING
|
||||||
|
FTMotionDisableInScope FT_Disabler; // Disable Fixed-Time Motion for probing
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* On the initial G29 fetch command parameters.
|
* On the initial G29 fetch command parameters.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -45,6 +45,10 @@
|
||||||
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
#include "../../../core/debug_out.h"
|
#include "../../../core/debug_out.h"
|
||||||
|
|
||||||
|
#if FT_MOTION_DISABLE_FOR_PROBING
|
||||||
|
#include "../../module/ft_motion.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// Save 130 bytes with non-duplication of PSTR
|
// Save 130 bytes with non-duplication of PSTR
|
||||||
inline void echo_not_entered(const char c) { SERIAL_CHAR(c); SERIAL_ECHOLNPGM(" not entered."); }
|
inline void echo_not_entered(const char c) { SERIAL_CHAR(c); SERIAL_ECHOLNPGM(" not entered."); }
|
||||||
|
|
||||||
|
@ -63,6 +67,10 @@ inline void echo_not_entered(const char c) { SERIAL_CHAR(c); SERIAL_ECHOLNPGM("
|
||||||
*/
|
*/
|
||||||
void GcodeSuite::G29() {
|
void GcodeSuite::G29() {
|
||||||
|
|
||||||
|
#if FT_MOTION_DISABLE_FOR_PROBING
|
||||||
|
FTMotionDisableInScope FT_Disabler; // Disable Fixed-Time Motion for probing
|
||||||
|
#endif
|
||||||
|
|
||||||
DEBUG_SECTION(log_G29, "G29", true);
|
DEBUG_SECTION(log_G29, "G29", true);
|
||||||
|
|
||||||
// G29 Q is also available if debugging
|
// G29 Q is also available if debugging
|
||||||
|
|
|
@ -52,6 +52,10 @@
|
||||||
#include "../../feature/bltouch.h"
|
#include "../../feature/bltouch.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if FT_MOTION_DISABLE_FOR_PROBING
|
||||||
|
#include "../../module/ft_motion.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "../../lcd/marlinui.h"
|
#include "../../lcd/marlinui.h"
|
||||||
|
|
||||||
#if ENABLED(EXTENSIBLE_UI)
|
#if ENABLED(EXTENSIBLE_UI)
|
||||||
|
@ -129,6 +133,11 @@
|
||||||
#if ENABLED(Z_SAFE_HOMING)
|
#if ENABLED(Z_SAFE_HOMING)
|
||||||
|
|
||||||
inline void home_z_safely() {
|
inline void home_z_safely() {
|
||||||
|
|
||||||
|
#if FT_MOTION_DISABLE_FOR_PROBING
|
||||||
|
FTMotionDisableInScope FT_Disabler; // Disable Fixed-Time Motion for homing
|
||||||
|
#endif
|
||||||
|
|
||||||
DEBUG_SECTION(log_G28, "home_z_safely", DEBUGGING(LEVELING));
|
DEBUG_SECTION(log_G28, "home_z_safely", DEBUGGING(LEVELING));
|
||||||
|
|
||||||
// Disallow Z homing if X or Y homing is needed
|
// Disallow Z homing if X or Y homing is needed
|
||||||
|
@ -284,6 +293,10 @@ void GcodeSuite::G28() {
|
||||||
motion_state_t saved_motion_state = begin_slow_homing();
|
motion_state_t saved_motion_state = begin_slow_homing();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if FT_MOTION_DISABLE_FOR_PROBING
|
||||||
|
FTMotionDisableInScope FT_Disabler; // Disable Fixed-Time Motion for homing
|
||||||
|
#endif
|
||||||
|
|
||||||
// Always home with tool 0 active
|
// Always home with tool 0 active
|
||||||
#if HAS_MULTI_HOTEND
|
#if HAS_MULTI_HOTEND
|
||||||
#if DISABLED(DELTA) || ENABLED(DELTA_HOME_TO_SAFE_ZONE)
|
#if DISABLED(DELTA) || ENABLED(DELTA_HOME_TO_SAFE_ZONE)
|
||||||
|
|
|
@ -34,6 +34,10 @@
|
||||||
#include "../../feature/probe_temp_comp.h"
|
#include "../../feature/probe_temp_comp.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if FT_MOTION_DISABLE_FOR_PROBING
|
||||||
|
#include "../../module/ft_motion.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ANY(DWIN_CREALITY_LCD_JYERSUI, EXTENSIBLE_UI)
|
#if ANY(DWIN_CREALITY_LCD_JYERSUI, EXTENSIBLE_UI)
|
||||||
#define VERBOSE_SINGLE_PROBE
|
#define VERBOSE_SINGLE_PROBE
|
||||||
#endif
|
#endif
|
||||||
|
@ -76,6 +80,10 @@ void GcodeSuite::G30() {
|
||||||
// Use 'C' to set Probe Temperature Compensation ON/OFF (on by default)
|
// Use 'C' to set Probe Temperature Compensation ON/OFF (on by default)
|
||||||
TERN_(HAS_PTC, ptc.set_enabled(parser.boolval('C', true)));
|
TERN_(HAS_PTC, ptc.set_enabled(parser.boolval('C', true)));
|
||||||
|
|
||||||
|
#if FT_MOTION_DISABLE_FOR_PROBING
|
||||||
|
FTMotionDisableInScope FT_Disabler; // Disable Fixed-Time Motion for probing
|
||||||
|
#endif
|
||||||
|
|
||||||
// Probe the bed, optionally raise, and return the measured height
|
// Probe the bed, optionally raise, and return the measured height
|
||||||
const float measured_z = probe.probe_at_point(probepos, raise_after);
|
const float measured_z = probe.probe_at_point(probepos, raise_after);
|
||||||
|
|
||||||
|
|
|
@ -1423,6 +1423,9 @@
|
||||||
#define FTM_WINDOW_SIZE FTM_BW_SIZE
|
#define FTM_WINDOW_SIZE FTM_BW_SIZE
|
||||||
#define FTM_BATCH_SIZE FTM_BW_SIZE
|
#define FTM_BATCH_SIZE FTM_BW_SIZE
|
||||||
#endif
|
#endif
|
||||||
|
#if ANY(BIQU_MICROPROBE_V1, BIQU_MICROPROBE_V2)
|
||||||
|
#define FT_MOTION_DISABLE_FOR_PROBING 1
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Multi-Stepping Limit
|
// Multi-Stepping Limit
|
||||||
|
|
|
@ -1452,10 +1452,6 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i
|
||||||
#error "BIQU MicroProbe requires a PROBE_ENABLE_PIN."
|
#error "BIQU MicroProbe requires a PROBE_ENABLE_PIN."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(FT_MOTION) && DISABLED(ENDSTOP_INTERRUPTS_FEATURE)
|
|
||||||
#error "BIQU Microprobe requires ENDSTOP_INTERRUPTS_FEATURE with FT_MOTION."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ENABLED(BIQU_MICROPROBE_V1)
|
#if ENABLED(BIQU_MICROPROBE_V1)
|
||||||
#if ENABLED(INVERTED_PROBE_STATE)
|
#if ENABLED(INVERTED_PROBE_STATE)
|
||||||
#if Z_MIN_PROBE_ENDSTOP_HIT_STATE != LOW
|
#if Z_MIN_PROBE_ENDSTOP_HIT_STATE != LOW
|
||||||
|
|
|
@ -213,7 +213,18 @@ class FTMotion {
|
||||||
|
|
||||||
FORCE_INLINE static int32_t num_samples_shaper_settle() { return ( shaping.x.ena || shaping.y.ena ) ? FTM_ZMAX : 0; }
|
FORCE_INLINE static int32_t num_samples_shaper_settle() { return ( shaping.x.ena || shaping.y.ena ) ? FTM_ZMAX : 0; }
|
||||||
|
|
||||||
|
|
||||||
}; // class FTMotion
|
}; // class FTMotion
|
||||||
|
|
||||||
extern FTMotion ftMotion;
|
extern FTMotion ftMotion;
|
||||||
|
|
||||||
|
typedef struct FTMotionDisableInScope {
|
||||||
|
bool isactive;
|
||||||
|
FTMotionDisableInScope() {
|
||||||
|
isactive = ftMotion.cfg.active;
|
||||||
|
ftMotion.cfg.active = false;
|
||||||
|
}
|
||||||
|
~FTMotionDisableInScope() {
|
||||||
|
ftMotion.cfg.active = isactive;
|
||||||
|
if (isactive) ftMotion.init();
|
||||||
|
}
|
||||||
|
} FTMotionDisableInScope_t;
|
||||||
|
|
|
@ -12,5 +12,7 @@ set -e
|
||||||
restore_configs
|
restore_configs
|
||||||
opt_set MOTHERBOARD BOARD_BTT_SKR_MINI_E3_V1_0 SERIAL_PORT 1 SERIAL_PORT_2 -1 \
|
opt_set MOTHERBOARD BOARD_BTT_SKR_MINI_E3_V1_0 SERIAL_PORT 1 SERIAL_PORT_2 -1 \
|
||||||
X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2209 Z_DRIVER_TYPE TMC2209 E0_DRIVER_TYPE TMC2209
|
X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2209 Z_DRIVER_TYPE TMC2209 E0_DRIVER_TYPE TMC2209
|
||||||
opt_enable CR10_STOCKDISPLAY PINS_DEBUGGING Z_IDLE_HEIGHT FT_MOTION FT_MOTION_MENU ADAPTIVE_STEP_SMOOTHING NONLINEAR_EXTRUSION
|
opt_enable CR10_STOCKDISPLAY PINS_DEBUGGING Z_IDLE_HEIGHT \
|
||||||
|
FT_MOTION FT_MOTION_MENU BIQU_MICROPROBE_V1 PROBE_ENABLE_DISABLE Z_SAFE_HOMING AUTO_BED_LEVELING_BILINEAR \
|
||||||
|
ADAPTIVE_STEP_SMOOTHING NONLINEAR_EXTRUSION
|
||||||
exec_test $1 $2 "BigTreeTech SKR Mini E3 1.0 - TMC2209 HW Serial, FT_MOTION" "$3"
|
exec_test $1 $2 "BigTreeTech SKR Mini E3 1.0 - TMC2209 HW Serial, FT_MOTION" "$3"
|
||||||
|
|
Loading…
Add table
Reference in a new issue