From c9035a122d112cb6bf47412ce397a11cb18e7136 Mon Sep 17 00:00:00 2001 From: Marcio Teixeira Date: Tue, 30 Jan 2018 13:59:26 -0700 Subject: [PATCH] Fixes to 1.1.8 merge. --- Marlin/Conditionals_LulzBot.h | 36 ++++++++++++++++------------------- Marlin/Conditionals_post.h | 5 ----- Marlin/Configuration.h | 4 ++-- Marlin/Configuration_adv.h | 6 ++---- Marlin/Marlin_main.cpp | 24 +++++++++++------------ Marlin/temperature.cpp | 1 + 6 files changed, 32 insertions(+), 44 deletions(-) diff --git a/Marlin/Conditionals_LulzBot.h b/Marlin/Conditionals_LulzBot.h index 8c7c0df14..13cbd477a 100644 --- a/Marlin/Conditionals_LulzBot.h +++ b/Marlin/Conditionals_LulzBot.h @@ -13,7 +13,7 @@ * got disabled. */ -#define LULZBOT_FW_VERSION ".75" // Change this with each update +#define LULZBOT_FW_VERSION ".1" // Change this with each update #if ( \ !defined(LULZBOT_Gladiola_Mini) && \ @@ -177,9 +177,6 @@ Running = true; \ lcd_reset_alert_level(); -// Fix for auto0.g, which is broken -#define LULZBOT_AUTOSTART_BUGFIX - // Q&A wants to be able to use M226 on endstops switches #define LULZBOT_NO_PIN_PROTECTION_ON_M226 @@ -190,17 +187,10 @@ #define LULZBOT_G28_DISABLES_LEVELING_WORKAROUND #endif -// Marlin 1.1.5 does not respect Z_HOMING_HEIGHT on the Mini. This has -// been reported upstream as bug #8669 -#define LULZBOT_Z_HOMING_HEIGHT_WORKAROUND - // Marlin 1.1.5 does not respect ENDSTOPS_ALWAYS_ON_DEFAULT at startup, // as described in T1393 #define LULZBOT_ENDSTOPS_ALWAYS_ON_DEFAULT_WORKAROUND -// Backport of upstream Marlin fix T7811 related to M600 resume_print -#define LULZBOT_M600_BACKPORT_T7811 - // In Marlin 1.1.5, a paused print cannot be resumed from the LCD if // PAUSE_PARK_RETRACT_LENGTH is non-zero. This has been submitted as // bug #8703 @@ -212,11 +202,6 @@ // Back port of upstream https://github.com/MarlinFirmware/Marlin/commit/6ed284061580ffc6eef40df391afb30d2f8b45f5 #define LULZBOT_OCTOPRINT_RX_BUFFER_OVERFLOW_WORKAROUND delay(2); -/* In Marlin, the custom boot screen is incorrectly being drawn during - * lcd_implementation_init, this causes the boot screen to flash - * before entering menus, and also screws up the new modern UI */ -#define LULZBOT_CUSTOM_BOOTSCREEN_DURING_INIT_WORKAROUND - /************************* EXPERIMENTAL FEATURES ******************************/ #if defined(LULZBOT_USE_EXPERIMENTAL_FEATURES) @@ -442,6 +427,19 @@ #endif #endif +/* Make sure Marlin allows probe points outside of the bed area */ +#if defined(LULZBOT_USE_AUTOLEVELING) + #if LULZBOT_Z_SAFE_HOMING_X_POINT < LULZBOT_LEFT_PROBE_BED_POSITION + #define MIN_PROBE_X LULZBOT_Z_SAFE_HOMING_X_POINT + #else + #define MIN_PROBE_X LULZBOT_LEFT_PROBE_BED_POSITION + #endif + #define MAX_PROBE_X LULZBOT_RIGHT_PROBE_BED_POSITION + + #define MIN_PROBE_Y LULZBOT_FRONT_PROBE_BED_POSITION + #define MAX_PROBE_Y LULZBOT_BACK_PROBE_BED_POSITION +#endif + /* Auto-leveling was introduced on the Mini and TAZ 6. * Define probe parameters related to bed leveling, * e.g. the washers on the bed. These are confusingly @@ -450,10 +448,9 @@ */ #if defined(LULZBOT_USE_AUTOLEVELING) #define LULZBOT_FIX_MOUNTED_PROBE - #define LULZBOT_PROBE_POINTS_OUTSIDE_OF_BED #endif // LULZBOT_USE_AUTOLEVELING -#define LULZBOT_PROBE_DOUBLE_TOUCH +#define LULZBOT_MULTIPLE_PROBING 2 #define LULZBOT_X_PROBE_OFFSET_FROM_EXTRUDER 0 #define LULZBOT_Y_PROBE_OFFSET_FROM_EXTRUDER 0 #define LULZBOT_Z_PROBE_OFFSET_RANGE_MIN -2 @@ -1440,7 +1437,7 @@ /* Always use COOLSTEP on E0 */ \ LULZBOT_ENABLE_COOLSTEP_WITH_STALLGUARD(stepperE0); \ - #define LULZBOT_TMC2130_ADV { \ + #define LULZBOT_TMC_ADV { \ LULZBOT_MOTOR_INIT_XY \ LULZBOT_MOTOR_INIT_Z \ LULZBOT_MOTOR_INIT_E \ @@ -1819,7 +1816,6 @@ #define LULZBOT_HIDE_ACTIVE_NOZZLE_IN_LCD #define LULZBOT_HIDE_PID_CONFIG_IN_LCD #define LULZBOT_HIDE_EXTRA_FAN_CONFIG_IN_LCD - #define LULZBOT_SCROLL_LONG_FILE_NAMES #define LULZBOT_REORDERED_MENUS #define LULZBOT_ESTEP_REDUCED_LCD_PRECISION #if LULZBOT_EXTRUDERS > 1 diff --git a/Marlin/Conditionals_post.h b/Marlin/Conditionals_post.h index bf0b10193..9b69e1ffc 100644 --- a/Marlin/Conditionals_post.h +++ b/Marlin/Conditionals_post.h @@ -1080,11 +1080,6 @@ #define MANUAL_PROBE_HEIGHT Z_HOMING_HEIGHT #endif - #define MIN_PROBE_X (X_MIN_POS) - #define MIN_PROBE_Y (Y_MIN_POS) - #define MAX_PROBE_X (X_MAX_POS) - #define MAX_PROBE_Y (Y_MAX_POS) - #elif ENABLED(BED_CENTER_AT_0_0) // Stepper pulse duration, in cycles #define STEP_PULSE_CYCLES ((MINIMUM_STEPPER_PULSE) * CYCLES_PER_MICROSECOND) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index db0d042ff..630e45301 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -727,7 +727,7 @@ // The number of probes to perform at each point. // Set to 2 for a fast/slow probe, using the second probe result. // Set to 3 or more for slow probes, averaging the results. -//#define MULTIPLE_PROBING 2 +#define MULTIPLE_PROBING LULZBOT_MULTIPLE_PROBING /** * Z probes require clearance when deploying, stowing, and moving between @@ -1074,7 +1074,7 @@ #if ENABLED(Z_SAFE_HOMING) #define Z_SAFE_HOMING_X_POINT LULZBOT_Z_SAFE_HOMING_X_POINT // X point for Z homing when homing all axes (G28). - #define Z_SAFE_HOMING_Y_POINT LULZBOT_Z_SAFE_HOMING_X_POINT // Y point for Z homing when homing all axes (G28). + #define Z_SAFE_HOMING_Y_POINT LULZBOT_Z_SAFE_HOMING_Y_POINT // Y point for Z homing when homing all axes (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 7783c0370..82944ec08 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -358,9 +358,7 @@ #define Z_HOME_BUMP_MM LULZBOT_Z_HOME_BUMP_MM #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #if defined(LULZBOT_QUICKHOME) -#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially -#endif -#define QUICK_HOME LULZBOT_QUICKHOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially. +#define QUICK_HOME LULZBOT_QUICKHOME // If homing includes X and Y, do a diagonal move initially #endif // When G28 is called, this option will make Y home before X @@ -1170,7 +1168,7 @@ * stepperY.interpolate(0); \ * } */ - #define TMC_ADV() LULZBOT_TMC2130_ADV + #define TMC_ADV() LULZBOT_TMC_ADV #endif // TMC2130 || TMC2208 diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 2e14b4a91..270ed6130 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2339,16 +2339,17 @@ static void clean_up_after_endstop_or_probe_move() { const float old_feedrate_mm_s = feedrate_mm_s; feedrate_mm_s = XY_PROBE_FEEDRATE_MM_S; - + #if defined(LULZBOT_Z_CLEARANCE_DEPLOY_PROBE_WORKAROUND) do_probe_raise(_Z_CLEARANCE_DEPLOY_PROBE); - #endif + // Move the probe to the given XY + do_blocking_move_to_xy(nx, ny); + #else // Move the probe to the starting XYZ do_blocking_move_to(nx, ny, nz); #endif - float measured_z = NAN; if (!DEPLOY_PROBE()) { measured_z = run_z_probe() + zprobe_zoffset; @@ -2972,7 +2973,7 @@ static void homeaxis(const AxisEnum axis) { if (axis == Y_AXIS) tmc_sensorless_homing(stepperY); #endif #if ENABLED(Z_IS_TMC2130) && defined(LULZBOT_SENSORLESS_HOMING_Z) - if (axis == Z_AXIS) tmc2130_sensorless_homing(stepperZ); + if (axis == Z_AXIS) tmc_sensorless_homing(stepperZ); if (axis == Z_AXIS) LULZBOT_ADJUST_Z_HOMING_CURRENT(true); #endif #endif @@ -3086,7 +3087,7 @@ static void homeaxis(const AxisEnum axis) { if (axis == Y_AXIS) tmc_sensorless_homing(stepperY, false); #endif #if ENABLED(Z_IS_TMC2130) && defined(LULZBOT_SENSORLESS_HOMING_Z) - if (axis == Z_AXIS) tmc2130_sensorless_homing(stepperZ, false); + if (axis == Z_AXIS) tmc_sensorless_homing(stepperZ, false); if (axis == Z_AXIS) LULZBOT_ADJUST_Z_HOMING_CURRENT(false); #endif #endif @@ -4063,7 +4064,6 @@ inline void gcode_G28(const bool always_home_all) { #endif - #if defined(LULZBOT_Z_HOMING_HEIGHT_WORKAROUND) if (home_all || homeX || homeY) { // Raise Z before homing any other axes and z is not already high enough (never lower z) destination[Z_AXIS] = Z_HOMING_HEIGHT; @@ -6233,7 +6233,7 @@ inline void gcode_G92() { #endif bool didE = false; - #if IS_SCARA || !HAS_POSITION_SHIFT + #if IS_SCARA || !HAS_POSITION_SHIFT || defined(LULZBOT_G92_BACKWARDS_COMPATIBILITY) bool didXYZ = false; #else constexpr bool didXYZ = false; @@ -6245,7 +6245,7 @@ inline void gcode_G92() { v = i == E_AXIS ? l : LOGICAL_TO_NATIVE(l, i), d = v - current_position[i]; if (!NEAR_ZERO(d)) { - #if IS_SCARA || !HAS_POSITION_SHIFT + #if IS_SCARA || !HAS_POSITION_SHIFT || defined(LULZBOT_G92_BACKWARDS_COMPATIBILITY) if (i == E_AXIS) didE = true; else didXYZ = true; current_position[i] = v; // Without workspaces revert to Marlin 1.0 behavior #elif HAS_POSITION_SHIFT @@ -6684,8 +6684,6 @@ inline void gcode_M17() { set_destination_from_current(); - #endif - if (load_length != 0) { #if ENABLED(ULTIPANEL) // Show "insert filament" @@ -7657,7 +7655,6 @@ inline void gcode_M104() { #endif } - LULZBOT_OCTOPRINT_RX_BUFFER_OVERFLOW_WORKAROUND /** * M105: Read hot end and bed temperature */ @@ -10870,8 +10867,8 @@ inline void gcode_M502() { else tmc_get_sgt(stepperY2, extended_axis_codes[TMC_Y2]); #endif #if ENABLED(E0_IS_TMC2130) - if (parser.seen(axis_codes[E_AXIS])) tmc2130_set_sgt(stepperE0, 'E', parser.value_int()); - else tmc2130_get_sgt(stepperE0, 'E'); + if (parser.seen(axis_codes[E_AXIS])) tmc_set_sgt(stepperE0, extended_axis_codes[TMC_E0], parser.value_int()); + else tmc_get_sgt(stepperE0, extended_axis_codes[TMC_E0]); #endif } #endif // SENSORLESS_HOMING @@ -11791,6 +11788,7 @@ void process_parsed_command() { case 26: // G26: LulzBot clear probe fail LULZBOT_G26_RESET_ACTION; break; + #endif #if ENABLED(NOZZLE_PARK_FEATURE) case 27: // G27: Nozzle Park diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 171e60be3..b953fb9e5 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -2225,6 +2225,7 @@ void Temperature::isr() { SERIAL_PROTOCOLPAIR(" (", r / OVERSAMPLENR); SERIAL_PROTOCOLCHAR(')'); #endif + LULZBOT_OCTOPRINT_RX_BUFFER_OVERFLOW_WORKAROUND } extern uint8_t target_extruder;