From 4e1448e75ae2b9a9b58fb16254e79a6e6dbfda75 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 30 Apr 2017 21:49:00 -0400 Subject: [PATCH] Various fixes for compiler warnings add BLTouch-related messages in english and (rusty) french; add missing endstops.h in ultralcd.cpp; fix misc. compiler warnings; fix lsf_reset - ZERO macro can't handle a pointer as it would only memset the size of the pointer, not the size of the entire struct --- Marlin/Configuration_adv.h | 0 Marlin/G26_Mesh_Validation_Tool.cpp | 0 Marlin/Marlin_main.cpp | 2 +- Marlin/configuration_store.cpp | 0 Marlin/enum.h | 0 Marlin/language_en.h | 6 ++++++ Marlin/language_fr.h | 2 ++ Marlin/least_squares_fit.cpp | 4 +++- Marlin/pins_RAMBO.h | 0 Marlin/platformio.ini | 0 Marlin/ubl.cpp | 0 Marlin/ubl.h | 0 Marlin/ubl_G29.cpp | 0 Marlin/ubl_motion.cpp | 0 Marlin/ultralcd.cpp | 4 ++++ 15 files changed, 16 insertions(+), 2 deletions(-) mode change 100755 => 100644 Marlin/Configuration_adv.h mode change 100755 => 100644 Marlin/G26_Mesh_Validation_Tool.cpp mode change 100755 => 100644 Marlin/Marlin_main.cpp mode change 100755 => 100644 Marlin/configuration_store.cpp mode change 100755 => 100644 Marlin/enum.h mode change 100755 => 100644 Marlin/pins_RAMBO.h mode change 100755 => 100644 Marlin/platformio.ini mode change 100755 => 100644 Marlin/ubl.cpp mode change 100755 => 100644 Marlin/ubl.h mode change 100755 => 100644 Marlin/ubl_G29.cpp mode change 100755 => 100644 Marlin/ubl_motion.cpp mode change 100755 => 100644 Marlin/ultralcd.cpp diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h old mode 100755 new mode 100644 diff --git a/Marlin/G26_Mesh_Validation_Tool.cpp b/Marlin/G26_Mesh_Validation_Tool.cpp old mode 100755 new mode 100644 diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp old mode 100755 new mode 100644 index 374a41ebb..2fa5dba6d --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2079,7 +2079,7 @@ static void clean_up_after_endstop_or_probe_move() { */ #if ENABLED(BLTOUCH_HEATERS_OFF) - bool set_heaters_for_bltouch(const bool deploy) { + void set_heaters_for_bltouch(const bool deploy) { static bool heaters_were_disabled = false; static millis_t next_emi_protection; static float temps_at_entry[HOTENDS]; diff --git a/Marlin/configuration_store.cpp b/Marlin/configuration_store.cpp old mode 100755 new mode 100644 diff --git a/Marlin/enum.h b/Marlin/enum.h old mode 100755 new mode 100644 diff --git a/Marlin/language_en.h b/Marlin/language_en.h index 35a0cbb89..80f17ea53 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -417,6 +417,12 @@ #ifndef MSG_BLTOUCH_RESET #define MSG_BLTOUCH_RESET _UxGT("Reset BLTouch") #endif +#ifndef MSG_BLTOUCH_DEPLOY + #define MSG_BLTOUCH_DEPLOY _UxGT("Deploy BLTouch") +#endif +#ifndef MSG_BLTOUCH_STOW + #define MSG_BLTOUCH_STOW _UxGT("Stow BLTouch") +#endif #ifndef MSG_HOME #define MSG_HOME _UxGT("Home") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST #endif diff --git a/Marlin/language_fr.h b/Marlin/language_fr.h index e5689c8a0..f0ea9b7d0 100644 --- a/Marlin/language_fr.h +++ b/Marlin/language_fr.h @@ -161,6 +161,8 @@ #define MSG_ZPROBE_OUT _UxGT("Z sonde extè. lit") #define MSG_BLTOUCH_SELFTEST _UxGT("Autotest BLTouch") #define MSG_BLTOUCH_RESET _UxGT("RaZ BLTouch") +#define MSG_BLTOUCH_DEPLOY _UxGT("Déployer BLTouch") +#define MSG_BLTOUCH_STOW _UxGT("Ranger BLTouch") #define MSG_HOME _UxGT("Origine") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST #define MSG_FIRST _UxGT("Premier") #define MSG_ZPROBE_ZOFFSET _UxGT("Décalage Z") diff --git a/Marlin/least_squares_fit.cpp b/Marlin/least_squares_fit.cpp index e6f684e77..ce21b3a05 100644 --- a/Marlin/least_squares_fit.cpp +++ b/Marlin/least_squares_fit.cpp @@ -41,7 +41,9 @@ #include "least_squares_fit.h" -void incremental_LSF_reset(struct linear_fit_data *lsf) { ZERO(lsf); } +void incremental_LSF_reset(struct linear_fit_data *lsf) { + memset(lsf, 0, sizeof(linear_fit_data)); +} void incremental_LSF(struct linear_fit_data *lsf, float x, float y, float z) { lsf->xbar += x; diff --git a/Marlin/pins_RAMBO.h b/Marlin/pins_RAMBO.h old mode 100755 new mode 100644 diff --git a/Marlin/platformio.ini b/Marlin/platformio.ini old mode 100755 new mode 100644 diff --git a/Marlin/ubl.cpp b/Marlin/ubl.cpp old mode 100755 new mode 100644 diff --git a/Marlin/ubl.h b/Marlin/ubl.h old mode 100755 new mode 100644 diff --git a/Marlin/ubl_G29.cpp b/Marlin/ubl_G29.cpp old mode 100755 new mode 100644 diff --git a/Marlin/ubl_motion.cpp b/Marlin/ubl_motion.cpp old mode 100755 new mode 100644 diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp old mode 100755 new mode 100644 index 16952ac7d..53fe8d815 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -39,6 +39,10 @@ #include "duration_t.h" #endif +#if ENABLED(BLTOUCH) + #include "endstops.h" +#endif + int lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2]; #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)