Sfoglia il codice sorgente

Merge pull request #6527 from thinkyhead/rc_cleanups_2

Patch DELTA_HEIGHT, BLTOUCH init
Scott Lahteine 7 anni fa
parent
commit
8bd63aafb9
2 ha cambiato i file con 13 aggiunte e 4 eliminazioni
  1. 7
    0
      Marlin/Conditionals_post.h
  2. 6
    4
      Marlin/Marlin_main.cpp

+ 7
- 0
Marlin/Conditionals_post.h Vedi File

@@ -120,6 +120,13 @@
120 120
   #endif
121 121
 
122 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
+
129
+  /**
123 130
    * Auto Bed Leveling and Z Probe Repeatability Test
124 131
    */
125 132
   #define HOMING_Z_WITH_PROBE (HAS_BED_PROBE && Z_HOME_DIR < 0 && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN))

+ 6
- 4
Marlin/Marlin_main.cpp Vedi File

@@ -2080,7 +2080,7 @@ static void clean_up_after_endstop_or_probe_move() {
2080 2080
     #if ENABLED(BLTOUCH_HEATERS_OFF)
2081 2081
 
2082 2082
       void set_heaters_for_bltouch(const bool deploy) {
2083
-        static int8_t heaters_were_disabled = 0;
2083
+        static bool heaters_were_disabled = false;
2084 2084
         static millis_t next_emi_protection;
2085 2085
         static float temps_at_entry[HOTENDS];
2086 2086
 
@@ -2111,6 +2111,7 @@ static void clean_up_after_endstop_or_probe_move() {
2111 2111
             thermalManager.setTargetBed(bed_temp_at_entry);
2112 2112
           #endif
2113 2113
         }
2114
+        heaters_were_disabled = deploy;
2114 2115
       }
2115 2116
 
2116 2117
     #endif // BLTOUCH_HEATERS_OFF
@@ -12263,9 +12264,10 @@ void setup() {
12263 12264
   #endif
12264 12265
 
12265 12266
   #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);
12269 12271
   #endif
12270 12272
 
12271 12273
   #if ENABLED(EXPERIMENTAL_I2CBUS) && I2C_SLAVE_ADDRESS > 0

Loading…
Annulla
Salva