From b5168bd6c2b165094d5479b5f17fc242e3411354 Mon Sep 17 00:00:00 2001 From: NotaRobotexe Date: Mon, 24 Jun 2019 17:30:56 +0200 Subject: [PATCH 1/3] fan error fix --- Firmware/Marlin_main.cpp | 9 +++++++++ Firmware/temperature.cpp | 7 +++++-- Firmware/ultralcd.cpp | 5 ++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 711c428b..7f2efe35 100755 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -9387,6 +9387,11 @@ void restore_print_from_ram_and_continue(float e_move) fanSpeed = saved_fanSpeed; float e = saved_pos[E_AXIS] - e_move; plan_set_e_position(e); + + #ifdef FANCHECK + fans_check_enabled = false; + #endif + //first move print head in XY to the saved position: plan_buffer_line(saved_pos[X_AXIS], saved_pos[Y_AXIS], current_position[Z_AXIS], saved_pos[E_AXIS] - e_move, homing_feedrate[Z_AXIS]/13, active_extruder); st_synchronize(); @@ -9397,6 +9402,10 @@ void restore_print_from_ram_and_continue(float e_move) plan_buffer_line(saved_pos[X_AXIS], saved_pos[Y_AXIS], saved_pos[Z_AXIS], saved_pos[E_AXIS], 35, active_extruder); st_synchronize(); + #ifdef FANCHECK + fans_check_enabled = true; + #endif + memcpy(current_position, saved_pos, sizeof(saved_pos)); memcpy(destination, current_position, sizeof(destination)); if (saved_printing_type == PRINTING_TYPE_SD) { //was sd printing diff --git a/Firmware/temperature.cpp b/Firmware/temperature.cpp index 9c49cf79..7ea6d07c 100755 --- a/Firmware/temperature.cpp +++ b/Firmware/temperature.cpp @@ -500,8 +500,9 @@ void checkFanSpeed() max_print_fan_errors = 15; //15 seconds max_extruder_fan_errors = 5; //5 seconds #endif //FAN_SOFT_PWM - - fans_check_enabled = (eeprom_read_byte((uint8_t*)EEPROM_FAN_CHECK_ENABLED) > 0); + + if(fans_check_enabled != false) + fans_check_enabled = (eeprom_read_byte((uint8_t*)EEPROM_FAN_CHECK_ENABLED) > 0); static unsigned char fan_speed_errors[2] = { 0,0 }; #if (defined(FANCHECK) && defined(TACH_0) && (TACH_0 >-1)) if ((fan_speed[0] == 0) && (current_temperature[0] > EXTRUDER_AUTO_FAN_TEMPERATURE)) fan_speed_errors[0]++; @@ -560,6 +561,8 @@ void fanSpeedError(unsigned char _fan) { else { setTargetHotend0(0); SERIAL_ECHOLNPGM("// action:pause"); //for octoprint + heating_status = 0; + fan_check_error = EFCE_REPORTED; } switch (_fan) { case 0: // extracting the same code from case 0 and case 1 into a function saves 72B diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index f69efbbc..0a22a937 100755 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -6380,6 +6380,7 @@ static void lcd_test_menu() void lcd_resume_print() { lcd_return_to_status(); + lcd_reset_alert_level(); lcd_setstatuspgm(_T(MSG_RESUMING_PRINT)); lcd_reset_alert_level(); //for fan speed error restore_print_from_ram_and_continue(0.0); @@ -6485,7 +6486,9 @@ static void lcd_main_menu() } else { - MENU_ITEM_SUBMENU_P(_i("Resume print"), lcd_resume_print);////MSG_RESUME_PRINT + checkFanSpeed(); //Check manually to get most recent fan speed status + if(fan_check_error == EFCE_OK) + MENU_ITEM_SUBMENU_P(_i("Resume print"), lcd_resume_print);////MSG_RESUME_PRINT } MENU_ITEM_SUBMENU_P(_T(MSG_STOP_PRINT), lcd_sdcard_stop); } From 3e9dc91cefac628539cabf2099b78285867b70df Mon Sep 17 00:00:00 2001 From: NotaRobotexe Date: Mon, 24 Jun 2019 18:01:49 +0200 Subject: [PATCH 2/3] ifdef for mk2 --- Firmware/ultralcd.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 0a22a937..47c42747 100755 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -6486,9 +6486,14 @@ static void lcd_main_menu() } else { - checkFanSpeed(); //Check manually to get most recent fan speed status - if(fan_check_error == EFCE_OK) - MENU_ITEM_SUBMENU_P(_i("Resume print"), lcd_resume_print);////MSG_RESUME_PRINT + #ifdef FANCHECK + checkFanSpeed(); //Check manually to get most recent fan speed status + if(fan_check_error == EFCE_OK) + MENU_ITEM_SUBMENU_P(_i("Resume print"), lcd_resume_print);////MSG_RESUME_PRINT + #else + MENU_ITEM_SUBMENU_P(_i("Resume print"), lcd_resume_print);////MSG_RESUME_PRINT + #endif + } MENU_ITEM_SUBMENU_P(_T(MSG_STOP_PRINT), lcd_sdcard_stop); } From a59e7090ead7bafb46b4478211cf6283f86ff368 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Thu, 27 Jun 2019 17:32:40 +0200 Subject: [PATCH 3/3] Increase version. --- Firmware/Configuration.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Firmware/Configuration.h b/Firmware/Configuration.h index eee1b167..acdadfe7 100644 --- a/Firmware/Configuration.h +++ b/Firmware/Configuration.h @@ -7,8 +7,8 @@ #define STR(x) STR_HELPER(x) // Firmware version -#define FW_VERSION "3.7.2-RC1" -#define FW_COMMIT_NR 2359 +#define FW_VERSION "3.7.2" +#define FW_COMMIT_NR 2363 // FW_VERSION_UNKNOWN means this is an unofficial build. // The firmware should only be checked into github with this symbol. #define FW_DEV_VERSION FW_VERSION_UNKNOWN