Merge pull request #6519 from thinkyhead/rc_cleanups_2

Various fixes for compiler warnings
master
Scott Lahteine 8 years ago committed by GitHub
commit 984c210dec

@ -2079,8 +2079,8 @@ static void clean_up_after_endstop_or_probe_move() {
*/ */
#if ENABLED(BLTOUCH_HEATERS_OFF) #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 int8_t heaters_were_disabled = 0;
static millis_t next_emi_protection; static millis_t next_emi_protection;
static float temps_at_entry[HOTENDS]; static float temps_at_entry[HOTENDS];
@ -2105,6 +2105,7 @@ static void clean_up_after_endstop_or_probe_move() {
#endif #endif
} }
else { else {
next_emi_protection = 0;
HOTEND_LOOP() thermalManager.setTargetHotend(temps_at_entry[e], e); HOTEND_LOOP() thermalManager.setTargetHotend(temps_at_entry[e], e);
#if HAS_TEMP_BED #if HAS_TEMP_BED
thermalManager.setTargetBed(bed_temp_at_entry); thermalManager.setTargetBed(bed_temp_at_entry);
@ -2115,9 +2116,6 @@ static void clean_up_after_endstop_or_probe_move() {
#endif // BLTOUCH_HEATERS_OFF #endif // BLTOUCH_HEATERS_OFF
void set_bltouch_deployed(const bool deploy) { void set_bltouch_deployed(const bool deploy) {
#if ENABLED(BLTOUCH_HEATERS_OFF)
set_heaters_for_bltouch(deploy);
#endif
if (deploy && TEST_BLTOUCH()) { // If BL-Touch says it's triggered if (deploy && TEST_BLTOUCH()) { // If BL-Touch says it's triggered
bltouch_command(BLTOUCH_RESET); // try to reset it. bltouch_command(BLTOUCH_RESET); // try to reset it.
bltouch_command(BLTOUCH_DEPLOY); // Also needs to deploy and stow to bltouch_command(BLTOUCH_DEPLOY); // Also needs to deploy and stow to
@ -2131,6 +2129,9 @@ static void clean_up_after_endstop_or_probe_move() {
stop(); // punt! stop(); // punt!
} }
} }
#if ENABLED(BLTOUCH_HEATERS_OFF)
set_heaters_for_bltouch(deploy);
#endif
bltouch_command(deploy ? BLTOUCH_DEPLOY : BLTOUCH_STOW); bltouch_command(deploy ? BLTOUCH_DEPLOY : BLTOUCH_STOW);
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) { if (DEBUGGING(LEVELING)) {
@ -2153,12 +2154,12 @@ static void clean_up_after_endstop_or_probe_move() {
} }
#endif #endif
if (endstops.z_probe_enabled == deploy) return false;
#if ENABLED(BLTOUCH) && ENABLED(BLTOUCH_HEATERS_OFF) #if ENABLED(BLTOUCH) && ENABLED(BLTOUCH_HEATERS_OFF)
set_heaters_for_bltouch(deploy); set_heaters_for_bltouch(deploy);
#endif #endif
if (endstops.z_probe_enabled == deploy) return false;
// Make room for probe // Make room for probe
do_probe_raise(_Z_CLEARANCE_DEPLOY_PROBE); do_probe_raise(_Z_CLEARANCE_DEPLOY_PROBE);

@ -417,6 +417,12 @@
#ifndef MSG_BLTOUCH_RESET #ifndef MSG_BLTOUCH_RESET
#define MSG_BLTOUCH_RESET _UxGT("Reset BLTouch") #define MSG_BLTOUCH_RESET _UxGT("Reset BLTouch")
#endif #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 #ifndef MSG_HOME
#define MSG_HOME _UxGT("Home") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST #define MSG_HOME _UxGT("Home") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST
#endif #endif

@ -161,6 +161,8 @@
#define MSG_ZPROBE_OUT _UxGT("Z sonde extè. lit") #define MSG_ZPROBE_OUT _UxGT("Z sonde extè. lit")
#define MSG_BLTOUCH_SELFTEST _UxGT("Autotest BLTouch") #define MSG_BLTOUCH_SELFTEST _UxGT("Autotest BLTouch")
#define MSG_BLTOUCH_RESET _UxGT("RaZ 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_HOME _UxGT("Origine") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST
#define MSG_FIRST _UxGT("Premier") #define MSG_FIRST _UxGT("Premier")
#define MSG_ZPROBE_ZOFFSET _UxGT("Décalage Z") #define MSG_ZPROBE_ZOFFSET _UxGT("Décalage Z")

@ -41,7 +41,9 @@
#include "least_squares_fit.h" #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) { void incremental_LSF(struct linear_fit_data *lsf, float x, float y, float z) {
lsf->xbar += x; lsf->xbar += x;

@ -39,6 +39,10 @@
#include "duration_t.h" #include "duration_t.h"
#endif #endif
#if ENABLED(BLTOUCH)
#include "endstops.h"
#endif
int lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2]; int lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2];
#if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT) #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)

Loading…
Cancel
Save