Cleanups following recent commits
This commit is contained in:
parent
dca48f0e63
commit
71396f77d3
@ -649,7 +649,7 @@
|
|||||||
/**
|
/**
|
||||||
* Heater & Fan Pausing
|
* Heater & Fan Pausing
|
||||||
*/
|
*/
|
||||||
#if ENABLED(PROBING_FANS_OFF) && FAN_COUNT == 0
|
#if FAN_COUNT == 0
|
||||||
#undef PROBING_FANS_OFF
|
#undef PROBING_FANS_OFF
|
||||||
#endif
|
#endif
|
||||||
#define QUIET_PROBING (ENABLED(PROBING_HEATERS_OFF) || ENABLED(PROBING_FANS_OFF))
|
#define QUIET_PROBING (ENABLED(PROBING_HEATERS_OFF) || ENABLED(PROBING_FANS_OFF))
|
||||||
|
@ -2057,26 +2057,21 @@ static void clean_up_after_endstop_or_probe_move() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(PROBING_FANS_OFF)
|
#if ENABLED(PROBING_FANS_OFF)
|
||||||
void fans_pause(bool p) {
|
|
||||||
if (p == fans_paused) { // If called out of order something is wrong
|
void fans_pause(const bool p) {
|
||||||
SERIAL_ERROR_START;
|
if (p != fans_paused) {
|
||||||
SERIAL_ERRORPGM("Fans already ");
|
fans_paused = p;
|
||||||
if (!fans_paused) SERIAL_ERRORPGM("un");
|
if (p)
|
||||||
SERIAL_ERRORLNPGM("paused!");
|
for (uint8_t x = 0; x < FAN_COUNT; x++) {
|
||||||
return;
|
paused_fanSpeeds[x] = fanSpeeds[x];
|
||||||
|
fanSpeeds[x] = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
for (uint8_t x = 0; x < FAN_COUNT; x++)
|
||||||
|
fanSpeeds[x] = paused_fanSpeeds[x];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p)
|
|
||||||
for (uint8_t x = 0;x < FAN_COUNT;x++) {
|
|
||||||
paused_fanSpeeds[x] = fanSpeeds[x];
|
|
||||||
fanSpeeds[x] = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
for (uint8_t x = 0;x < FAN_COUNT;x++)
|
|
||||||
fanSpeeds[x] = paused_fanSpeeds[x];
|
|
||||||
|
|
||||||
fans_paused = p;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // PROBING_FANS_OFF
|
#endif // PROBING_FANS_OFF
|
||||||
|
|
||||||
#if HAS_BED_PROBE
|
#if HAS_BED_PROBE
|
||||||
@ -2091,18 +2086,16 @@ static void clean_up_after_endstop_or_probe_move() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if QUIET_PROBING
|
#if QUIET_PROBING
|
||||||
void probing_pause(bool pause) {
|
void probing_pause(const bool p) {
|
||||||
#if ENABLED(PROBING_HEATERS_OFF)
|
#if ENABLED(PROBING_HEATERS_OFF)
|
||||||
thermalManager.pause(pause);
|
thermalManager.pause(p);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(PROBING_FANS_OFF)
|
#if ENABLED(PROBING_FANS_OFF)
|
||||||
fans_pause(pause);
|
fans_pause(p);
|
||||||
#endif
|
#endif
|
||||||
|
if (p) safe_delay(25);
|
||||||
if(pause) safe_delay(25);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif // QUIET_PROBING
|
||||||
|
|
||||||
#if ENABLED(BLTOUCH)
|
#if ENABLED(BLTOUCH)
|
||||||
|
|
||||||
|
@ -1353,38 +1353,29 @@ void Temperature::disable_all_heaters() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(PROBING_HEATERS_OFF)
|
#if ENABLED(PROBING_HEATERS_OFF)
|
||||||
void Temperature::pause(bool p) {
|
|
||||||
if (p == paused) { // If called out of order something is wrong
|
|
||||||
SERIAL_ERROR_START;
|
|
||||||
SERIAL_ERRORPGM("Heaters already ");
|
|
||||||
if (!paused) SERIAL_ERRORPGM("un");
|
|
||||||
SERIAL_ERRORLNPGM("paused!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (p) {
|
void Temperature::pause(const bool p) {
|
||||||
HOTEND_LOOP() {
|
if (p != paused) {
|
||||||
paused_hotend_temp[e] = degTargetHotend(e);
|
paused = p;
|
||||||
setTargetHotend(0, e);
|
if (p) {
|
||||||
|
HOTEND_LOOP() {
|
||||||
|
paused_hotend_temp[e] = degTargetHotend(e);
|
||||||
|
setTargetHotend(0, e);
|
||||||
|
}
|
||||||
|
#if HAS_TEMP_BED
|
||||||
|
paused_bed_temp = degTargetBed();
|
||||||
|
setTargetBed(0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
HOTEND_LOOP() setTargetHotend(paused_hotend_temp[e], e);
|
||||||
|
#if HAS_TEMP_BED
|
||||||
|
setTargetBed(paused_bed_temp);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#if HAS_TEMP_BED
|
|
||||||
paused_bed_temp = degTargetBed();
|
|
||||||
setTargetBed(0);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
HOTEND_LOOP() setTargetHotend(paused_hotend_temp[e], e);
|
|
||||||
#if HAS_TEMP_BED
|
|
||||||
setTargetBed(paused_bed_temp);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
paused = p;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Temperature::ispaused() {
|
|
||||||
return paused;
|
|
||||||
}
|
|
||||||
#endif // PROBING_HEATERS_OFF
|
#endif // PROBING_HEATERS_OFF
|
||||||
|
|
||||||
#if ENABLED(HEATER_0_USES_MAX6675)
|
#if ENABLED(HEATER_0_USES_MAX6675)
|
||||||
|
@ -458,8 +458,7 @@ class Temperature {
|
|||||||
#endif // BABYSTEPPING
|
#endif // BABYSTEPPING
|
||||||
|
|
||||||
#if ENABLED(PROBING_HEATERS_OFF)
|
#if ENABLED(PROBING_HEATERS_OFF)
|
||||||
static void pause(bool p);
|
static void pause(const bool p);
|
||||||
static bool ispaused();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -1006,7 +1006,7 @@
|
|||||||
if (!ubl.state.active) SERIAL_PROTOCOLPGM("de");
|
if (!ubl.state.active) SERIAL_PROTOCOLPGM("de");
|
||||||
SERIAL_PROTOCOLLNPGM("activated.\n");
|
SERIAL_PROTOCOLLNPGM("activated.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool g29_parameter_parsing() {
|
bool g29_parameter_parsing() {
|
||||||
bool err_flag = false;
|
bool err_flag = false;
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@
|
|||||||
const float e_normalized_dist = e_position / on_axis_distance,
|
const float e_normalized_dist = e_position / on_axis_distance,
|
||||||
z_normalized_dist = z_position / on_axis_distance;
|
z_normalized_dist = z_position / on_axis_distance;
|
||||||
|
|
||||||
int current_xi = cell_start_xi,
|
int current_xi = cell_start_xi,
|
||||||
current_yi = cell_start_yi;
|
current_yi = cell_start_yi;
|
||||||
|
|
||||||
const float m = dy / dx,
|
const float m = dy / dx,
|
||||||
|
Loading…
Reference in New Issue
Block a user