MK2.5 - watchdog enabled + test (command "D-1")

This commit is contained in:
Robert Pelnar 2019-04-29 13:19:59 +02:00
parent af6b9a2597
commit 18dec75b56
4 changed files with 12 additions and 6 deletions

View file

@ -176,15 +176,15 @@ extern float axis_steps_per_unit[NUM_AXIS];
#endif //0 #endif //0
#define LOG(args...) #define LOG(args...)
#ifdef DEBUG_DCODES
void dcode__1() void dcode__1()
{ {
printf("D-1 - Endless loop\n"); printf_P(PSTR("D-1 - Endless loop\n"));
cli(); // cli();
while (1); while (1);
} }
#ifdef DEBUG_DCODES
void dcode_0() void dcode_0()
{ {
if (*(strchr_pointer + 1) == 0) return; if (*(strchr_pointer + 1) == 0) return;

View file

@ -3538,7 +3538,7 @@ void process_commands()
else if (code_seen("RESET")) { //! PRUSA RESET else if (code_seen("RESET")) { //! PRUSA RESET
// careful! // careful!
if (farm_mode) { if (farm_mode) {
#ifdef WATCHDOG #if (defined(WATCHDOG) && (MOTHERBOARD == BOARD_EINSY_1_0a))
boot_app_magic = BOOT_APP_MAGIC; boot_app_magic = BOOT_APP_MAGIC;
boot_app_flags = BOOT_APP_FLG_RUN; boot_app_flags = BOOT_APP_FLG_RUN;
wdt_enable(WDTO_15MS); wdt_enable(WDTO_15MS);
@ -7174,9 +7174,9 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
{ {
switch((int)code_value()) switch((int)code_value())
{ {
#ifdef DEBUG_DCODES
case -1: //! D-1 - Endless loop case -1: //! D-1 - Endless loop
dcode__1(); break; dcode__1(); break;
#ifdef DEBUG_DCODES
case 0: //! D0 - Reset case 0: //! D0 - Reset
dcode_0(); break; dcode_0(); break;
case 1: //! D1 - Clear EEPROM case 1: //! D1 - Clear EEPROM

View file

@ -103,6 +103,9 @@
// New XYZ calibration // New XYZ calibration
#define NEW_XYZCAL #define NEW_XYZCAL
// Watchdog support
#define WATCHDOG
// Fan check // Fan check
#define FANCHECK #define FANCHECK

View file

@ -104,6 +104,9 @@
// New XYZ calibration // New XYZ calibration
#define NEW_XYZCAL #define NEW_XYZCAL
// Watchdog support
#define WATCHDOG
// Fan check // Fan check
#define FANCHECK #define FANCHECK