Fix some warnings, Melzi pins

This commit is contained in:
Jason Smith
2020-01-14 23:55:26 -08:00
committed by Scott Lahteine
parent b310047ded
commit c305c2cc6b
9 changed files with 134 additions and 58 deletions

View File

@ -1395,7 +1395,7 @@ void Planner::check_axes_activity() {
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
const float fade_scaling_factor = fade_scaling_factor_for_z(raw.z);
#else
#elif DISABLED(MESH_BED_LEVELING)
constexpr float fade_scaling_factor = 1.0;
#endif
@ -1432,7 +1432,7 @@ void Planner::check_axes_activity() {
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
const float fade_scaling_factor = fade_scaling_factor_for_z(raw.z);
#else
#elif DISABLED(MESH_BED_LEVELING)
constexpr float fade_scaling_factor = 1.0;
#endif

View File

@ -2912,6 +2912,7 @@ void Temperature::tick() {
) {
#if TEMP_RESIDENCY_TIME > 0
millis_t residency_start_ms = 0;
bool first_loop = true;
// Loop until the temperature has stabilized
#define TEMP_CONDITIONS (!residency_start_ms || PENDING(now, residency_start_ms + (TEMP_RESIDENCY_TIME) * 1000UL))
#else
@ -2929,7 +2930,7 @@ void Temperature::tick() {
#endif
float target_temp = -1.0, old_temp = 9999.0;
bool wants_to_cool = false, first_loop = true;
bool wants_to_cool = false;
wait_for_heatup = true;
millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;
do {
@ -2982,6 +2983,8 @@ void Temperature::tick() {
residency_start_ms = now;
}
first_loop = false;
#endif
// Prevent a wait-forever situation if R is misused i.e. M109 R0
@ -3002,8 +3005,6 @@ void Temperature::tick() {
}
#endif
first_loop = false;
} while (wait_for_heatup && TEMP_CONDITIONS);
if (wait_for_heatup) {
@ -3151,6 +3152,7 @@ void Temperature::tick() {
bool Temperature::wait_for_chamber(const bool no_wait_for_cooling/*=true*/) {
#if TEMP_CHAMBER_RESIDENCY_TIME > 0
millis_t residency_start_ms = 0;
bool first_loop = true;
// Loop until the temperature has stabilized
#define TEMP_CHAMBER_CONDITIONS (!residency_start_ms || PENDING(now, residency_start_ms + (TEMP_CHAMBER_RESIDENCY_TIME) * 1000UL))
#else
@ -3159,7 +3161,7 @@ void Temperature::tick() {
#endif
float target_temp = -1, old_temp = 9999;
bool wants_to_cool = false, first_loop = true;
bool wants_to_cool = false;
wait_for_heatup = true;
millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;
@ -3212,6 +3214,7 @@ void Temperature::tick() {
residency_start_ms = now;
}
first_loop = false;
#endif // TEMP_CHAMBER_RESIDENCY_TIME > 0
// Prevent a wait-forever situation if R is misused i.e. M191 R0
@ -3224,9 +3227,6 @@ void Temperature::tick() {
old_temp = temp;
}
}
first_loop = false;
} while (wait_for_heatup && TEMP_CHAMBER_CONDITIONS);
if (wait_for_heatup) ui.reset_status();