Merge pull request #7722 from tcm0116/2.0.x-warnings

Cleanup 2.0.x compiler warnings
This commit is contained in:
Scott Lahteine
2017-10-01 21:56:54 -05:00
committed by GitHub
22 changed files with 238 additions and 224 deletions

View File

@ -24,6 +24,10 @@
#if ENABLED(MIXING_EXTRUDER)
#if ENABLED(DIRECT_MIXING_IN_G1)
#include "../gcode/parser.h"
#endif
float mixing_factor[MIXING_STEPPERS]; // Reciprocal of mix proportion. 0.0 = off, otherwise >= 1.0.
#if MIXING_VIRTUAL_TOOLS > 1

View File

@ -52,21 +52,23 @@ static float resume_position[XYZE];
static bool sd_print_paused = false;
#endif
static void filament_change_beep(const int8_t max_beep_count, const bool init=false) {
static millis_t next_buzz = 0;
static int8_t runout_beep = 0;
#if HAS_BUZZER
static void filament_change_beep(const int8_t max_beep_count, const bool init=false) {
static millis_t next_buzz = 0;
static int8_t runout_beep = 0;
if (init) next_buzz = runout_beep = 0;
if (init) next_buzz = runout_beep = 0;
const millis_t ms = millis();
if (ELAPSED(ms, next_buzz)) {
if (max_beep_count < 0 || runout_beep < max_beep_count + 5) { // Only beep as long as we're supposed to
next_buzz = ms + ((max_beep_count < 0 || runout_beep < max_beep_count) ? 2500 : 400);
BUZZ(300, 2000);
runout_beep++;
const millis_t ms = millis();
if (ELAPSED(ms, next_buzz)) {
if (max_beep_count < 0 || runout_beep < max_beep_count + 5) { // Only beep as long as we're supposed to
next_buzz = ms + ((max_beep_count < 0 || runout_beep < max_beep_count) ? 2500 : 400);
BUZZ(300, 2000);
runout_beep++;
}
}
}
}
#endif
static void ensure_safe_temperature() {
bool heaters_heating = true;