Merge pull request #1778 from XPila/MK3

MK2.5 - watchdog enabled + test (command "D-1")
This commit is contained in:
Marek Běl 2019-04-29 14:48:16 +00:00 committed by GitHub
commit 95beb33924
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 11 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

@ -1046,11 +1046,6 @@ static void updateTemperaturesFromRawValues()
redundant_temperature = analog2temp(redundant_temperature_raw, 1); redundant_temperature = analog2temp(redundant_temperature_raw, 1);
#endif #endif
//Reset the watchdog after we know we have a temperature measurement.
#ifdef WATCHDOG
wdt_reset();
#endif //WATCHDOG
CRITICAL_SECTION_START; CRITICAL_SECTION_START;
temp_meas_ready = false; temp_meas_ready = false;
CRITICAL_SECTION_END; CRITICAL_SECTION_END;

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