Skip to content

Commit 8bd63aa

Browse files
authored
Merge pull request #6527 from thinkyhead/rc_cleanups_2
Patch DELTA_HEIGHT, BLTOUCH init
2 parents 984c210 + 4f74c41 commit 8bd63aa

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

Marlin/Conditionals_post.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@
119119
#define Z_HOME_POS (Z_HOME_DIR < 0 ? Z_MIN_POS : Z_MAX_POS)
120120
#endif
121121

122+
/**
123+
* If DELTA_HEIGHT isn't defined use the old setting
124+
*/
125+
#if ENABLED(DELTA) && !defined(DELTA_HEIGHT)
126+
#define DELTA_HEIGHT Z_HOME_POS
127+
#endif
128+
122129
/**
123130
* Auto Bed Leveling and Z Probe Repeatability Test
124131
*/

Marlin/Marlin_main.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2080,7 +2080,7 @@ static void clean_up_after_endstop_or_probe_move() {
20802080
#if ENABLED(BLTOUCH_HEATERS_OFF)
20812081

20822082
void set_heaters_for_bltouch(const bool deploy) {
2083-
static int8_t heaters_were_disabled = 0;
2083+
static bool heaters_were_disabled = false;
20842084
static millis_t next_emi_protection;
20852085
static float temps_at_entry[HOTENDS];
20862086

@@ -2111,6 +2111,7 @@ static void clean_up_after_endstop_or_probe_move() {
21112111
thermalManager.setTargetBed(bed_temp_at_entry);
21122112
#endif
21132113
}
2114+
heaters_were_disabled = deploy;
21142115
}
21152116

21162117
#endif // BLTOUCH_HEATERS_OFF
@@ -12263,9 +12264,10 @@ void setup() {
1226312264
#endif
1226412265

1226512266
#if ENABLED(BLTOUCH)
12266-
bltouch_command(BLTOUCH_RESET); // Just in case the BLTouch is in the error state, try to
12267-
set_bltouch_deployed(true); // reset it. Also needs to deploy and stow to clear the
12268-
set_bltouch_deployed(false); // error condition.
12267+
// Make sure any BLTouch error condition is cleared
12268+
bltouch_command(BLTOUCH_RESET);
12269+
set_bltouch_deployed(true);
12270+
set_bltouch_deployed(false);
1226912271
#endif
1227012272

1227112273
#if ENABLED(EXPERIMENTAL_I2CBUS) && I2C_SLAVE_ADDRESS > 0

0 commit comments

Comments
 (0)