diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index ff849d22dce4..0b00f49367a6 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -68,7 +68,7 @@ // Choose the name from boards.h that matches your setup #ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_RAMPS_14_EFB + #define MOTHERBOARD BOARD_MKS_ROBIN_NANO_V3_1 #endif /** @@ -79,7 +79,7 @@ * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9] */ -#define SERIAL_PORT 0 +#define SERIAL_PORT -1 /** * Serial Port Baud Rate @@ -92,7 +92,7 @@ * * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] */ -#define BAUDRATE 250000 +#define BAUDRATE 115200 //#define BAUD_RATE_GCODE // Enable G-code M575 to set the baud rate @@ -149,9 +149,9 @@ * TMC5160, TMC5160_STANDALONE * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE'] */ -#define X_DRIVER_TYPE A4988 -#define Y_DRIVER_TYPE A4988 -#define Z_DRIVER_TYPE A4988 +#define X_DRIVER_TYPE TMC2209 +#define Y_DRIVER_TYPE TMC2209 +#define Z_DRIVER_TYPE TMC2209 //#define X2_DRIVER_TYPE A4988 //#define Y2_DRIVER_TYPE A4988 //#define Z2_DRIVER_TYPE A4988 @@ -163,8 +163,8 @@ //#define U_DRIVER_TYPE A4988 //#define V_DRIVER_TYPE A4988 //#define W_DRIVER_TYPE A4988 -#define E0_DRIVER_TYPE A4988 -//#define E1_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE TMC2209 +#define E1_DRIVER_TYPE TMC2209 //#define E2_DRIVER_TYPE A4988 //#define E3_DRIVER_TYPE A4988 //#define E4_DRIVER_TYPE A4988 @@ -700,9 +700,9 @@ #define DEFAULT_Ki_LIST { 1.08, 1.08 } #define DEFAULT_Kd_LIST { 114.00, 114.00 } #else - #define DEFAULT_Kp 22.20 - #define DEFAULT_Ki 1.08 - #define DEFAULT_Kd 114.00 + #define DEFAULT_Kp 23.90 + #define DEFAULT_Ki 2.12 + #define DEFAULT_Kd 67.41 #endif #else #define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current @@ -1220,9 +1220,9 @@ * Endstop "Hit" State * Set to the state (HIGH or LOW) that applies to each endstop. */ -#define X_MIN_ENDSTOP_HIT_STATE HIGH +#define X_MIN_ENDSTOP_HIT_STATE LOW #define X_MAX_ENDSTOP_HIT_STATE HIGH -#define Y_MIN_ENDSTOP_HIT_STATE HIGH +#define Y_MIN_ENDSTOP_HIT_STATE LOW #define Y_MAX_ENDSTOP_HIT_STATE HIGH #define Z_MIN_ENDSTOP_HIT_STATE HIGH #define Z_MAX_ENDSTOP_HIT_STATE HIGH @@ -1286,7 +1286,7 @@ * Override with M92 (when enabled below) * X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]] */ -#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 500 } +#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 405.05 } /** * Enable support for M92. Disable to save at least ~530 bytes of flash. @@ -1298,7 +1298,7 @@ * Override with M203 * X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]] */ -#define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 } +#define DEFAULT_MAX_FEEDRATE { 500, 500, 10, 70 } //#define LIMITED_MAX_FR_EDITING // Limit edit via M203 or LCD to DEFAULT_MAX_FEEDRATE * 2 #if ENABLED(LIMITED_MAX_FR_EDITING) @@ -1311,7 +1311,7 @@ * Override with M201 * X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]] */ -#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 } +#define DEFAULT_MAX_ACCELERATION { 750, 750, 100, 1000 } //#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2 #if ENABLED(LIMITED_MAX_ACCEL_EDITING) @@ -1326,9 +1326,9 @@ * M204 R Retract Acceleration * M204 T Travel Acceleration */ -#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration for printing moves -#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts -#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves +#define DEFAULT_ACCELERATION 300 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_RETRACT_ACCELERATION 1000 // E acceleration for retracts +#define DEFAULT_TRAVEL_ACCELERATION 300 // X, Y, Z acceleration for travel (non printing) moves /** * Default Jerk limits (mm/s) @@ -1338,11 +1338,11 @@ * When changing speed and direction, if the difference is less than the * value set here, it may happen instantaneously. */ -//#define CLASSIC_JERK +#define CLASSIC_JERK #if ENABLED(CLASSIC_JERK) - #define DEFAULT_XJERK 10.0 - #define DEFAULT_YJERK 10.0 - #define DEFAULT_ZJERK 0.3 + #define DEFAULT_XJERK 8.0 + #define DEFAULT_YJERK 8.0 + #define DEFAULT_ZJERK 0.4 #define DEFAULT_EJERK 5.0 //#define DEFAULT_IJERK 0.3 //#define DEFAULT_JJERK 0.3 @@ -1399,7 +1399,7 @@ #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 +#define USE_PROBE_FOR_Z_HOMING /** * Z_MIN_PROBE_PIN @@ -1456,7 +1456,7 @@ /** * The BLTouch probe uses a Hall effect sensor and emulates a servo. */ -//#define BLTOUCH +#define BLTOUCH /** * MagLev V4 probe by MDD @@ -1632,7 +1632,7 @@ * | [-] | * O-- FRONT --+ */ -#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 } +#define NOZZLE_TO_PROBE_OFFSET { -41.5, -6, 0} // Enable and set to use a specific tool for probing. Disable to allow any tool. #define PROBING_TOOL 0 @@ -1642,7 +1642,7 @@ // 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 10 +#define PROBING_MARGIN 30 // X and Y axis travel speed (mm/min) between probes. // Leave undefined to use the average of the current XY homing feedrate. @@ -1652,7 +1652,7 @@ #define Z_PROBE_FEEDRATE_FAST (4*60) // Feedrate (mm/min) for the "accurate" probe of each point -#define Z_PROBE_FEEDRATE_SLOW (Z_PROBE_FEEDRATE_FAST / 2) +#define Z_PROBE_FEEDRATE_SLOW (Z_PROBE_FEEDRATE_FAST) /** * Probe Activation Switch @@ -1734,7 +1734,7 @@ //#define PROBE_OFFSET_ZMAX 20 // (mm) // 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 @@ -1805,8 +1805,8 @@ // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. #define INVERT_X_DIR false -#define INVERT_Y_DIR true -#define INVERT_Z_DIR false +#define INVERT_Y_DIR false +#define INVERT_Z_DIR true //#define INVERT_I_DIR false //#define INVERT_J_DIR false //#define INVERT_K_DIR false @@ -1817,7 +1817,7 @@ // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR false +#define INVERT_E0_DIR true #define INVERT_E1_DIR false #define INVERT_E2_DIR false #define INVERT_E3_DIR false @@ -1876,8 +1876,8 @@ // @section geometry // The size of the printable area -#define X_BED_SIZE 200 -#define Y_BED_SIZE 200 +#define X_BED_SIZE 310 +#define Y_BED_SIZE 310 // Travel limits (linear=mm, rotational=°) after homing, corresponding to endstop positions. #define X_MIN_POS 0 @@ -1885,7 +1885,7 @@ #define Z_MIN_POS 0 #define X_MAX_POS X_BED_SIZE #define Y_MAX_POS Y_BED_SIZE -#define Z_MAX_POS 200 +#define Z_MAX_POS 400 //#define I_MIN_POS 0 //#define I_MAX_POS 50 //#define J_MIN_POS 0 @@ -2098,7 +2098,7 @@ */ //#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 @@ -2175,7 +2175,7 @@ #if ANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. - #define GRID_MAX_POINTS_X 3 + #define GRID_MAX_POINTS_X 4 #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X // Probe along the Y axis, advancing X after each column @@ -2270,7 +2270,7 @@ #endif // Add a menu item to move between bed corners for manual bed adjustment -//#define LCD_BED_TRAMMING +#define LCD_BED_TRAMMING #if ENABLED(LCD_BED_TRAMMING) #define BED_TRAMMING_INSET_LFRB { 30, 30, 30, 30 } // (mm) Left, Front, Right, Back insets @@ -2328,7 +2328,7 @@ * - Allows Z homing only when XY positions are known and trusted. * - If stepper drivers sleep, XY homing may be required again before Z homing. */ -//#define Z_SAFE_HOMING +#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) #define Z_SAFE_HOMING_X_POINT X_CENTER // (mm) X point for Z homing @@ -2418,12 +2418,12 @@ * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) */ -//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 //#define DISABLE_M503 // Saves ~2700 bytes of flash. Disable for release! #define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save flash. #define EEPROM_BOOT_SILENT // Keep M503 quiet and only give errors during first load #if ENABLED(EEPROM_SETTINGS) - //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. + #define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. //#define EEPROM_INIT_NOW // Init EEPROM on first boot after a new build. #endif @@ -2457,17 +2457,23 @@ // Preheat Constants - Up to 10 are supported without changes // #define PREHEAT_1_LABEL "PLA" -#define PREHEAT_1_TEMP_HOTEND 180 -#define PREHEAT_1_TEMP_BED 70 +#define PREHEAT_1_TEMP_HOTEND 210 +#define PREHEAT_1_TEMP_BED 60 #define PREHEAT_1_TEMP_CHAMBER 35 #define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 -#define PREHEAT_2_LABEL "ABS" +#define PREHEAT_2_LABEL "PETG" #define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 110 +#define PREHEAT_2_TEMP_BED 70 #define PREHEAT_2_TEMP_CHAMBER 35 #define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 +#define PREHEAT_3_LABEL "ABS" +#define PREHEAT_3_TEMP_HOTEND 240 +#define PREHEAT_3_TEMP_BED 110 +#define PREHEAT_3_TEMP_CHAMBER 35 +#define PREHEAT_3_FAN_SPEED 0 // Value from 0 to 255 + /** * @section nozzle park * @@ -2481,11 +2487,11 @@ * P1 Raise the nozzle always to Z-park height. * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS. */ -//#define NOZZLE_PARK_FEATURE +#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) // Specify a park position as { X, Y, Z_raise } - #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } + #define NOZZLE_PARK_POINT { (0), (0), 20 } #define NOZZLE_PARK_MOVE 0 // Park motion: 0 = XY Move, 1 = X Only, 2 = Y Only, 3 = X before Y, 4 = Y before X #define NOZZLE_PARK_Z_RAISE_MIN 2 // (mm) Always raise Z by at least this distance #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) @@ -2663,7 +2669,7 @@ * SD Card support is disabled by default. If your controller has an SD slot, * you must uncomment the following option or it won't work. */ -//#define SDSUPPORT +#define SDSUPPORT /** * SD CARD: ENABLE CRC @@ -3316,7 +3322,7 @@ // Usually paired with MKS Robin Nano V2 & V3 // https://github.com/makerbase-mks/MKS-TFT-Hardware/tree/master/MKS%20TS35 // -//#define MKS_TS35_V2_0 +#define MKS_TS35_V2_0 // // 320x240, 2.4", FSMC Display From MKS @@ -3421,7 +3427,7 @@ */ //#define TFT_CLASSIC_UI //#define TFT_COLOR_UI -//#define TFT_LVGL_UI +#define TFT_LVGL_UI #if ENABLED(TFT_COLOR_UI) /** @@ -3448,7 +3454,7 @@ #endif #if ENABLED(TFT_LVGL_UI) - //#define MKS_WIFI_MODULE // MKS WiFi module + #define MKS_WIFI_MODULE // MKS WiFi module #endif /** @@ -3477,7 +3483,7 @@ // // Touch Screen Settings // -//#define TOUCH_SCREEN +#define TOUCH_SCREEN #if ENABLED(TOUCH_SCREEN) #define BUTTON_DELAY_EDIT 50 // (ms) Button repeat delay for edit screens #define BUTTON_DELAY_MENU 250 // (ms) Button repeat delay for menus @@ -3528,7 +3534,7 @@ // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency // which is not as annoying as with the hardware PWM. On the other hand, if this frequency // is too low, you should also increment SOFT_PWM_SCALE. -//#define FAN_SOFT_PWM +#define FAN_SOFT_PWM // Incrementing this by 1 will double the software PWM frequency, // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. @@ -3608,7 +3614,7 @@ // Support for Adafruit NeoPixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW, NEO_RGBW, NEO_GRB, NEO_RBG, etc. + #define NEOPIXEL_TYPE NEO_RGB // NEO_GRBW, NEO_RGBW, NEO_GRB, NEO_RBG, etc. // See https://github.com/adafruit/Adafruit_NeoPixel/blob/master/Adafruit_NeoPixel.h //#define NEOPIXEL_PIN 4 // LED driving pin //#define NEOPIXEL2_TYPE NEOPIXEL_TYPE @@ -3630,11 +3636,11 @@ #endif // Use some of the NeoPixel LEDs for static (background) lighting - //#define NEOPIXEL_BKGD_INDEX_FIRST 0 // Index of the first background LED - //#define NEOPIXEL_BKGD_INDEX_LAST 5 // Index of the last background LED - //#define NEOPIXEL_BKGD_COLOR { 255, 255, 255, 0 } // R, G, B, W - //#define NEOPIXEL_BKGD_TIMEOUT_COLOR { 25, 25, 25, 0 } // R, G, B, W - //#define NEOPIXEL_BKGD_ALWAYS_ON // Keep the backlight on when other NeoPixels are off + #define NEOPIXEL_BKGD_INDEX_FIRST 0 // Index of the first background LED + #define NEOPIXEL_BKGD_INDEX_LAST 5 // Index of the last background LED + #define NEOPIXEL_BKGD_COLOR { 255, 255, 255, 0 } // R, G, B, W + #define NEOPIXEL_BKGD_TIMEOUT_COLOR { 25, 25, 25, 0 } // R, G, B, W + #define NEOPIXEL_BKGD_ALWAYS_ON // Keep the backlight on when other NeoPixels are off #endif /** @@ -3661,7 +3667,7 @@ * Set this manually if there are extra servos needing manual control. * Set to 0 to turn off servo support. */ -//#define NUM_SERVOS 3 // Note: Servo index starts with 0 for M280-M282 commands +#define NUM_SERVOS 1 // Note: Servo index starts with 0 for M280-M282 commands // (ms) Delay before the next move will start, to give the servo time to reach its target angle. // 300ms is a good value but you can try less delay. diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 3928078d64bc..9fd8a637da1e 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -686,7 +686,7 @@ * Multiple extruders can be assigned to the same pin in which case * the fan will turn on when any selected extruder is above the threshold. */ -#define E0_AUTO_FAN_PIN -1 +#define E0_AUTO_FAN_PIN FAN1_PIN #define E1_AUTO_FAN_PIN -1 #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 @@ -1762,9 +1762,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 PLR_BED_THRESHOLD BED_MAXTEMP // (°C) Skip user confirmation at or above this bed temperature (0 to disable) //#define POWER_LOSS_PIN 44 // Pin to detect power-loss. Set to -1 to disable default pin on boards without module, or comment to use board default. @@ -1832,13 +1832,13 @@ // Allow international symbols in long filenames. To display correctly, the // LCD's font must contain the characters. Check your selected LCD language. - //#define UTF_FILENAME_SUPPORT + #define UTF_FILENAME_SUPPORT - //#define LONG_FILENAME_HOST_SUPPORT // Get the long filename of a file/folder with 'M33 ' and list long filenames with 'M20 L' - //#define LONG_FILENAME_WRITE_SUPPORT // Create / delete files with long filenames via M28, M30, and Binary Transfer Protocol + #define LONG_FILENAME_HOST_SUPPORT // Get the long filename of a file/folder with 'M33 ' and list long filenames with 'M20 L' + #define LONG_FILENAME_WRITE_SUPPORT // Create / delete files with long filenames via M28, M30, and Binary Transfer Protocol //#define M20_TIMESTAMP_SUPPORT // Include timestamps by adding the 'T' flag to M20 commands - //#define SCROLL_LONG_FILENAMES // Scroll long filenames in the SD card menu + #define SCROLL_LONG_FILENAMES // Scroll long filenames in the SD card menu //#define SD_ABORT_NO_COOLDOWN // Leave the heaters on after Stop Print (not recommended!) @@ -1870,7 +1870,7 @@ * * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility. */ - //#define USB_FLASH_DRIVE_SUPPORT + //#define USB_FLASH_DRIVE_SUPPORT #if ENABLED(USB_FLASH_DRIVE_SUPPORT) /** * USB Host Shield Library @@ -1890,7 +1890,7 @@ /** * Native USB Host supported by some boards (USB OTG) */ - //#define USE_OTG_USB_HOST + #define USE_OTG_USB_HOST #if DISABLED(USE_OTG_USB_HOST) #define USB_CS_PIN SDSS @@ -2285,7 +2285,7 @@ * * Warning: Does not respect endstops! */ -//#define BABYSTEPPING +#define BABYSTEPPING #if ENABLED(BABYSTEPPING) //#define EP_BABYSTEPPING // M293/M294 babystepping with EMERGENCY_PARSER support //#define BABYSTEP_WITHOUT_HOMING @@ -2306,9 +2306,9 @@ #endif #endif - //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + #define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 - //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping + #define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets //#define BABYSTEP_GFX_OVERLAY // Enable graphical overlay on Z-offset editor @@ -2332,7 +2332,7 @@ * * See https://marlinfw.org/docs/features/lin_advance.html for full instructions. */ -//#define LIN_ADVANCE +#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) #if ENABLED(DISTINCT_E_FACTORS) #define ADVANCE_K { 0.22 } // (mm) Compression length per 1mm/s extruder speed, per extruder @@ -3328,7 +3328,7 @@ * Define your own with: * { , , hysteresis_start[1..8] } */ - #define CHOPPER_TIMING CHOPPER_DEFAULT_12V // All axes (override below) + #define CHOPPER_TIMING CHOPPER_DEFAULT_24V // All axes (override below) //#define CHOPPER_TIMING_X CHOPPER_TIMING // For X Axes (override below) //#define CHOPPER_TIMING_X2 CHOPPER_TIMING_X //#define CHOPPER_TIMING_Y CHOPPER_TIMING // For Y Axes (override below) @@ -3365,7 +3365,7 @@ * M912 - Clear stepper driver overtemperature pre-warn condition flag. * M122 - Report driver parameters (Requires TMC_DEBUG) */ - //#define MONITOR_DRIVER_STATUS + #define MONITOR_DRIVER_STATUS #if ENABLED(MONITOR_DRIVER_STATUS) #define CURRENT_STEP_DOWN 50 // [mA] @@ -3382,7 +3382,7 @@ * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD. * M913 X/Y/Z/E to live tune the setting */ - //#define HYBRID_THRESHOLD + #define HYBRID_THRESHOLD #define X_HYBRID_THRESHOLD 100 // [mm/s] #define X2_HYBRID_THRESHOLD 100 @@ -3472,13 +3472,16 @@ /** * Step on both rising and falling edge signals (as with a square wave). */ - #define EDGE_STEPPING + //#define EDGE_STEPPING + //Already enabled by default but interferes with TMC2209 + //in older versions it is //#define SQUARE_WAVE_STEPPING but now if we disable it it also asks: + #define NO_EDGE_STEPPING_WARNING /** * Enable M122 debugging command for TMC stepper drivers. * M122 S0/1 will enable continuous reporting. */ - //#define TMC_DEBUG + #define TMC_DEBUG /** * You can set your own advanced settings by filling in predefined functions. @@ -3932,7 +3935,7 @@ /** * Auto-report position with M154 S */ -//#define AUTO_REPORT_POSITION +#define AUTO_REPORT_POSITION #if ENABLED(AUTO_REPORT_POSITION) //#define AUTO_REPORT_REAL_POSITION // Auto-report the real position #endif @@ -4141,7 +4144,7 @@ * Host Prompt Support enables Marlin to use the host for user prompts so * filament runout and other processes can be managed from the host side. */ -//#define HOST_ACTION_COMMANDS +#define HOST_ACTION_COMMANDS #if ENABLED(HOST_ACTION_COMMANDS) //#define HOST_PAUSE_M76 // Tell the host to pause in response to M76 //#define HOST_PROMPT_SUPPORT // Initiate host prompts to get user feedback @@ -4624,7 +4627,7 @@ // // M43 - display pin status, toggle pins, watch pins, watch endstops & toggle LED, test servo probe // -//#define PINS_DEBUGGING +#define PINS_DEBUGGING // Enable Tests that will run at startup and produce a report //#define MARLIN_TEST_BUILD diff --git a/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp index 4b2474a8e619..d1835678032e 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp @@ -307,6 +307,10 @@ void lv_draw_dialog(uint8_t type) { else if (DIALOG_IS(TYPE_FINISH_PRINT)) { lv_label_set_text(labelDialog, print_file_dialog_menu.print_finish); lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20); + + sprintf_P(public_buf_l, PSTR("%s: %d%d:%d%d:%d%d"), print_file_dialog_menu.print_time, print_time.hours / 10, print_time.hours % 10, print_time.minutes / 10, print_time.minutes % 10, print_time.seconds / 10, print_time.seconds % 10); + lv_obj_t *labelPrintTime = lv_label_create(scr, public_buf_l); + lv_obj_align(labelPrintTime, nullptr, LV_ALIGN_CENTER, 0, -60); } else if (DIALOG_IS(PAUSE_MESSAGE_PARKING)) { lv_label_set_text(labelDialog, pause_msg_menu.pausing); diff --git a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp index 2a906ff80fe3..0d71630c7e84 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp @@ -115,8 +115,8 @@ void gCfgItems_init() { gCfgItems.curFilesize = 0; gCfgItems.finish_power_off = false; gCfgItems.pause_reprint = false; - gCfgItems.pausePosX = -1; - gCfgItems.pausePosY = -1; + gCfgItems.pausePosX = 50; + gCfgItems.pausePosY = 0; gCfgItems.pausePosZ = 5; gCfgItems.trammingPos[0].x = X_MIN_POS + 30; gCfgItems.trammingPos[0].y = Y_MIN_POS + 30; @@ -132,9 +132,9 @@ void gCfgItems_init() { gCfgItems.wifi_mode_sel = STA_MODEL; gCfgItems.fileSysType = FILE_SYS_SD; gCfgItems.wifi_type = ESP_WIFI; - gCfgItems.filamentchange_load_length = 200; - gCfgItems.filamentchange_load_speed = 1000; - gCfgItems.filamentchange_unload_length = 200; + gCfgItems.filamentchange_load_length = 40; + gCfgItems.filamentchange_load_speed = 250; + gCfgItems.filamentchange_unload_length = 120; gCfgItems.filamentchange_unload_speed = 1000; gCfgItems.filament_limit_temp = 200; diff --git a/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp b/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp index 26979af2703f..f6eb32941b69 100644 --- a/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp +++ b/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp @@ -43,7 +43,7 @@ extern uint32_t To_pre_view; extern bool flash_preview_begin, default_preview_flg, gcode_preview_over; void printer_state_polling() { - char str_1[16]; + char str_1[16], str_2[16]; //str_2[16] е добавен заради грешка на MKS if (uiCfg.print_state == PAUSING) { #if HAS_MEDIA if (!planner.has_blocks_queued() && card.getIndex() > MIN_FILE_PRINTED) @@ -65,7 +65,7 @@ void printer_state_polling() { gcode.process_subcommands_now(public_buf_l); } if (gCfgItems.pausePosX != (float)-1 && gCfgItems.pausePosY != (float)-1) { - sprintf_P(public_buf_l, PSTR("G1 X%s Y%s"), dtostrf(gCfgItems.pausePosX, 1, 1, str_1), dtostrf(gCfgItems.pausePosY, 1, 1, str_1)); + sprintf_P(public_buf_l, PSTR("G1 X%s Y%s"), dtostrf(gCfgItems.pausePosX, 1, 1, str_1), dtostrf(gCfgItems.pausePosY, 1, 1, str_2)); gcode.process_subcommands_now(public_buf_l); } uiCfg.print_state = PAUSED; @@ -85,7 +85,7 @@ void printer_state_polling() { if (uiCfg.print_state == RESUMING) { if (IS_SD_PAUSED()) { if (gCfgItems.pausePosX != (float)-1 && gCfgItems.pausePosY != (float)-1) { - sprintf_P(public_buf_m, PSTR("G1 X%s Y%s"), dtostrf(uiCfg.current_x_position_bak, 1, 1, str_1), dtostrf(uiCfg.current_y_position_bak, 1, 1, str_1)); + sprintf_P(public_buf_m, PSTR("G1 X%s Y%s"), dtostrf(uiCfg.current_x_position_bak, 1, 1, str_1), dtostrf(uiCfg.current_y_position_bak, 1, 1, str_2)); gcode.process_subcommands_now(public_buf_m); } if (gCfgItems.pausePosZ != (float)-1) { diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h index 050c8f242462..6f81ce497461 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h @@ -169,7 +169,8 @@ #endif #ifndef POWER_LOSS_PIN - #define POWER_LOSS_PIN PA13 // PW_DET + // otherwise "Power Outage" when starting a program (or resistor) + //#define POWER_LOSS_PIN PA13 // PW_DET #endif //#define SUICIDE_PIN PB2 diff --git a/README.md b/README.md index 43407f9da6dd..db407888d572 100644 --- a/README.md +++ b/README.md @@ -1,142 +1,79 @@ -

MarlinFirmware's logo

+# SUNLU S9 with MKS Robin Nano V3 -

Marlin 3D Printer Firmware

+Marlin Firmware configured for SUNLU S9 with MKS Robin Nano V3 motherboard. -

- GPL-V3.0 License - Contributors - Last Release Date - CI Status - GitHub Sponsors -
- Follow MarlinFirmware on Mastodon -

+Based on [Marlin](https://github.com/MarlinFirmware/Marlin) sources. -Additional documentation can be found at the [Marlin Home Page](//marlinfw.org/). -Please test this firmware and let us know if it misbehaves in any way. Volunteers are standing by! -## Marlin 2.1 Bugfix Branch +### Commit - Minimal installation. -__Not for production use. Use with caution!__ +Configured as 'SUNLU S9+' -Marlin 2.1 takes this popular RepRap firmware to the next level by adding support for much faster 32-bit and ARM-based boards while improving support for 8-bit AVR boards. Read about Marlin's decision to use a "Hardware Abstraction Layer" below. +'MKS Robin Nano V3' Minimum Configuration -This branch is for patches to the latest 2.1.x release version. Periodically this branch will form the basis for the next minor 2.1.x release. +Stepper drivers A4988 -Download earlier versions of Marlin on the [Releases page](//github.com/MarlinFirmware/Marlin/releases). +\+ LIN_ADVANCE -## Example Configurations -Before you can build Marlin for your machine you'll need a configuration for your specific hardware. Upon request, your vendor will be happy to provide you with the complete source code and configurations for your machine, but you'll need to get updated configuration files if you want to install a newer version of Marlin. Fortunately, Marlin users have contributed dozens of tested configurations to get you started. Visit the [MarlinFirmware/Configurations](//github.com/MarlinFirmware/Configurations) repository to find the right configuration for your hardware. +### Commit - MKS Lcd -## Building Marlin 2.1 +Fixed observed bugs in MKS. -To build and upload Marlin you will use one of these tools: +At the end of a program, the elapsed time is displayed (from version 2.0.9.2) -- The free [Visual Studio Code](//code.visualstudio.com/download) using the [Auto Build Marlin](//marlinfw.org/docs/basics/auto_build_marlin.html) extension. -- The free [Arduino IDE](//www.arduino.cc/en/main/software) : See [Building Marlin with Arduino](//marlinfw.org/docs/basics/install_arduino.html) -- You can also use VSCode with devcontainer : See [Installing Marlin (VSCode devcontainer)](http://marlinfw.org/docs/basics/install_devcontainer_vscode.html). -Marlin is optimized to build with the **PlatformIO IDE** extension for **Visual Studio Code**. You can still build Marlin with **Arduino IDE**, and we hope to improve the Arduino build experience, but at this time PlatformIO is the better choice. +### Commit - Direct drive -## 8-Bit AVR Boards +'BMG Dual Drive' extruder with 'Ender-3 CR10' head -We intend to continue supporting 8-bit AVR boards in perpetuity, maintaining a single codebase that can apply to all machines. We want casual hobbyists and tinkerers and owners of older machines to benefit from the community's innovations just as much as those with fancier machines. Plus, those old AVR-based machines are often the best for your testing and feedback! +Calibrated by M303 E0 S250 C8 U for 'Ender-3 CR10' head -## Hardware Abstraction Layer (HAL) +3 materials in Preheat Constants. (on MKS_TS35_V2_0 only 2 work) -Marlin includes an abstraction layer to provide a common API for all the platforms it targets. This allows Marlin code to address the details of motion and user interface tasks at the lowest and highest levels with no system overhead, tying all events directly to the hardware clock. -Every new HAL opens up a world of hardware. At this time we need HALs for RP2040 and the Duet3D family of boards. A HAL that wraps an RTOS is an interesting concept that could be explored. Did you know that Marlin includes a Simulator that can run on Windows, macOS, and Linux? Join the Discord to help move these sub-projects forward! +### Commit - Stepper drivers TMC2209 -### Supported Platforms +Marlin error in LIN_ADVANCE: - Platform|MCU|Example Boards - --------|---|------- - [Arduino AVR](//www.arduino.cc/)|ATmega|RAMPS, Melzi, RAMBo - [Teensy++ 2.0](//www.microchip.com/en-us/product/AT90USB1286)|AT90USB1286|Printrboard - [Arduino Due](//www.arduino.cc/en/Guide/ArduinoDue)|SAM3X8E|RAMPS-FD, RADDS, RAMPS4DUE - [ESP32](//github.com/espressif/arduino-esp32)|ESP32|FYSETC E4, E4d@BOX, MRR - [LPC1768](//www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1700-cortex-m3/512-kb-flash-64-kb-sram-ethernet-usb-lqfp100-package:LPC1768FBD100)|ARM® Cortex-M3|MKS SBASE, Re-ARM, Selena Compact - [LPC1769](//www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1700-cortex-m3/512-kb-flash-64-kb-sram-ethernet-usb-lqfp100-package:LPC1769FBD100)|ARM® Cortex-M3|Smoothieboard, Azteeg X5 mini, TH3D EZBoard - [STM32F103](//www.st.com/en/microcontrollers-microprocessors/stm32f103.html)|ARM® Cortex-M3|Malyan M200, GTM32 Pro, MKS Robin, BTT SKR Mini - [STM32F401](//www.st.com/en/microcontrollers-microprocessors/stm32f401.html)|ARM® Cortex-M4|ARMED, Rumba32, SKR Pro, Lerdge, FYSETC S6, Artillery Ruby - [STM32F7x6](//www.st.com/en/microcontrollers-microprocessors/stm32f7x6.html)|ARM® Cortex-M7|The Borg, RemRam V1 - [STM32G0B1RET6](//www.st.com/en/microcontrollers-microprocessors/stm32g0x1.html)|ARM® Cortex-M0+|BigTreeTech SKR mini E3 V3.0 - [STM32H743xIT6](//www.st.com/en/microcontrollers-microprocessors/stm32h743-753.html)|ARM® Cortex-M7|BigTreeTech SKR V3.0, SKR EZ V3.0, SKR SE BX V2.0/V3.0 - [SAMD51P20A](//www.adafruit.com/product/4064)|ARM® Cortex-M4|Adafruit Grand Central M4 - [Teensy 3.5](//www.pjrc.com/store/teensy35.html)|ARM® Cortex-M4| - [Teensy 3.6](//www.pjrc.com/store/teensy36.html)|ARM® Cortex-M4| - [Teensy 4.0](//www.pjrc.com/store/teensy40.html)|ARM® Cortex-M7| - [Teensy 4.1](//www.pjrc.com/store/teensy41.html)|ARM® Cortex-M7| - Linux Native|x86/ARM/etc.|Raspberry Pi - [All supported boards](//marlinfw.org/docs/hardware/boards.html#boards-list)|All platforms|All boards +" +//#define EDGE_STEPPING -## Marlin Support +//Already enabled by default but interferes with TMC2209 -The Issue Queue is reserved for Bug Reports and Feature Requests. Please use the following resources for help with configuration and troubleshooting: +//in older versions it is //#define SQUARE_WAVE_STEPPING but now if we disable it it also asks: -- [Marlin Documentation](//marlinfw.org) - Official Marlin documentation -- [Marlin Discord](//discord.com/servers/marlin-firmware-461605380783472640) - Discuss issues with Marlin users and developers -- Facebook Group ["Marlin Firmware"](//www.facebook.com/groups/1049718498464482/) -- RepRap.org [Marlin Forum](//forums.reprap.org/list.php?415) -- Facebook Group ["Marlin Firmware for 3D Printers"](//www.facebook.com/groups/3Dtechtalk/) -- [Marlin Configuration](//www.youtube.com/results?search_query=marlin+configuration) on YouTube +#define NO_EDGE_STEPPING_WARNING +" -## Contributing Patches +\+ More diagnostics -You can contribute patches by submitting a Pull Request to the ([bugfix-2.1.x](//github.com/MarlinFirmware/Marlin/tree/bugfix-2.1.x)) branch. -- We use branches named with a "bugfix" or "dev" prefix to fix bugs and integrate new features. -- Follow the [Coding Standards](//marlinfw.org/docs/development/coding_standards.html) to gain points with the maintainers. -- Please submit Feature Requests and Bug Reports to the [Issue Queue](//github.com/MarlinFirmware/Marlin/issues/new/choose). See above for user support. -- Whenever you add new features, be sure to add one or more build tests to `buildroot/tests`. Any tests added to a PR will be run within that PR on GitHub servers as soon as they are pushed. To minimize iteration be sure to run your new tests locally, if possible. - - Local build tests: - - All: `make tests-config-all-local` - - Single: `make tests-config-single-local TEST_TARGET=...` - - Local build tests in Docker: - - All: `make tests-config-all-local-docker` - - Single: `make tests-config-all-local-docker TEST_TARGET=...` - - To run all unit test suites: - - Using PIO: `platformio run -t test-marlin` - - Using Make: `make unit-test-all-local` - - Using Docker + make: `maker unit-test-all-local-docker` - - To run a single unit test suite: - - Using PIO: `platformio run -t marlin_` - - Using make: `make unit-test-single-local TEST_TARGET=` - - Using Docker + make: `maker unit-test-single-local-docker TEST_TARGET=` -- If your feature can be unit tested, add one or more unit tests. For more information see our documentation on [Unit Tests](test). +### Commit - Allow international symbols in long filenames. -## Contributors +But MKS TS35 V2 0 has problem with Cyrillic fonts. -Marlin is constantly improving thanks to a huge number of contributors from all over the world bringing their specialties and talents. Huge thanks are due to [all the contributors](//github.com/MarlinFirmware/Marlin/graphs/contributors) who regularly patch up bugs, help direct traffic, and basically keep Marlin from falling apart. Marlin's continued existence would not be possible without them. -Marlin Firmware original logo design by Ahmet Cem TURAN [@ahmetcemturan](//github.com/ahmetcemturan). +### Commit - Indicator MKS_MINI_12864_V3 -## Project Leadership +The test is successful. For now I only need it for backup. But they say it works with Klipper too. -Name|Role|Link|Donate -----|----|----|---- -🇺🇸 Scott Lahteine|Project Lead|[[@thinkyhead](//github.com/thinkyhead)]|[💸 Donate](//marlinfw.org/docs/development/contributing.html#donate) -🇺🇸 Roxanne Neufeld|Admin|[[@Roxy-3D](//github.com/Roxy-3D)]| -🇺🇸 Keith Bennett|Admin|[[@thisiskeithb](//github.com/thisiskeithb)]|[💸 Donate](//github.com/sponsors/thisiskeithb) -🇺🇸 Jason Smith|Admin|[[@sjasonsmith](//github.com/sjasonsmith)]| -🇧🇷 Victor Oliveira|Admin|[[@rhapsodyv](//github.com/rhapsodyv)]| -🇬🇧 Chris Pepper|Admin|[[@p3p](//github.com/p3p)]| -🇳🇿 Peter Ellens|Admin|[[@ellensp](//github.com/ellensp)]|[💸 Donate](//ko-fi.com/ellensp) -🇺🇸 Bob Kuhn|Admin|[[@Bob-the-Kuhn](//github.com/Bob-the-Kuhn)]| -🇳🇱 Erik van der Zalm|Founder|[[@ErikZalm](//github.com/ErikZalm)]| - -## Star History - - - - - - Star History Chart - - - -## License - -Marlin is published under the [GPL license](/LICENSE) because we believe in open development. The GPL comes with both rights and obligations. Whether you use Marlin firmware as the driver for your open or closed-source product, you must keep Marlin open, and you must provide your compatible Marlin source code to end users upon request. The most straightforward way to comply with the Marlin license is to make a fork of Marlin on Github, perform your modifications, and direct users to your modified fork. + +### Commit - Back to MKS_TS35_V2_0 + + + + +## Other tests: + +can be replaced: + +" +//#define TFT_CLASSIC_UI + +//#define TFT_COLOR_UI + +#define TFT_LVGL_UI +" + +but without TFT_LVGL_UI there is no MKS_WIFI_MODULE \ No newline at end of file diff --git a/platformio.ini b/platformio.ini index 5c9be792f03d..35209bfb31ef 100644 --- a/platformio.ini +++ b/platformio.ini @@ -13,7 +13,7 @@ [platformio] src_dir = Marlin boards_dir = buildroot/share/PlatformIO/boards -default_envs = mega2560 +default_envs = mks_robin_nano_v3_1_usb_flash_drive_msc include_dir = Marlin extra_configs = Marlin/config.ini