Browse Source

Merge pull request #6519 from thinkyhead/rc_cleanups_2

Various fixes for compiler warnings
Scott Lahteine 8 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
      */
2079
      */
2080
     #if ENABLED(BLTOUCH_HEATERS_OFF)
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
         static millis_t next_emi_protection;
2084
         static millis_t next_emi_protection;
2085
         static float temps_at_entry[HOTENDS];
2085
         static float temps_at_entry[HOTENDS];
2086
 
2086
 
2105
           #endif
2105
           #endif
2106
         }
2106
         }
2107
         else {
2107
         else {
2108
+          next_emi_protection = 0;
2108
           HOTEND_LOOP() thermalManager.setTargetHotend(temps_at_entry[e], e);
2109
           HOTEND_LOOP() thermalManager.setTargetHotend(temps_at_entry[e], e);
2109
           #if HAS_TEMP_BED
2110
           #if HAS_TEMP_BED
2110
             thermalManager.setTargetBed(bed_temp_at_entry);
2111
             thermalManager.setTargetBed(bed_temp_at_entry);
2115
     #endif // BLTOUCH_HEATERS_OFF
2116
     #endif // BLTOUCH_HEATERS_OFF
2116
 
2117
 
2117
     void set_bltouch_deployed(const bool deploy) {
2118
     void set_bltouch_deployed(const bool deploy) {
2118
-      #if ENABLED(BLTOUCH_HEATERS_OFF)
2119
-        set_heaters_for_bltouch(deploy);
2120
-      #endif
2121
       if (deploy && TEST_BLTOUCH()) {      // If BL-Touch says it's triggered
2119
       if (deploy && TEST_BLTOUCH()) {      // If BL-Touch says it's triggered
2122
         bltouch_command(BLTOUCH_RESET);    //  try to reset it.
2120
         bltouch_command(BLTOUCH_RESET);    //  try to reset it.
2123
         bltouch_command(BLTOUCH_DEPLOY);   // Also needs to deploy and stow to
2121
         bltouch_command(BLTOUCH_DEPLOY);   // Also needs to deploy and stow to
2131
           stop();                          // punt!
2129
           stop();                          // punt!
2132
         }
2130
         }
2133
       }
2131
       }
2132
+      #if ENABLED(BLTOUCH_HEATERS_OFF)
2133
+        set_heaters_for_bltouch(deploy);
2134
+      #endif
2134
       bltouch_command(deploy ? BLTOUCH_DEPLOY : BLTOUCH_STOW);
2135
       bltouch_command(deploy ? BLTOUCH_DEPLOY : BLTOUCH_STOW);
2135
       #if ENABLED(DEBUG_LEVELING_FEATURE)
2136
       #if ENABLED(DEBUG_LEVELING_FEATURE)
2136
         if (DEBUGGING(LEVELING)) {
2137
         if (DEBUGGING(LEVELING)) {
2153
       }
2154
       }
2154
     #endif
2155
     #endif
2155
 
2156
 
2157
+    if (endstops.z_probe_enabled == deploy) return false;
2158
+
2156
     #if ENABLED(BLTOUCH) && ENABLED(BLTOUCH_HEATERS_OFF)
2159
     #if ENABLED(BLTOUCH) && ENABLED(BLTOUCH_HEATERS_OFF)
2157
       set_heaters_for_bltouch(deploy);
2160
       set_heaters_for_bltouch(deploy);
2158
     #endif
2161
     #endif
2159
 
2162
 
2160
-    if (endstops.z_probe_enabled == deploy) return false;
2161
-
2162
     // Make room for probe
2163
     // Make room for probe
2163
     do_probe_raise(_Z_CLEARANCE_DEPLOY_PROBE);
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
 #ifndef MSG_BLTOUCH_RESET
417
 #ifndef MSG_BLTOUCH_RESET
418
   #define MSG_BLTOUCH_RESET                   _UxGT("Reset BLTouch")
418
   #define MSG_BLTOUCH_RESET                   _UxGT("Reset BLTouch")
419
 #endif
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
 #ifndef MSG_HOME
426
 #ifndef MSG_HOME
421
   #define MSG_HOME                            _UxGT("Home") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST
427
   #define MSG_HOME                            _UxGT("Home") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST
422
 #endif
428
 #endif

+ 2
- 0
Marlin/language_fr.h View File

161
 #define MSG_ZPROBE_OUT                      _UxGT("Z sonde extè. lit")
161
 #define MSG_ZPROBE_OUT                      _UxGT("Z sonde extè. lit")
162
 #define MSG_BLTOUCH_SELFTEST                _UxGT("Autotest BLTouch")
162
 #define MSG_BLTOUCH_SELFTEST                _UxGT("Autotest BLTouch")
163
 #define MSG_BLTOUCH_RESET                   _UxGT("RaZ BLTouch")
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
 #define MSG_HOME                            _UxGT("Origine")  // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST
166
 #define MSG_HOME                            _UxGT("Origine")  // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST
165
 #define MSG_FIRST                           _UxGT("Premier")
167
 #define MSG_FIRST                           _UxGT("Premier")
166
 #define MSG_ZPROBE_ZOFFSET                  _UxGT("Décalage Z")
168
 #define MSG_ZPROBE_ZOFFSET                  _UxGT("Décalage Z")

+ 3
- 1
Marlin/least_squares_fit.cpp View File

41
 
41
 
42
 #include "least_squares_fit.h"
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
 void incremental_LSF(struct linear_fit_data *lsf, float x, float y, float z) {
48
 void incremental_LSF(struct linear_fit_data *lsf, float x, float y, float z) {
47
   lsf->xbar += x;
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
   #include "duration_t.h"
39
   #include "duration_t.h"
40
 #endif
40
 #endif
41
 
41
 
42
+#if ENABLED(BLTOUCH)
43
+  #include "endstops.h"
44
+#endif
45
+
42
 int lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2];
46
 int lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2];
43
 
47
 
44
 #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
48
 #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)

Loading…
Cancel
Save