From 5d33eed461ca0e9507b46e417947776b36191d0c Mon Sep 17 00:00:00 2001 From: X-Dron Date: Sun, 1 Nov 2020 20:51:10 +0300 Subject: [PATCH 01/10] PID range/Home Offset Menu --- Marlin/Configuration.h | 2 +- Marlin/Configuration_adv.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 56f512f13f..f4b57b4ad7 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -559,7 +559,7 @@ //#define PID_DEBUG // Sends debug data to the serial port. Use 'M303 D' to toggle activation. //#define PID_OPENLOOP // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay - #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature + #define PID_FUNCTIONAL_RANGE 20 // If the temperature difference between the target temperature and the actual temperature // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. #endif diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index cf173755b5..d84fc0636b 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -3158,7 +3158,7 @@ * - M206 and M428 are disabled. * - G92 will revert to its behavior from Marlin 1.0. */ -//#define NO_WORKSPACE_OFFSETS +#define NO_WORKSPACE_OFFSETS // Extra options for the M114 "Current Position" report //#define M114_DETAIL // Use 'M114` for details to check planner calculations From 036ade4ae826332be28bc383037dae93806ae93d Mon Sep 17 00:00:00 2001 From: X-Dron Date: Sun, 1 Nov 2020 21:02:09 +0300 Subject: [PATCH 02/10] REVERT --- Marlin/Configuration.h | 72 +++++++++++++++++++------------------- Marlin/Configuration_adv.h | 12 +++---- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index f4b57b4ad7..92aece1b40 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -128,7 +128,7 @@ // Choose the name from boards.h that matches your setup #ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 + #define MOTHERBOARD BOARD_MKS_ROBIN_NANO #endif // Name displayed in the LCD "Ready" message and Info menu @@ -426,7 +426,7 @@ #define TEMP_SENSOR_7 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_PROBE 0 -#define TEMP_SENSOR_CHAMBER 1 +#define TEMP_SENSOR_CHAMBER 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -668,7 +668,7 @@ #define X_MAX_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. #define Y_MAX_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. #define Z_MAX_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. -#define Z_MIN_PROBE_ENDSTOP_INVERTING false // Set to true to invert the logic of the probe. +#define Z_MIN_PROBE_ENDSTOP_INVERTING true // Set to true to invert the logic of the probe. /** * Stepper Drivers @@ -686,15 +686,15 @@ * TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'L6474', 'POWERSTEP01', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE'] */ -#define X_DRIVER_TYPE TMC2209 -#define Y_DRIVER_TYPE TMC2208 -#define Z_DRIVER_TYPE TMC2208 +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 //#define X2_DRIVER_TYPE A4988 //#define Y2_DRIVER_TYPE A4988 //#define Z2_DRIVER_TYPE A4988 //#define Z3_DRIVER_TYPE A4988 //#define Z4_DRIVER_TYPE A4988 -#define E0_DRIVER_TYPE TMC2209 +#define E0_DRIVER_TYPE A4988 //#define E1_DRIVER_TYPE A4988 //#define E2_DRIVER_TYPE A4988 //#define E3_DRIVER_TYPE A4988 @@ -749,7 +749,7 @@ * Override with M92 * X, Y, Z, E0 [, E1[, E2...]] */ -#define DEFAULT_AXIS_STEPS_PER_UNIT { 161.0, 161.0, 800, 830 } +#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 421 } /** * Default Max Feed Rate (mm/s) @@ -769,7 +769,7 @@ * Override with M201 * X, Y, Z, E0 [, E1[, E2...]] */ -#define DEFAULT_MAX_ACCELERATION { 1300, 1300, 100, 800 } +#define DEFAULT_MAX_ACCELERATION { 1000, 1000, 100, 800 } #define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2 #if ENABLED(LIMITED_MAX_ACCEL_EDITING) @@ -785,9 +785,9 @@ * M204 T Travel Acceleration */ // @efim-a-efim - decreased E0 acceleration to make it less noisy (yes, even with TMC2208 drivers) -#define DEFAULT_ACCELERATION 1100 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E acceleration for printing moves #define DEFAULT_RETRACT_ACCELERATION 800 // E acceleration for retracts -#define DEFAULT_TRAVEL_ACCELERATION 1200 // X, Y, Z acceleration for travel (non printing) moves +#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration for travel (non printing) moves /** * Default Jerk limits (mm/s) @@ -799,8 +799,8 @@ */ #define CLASSIC_JERK #if ENABLED(CLASSIC_JERK) - #define DEFAULT_XJERK 13.0 - #define DEFAULT_YJERK 13.0 + #define DEFAULT_XJERK 10.0 + #define DEFAULT_YJERK 10.0 #define DEFAULT_ZJERK 0.5 //#define TRAVEL_EXTRA_XYJERK 0.0 // Additional jerk allowance for all travel moves @@ -850,7 +850,7 @@ * The probe replaces the Z-MIN endstop and is used for Z homing. * (Automatically enables USE_PROBE_FOR_Z_HOMING.) */ -#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN +//#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN // Force the use of the probe for Z-axis homing //#define USE_PROBE_FOR_Z_HOMING @@ -870,7 +870,7 @@ * - normally-closed switches to GND and D32. * - normally-open switches to 5V and D32. */ -//#define Z_MIN_PROBE_PIN BL_TOUCH_Z_PIN // Pin 32 is the RAMPS default +#define Z_MIN_PROBE_PIN BL_TOUCH_Z_PIN // Pin 32 is the RAMPS default /** * Probe Type @@ -999,10 +999,10 @@ // Most probes should stay away from the edges of the bed, but // with NOZZLE_AS_PROBE this can be negative for a wider probing area. -#define PROBING_MARGIN 5 +#define PROBING_MARGIN 30 // X and Y axis travel speed (mm/min) between probes -#define XY_PROBE_SPEED 3000 +#define XY_PROBE_SPEED (1000) // Feedrate (mm/min) for the first approach when double-probing (MULTIPLE_PROBING == 2) #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z @@ -1019,7 +1019,7 @@ * A total of 2 does fast/slow probes with a weighted average. * A total of 3 or more adds more slow probes, taking the average. */ -#define MULTIPLE_PROBING 2 +#define MULTIPLE_PROBING 5 //#define EXTRA_PROBING 1 /** @@ -1036,8 +1036,8 @@ * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle. * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle. */ -#define Z_CLEARANCE_DEPLOY_PROBE 5 // Z Clearance for Deploy/Stow -#define Z_CLEARANCE_BETWEEN_PROBES 3 // Z Clearance between probe points +#define Z_CLEARANCE_DEPLOY_PROBE 7 // Z Clearance for Deploy/Stow +#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points #define Z_CLEARANCE_MULTI_PROBE 3 // Z Clearance between multiple probes #define Z_AFTER_PROBING 5 // Z position after probing is done @@ -1146,7 +1146,7 @@ #define Z_HOMING_HEIGHT 2 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ... // Be sure to have this much clearance over your Z_MAX_POS to prevent grinding. -//#define Z_AFTER_HOMING 10 // (mm) Height to move to after homing Z +#define Z_AFTER_HOMING 10 // (mm) Height to move to after homing Z // Direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1] @@ -1157,15 +1157,15 @@ // @section machine // The size of the print bed -#define X_BED_SIZE 250 -#define Y_BED_SIZE 206 +#define X_BED_SIZE 255 +#define Y_BED_SIZE 210 // Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 -#define Y_MIN_POS -4 +#define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS X_BED_SIZE + X_MIN_POS -#define Y_MAX_POS Y_BED_SIZE + Y_MIN_POS +#define X_MAX_POS X_BED_SIZE +#define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 210 /** @@ -1423,8 +1423,8 @@ #define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28). + #define Z_SAFE_HOMING_X_POINT (0) // X point for Z homing when homing all axes (G28). + #define Z_SAFE_HOMING_Y_POINT (0) // Y point for Z homing when homing all axes (G28). #endif // Homing speeds (mm/m) @@ -1569,14 +1569,14 @@ EEPROM_W25Q // @section temperature // Preheat Constants -#define PREHEAT_1_LABEL "PLA" -#define PREHEAT_1_TEMP_HOTEND 190 -#define PREHEAT_1_TEMP_BED 50 +#define PREHEAT_1_LABEL "PETG" +#define PREHEAT_1_TEMP_HOTEND 235 +#define PREHEAT_1_TEMP_BED 80 #define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 -#define PREHEAT_2_LABEL "PETG" -#define PREHEAT_2_TEMP_HOTEND 235 -#define PREHEAT_2_TEMP_BED 80 +#define PREHEAT_2_LABEL "ABS" +#define PREHEAT_2_TEMP_HOTEND 250 +#define PREHEAT_2_TEMP_BED 100 #define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 /** @@ -1703,7 +1703,7 @@ EEPROM_W25Q * * View the current statistics with M78. */ -#define PRINTCOUNTER +//#define PRINTCOUNTER /** * Password @@ -2287,7 +2287,7 @@ EEPROM_W25Q * Resolution: TFT_WIDTH and TFT_HEIGHT * Interface: TFT_INTERFACE_FSMC or TFT_INTERFACE_SPI */ -#define MKS_TS35_V2_0 +#define MKS_ROBIN_TFT35 /** * TFT UI - User Interface Selection. Enable one of the following options: diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index d84fc0636b..433b5412d7 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -503,7 +503,7 @@ /** * M355 Case Light on-off / brightness */ -#define CASE_LIGHT_ENABLE +//#define CASE_LIGHT_ENABLE #if ENABLED(CASE_LIGHT_ENABLE) #define CASE_LIGHT_PIN LED_CASE_PIN // Override the default pin if needed #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW @@ -511,7 +511,7 @@ #define CASE_LIGHT_DEFAULT_BRIGHTNESS 255 // Set default power-up brightness (0-255, requires PWM pin) #define CASE_LIGHT_MAX_PWM 255 // Limit pwm #define CASE_LIGHT_MENU // Add Case Light options to the LCD menu - #define CASE_LIGHT_NO_BRIGHTNESS // Disable brightness control. Enable for non-PWM lighting. + //#define CASE_LIGHT_NO_BRIGHTNESS // Disable brightness control. Enable for non-PWM lighting. //#define CASE_LIGHT_USE_NEOPIXEL // Use NeoPixel LED as case light, requires NEOPIXEL_LED. #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White } @@ -2268,7 +2268,7 @@ #if AXIS_IS_TMC(X) #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_CURRENT_HOME X_CURRENT // (mA) RMS current for sensorless homing - #define X_MICROSTEPS 32 // 0..256 + #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 #define X_CHAIN_POS -1 // <=0 : Not chained. 1 : MCU MOSI connected. 2 : Next in chain, ... #endif @@ -2284,7 +2284,7 @@ #if AXIS_IS_TMC(Y) #define Y_CURRENT 800 #define Y_CURRENT_HOME Y_CURRENT - #define Y_MICROSTEPS 32 + #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 #define Y_CHAIN_POS -1 #endif @@ -2300,7 +2300,7 @@ #if AXIS_IS_TMC(Z) #define Z_CURRENT 800 #define Z_CURRENT_HOME Z_CURRENT - #define Z_MICROSTEPS 32 + #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 #define Z_CHAIN_POS -1 #endif @@ -2331,7 +2331,7 @@ #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 - #define E0_MICROSTEPS 32 + #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 #define E0_CHAIN_POS -1 #endif From 83aaac475e51656dc1be3d5d7556620dcad35fc8 Mon Sep 17 00:00:00 2001 From: X-Dron Date: Fri, 6 Nov 2020 11:04:39 +0300 Subject: [PATCH 03/10] BABYSTEP_MILLIMETER_UNITS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Так будет лучше. Шаги на мм у разных версий принтера могут быть разными. В исходном варианте дергаем на 10 микрошагов драйвера. В обновленнном на 0.01мм на babystep --- Marlin/Configuration_adv.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 433b5412d7..5144974b3d 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1612,9 +1612,9 @@ #define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement). //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA! #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way - //#define BABYSTEP_MILLIMETER_UNITS // Specify BABYSTEP_MULTIPLICATOR_(XY|Z) in mm instead of micro-steps - #define BABYSTEP_MULTIPLICATOR_Z 10 // (steps or mm) Steps or millimeter distance for each Z babystep - #define BABYSTEP_MULTIPLICATOR_XY 10 // (steps or mm) Steps or millimeter distance for each XY babystep + #define BABYSTEP_MILLIMETER_UNITS // Specify BABYSTEP_MULTIPLICATOR_(XY|Z) in mm instead of micro-steps + #define BABYSTEP_MULTIPLICATOR_Z 0.01 // (steps or mm) Steps or millimeter distance for each Z babystep + //#define BABYSTEP_MULTIPLICATOR_XY 10 // (steps or mm) Steps or millimeter distance for each XY babystep #define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING) From 3d886c4fbdc57642784e65cce4dc1c0ea4365d46 Mon Sep 17 00:00:00 2001 From: X-Dron Date: Fri, 6 Nov 2020 11:11:19 +0300 Subject: [PATCH 04/10] Revert "BABYSTEP_MILLIMETER_UNITS" This reverts commit 83aaac475e51656dc1be3d5d7556620dcad35fc8. --- Marlin/Configuration_adv.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 5144974b3d..433b5412d7 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1612,9 +1612,9 @@ #define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement). //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA! #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way - #define BABYSTEP_MILLIMETER_UNITS // Specify BABYSTEP_MULTIPLICATOR_(XY|Z) in mm instead of micro-steps - #define BABYSTEP_MULTIPLICATOR_Z 0.01 // (steps or mm) Steps or millimeter distance for each Z babystep - //#define BABYSTEP_MULTIPLICATOR_XY 10 // (steps or mm) Steps or millimeter distance for each XY babystep + //#define BABYSTEP_MILLIMETER_UNITS // Specify BABYSTEP_MULTIPLICATOR_(XY|Z) in mm instead of micro-steps + #define BABYSTEP_MULTIPLICATOR_Z 10 // (steps or mm) Steps or millimeter distance for each Z babystep + #define BABYSTEP_MULTIPLICATOR_XY 10 // (steps or mm) Steps or millimeter distance for each XY babystep #define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING) From a622308db6681be71b534effc9e9ab3c98f0b245 Mon Sep 17 00:00:00 2001 From: X-Dron Date: Fri, 6 Nov 2020 19:37:42 +0300 Subject: [PATCH 05/10] SYNC --- Marlin/Configuration.h | 1 - Marlin/src/MarlinCore.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 92aece1b40..7226b452ad 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -121,7 +121,6 @@ * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] */ #define BAUDRATE 115200 -#define USB_BAUDRATE 250000 // Enable the Bluetooth serial interface on AT90USB devices //#define BLUETOOTH diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index ae75378218..610ab7962b 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -977,7 +977,7 @@ void setup() { serial_connect_timeout = millis() + 1000UL; while (!MYSERIAL1 && PENDING(millis(), serial_connect_timeout)) { /*nada*/ } #endif - + SERIAL_ECHO_MSG("start"); #if BOTH(HAS_TFT_LVGL_UI, USE_WIFI_FUNCTION) mks_esp_wifi_init(); From e85ed10bebfa3b0345ac321ad606cd01d5f7a046 Mon Sep 17 00:00:00 2001 From: Sergey Date: Tue, 10 Nov 2020 12:42:13 +0300 Subject: [PATCH 06/10] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D0=BE=D1=81=D1=82=D0=B0?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=BA=D0=B8=20=D0=BD=D0=B0=20=D0=BF=D0=B0?= =?UTF-8?q?=D1=83=D0=B7=D1=83=20=D0=B8=D0=B7=20=D0=BC=D0=B5=D0=BD=D1=8E=20?= =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20POWER=5FLOSS=5FRECOVERY?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 4 ++-- Marlin/src/gcode/feature/pause/M125.cpp | 3 ++- Marlin/src/sd/cardreader.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index dea6cca66a..a36dc15583 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1197,9 +1197,9 @@ * an option on the LCD screen to continue the print from the last-known * point in the file. */ - //#define POWER_LOSS_RECOVERY + #define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - #define PLR_ENABLED_DEFAULT false // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500) + #define PLR_ENABLED_DEFAULT true // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500) //#define BACKUP_POWER_SUPPLY // Backup power / UPS to move the steppers on power loss //#define POWER_LOSS_RECOVER_ZHOME // Z homing is needed for proper recovery. 99.9% of the time this should be disabled! //#define POWER_LOSS_ZRAISE 2 // (mm) Z axis raise on resume (on power loss with UPS) diff --git a/Marlin/src/gcode/feature/pause/M125.cpp b/Marlin/src/gcode/feature/pause/M125.cpp index db78e870d7..fc53fd052e 100644 --- a/Marlin/src/gcode/feature/pause/M125.cpp +++ b/Marlin/src/gcode/feature/pause/M125.cpp @@ -75,7 +75,8 @@ void GcodeSuite::M125() { TERN_(HAS_LCD_MENU, lcd_pause_show_message(PAUSE_MESSAGE_PARKING, PAUSE_MODE_PAUSE_PRINT)); - const bool show_lcd = TERN0(HAS_LCD_MENU, parser.seenval('P')); + //Temporary fix, until merge bugfix branch + const bool show_lcd = 1; //TERN0(HAS_LCD_MENU, parser.seenval('P')); if (pause_print(retract, park_point, 0, show_lcd)) { TERN_(POWER_LOSS_RECOVERY, if (recovery.enabled) recovery.save(true)); diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index f4622f301e..20afb04578 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -662,7 +662,7 @@ bool CardReader::fileExists(const char * const path) { if (fname) { diveDir->rewind(); selectByName(*diveDir, fname); - diveDir->close(); + //diveDir->close(); } return fname != nullptr; } From d7ddde3f039fcbdd9d83a0873d9ef03cebeaadfc Mon Sep 17 00:00:00 2001 From: Sergey Date: Thu, 12 Nov 2020 00:41:55 +0300 Subject: [PATCH 07/10] =?UTF-8?q?=D0=92=D1=80=D0=B5=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D0=BD=D0=BE=D0=B5=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B2=D0=BE=D1=81=D1=81=D1=82=D0=B0?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BF=D0=B5?= =?UTF-8?q?=D1=87=D0=B0=D1=82=D0=B8=20POWER=5FLOSS=5FRECOVERY?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/mks_wifi/mks_wifi_gcodes.cpp | 8 ++++++++ Marlin/src/sd/cardreader.cpp | 10 +++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Marlin/src/module/mks_wifi/mks_wifi_gcodes.cpp b/Marlin/src/module/mks_wifi/mks_wifi_gcodes.cpp index 9b896286a7..3455c843c6 100644 --- a/Marlin/src/module/mks_wifi/mks_wifi_gcodes.cpp +++ b/Marlin/src/module/mks_wifi/mks_wifi_gcodes.cpp @@ -102,6 +102,14 @@ void mks_m23(char *filename){ DEBUG("M23: %s",filename); + if(filename[0] == '/'){ + DEBUG("Strip slash"); + for(uint32_t i = 0; i < strlen(filename) ; i++){ + filename[i] = filename[i+1]; + } + DEBUG("Fixed name: %s",filename); + } + //Имя файла может быть меньше 12 символов, но с расширением .gcode //С конца имени файла шагаем к началу, считаем сколько символов до точки dot_pos=0; diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index 20afb04578..3d49b4322e 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -659,11 +659,11 @@ bool CardReader::fileExists(const char * const path) { if (!isMounted()) return false; SdFile *diveDir = nullptr; const char * const fname = diveToFile(false, diveDir, path); - if (fname) { - diveDir->rewind(); - selectByName(*diveDir, fname); - //diveDir->close(); - } + // if (fname) { + // diveDir->rewind(); + // selectByName(*diveDir, fname); + // //diveDir->close(); + // } return fname != nullptr; } From af8800d8ed748a0a74f3cd532e7f0d246ceb9ef9 Mon Sep 17 00:00:00 2001 From: Sergey Date: Mon, 30 Nov 2020 13:23:09 +0300 Subject: [PATCH 08/10] telegram link --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 1e41ff7b83..32b34401dc 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ Прошивка работает на принтерах Flying Bear Ghost 4S и 5. Экран работает. WIFI работает. +Если у вас есть какие-то вопросы по настройке прошивки или по ее использованию, вы можете задать свой вопрос в [telegramm группе](https://t.me/Ghostbustersss). + ## MKS WIFI модуль ### Работает From a3f2eaafbd7a754fecea7e00c8d907400cedb330 Mon Sep 17 00:00:00 2001 From: Sergey Date: Mon, 30 Nov 2020 13:23:45 +0300 Subject: [PATCH 09/10] fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 32b34401dc..4b7ccc775b 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Прошивка работает на принтерах Flying Bear Ghost 4S и 5. Экран работает. WIFI работает. -Если у вас есть какие-то вопросы по настройке прошивки или по ее использованию, вы можете задать свой вопрос в [telegramm группе](https://t.me/Ghostbustersss). +Если у вас есть какие-то вопросы по настройке прошивки или по ее использованию, вы можете задать свой вопрос в [telegram группе](https://t.me/Ghostbustersss). ## MKS WIFI модуль From 2da0e9115519743354636d37908690f89d8eec02 Mon Sep 17 00:00:00 2001 From: Sergey Date: Mon, 28 Dec 2020 12:01:38 +0300 Subject: [PATCH 10/10] Update config --- Marlin/Configuration.h | 70 ++++++++++++------------- Marlin/Configuration_adv.h | 50 +++++++++--------- Marlin/src/feature/bedlevel/abl/abl.cpp | 2 +- Marlin/src/gcode/feature/pause/M125.cpp | 3 +- Marlin/src/gcode/gcode.cpp | 1 + Marlin/src/inc/Conditionals_LCD.h | 42 +++++++-------- Marlin/src/lcd/menu/menu_motion.cpp | 2 +- Marlin/src/module/motion.cpp | 8 +-- Marlin/src/module/stepper.cpp | 3 +- Marlin/src/module/temperature.cpp | 8 +-- README.md | 24 ++++++++- 11 files changed, 118 insertions(+), 95 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 7226b452ad..d84f70dda9 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -755,11 +755,11 @@ * Override with M203 * X, Y, Z, E0 [, E1[, E2...]] */ -#define DEFAULT_MAX_FEEDRATE { 200, 200, 4, 70 } +#define DEFAULT_MAX_FEEDRATE { 200, 200, 4, 50 } -//#define LIMITED_MAX_FR_EDITING // Limit edit via M203 or LCD to DEFAULT_MAX_FEEDRATE * 2 +#define LIMITED_MAX_FR_EDITING // Limit edit via M203 or LCD to DEFAULT_MAX_FEEDRATE * 2 #if ENABLED(LIMITED_MAX_FR_EDITING) - #define MAX_FEEDRATE_EDIT_VALUES { 600, 600, 10, 50 } // ...or, set your own edit limits + #define MAX_FEEDRATE_EDIT_VALUES { 300, 300, 10, 70 } // ...or, set your own edit limits #endif /** @@ -768,11 +768,11 @@ * Override with M201 * X, Y, Z, E0 [, E1[, E2...]] */ -#define DEFAULT_MAX_ACCELERATION { 1000, 1000, 100, 800 } +#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 3000 } #define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2 #if ENABLED(LIMITED_MAX_ACCEL_EDITING) - #define MAX_ACCEL_EDIT_VALUES { 2000, 2000, 100, 1000 } // ...or, set your own edit limits + #define MAX_ACCEL_EDIT_VALUES { 5000, 5000, 100, 5000 } // ...or, set your own edit limits #endif /** @@ -784,8 +784,8 @@ * M204 T Travel Acceleration */ // @efim-a-efim - decreased E0 acceleration to make it less noisy (yes, even with TMC2208 drivers) -#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E acceleration for printing moves -#define DEFAULT_RETRACT_ACCELERATION 800 // E acceleration for retracts +#define DEFAULT_ACCELERATION 1500 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_RETRACT_ACCELERATION 2000 // E acceleration for retracts #define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration for travel (non printing) moves /** @@ -806,11 +806,11 @@ #define LIMITED_JERK_EDITING // Limit edit via M205 or LCD to DEFAULT_aJERK * 2 #if ENABLED(LIMITED_JERK_EDITING) - #define MAX_JERK_EDIT_VALUES { 20, 20, 2, 20 } // ...or, set your own edit limits + #define MAX_JERK_EDIT_VALUES { 30, 30, 2, 20 } // ...or, set your own edit limits #endif #endif -#define DEFAULT_EJERK 7 // May be used by Linear Advance +#define DEFAULT_EJERK 8 // May be used by Linear Advance /** * Junction Deviation Factor @@ -869,7 +869,7 @@ * - normally-closed switches to GND and D32. * - normally-open switches to 5V and D32. */ -#define Z_MIN_PROBE_PIN BL_TOUCH_Z_PIN // Pin 32 is the RAMPS default +//#define Z_MIN_PROBE_PIN BL_TOUCH_Z_PIN // Pin 32 is the RAMPS default /** * Probe Type @@ -883,7 +883,7 @@ * Use G29 repeatedly, adjusting the Z height at each point with movement commands * or (with LCD_BED_LEVELING) the LCD controller. */ -//#define PROBE_MANUALLY +#define PROBE_MANUALLY //#define MANUAL_PROBE_START_Z 0.2 /** @@ -907,7 +907,7 @@ /** * The BLTouch probe uses a Hall effect sensor and emulates a servo. */ -#define BLTOUCH +//#define BLTOUCH /** * Pressure sensor with a BLTouch-like interface @@ -994,11 +994,11 @@ * | [-] | * O-- FRONT --+ */ -#define NOZZLE_TO_PROBE_OFFSET { 37, -20, 0 } +#define NOZZLE_TO_PROBE_OFFSET { 0, 0, 0 } // Most probes should stay away from the edges of the bed, but // with NOZZLE_AS_PROBE this can be negative for a wider probing area. -#define PROBING_MARGIN 30 +#define PROBING_MARGIN 0 // X and Y axis travel speed (mm/min) between probes #define XY_PROBE_SPEED (1000) @@ -1018,8 +1018,8 @@ * A total of 2 does fast/slow probes with a weighted average. * A total of 3 or more adds more slow probes, taking the average. */ -#define MULTIPLE_PROBING 5 -//#define EXTRA_PROBING 1 +#define MULTIPLE_PROBING 3 +#define EXTRA_PROBING 1 /** * Z probes require clearance when deploying, stowing, and moving between @@ -1043,11 +1043,11 @@ #define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping // For M851 give a range for adjusting the Z probe offset -#define Z_PROBE_OFFSET_RANGE_MIN -20 -#define Z_PROBE_OFFSET_RANGE_MAX 20 +#define Z_PROBE_OFFSET_RANGE_MIN -3 +#define Z_PROBE_OFFSET_RANGE_MAX 3 // Enable the M48 repeatability test to test probe accuracy -#define Z_MIN_PROBE_REPEATABILITY_TEST +//#define Z_MIN_PROBE_REPEATABILITY_TEST // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW @@ -1138,7 +1138,7 @@ // @section homing -//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed +#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed //#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off. @@ -1156,16 +1156,16 @@ // @section machine // The size of the print bed -#define X_BED_SIZE 255 +#define X_BED_SIZE 250 #define Y_BED_SIZE 210 // Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS X_BED_SIZE +#define X_MAX_POS X_BED_SIZE+X_MIN_POS #define Y_MAX_POS Y_BED_SIZE -#define Z_MAX_POS 210 +#define Z_MAX_POS 200 /** * Software Endstops @@ -1181,7 +1181,7 @@ #if ENABLED(MIN_SOFTWARE_ENDSTOPS) #define MIN_SOFTWARE_ENDSTOP_X #define MIN_SOFTWARE_ENDSTOP_Y - //#define MIN_SOFTWARE_ENDSTOP_Z + #define MIN_SOFTWARE_ENDSTOP_Z #endif // Max software endstops constrain movement within maximum coordinate bounds @@ -1193,7 +1193,7 @@ #endif #if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) - //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD + #define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif /** @@ -1203,9 +1203,9 @@ * RAMPS-based boards use SERVO3_PIN for the first runout sensor. * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc. */ -//#define FILAMENT_RUNOUT_SENSOR +#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) - #define FIL_RUNOUT_ENABLED_DEFAULT true // Enable the sensor on startup. Override with M412 followed by M500. + #define FIL_RUNOUT_ENABLED_DEFAULT false // Enable the sensor on startup. Override with M412 followed by M500. #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each. #define FIL_RUNOUT_STATE HIGH // Pin state indicating that filament is NOT present. //#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. @@ -1218,7 +1218,7 @@ // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. - //#define FILAMENT_RUNOUT_DISTANCE_MM 25 + #define FILAMENT_RUNOUT_DISTANCE_MM 500 #ifdef FILAMENT_RUNOUT_DISTANCE_MM // Enable this option to use an encoder disc that toggles the runout pin @@ -1268,9 +1268,9 @@ */ //#define AUTO_BED_LEVELING_3POINT //#define AUTO_BED_LEVELING_LINEAR -#define AUTO_BED_LEVELING_BILINEAR +//#define AUTO_BED_LEVELING_BILINEAR //#define AUTO_BED_LEVELING_UBL -//#define MESH_BED_LEVELING +#define MESH_BED_LEVELING /** * Normally G28 leaves leveling disabled on completion. Enable @@ -1283,7 +1283,7 @@ * Turn on with the command 'M111 S32'. * NOTE: Requires a lot of PROGMEM! */ -//#define DEBUG_LEVELING_FEATURE +#define DEBUG_LEVELING_FEATURE #if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, @@ -1347,7 +1347,7 @@ //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh - #define MESH_INSET 20 // Set Mesh bounds as an inset region of the bed + #define MESH_INSET 5 // Set Mesh bounds as an inset region of the bed #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X @@ -1427,8 +1427,8 @@ #endif // Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*50) -#define HOMING_FEEDRATE_Z (50*50) +#define HOMING_FEEDRATE_XY (40*60) +#define HOMING_FEEDRATE_Z (40*60) // Validate that endstops are triggered on homing moves #define VALIDATE_HOMING_ENDSTOPS @@ -1702,7 +1702,7 @@ EEPROM_W25Q * * View the current statistics with M78. */ -//#define PRINTCOUNTER +#define PRINTCOUNTER /** * Password diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index a36dc15583..45c2800b31 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -371,7 +371,7 @@ * Hotend Idle Timeout * Prevent filament in the nozzle from charring and causing a critical jam. */ -//#define HOTEND_IDLE_TIMEOUT +#define HOTEND_IDLE_TIMEOUT #if ENABLED(HOTEND_IDLE_TIMEOUT) #define HOTEND_IDLE_TIMEOUT_SEC (5*60) // (seconds) Time without extruder movement to trigger protection #define HOTEND_IDLE_MIN_TRIGGER 180 // (°C) Minimum temperature to enable hotend protection @@ -512,7 +512,7 @@ #define CASE_LIGHT_MAX_PWM 255 // Limit pwm #define CASE_LIGHT_MENU // Add Case Light options to the LCD menu //#define CASE_LIGHT_NO_BRIGHTNESS // Disable brightness control. Enable for non-PWM lighting. - //#define CASE_LIGHT_USE_NEOPIXEL // Use NeoPixel LED as case light, requires NEOPIXEL_LED. + //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED. #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White } #endif @@ -798,7 +798,7 @@ #if ENABLED(ASSISTED_TRAMMING) // Define positions for probing points, use the hotend as reference not the sensor. - #define TRAMMING_POINT_XY { { 20, 20 }, { 200, 20 }, { 200, 200 }, { 20, 200 } } + #define TRAMMING_POINT_XY { { 37, 10 }, { 223, 10 }, { 223, 180 }, { 37, 180 } } // Define positions names for probing points. #define TRAMMING_POINT_NAME_1 "Front-Left" @@ -1121,16 +1121,16 @@ #endif // HAS_LCD_MENU // Scroll a longer status message into view -//#define STATUS_MESSAGE_SCROLLING +#define STATUS_MESSAGE_SCROLLING // On the Info Screen, display XY with one decimal place when possible -//#define LCD_DECIMAL_SMALL_XY +#define LCD_DECIMAL_SMALL_XY // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 // Add an 'M73' G-code to set the current percentage -//#define LCD_SET_PROGRESS_MANUALLY +#define LCD_SET_PROGRESS_MANUALLY // Show the E position (filament used) during printing //#define LCD_SHOW_E_TOTAL @@ -1199,7 +1199,7 @@ */ #define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - #define PLR_ENABLED_DEFAULT true // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500) + #define PLR_ENABLED_DEFAULT false // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500) //#define BACKUP_POWER_SUPPLY // Backup power / UPS to move the steppers on power loss //#define POWER_LOSS_RECOVER_ZHOME // Z homing is needed for proper recovery. 99.9% of the time this should be disabled! //#define POWER_LOSS_ZRAISE 2 // (mm) Z axis raise on resume (on power loss with UPS) @@ -1695,18 +1695,18 @@ * the probe to be unable to reach any points. */ #if PROBE_SELECTED && !IS_KINEMATIC - //#define PROBING_MARGIN_LEFT PROBING_MARGIN - //#define PROBING_MARGIN_RIGHT PROBING_MARGIN - //#define PROBING_MARGIN_FRONT PROBING_MARGIN - //#define PROBING_MARGIN_BACK PROBING_MARGIN + #define PROBING_MARGIN_LEFT PROBING_MARGIN + #define PROBING_MARGIN_RIGHT PROBING_MARGIN + #define PROBING_MARGIN_FRONT PROBING_MARGIN + #define PROBING_MARGIN_BACK PROBING_MARGIN #endif #if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large - //#define MESH_MIN_X MESH_INSET - //#define MESH_MIN_Y MESH_INSET - //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) - //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) + #define MESH_MIN_X 0 + #define MESH_MIN_Y MESH_INSET + #define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + #define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) #endif /** @@ -1806,7 +1806,7 @@ #endif // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -//#define BEZIER_CURVE_SUPPORT +#define BEZIER_CURVE_SUPPORT /** * Direct Stepping @@ -1989,21 +1989,21 @@ * * Note that M207 / M208 / M209 settings are saved to EEPROM. */ -//#define FWRETRACT +#define FWRETRACT #if ENABLED(FWRETRACT) - #define FWRETRACT_AUTORETRACT // Override slicer retractions + //#define FWRETRACT_AUTORETRACT // Override slicer retractions #if ENABLED(FWRETRACT_AUTORETRACT) #define MIN_AUTORETRACT 0.1 // (mm) Don't convert E moves under this length - #define MAX_AUTORETRACT 10.0 // (mm) Don't convert E moves over this length + #define MAX_AUTORETRACT 5.0 // (mm) Don't convert E moves over this length #endif - #define RETRACT_LENGTH 3 // (mm) Default retract length (positive value) + #define RETRACT_LENGTH 2 // (mm) Default retract length (positive value) #define RETRACT_LENGTH_SWAP 13 // (mm) Default swap retract length (positive value) - #define RETRACT_FEEDRATE 45 // (mm/s) Default feedrate for retracting + #define RETRACT_FEEDRATE 35 // (mm/s) Default feedrate for retracting #define RETRACT_ZRAISE 0 // (mm) Default retract Z-raise #define RETRACT_RECOVER_LENGTH 0 // (mm) Default additional recover length (added to retract length on recover) #define RETRACT_RECOVER_LENGTH_SWAP 0 // (mm) Default additional swap recover length (added to retract length on recover from toolchange) - #define RETRACT_RECOVER_FEEDRATE 8 // (mm/s) Default feedrate for recovering from retraction - #define RETRACT_RECOVER_FEEDRATE_SWAP 8 // (mm/s) Default feedrate for recovering from swap retraction + #define RETRACT_RECOVER_FEEDRATE 35 // (mm/s) Default feedrate for recovering from retraction + #define RETRACT_RECOVER_FEEDRATE_SWAP 35 // (mm/s) Default feedrate for recovering from swap retraction #if ENABLED(MIXING_EXTRUDER) //#define RETRACT_SYNC_MIXING // Retract and restore all mixing steppers simultaneously #endif @@ -3126,7 +3126,7 @@ /** * Disable all Volumetric extrusion options */ -//#define NO_VOLUMETRICS +#define NO_VOLUMETRICS #if DISABLED(NO_VOLUMETRICS) /** @@ -3275,7 +3275,7 @@ * * Implement M486 to allow Marlin to skip objects */ -//#define CANCEL_OBJECTS +#define CANCEL_OBJECTS /** * I2C position encoders for closed loop control. diff --git a/Marlin/src/feature/bedlevel/abl/abl.cpp b/Marlin/src/feature/bedlevel/abl/abl.cpp index a585c1e155..39d8815fad 100644 --- a/Marlin/src/feature/bedlevel/abl/abl.cpp +++ b/Marlin/src/feature/bedlevel/abl/abl.cpp @@ -348,7 +348,7 @@ float bilinear_z_offset(const xy_pos_t &raw) { * Prepare a bilinear-leveled linear move on Cartesian, * splitting the move where it crosses grid borders. */ - void bilinear_line_to_destination(const feedRate_t scaled_fr_mm_s, uint16_t x_splits, uint16_t y_splits) { + void bilinear_line_to_destination(const feedRate_t &scaled_fr_mm_s, uint16_t x_splits, uint16_t y_splits) { // Get current and destination cells for this line xy_int_t c1 { CELL_INDEX(x, current_position.x), CELL_INDEX(y, current_position.y) }, c2 { CELL_INDEX(x, destination.x), CELL_INDEX(y, destination.y) }; diff --git a/Marlin/src/gcode/feature/pause/M125.cpp b/Marlin/src/gcode/feature/pause/M125.cpp index fc53fd052e..db78e870d7 100644 --- a/Marlin/src/gcode/feature/pause/M125.cpp +++ b/Marlin/src/gcode/feature/pause/M125.cpp @@ -75,8 +75,7 @@ void GcodeSuite::M125() { TERN_(HAS_LCD_MENU, lcd_pause_show_message(PAUSE_MESSAGE_PARKING, PAUSE_MODE_PAUSE_PRINT)); - //Temporary fix, until merge bugfix branch - const bool show_lcd = 1; //TERN0(HAS_LCD_MENU, parser.seenval('P')); + const bool show_lcd = TERN0(HAS_LCD_MENU, parser.seenval('P')); if (pause_print(retract, park_point, 0, show_lcd)) { TERN_(POWER_LOSS_RECOVERY, if (recovery.enabled) recovery.save(true)); diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 84e64bfb22..394affb118 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -260,6 +260,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { #if ENABLED(PASSWORD_FEATURE) if (password.is_locked && !(parser.command_letter == 'M' && parser.codenum == 511)) { SERIAL_ECHO_MSG(STR_PRINTER_LOCKED); + if (!no_ok) queue.ok_to_send(); return; } #endif diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 56ce2ca5ed..45921f7be3 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -63,12 +63,12 @@ #elif ENABLED(CARTESIO_UI) #define DOGLCD - #define IS_ULTIPANEL + #define IS_ULTIPANEL 1 #elif EITHER(DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) #define IS_DWIN_MARLINUI 1 - #define IS_ULTIPANEL + #define IS_ULTIPANEL 1 #elif ENABLED(ZONESTAR_LCD) @@ -76,7 +76,7 @@ #define IS_RRW_KEYPAD #define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 #define ADC_KEY_NUM 8 - #define IS_ULTIPANEL + #define IS_ULTIPANEL 1 // This helps to implement ADC_KEYPAD menus #define REVERSE_MENU_DIRECTION @@ -98,7 +98,7 @@ #define IS_U8GLIB_SSD1306 #elif ENABLED(RADDS_DISPLAY) - #define IS_ULTIPANEL + #define IS_ULTIPANEL 1 #define ENCODER_PULSES_PER_STEP 2 #elif EITHER(ANET_FULL_GRAPHICS_LCD, BQ_LCD_SMART_CONTROLLER) @@ -108,7 +108,7 @@ #elif ANY(miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864) #define DOGLCD - #define IS_ULTIPANEL + #define IS_ULTIPANEL 1 #if ENABLED(miniVIKI) #define U8GLIB_ST7565_64128N @@ -123,19 +123,19 @@ #elif ENABLED(OLED_PANEL_TINYBOY2) #define IS_U8GLIB_SSD1306 - #define IS_ULTIPANEL + #define IS_ULTIPANEL 1 #elif ENABLED(RA_CONTROL_PANEL) #define LCD_I2C_TYPE_PCA8574 #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander - #define IS_ULTIPANEL + #define IS_ULTIPANEL 1 #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) #define DOGLCD #define U8GLIB_ST7920 - #define IS_ULTIPANEL + #define IS_ULTIPANEL 1 #elif ENABLED(CR10_STOCKDISPLAY) @@ -179,7 +179,7 @@ #define FYSETC_MINI_12864 #define DOGLCD - #define IS_ULTIPANEL + #define IS_ULTIPANEL 1 #define LED_COLORS_REDUCE_GREEN #if ENABLED(PSU_CONTROL) && EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) #define LED_BACKLIGHT_TIMEOUT 10000 @@ -205,7 +205,7 @@ #elif ENABLED(ULTI_CONTROLLER) - #define IS_ULTIPANEL + #define IS_ULTIPANEL 1 #define U8GLIB_SSD1309 #define LCD_RESET_PIN LCD_PINS_D6 // This controller need a reset pin #define ENCODER_PULSES_PER_STEP 2 @@ -220,7 +220,7 @@ #elif EITHER(TFTGLCD_PANEL_SPI, TFTGLCD_PANEL_I2C) #define IS_TFTGLCD_PANEL 1 - #define IS_ULTIPANEL // Note that IS_ULTIPANEL leads to HAS_WIRED_LCD + #define IS_ULTIPANEL 1 // Note that IS_ULTIPANEL leads to HAS_WIRED_LCD #if ENABLED(SDSUPPORT) && DISABLED(LCD_PROGRESS_BAR) #define LCD_PROGRESS_BAR @@ -246,7 +246,7 @@ #endif #if EITHER(MAKRPANEL, MINIPANEL) - #define IS_ULTIPANEL + #define IS_ULTIPANEL 1 #define DOGLCD #if ENABLED(MAKRPANEL) #define U8GLIB_ST7565_64128N @@ -258,7 +258,7 @@ #endif #if ENABLED(OVERLORD_OLED) - #define IS_ULTIPANEL + #define IS_ULTIPANEL 1 #define U8GLIB_SH1106 /** * PCA9632 for buzzer and LEDs via i2c @@ -302,13 +302,13 @@ // Basic Ultipanel-like displays #if ANY(ULTIMAKERCONTROLLER, REPRAP_DISCOUNT_SMART_CONTROLLER, G3D_PANEL, RIGIDBOT_PANEL, PANEL_ONE, U8GLIB_SH1106) - #define IS_ULTIPANEL + #define IS_ULTIPANEL 1 #endif // Einstart OLED has Cardinal nav via pins defined in pins_EINSTART-S.h #if ENABLED(U8GLIB_SH1106_EINSTART) #define DOGLCD - #define IS_ULTIPANEL + #define IS_ULTIPANEL 1 #endif // Compatibility @@ -350,7 +350,7 @@ #if TFT_SCALED_DOGLCD #define DOGLCD - #define IS_ULTIPANEL + #define IS_ULTIPANEL 1 #define DELAYED_BACKLIGHT_INIT #elif ENABLED(TFT_LVGL_UI) #define DELAYED_BACKLIGHT_INIT @@ -359,7 +359,7 @@ // Color UI #if ENABLED(TFT_COLOR_UI) #define HAS_GRAPHICAL_TFT 1 - #define IS_ULTIPANEL + #define IS_ULTIPANEL 1 #endif /** @@ -383,7 +383,7 @@ #define LCD_I2C_TYPE_MCP23017 #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander #define LCD_USE_I2C_BUZZER // Enable buzzer on LCD (optional) - #define IS_ULTIPANEL + #define IS_ULTIPANEL 1 #elif ENABLED(LCD_I2C_VIKI) @@ -398,7 +398,7 @@ #define LCD_I2C_TYPE_MCP23017 #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander #define LCD_USE_I2C_BUZZER // Enable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later) - #define IS_ULTIPANEL + #define IS_ULTIPANEL 1 #define ENCODER_FEEDRATE_DEADZONE 4 @@ -443,10 +443,10 @@ // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection #if ENABLED(FF_INTERFACEBOARD) #define SR_LCD_3W_NL // Non latching 3 wire shift register - #define IS_ULTIPANEL + #define IS_ULTIPANEL 1 #elif ENABLED(SAV_3DLCD) #define SR_LCD_2W_NL // Non latching 2 wire shift register - #define IS_ULTIPANEL + #define IS_ULTIPANEL 1 #endif #if ENABLED(IS_ULTIPANEL) diff --git a/Marlin/src/lcd/menu/menu_motion.cpp b/Marlin/src/lcd/menu/menu_motion.cpp index 2972920f34..939a0480b9 100644 --- a/Marlin/src/lcd/menu/menu_motion.cpp +++ b/Marlin/src/lcd/menu/menu_motion.cpp @@ -192,7 +192,7 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int #if E_MANUAL inline void _goto_menu_move_distance_e() { - ui.goto_screen([]{ _menu_move_distance(E_AXIS, []{ lcd_move_e(); }, -1); }); + ui.goto_screen([]{ _menu_move_distance(E_AXIS, []{ lcd_move_e(TERN_(MULTI_MANUAL, active_extruder)); }, -1); }); } inline void _menu_move_distance_e_maybe() { diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 5b3fab10b1..a39ce52674 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -1466,10 +1466,12 @@ void set_axis_never_homed(const AxisEnum axis) { effectorBackoutDir, // Direction in which the effector mm coordinates move away from endstop. stepperBackoutDir; // Direction in which the TMC µstep count(phase) move away from endstop. + #define PHASE_PER_MICROSTEP(N) (256 / _MAX(1, N##_MICROSTEPS)) + switch (axis) { #ifdef X_MICROSTEPS case X_AXIS: - phasePerUStep = 256 / (X_MICROSTEPS); + phasePerUStep = PHASE_PER_MICROSTEP(X); phaseCurrent = stepperX.get_microstep_counter(); effectorBackoutDir = -X_HOME_DIR; stepperBackoutDir = INVERT_X_DIR ? effectorBackoutDir : -effectorBackoutDir; @@ -1477,7 +1479,7 @@ void set_axis_never_homed(const AxisEnum axis) { #endif #ifdef Y_MICROSTEPS case Y_AXIS: - phasePerUStep = 256 / (Y_MICROSTEPS); + phasePerUStep = PHASE_PER_MICROSTEP(Y); phaseCurrent = stepperY.get_microstep_counter(); effectorBackoutDir = -Y_HOME_DIR; stepperBackoutDir = INVERT_Y_DIR ? effectorBackoutDir : -effectorBackoutDir; @@ -1485,7 +1487,7 @@ void set_axis_never_homed(const AxisEnum axis) { #endif #ifdef Z_MICROSTEPS case Z_AXIS: - phasePerUStep = 256 / (Z_MICROSTEPS); + phasePerUStep = PHASE_PER_MICROSTEP(Z); phaseCurrent = stepperZ.get_microstep_counter(); effectorBackoutDir = -Z_HOME_DIR; stepperBackoutDir = INVERT_Z_DIR ? effectorBackoutDir : -effectorBackoutDir; diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 8a5de4b608..6d451f8f02 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -2261,7 +2261,6 @@ uint32_t Stepper::block_phase_isr() { interval = LA_isr_rate; } else if (step_events_completed < decelerate_after && LA_current_adv_steps < LA_max_adv_steps) { - //step_events_completed <= (uint32_t)accelerate_until) { LA_steps++; LA_current_adv_steps++; interval = LA_isr_rate; @@ -2272,6 +2271,8 @@ uint32_t Stepper::block_phase_isr() { else interval = LA_ADV_NEVER; + if (!LA_steps) return interval; // Leave pins alone if there are no steps! + DIR_WAIT_BEFORE(); #if ENABLED(MIXING_EXTRUDER) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 9408eea11c..00e145adff 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -1668,12 +1668,12 @@ void Temperature::updateTemperaturesFromRawValues() { #endif #define INIT_FAN_PIN(P) do{ _INIT_FAN_PIN(P); SET_FAST_PWM_FREQ(P); }while(0) #if EXTRUDER_AUTO_FAN_SPEED != 255 - #define INIT_E_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(FAST_PWM_FAN_FREQUENCY); } else SET_OUTPUT(P); }while(0) + #define INIT_E_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0) #else #define INIT_E_AUTO_FAN_PIN(P) SET_OUTPUT(P) #endif #if CHAMBER_AUTO_FAN_SPEED != 255 - #define INIT_CHAMBER_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(FAST_PWM_FAN_FREQUENCY); } else SET_OUTPUT(P); }while(0) + #define INIT_CHAMBER_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0) #else #define INIT_CHAMBER_AUTO_FAN_PIN(P) SET_OUTPUT(P) #endif @@ -1702,10 +1702,10 @@ void Temperature::init() { #endif // Thermistor activation by MCU pin - #if PIN_EXISTS(TEMP_0_TR_ENABLE_PIN) + #if PIN_EXISTS(TEMP_0_TR_ENABLE) OUT_WRITE(TEMP_0_TR_ENABLE_PIN, ENABLED(HEATER_0_USES_MAX6675)); #endif - #if PIN_EXISTS(TEMP_1_TR_ENABLE_PIN) + #if PIN_EXISTS(TEMP_1_TR_ENABLE) OUT_WRITE(TEMP_1_TR_ENABLE_PIN, ENABLED(HEATER_1_USES_MAX6675)); #endif diff --git a/README.md b/README.md index 4b7ccc775b..d81ebcfdbb 100644 --- a/README.md +++ b/README.md @@ -100,9 +100,29 @@ ### BLTouch -В прошивке по-умолчанию включена поддержка Bltouch. Парковка стола по оси Z настроена по стандартному концевику (а не по датчику), поэтому если у вас нет датчика, то мешать это не будет. Просто не трогайте настройки Z Offset (должно быть 0). +Bltouch отключен. [О подключении Bltouch](https://sergey1560.github.io/fb4s_howto/bltouch/). + +### Firmware retract + +Без использования опции "firmware retract" слайсер делает ретракты командами движения G1. В том месте, где нужно выполнить ректракт вставляются команды: + +``` +G1 E-2 F2100 ; "Откатить" 2мм со скоростью 35мм/с (2100 мм/мин) +команды движения +G1 E2 F2100 ; Вернуть обратно 2мм со скоростью 35мм/с (2100 мм/мин) +``` +Для ректрактов в Marlin поддерживаются специальные команды - [G10](https://marlinfw.org/docs/gcode/G010.html) и [G11](https://marlinfw.org/docs/gcode/G011.html). В слайсере нужно включить поддержку firmware retract и тогда в том месте, где нужно "откатить" пластик будет вставлена команда G10, а там, где нужно его вернуть G11. Если никакие дополнительные параметры не установлены, будут использованы параметры из прошивки (2мм, 35мм/с). + +Установить параметры можно командами [M207](https://marlinfw.org/docs/gcode/M207.html) и [M208](https://marlinfw.org/docs/gcode/M208.html). + +Для того, чтобы можно было настраивать ретракт в слайсере, в стартовый код нужно добавить M207. Как правило, слайсеры позволяют добавить макрос в качестве параметров команды. + +Firmware retract позволяет изменять значения ректракта из меню принтера прямо во время печати. + +В Marlin есть функция автоматического распознования ректрактов командами G1 и замена их на G10/G11. Это функция отключена. + +Если в слайсере не включена поддержка firmware retract, все будет работать как обычно. -Прошивка настроена на подключение датчика к разъему ZMax (концевик датчика) и PB2 (управление сервой). Подробнее о [подключении Bltouch](https://sergey1560.github.io/fb4s_howto/bltouch/). ### Драйвера TMC2209