Co-Authored-By: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
committed by
Scott Lahteine
parent
e0bed1e344
commit
9ecfa1d252
@ -1803,8 +1803,8 @@ void prepare_line_to_destination() {
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Home Fast: ", move_length, "mm");
|
||||
do_homing_move(axis, move_length, 0.0, !use_probe_bump);
|
||||
|
||||
#if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH_SLOW_MODE)
|
||||
if (axis == Z_AXIS) bltouch.stow(); // Intermediate STOW (in LOW SPEED MODE)
|
||||
#if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH)
|
||||
if (axis == Z_AXIS && !bltouch.high_speed_mode) bltouch.stow(); // Intermediate STOW (in LOW SPEED MODE)
|
||||
#endif
|
||||
|
||||
// If a second homing move is configured...
|
||||
@ -1837,8 +1837,9 @@ void prepare_line_to_destination() {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH_SLOW_MODE)
|
||||
if (axis == Z_AXIS && bltouch.deploy()) return; // Intermediate DEPLOY (in LOW SPEED MODE)
|
||||
#if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH)
|
||||
if (axis == Z_AXIS && !bltouch.high_speed_mode && bltouch.deploy())
|
||||
return; // Intermediate DEPLOY (in LOW SPEED MODE)
|
||||
#endif
|
||||
|
||||
// Slow move towards endstop until triggered
|
||||
|
@ -489,8 +489,10 @@ bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) {
|
||||
#if BOTH(HAS_TEMP_HOTEND, WAIT_FOR_HOTEND)
|
||||
thermalManager.wait_for_hotend_heating(active_extruder);
|
||||
#endif
|
||||
|
||||
if (TERN0(BLTOUCH_SLOW_MODE, bltouch.deploy())) return true; // Deploy in LOW SPEED MODE on every probe action
|
||||
#if ENABLED(BLTOUCH)
|
||||
if (!bltouch.high_speed_mode && bltouch.deploy())
|
||||
return true; // Deploy in LOW SPEED MODE on every probe action
|
||||
#endif
|
||||
|
||||
// Disable stealthChop if used. Enable diag1 pin on driver.
|
||||
#if ENABLED(SENSORLESS_PROBING)
|
||||
@ -531,8 +533,10 @@ bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) {
|
||||
set_homing_current(false);
|
||||
#endif
|
||||
|
||||
if (probe_triggered && TERN0(BLTOUCH_SLOW_MODE, bltouch.stow())) // Stow in LOW SPEED MODE on every trigger
|
||||
return true;
|
||||
#if ENABLED(BLTOUCH)
|
||||
if (probe_triggered && !bltouch.high_speed_mode && bltouch.stow())
|
||||
return true; // Stow in LOW SPEED MODE on every trigger
|
||||
#endif
|
||||
|
||||
// Clear endstop flags
|
||||
endstops.hit_on_purpose();
|
||||
@ -762,8 +766,9 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai
|
||||
DEBUG_POS("", current_position);
|
||||
}
|
||||
|
||||
#if BOTH(BLTOUCH, BLTOUCH_HS_MODE)
|
||||
if (bltouch.triggered()) bltouch._reset();
|
||||
#if ENABLED(BLTOUCH)
|
||||
if (bltouch.high_speed_mode && bltouch.triggered())
|
||||
bltouch._reset();
|
||||
#endif
|
||||
|
||||
// On delta keep Z below clip height or do_blocking_move_to will abort
|
||||
|
@ -301,7 +301,10 @@ typedef struct SettingsDataStruct {
|
||||
//
|
||||
// BLTOUCH
|
||||
//
|
||||
bool bltouch_last_written_mode;
|
||||
bool bltouch_od_5v_mode;
|
||||
#ifdef BLTOUCH_HS_MODE
|
||||
bool bltouch_high_speed_mode; // M401 S
|
||||
#endif
|
||||
|
||||
//
|
||||
// Kinematic Settings
|
||||
@ -918,9 +921,15 @@ void MarlinSettings::postprocess() {
|
||||
// BLTOUCH
|
||||
//
|
||||
{
|
||||
_FIELD_TEST(bltouch_last_written_mode);
|
||||
const bool bltouch_last_written_mode = TERN(BLTOUCH, bltouch.last_written_mode, false);
|
||||
EEPROM_WRITE(bltouch_last_written_mode);
|
||||
_FIELD_TEST(bltouch_od_5v_mode);
|
||||
const bool bltouch_od_5v_mode = TERN0(BLTOUCH, bltouch.od_5v_mode);
|
||||
EEPROM_WRITE(bltouch_od_5v_mode);
|
||||
|
||||
#ifdef BLTOUCH_HS_MODE
|
||||
_FIELD_TEST(bltouch_high_speed_mode);
|
||||
const bool bltouch_high_speed_mode = TERN0(BLTOUCH, bltouch.high_speed_mode);
|
||||
EEPROM_WRITE(bltouch_high_speed_mode);
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
@ -1810,13 +1819,23 @@ void MarlinSettings::postprocess() {
|
||||
// BLTOUCH
|
||||
//
|
||||
{
|
||||
_FIELD_TEST(bltouch_last_written_mode);
|
||||
_FIELD_TEST(bltouch_od_5v_mode);
|
||||
#if ENABLED(BLTOUCH)
|
||||
const bool &bltouch_last_written_mode = bltouch.last_written_mode;
|
||||
const bool &bltouch_od_5v_mode = bltouch.od_5v_mode;
|
||||
#else
|
||||
bool bltouch_last_written_mode;
|
||||
bool bltouch_od_5v_mode;
|
||||
#endif
|
||||
EEPROM_READ(bltouch_od_5v_mode);
|
||||
|
||||
#ifdef BLTOUCH_HS_MODE
|
||||
_FIELD_TEST(bltouch_high_speed_mode);
|
||||
#if ENABLED(BLTOUCH)
|
||||
const bool &bltouch_high_speed_mode = bltouch.high_speed_mode;
|
||||
#else
|
||||
bool bltouch_high_speed_mode;
|
||||
#endif
|
||||
EEPROM_READ(bltouch_high_speed_mode);
|
||||
#endif
|
||||
EEPROM_READ(bltouch_last_written_mode);
|
||||
}
|
||||
|
||||
//
|
||||
@ -2827,11 +2846,11 @@ void MarlinSettings::reset() {
|
||||
TERN_(HAS_PTC, ptc.reset());
|
||||
|
||||
//
|
||||
// BLTOUCH
|
||||
// BLTouch
|
||||
//
|
||||
//#if ENABLED(BLTOUCH)
|
||||
// bltouch.last_written_mode;
|
||||
//#endif
|
||||
#ifdef BLTOUCH_HS_MODE
|
||||
bltouch.high_speed_mode = ENABLED(BLTOUCH_HS_MODE);
|
||||
#endif
|
||||
|
||||
//
|
||||
// Kinematic settings
|
||||
|
Reference in New Issue
Block a user