Browse Source

Cleanups following recent commits

pull/1/head
Scott Lahteine 8 years ago
parent
commit
71396f77d3
  1. 2
      Marlin/Conditionals_post.h
  2. 27
      Marlin/Marlin_main.cpp
  3. 17
      Marlin/temperature.cpp
  4. 3
      Marlin/temperature.h

2
Marlin/Conditionals_post.h

@ -649,7 +649,7 @@
/**
* Heater & Fan Pausing
*/
#if ENABLED(PROBING_FANS_OFF) && FAN_COUNT == 0
#if FAN_COUNT == 0
#undef PROBING_FANS_OFF
#endif
#define QUIET_PROBING (ENABLED(PROBING_HEATERS_OFF) || ENABLED(PROBING_FANS_OFF))

27
Marlin/Marlin_main.cpp

@ -2057,15 +2057,10 @@ static void clean_up_after_endstop_or_probe_move() {
#endif
#if ENABLED(PROBING_FANS_OFF)
void fans_pause(bool p) {
if (p == fans_paused) { // If called out of order something is wrong
SERIAL_ERROR_START;
SERIAL_ERRORPGM("Fans already ");
if (!fans_paused) SERIAL_ERRORPGM("un");
SERIAL_ERRORLNPGM("paused!");
return;
}
void fans_pause(const bool p) {
if (p != fans_paused) {
fans_paused = p;
if (p)
for (uint8_t x = 0; x < FAN_COUNT; x++) {
paused_fanSpeeds[x] = fanSpeeds[x];
@ -2074,9 +2069,9 @@ static void clean_up_after_endstop_or_probe_move() {
else
for (uint8_t x = 0; x < FAN_COUNT; x++)
fanSpeeds[x] = paused_fanSpeeds[x];
fans_paused = p;
}
}
#endif // PROBING_FANS_OFF
#if HAS_BED_PROBE
@ -2091,18 +2086,16 @@ static void clean_up_after_endstop_or_probe_move() {
#endif
#if QUIET_PROBING
void probing_pause(bool pause) {
void probing_pause(const bool p) {
#if ENABLED(PROBING_HEATERS_OFF)
thermalManager.pause(pause);
thermalManager.pause(p);
#endif
#if ENABLED(PROBING_FANS_OFF)
fans_pause(pause);
fans_pause(p);
#endif
if(pause) safe_delay(25);
if (p) safe_delay(25);
}
#endif
#endif // QUIET_PROBING
#if ENABLED(BLTOUCH)

17
Marlin/temperature.cpp

@ -1353,15 +1353,10 @@ void Temperature::disable_all_heaters() {
}
#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;
}
void Temperature::pause(const bool p) {
if (p != paused) {
paused = p;
if (p) {
HOTEND_LOOP() {
paused_hotend_temp[e] = degTargetHotend(e);
@ -1378,13 +1373,9 @@ void Temperature::disable_all_heaters() {
setTargetBed(paused_bed_temp);
#endif
}
paused = p;
}
bool Temperature::ispaused() {
return paused;
}
#endif // PROBING_HEATERS_OFF
#if ENABLED(HEATER_0_USES_MAX6675)

3
Marlin/temperature.h

@ -458,8 +458,7 @@ class Temperature {
#endif // BABYSTEPPING
#if ENABLED(PROBING_HEATERS_OFF)
static void pause(bool p);
static bool ispaused();
static void pause(const bool p);
#endif
private:

Loading…
Cancel
Save