Browse Source

Merge pull request #6519 from thinkyhead/rc_cleanups_2

Various fixes for compiler warnings
Scott Lahteine 7 years ago
parent
commit
984c210dec

+ 0
- 0
Marlin/Configuration_adv.h View File


+ 0
- 0
Marlin/G26_Mesh_Validation_Tool.cpp View File


+ 8
- 7
Marlin/Marlin_main.cpp View File

@@ -2079,8 +2079,8 @@ static void clean_up_after_endstop_or_probe_move() {
2079 2079
      */
2080 2080
     #if ENABLED(BLTOUCH_HEATERS_OFF)
2081 2081
 
2082
-      bool set_heaters_for_bltouch(const bool deploy) {
2083
-        static bool heaters_were_disabled = false;
2082
+      void set_heaters_for_bltouch(const bool deploy) {
2083
+        static int8_t heaters_were_disabled = 0;
2084 2084
         static millis_t next_emi_protection;
2085 2085
         static float temps_at_entry[HOTENDS];
2086 2086
 
@@ -2105,6 +2105,7 @@ static void clean_up_after_endstop_or_probe_move() {
2105 2105
           #endif
2106 2106
         }
2107 2107
         else {
2108
+          next_emi_protection = 0;
2108 2109
           HOTEND_LOOP() thermalManager.setTargetHotend(temps_at_entry[e], e);
2109 2110
           #if HAS_TEMP_BED
2110 2111
             thermalManager.setTargetBed(bed_temp_at_entry);
@@ -2115,9 +2116,6 @@ static void clean_up_after_endstop_or_probe_move() {
2115 2116
     #endif // BLTOUCH_HEATERS_OFF
2116 2117
 
2117 2118
     void set_bltouch_deployed(const bool deploy) {
2118
-      #if ENABLED(BLTOUCH_HEATERS_OFF)
2119
-        set_heaters_for_bltouch(deploy);
2120
-      #endif
2121 2119
       if (deploy && TEST_BLTOUCH()) {      // If BL-Touch says it's triggered
2122 2120
         bltouch_command(BLTOUCH_RESET);    //  try to reset it.
2123 2121
         bltouch_command(BLTOUCH_DEPLOY);   // Also needs to deploy and stow to
@@ -2131,6 +2129,9 @@ static void clean_up_after_endstop_or_probe_move() {
2131 2129
           stop();                          // punt!
2132 2130
         }
2133 2131
       }
2132
+      #if ENABLED(BLTOUCH_HEATERS_OFF)
2133
+        set_heaters_for_bltouch(deploy);
2134
+      #endif
2134 2135
       bltouch_command(deploy ? BLTOUCH_DEPLOY : BLTOUCH_STOW);
2135 2136
       #if ENABLED(DEBUG_LEVELING_FEATURE)
2136 2137
         if (DEBUGGING(LEVELING)) {
@@ -2153,12 +2154,12 @@ static void clean_up_after_endstop_or_probe_move() {
2153 2154
       }
2154 2155
     #endif
2155 2156
 
2157
+    if (endstops.z_probe_enabled == deploy) return false;
2158
+
2156 2159
     #if ENABLED(BLTOUCH) && ENABLED(BLTOUCH_HEATERS_OFF)
2157 2160
       set_heaters_for_bltouch(deploy);
2158 2161
     #endif
2159 2162
 
2160
-    if (endstops.z_probe_enabled == deploy) return false;
2161
-
2162 2163
     // Make room for probe
2163 2164
     do_probe_raise(_Z_CLEARANCE_DEPLOY_PROBE);
2164 2165
 

+ 0
- 0
Marlin/configuration_store.cpp View File


+ 0
- 0
Marlin/enum.h View File


+ 6
- 0
Marlin/language_en.h View File

@@ -417,6 +417,12 @@
417 417
 #ifndef MSG_BLTOUCH_RESET
418 418
   #define MSG_BLTOUCH_RESET                   _UxGT("Reset BLTouch")
419 419
 #endif
420
+#ifndef MSG_BLTOUCH_DEPLOY
421
+  #define MSG_BLTOUCH_DEPLOY                  _UxGT("Deploy BLTouch")
422
+#endif
423
+#ifndef MSG_BLTOUCH_STOW
424
+  #define MSG_BLTOUCH_STOW                    _UxGT("Stow BLTouch")
425
+#endif
420 426
 #ifndef MSG_HOME
421 427
   #define MSG_HOME                            _UxGT("Home") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST
422 428
 #endif

+ 2
- 0
Marlin/language_fr.h View File

@@ -161,6 +161,8 @@
161 161
 #define MSG_ZPROBE_OUT                      _UxGT("Z sonde extè. lit")
162 162
 #define MSG_BLTOUCH_SELFTEST                _UxGT("Autotest BLTouch")
163 163
 #define MSG_BLTOUCH_RESET                   _UxGT("RaZ BLTouch")
164
+#define MSG_BLTOUCH_DEPLOY                  _UxGT("Déployer BLTouch")
165
+#define MSG_BLTOUCH_STOW                    _UxGT("Ranger BLTouch")
164 166
 #define MSG_HOME                            _UxGT("Origine")  // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST
165 167
 #define MSG_FIRST                           _UxGT("Premier")
166 168
 #define MSG_ZPROBE_ZOFFSET                  _UxGT("Décalage Z")

+ 3
- 1
Marlin/least_squares_fit.cpp View File

@@ -41,7 +41,9 @@
41 41
 
42 42
 #include "least_squares_fit.h"
43 43
 
44
-void incremental_LSF_reset(struct linear_fit_data *lsf) { ZERO(lsf); }
44
+void incremental_LSF_reset(struct linear_fit_data *lsf) {
45
+  memset(lsf, 0, sizeof(linear_fit_data));
46
+}
45 47
 
46 48
 void incremental_LSF(struct linear_fit_data *lsf, float x, float y, float z) {
47 49
   lsf->xbar += x;

+ 0
- 0
Marlin/pins_RAMBO.h View File


+ 0
- 0
Marlin/platformio.ini View File


+ 0
- 0
Marlin/ubl.cpp View File


+ 0
- 0
Marlin/ubl.h View File


+ 0
- 0
Marlin/ubl_G29.cpp View File


+ 0
- 0
Marlin/ubl_motion.cpp View File


+ 4
- 0
Marlin/ultralcd.cpp View File

@@ -39,6 +39,10 @@
39 39
   #include "duration_t.h"
40 40
 #endif
41 41
 
42
+#if ENABLED(BLTOUCH)
43
+  #include "endstops.h"
44
+#endif
45
+
42 46
 int lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2];
43 47
 
44 48
 #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)

Loading…
Cancel
Save