From 25408d14da2b0b061ee15b1c1e6e008fdc93ad50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Wed, 21 Jul 2021 06:27:44 +0000 Subject: [PATCH 1/2] Remove unused #ifdef MK1BP MK1BP is never defined anywhere --- Firmware/Marlin_main.cpp | 7 ++----- Firmware/ultralcd.cpp | 14 -------------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 023b646f..450ddea6 100755 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -2901,7 +2901,7 @@ static void gcode_G28(bool home_x_axis, long home_x_value, bool home_y_axis, lon raise_z_above(Z_RAISE_BEFORE_HOMING); st_synchronize(); #endif // defined (Z_RAISE_BEFORE_HOMING) && (Z_RAISE_BEFORE_HOMING > 0) - #if (defined(MESH_BED_LEVELING) && !defined(MK1BP)) // If Mesh bed leveling, move X&Y to safe position for home + #ifdef MESH_BED_LEVELING // If Mesh bed leveling, move X&Y to safe position for home raise_z_above(MESH_HOME_Z_SEARCH); st_synchronize(); if (!axis_known_position[X_AXIS]) homeaxis(X_AXIS); @@ -3015,7 +3015,7 @@ static void gcode_G28(bool home_x_axis, long home_x_value, bool home_y_axis, lon // and correct the current_position XY axes to match the transformed coordinate system. world2machine_update_current(); -#if (defined(MESH_BED_LEVELING) && !defined(MK1BP)) +#ifdef MESH_BED_LEVELING if (home_x_axis || home_y_axis || without_mbl || home_z_axis) { if (! home_z && mbl_was_active) { @@ -5614,9 +5614,6 @@ if(eSoundMode!=e_SOUND_MODE_SILENT) */ case 80: { -#ifdef MK1BP - break; -#endif //MK1BP gcode_G80(); } break; diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 658e6b01..fd8c7b45 100755 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -2035,7 +2035,6 @@ static void lcd_support_menu() } } - #ifndef MK1BP MENU_ITEM_BACK_P(STR_SEPARATOR); MENU_ITEM_SUBMENU_P(_i("XYZ cal. details"), lcd_menu_xyz_y_min);////MSG_XYZ_DETAILS c=18 MENU_ITEM_SUBMENU_P(_i("Extruder info"), lcd_menu_extruder_info);////MSG_INFO_EXTRUDER c=18 @@ -2068,8 +2067,6 @@ static void lcd_support_menu() MENU_ITEM_SUBMENU_P(PSTR("Debug"), lcd_menu_debug);////MSG_DEBUG c=18 #endif /* DEBUG_BUILD */ - #endif //MK1BP - MENU_END(); } @@ -5777,11 +5774,6 @@ static void lcd_calibration_menu() MENU_ITEM_FUNCTION_P(_i("Belt test"), lcd_belttest_v);////MSG_BELTTEST c=18 #endif //TMC2130 MENU_ITEM_FUNCTION_P(_i("Selftest"), lcd_selftest_v);////MSG_SELFTEST c=18 -#ifdef MK1BP - // MK1 - // "Calibrate Z" - MENU_ITEM_GCODE_P(_T(MSG_HOMEYZ), PSTR("G28 Z")); -#else //MK1BP // MK2 MENU_ITEM_FUNCTION_P(_i("Calibrate XYZ"), lcd_mesh_calibration);////MSG_CALIBRATE_BED c=18 // "Calibrate Z" with storing the reference values to EEPROM. @@ -5791,26 +5783,20 @@ static void lcd_calibration_menu() #endif // "Mesh Bed Leveling" MENU_ITEM_SUBMENU_P(_T(MSG_MESH_BED_LEVELING), lcd_mesh_bedleveling); - -#endif //MK1BP MENU_ITEM_SUBMENU_P(_i("Bed level correct"), lcd_adjust_bed);////MSG_BED_CORRECTION_MENU c=18 MENU_ITEM_SUBMENU_P(_i("PID calibration"), pid_extruder);////MSG_PID_EXTRUDER c=17 #ifndef TMC2130 MENU_ITEM_SUBMENU_P(_i("Show end stops"), menu_show_end_stops);////MSG_SHOW_END_STOPS c=18 #endif -#ifndef MK1BP MENU_ITEM_GCODE_P(_i("Reset XYZ calibr."), PSTR("M44"));////MSG_CALIBRATE_BED_RESET c=18 -#endif //MK1BP #ifndef SNMM //MENU_ITEM_FUNCTION_P(MSG_RESET_CALIBRATE_E, lcd_extr_cal_reset); #endif -#ifndef MK1BP if(has_temperature_compensation()) { MENU_ITEM_SUBMENU_P(_i("Temp. calibration"), lcd_pinda_calibration_menu);////MSG_CALIBRATION_PINDA_MENU c=17 } -#endif //MK1BP } MENU_END(); From 21226214a7aa61c58b56ce69429648007486a2ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Wed, 21 Jul 2021 14:06:23 +0000 Subject: [PATCH 2/2] Remove MAX_SILENT_FEEDRATE It was last used on MK2 in 3rd July 2017. I suspect this code was simply forgotten. --- Firmware/Marlin_main.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 450ddea6..d3d87631 100755 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -9628,10 +9628,6 @@ void get_coordinates() } if(code_seen('F')) { next_feedrate = code_value(); -#ifdef MAX_SILENT_FEEDRATE - if (tmc2130_mode == TMC2130_MODE_SILENT) - if (next_feedrate > MAX_SILENT_FEEDRATE) next_feedrate = MAX_SILENT_FEEDRATE; -#endif //MAX_SILENT_FEEDRATE if(next_feedrate > 0.0) feedrate = next_feedrate; if (!seen[0] && !seen[1] && !seen[2] && seen[3]) {