Browse Source

Merge pull request #6549 from thinkyhead/rc_bltouch_refix

Fix BLTOUCH_HEATERS_OFF bug
Scott Lahteine 7 years ago
parent
commit
fc857c5b78
1 changed files with 3 additions and 5 deletions
  1. 3
    5
      Marlin/Marlin_main.cpp

+ 3
- 5
Marlin/Marlin_main.cpp View File

2079
 
2079
 
2080
       void set_heaters_for_bltouch(const bool deploy) {
2080
       void set_heaters_for_bltouch(const bool deploy) {
2081
         static bool heaters_were_disabled = false;
2081
         static bool heaters_were_disabled = false;
2082
-        static millis_t next_emi_protection;
2082
+        static millis_t next_emi_protection = 0;
2083
         static float temps_at_entry[HOTENDS];
2083
         static float temps_at_entry[HOTENDS];
2084
 
2084
 
2085
         #if HAS_TEMP_BED
2085
         #if HAS_TEMP_BED
2131
       #if ENABLED(BLTOUCH_HEATERS_OFF)
2131
       #if ENABLED(BLTOUCH_HEATERS_OFF)
2132
         set_heaters_for_bltouch(deploy);
2132
         set_heaters_for_bltouch(deploy);
2133
       #endif
2133
       #endif
2134
+
2134
       bltouch_command(deploy ? BLTOUCH_DEPLOY : BLTOUCH_STOW);
2135
       bltouch_command(deploy ? BLTOUCH_DEPLOY : BLTOUCH_STOW);
2136
+
2135
       #if ENABLED(DEBUG_LEVELING_FEATURE)
2137
       #if ENABLED(DEBUG_LEVELING_FEATURE)
2136
         if (DEBUGGING(LEVELING)) {
2138
         if (DEBUGGING(LEVELING)) {
2137
           SERIAL_ECHOPAIR("set_bltouch_deployed(", deploy);
2139
           SERIAL_ECHOPAIR("set_bltouch_deployed(", deploy);
2155
 
2157
 
2156
     if (endstops.z_probe_enabled == deploy) return false;
2158
     if (endstops.z_probe_enabled == deploy) return false;
2157
 
2159
 
2158
-    #if ENABLED(BLTOUCH) && ENABLED(BLTOUCH_HEATERS_OFF)
2159
-      set_heaters_for_bltouch(deploy);
2160
-    #endif
2161
-
2162
     // Make room for probe
2160
     // Make room for probe
2163
     do_probe_raise(_Z_CLEARANCE_DEPLOY_PROBE);
2161
     do_probe_raise(_Z_CLEARANCE_DEPLOY_PROBE);
2164
 
2162
 

Loading…
Cancel
Save