Watchdog cleanup (#15283)

This commit is contained in:
Scott Lahteine
2019-09-29 17:57:29 -05:00
committed by GitHub
parent 24706aedbd
commit 139b7196a0
28 changed files with 73 additions and 97 deletions

View File

@ -50,12 +50,6 @@
#define GET_PIN_MAP_PIN_M43(Q) GET_PIN_MAP_PIN(Q)
#endif
inline void _watchdog_reset() {
#if ENABLED(USE_WATCHDOG)
watchdog_reset();
#endif
}
inline void toggle_pins() {
const bool ignore_protection = parser.boolval('I');
const int repeat = parser.intval('R', 1),
@ -71,7 +65,7 @@ inline void toggle_pins() {
SERIAL_EOL();
}
else {
_watchdog_reset();
watchdog_refresh();
report_pin_state_extended(pin, ignore_protection, true, "Pulsing ");
#if AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO
if (pin == TEENSY_E2) {
@ -95,10 +89,10 @@ inline void toggle_pins() {
{
pinMode(pin, OUTPUT);
for (int16_t j = 0; j < repeat; j++) {
_watchdog_reset(); extDigitalWrite(pin, 0); safe_delay(wait);
_watchdog_reset(); extDigitalWrite(pin, 1); safe_delay(wait);
_watchdog_reset(); extDigitalWrite(pin, 0); safe_delay(wait);
_watchdog_reset();
watchdog_refresh(); extDigitalWrite(pin, 0); safe_delay(wait);
watchdog_refresh(); extDigitalWrite(pin, 1); safe_delay(wait);
watchdog_refresh(); extDigitalWrite(pin, 0); safe_delay(wait);
watchdog_refresh();
}
}
}

View File

@ -258,7 +258,7 @@ void GcodeSuite::M917() {
}
DEBUG_ECHOLNPGM(".");
reset_stepper_timeout(); // reset_stepper_timeout to keep steppers powered
watchdog_reset(); // beat the dog
watchdog_refresh();
safe_delay(5000);
status_composite_temp = 0;
for (j = 0; j < driver_count; j++) {