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
#define LOG(args...)
#ifdef DEBUG_DCODES
void dcode__1()
{
printf("D-1 - Endless loop\n");
cli();
printf_P(PSTR("D-1 - Endless loop\n"));
// cli();
while (1);
}
#ifdef DEBUG_DCODES
void dcode_0()
{
if (*(strchr_pointer + 1) == 0) return;

View file

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

View file

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

View file

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

View file

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