Patch for BLTOUCH_HEATERS_OFF

This commit is contained in:
Scott Lahteine 2017-05-01 11:09:39 -05:00
parent 1823a6ea29
commit 4f74c416a4

View file

@ -2080,7 +2080,7 @@ static void clean_up_after_endstop_or_probe_move() {
#if ENABLED(BLTOUCH_HEATERS_OFF) #if ENABLED(BLTOUCH_HEATERS_OFF)
void set_heaters_for_bltouch(const bool deploy) { void set_heaters_for_bltouch(const bool deploy) {
static int8_t heaters_were_disabled = 0; static bool heaters_were_disabled = false;
static millis_t next_emi_protection; static millis_t next_emi_protection;
static float temps_at_entry[HOTENDS]; static float temps_at_entry[HOTENDS];
@ -2111,6 +2111,7 @@ static void clean_up_after_endstop_or_probe_move() {
thermalManager.setTargetBed(bed_temp_at_entry); thermalManager.setTargetBed(bed_temp_at_entry);
#endif #endif
} }
heaters_were_disabled = deploy;
} }
#endif // BLTOUCH_HEATERS_OFF #endif // BLTOUCH_HEATERS_OFF
@ -12263,9 +12264,10 @@ void setup() {
#endif #endif
#if ENABLED(BLTOUCH) #if ENABLED(BLTOUCH)
bltouch_command(BLTOUCH_RESET); // Just in case the BLTouch is in the error state, try to // Make sure any BLTouch error condition is cleared
set_bltouch_deployed(true); // reset it. Also needs to deploy and stow to clear the bltouch_command(BLTOUCH_RESET);
set_bltouch_deployed(false); // error condition. set_bltouch_deployed(true);
set_bltouch_deployed(false);
#endif #endif
#if ENABLED(EXPERIMENTAL_I2CBUS) && I2C_SLAVE_ADDRESS > 0 #if ENABLED(EXPERIMENTAL_I2CBUS) && I2C_SLAVE_ADDRESS > 0