Compare commits
84 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4894f35e39 | |||
| 11ae89e290 | |||
| 9a570b23a3 | |||
| 1b091ecb87 | |||
| a75a5f8b2a | |||
| 80dd02fbdb | |||
| e6755450df | |||
| 9215bf791b | |||
| 0e1b62e094 | |||
| 64ffa0d4f4 | |||
| e6680ddfdf | |||
| 5c0696b51a | |||
| d438436f0c | |||
| 2f322e8084 | |||
| a3a4da5ff2 | |||
| bba892e327 | |||
| 25172b3acf | |||
| 0b6ecbd553 | |||
| de6246f826 | |||
| e813742ae0 | |||
| 46c8204990 | |||
| bdfe4ca4d1 | |||
| 6741f5182d | |||
| 489b75ae3c | |||
| 378fc12628 | |||
| 0cedad36d1 | |||
| 07b2480d30 | |||
| dd88eb56ee | |||
| fc77afd93e | |||
| 26af3e70bc | |||
| 0c15e8e751 | |||
| 639a2dc0b3 | |||
| 91a094d8cb | |||
| 66efa0b09b | |||
| 3226adf2a6 | |||
| 29822ee60e | |||
| 442d28485e | |||
| 29f85afe50 | |||
| c653a0f423 | |||
| 1fab2ef94f | |||
| 102c43dcd5 | |||
| 5284f45c62 | |||
| 9aaa7b1100 | |||
| a6c4c5a3f7 | |||
| 78c57f2847 | |||
| 90b0be5e12 | |||
| c24456353f | |||
| 9a9a112673 | |||
| 0977129353 | |||
| ffa8e0ce60 | |||
| cbaf1af0fe | |||
| ec7a4eb69e | |||
| 4f62ae9764 | |||
| b8dfc53693 | |||
| a30ae0aeca | |||
| 0cc6955ab7 | |||
| 32e8f90271 | |||
| 8b10b829fd | |||
| eab8ad6b16 | |||
| 35180fedd8 | |||
| 4ddd6d27c1 | |||
| 5b6317dd5b | |||
| 125e537dd1 | |||
| 1055cd4efa | |||
| 9b6037515f | |||
| 6bdc99be5f | |||
| d6abfd2523 | |||
| 4f0615be7b | |||
| dd345679d3 | |||
| b59301894a | |||
| 3165043527 | |||
| cd3bf4c766 | |||
| 30162df320 | |||
| 2d160b8461 | |||
| aa5a7f5c13 | |||
| e4e9915d84 | |||
| 8fe3650376 | |||
| 23d024309e | |||
| 62465cdf23 | |||
| 9eb4fc1cfd | |||
| 40de56b58b | |||
| 4a56689801 | |||
| 0216e032be | |||
| 2d8aa0cea1 |
+372
-108
@@ -1,3 +1,50 @@
|
||||
// If you have a trex 3, stock is this option plus 2208 on all axis. None in spreadcycle.
|
||||
#define TREX3
|
||||
|
||||
// If you have a trex 3 that was upgraded from a 2+ with the kit, modifies home position and offsets.
|
||||
//#define TREX3_UPGRADE
|
||||
|
||||
//Stock 2+ X is a 4988, all options off defaults to this
|
||||
//#define X_2208
|
||||
//#define X_Spreadcycle
|
||||
//#define X_S109
|
||||
|
||||
// Y all options off defaults to 2+ 8825 / 3 2208
|
||||
//#define Y_2208 // Highly recommended as large prints with high mass can cause layer shifts with stealthchop at high speed
|
||||
//#define Y_Spreadcycle
|
||||
//#define Y_4988 // Some machines shipped with 4988 drivers across the board. Set this if you arent sure what you have and all the drivers look identical
|
||||
//#define Y_S109
|
||||
|
||||
//Stock 2+ Z is a 8825, all options off defaults to this
|
||||
//#define Z_2208 // NOT Recommended! Dual stepper current draw is above the recommended limit for this driver
|
||||
//#define Z_4988 // Some machines shipped with 4988 drivers across the board. Set this if you arent sure what you have and all the drivers look identical
|
||||
//#define Z_Spreadcycle
|
||||
//#define Z_S109
|
||||
|
||||
//Stock 2+ Z is a 4988, all options off defaults to this
|
||||
//#define E_2208 // Not Recommended! Stealthchop mode faults with linear advance
|
||||
//#define E_Spreadcycle
|
||||
//#define E_S109
|
||||
|
||||
#define BedAC
|
||||
|
||||
#define tallVersion
|
||||
|
||||
#define ABL_Bilinear
|
||||
/*
|
||||
* Enables a filament sensor plugged into the laser pin. Disables the laser
|
||||
*/
|
||||
//#define FilamentSensor // Standard older TM3D runout sensor
|
||||
//#define lerdgeFilSensor // Newer inverted logic TM3D Runout Sensor
|
||||
//#define filamentEncoder
|
||||
|
||||
//#define autoCalibrationKit
|
||||
|
||||
|
||||
//#define SKR12Pro
|
||||
|
||||
//////////////////////////////////DO not edit below here unless you know what youre doing! //////////////////////////////////
|
||||
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
@@ -21,6 +68,22 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
// The TREX2+ upgraded to the 3 enables most of the same options, simplify here
|
||||
#if ENABLED(TREX3_UPGRADE)
|
||||
#define TREX3
|
||||
#endif
|
||||
|
||||
#if ENABLED(TREX3)
|
||||
#if DISABLED(X_S109)
|
||||
#define X_2208
|
||||
#endif
|
||||
#if DISABLED(Y_S109)
|
||||
#define Y_2208
|
||||
#endif
|
||||
#define Z_2208
|
||||
#define E_2208
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Configuration.h
|
||||
*
|
||||
@@ -61,14 +124,20 @@
|
||||
// @section info
|
||||
|
||||
// Author info of this build printed to the host during boot and M115
|
||||
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
|
||||
//#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes)
|
||||
#define STRING_CONFIG_H_AUTHOR "Tinymachines3D" // Who made the changes.
|
||||
#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes)
|
||||
|
||||
// @section machine
|
||||
|
||||
// Choose the name from boards.h that matches your setup
|
||||
#ifndef MOTHERBOARD
|
||||
#define MOTHERBOARD BOARD_RAMPS_14_EFB
|
||||
#if ENABLED(SKR12Pro)
|
||||
#define MOTHERBOARD BOARD_BTT_SKR_PRO_V1_2
|
||||
#elif ENABLED(TREX3)
|
||||
#define MOTHERBOARD BOARD_FORMBOT_TREX3
|
||||
#else
|
||||
#define MOTHERBOARD BOARD_FORMBOT_TREX2PLUS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -79,7 +148,11 @@
|
||||
*
|
||||
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
|
||||
*/
|
||||
#define SERIAL_PORT 0
|
||||
#if ENABLED(SKR12Pro)
|
||||
#define SERIAL_PORT -1
|
||||
#else
|
||||
#define SERIAL_PORT 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Serial Port Baud Rate
|
||||
@@ -101,7 +174,9 @@
|
||||
* Currently Ethernet (-2) is only supported on Teensy 4.1 boards.
|
||||
* :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7]
|
||||
*/
|
||||
//#define SERIAL_PORT_2 -1
|
||||
#if ENABLED(SKR12Pro)
|
||||
#define SERIAL_PORT_2 1
|
||||
#endif
|
||||
//#define BAUDRATE_2 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE
|
||||
|
||||
/**
|
||||
@@ -115,8 +190,15 @@
|
||||
// Enable the Bluetooth serial interface on AT90USB devices
|
||||
//#define BLUETOOTH
|
||||
|
||||
// Name displayed in the LCD "Ready" message and Info menu
|
||||
//#define CUSTOM_MACHINE_NAME "3D Printer"
|
||||
// Optional custom name for your RepStrap or other custom machine
|
||||
// Displayed in the LCD "Ready" message
|
||||
#if ENABLED(TREX3_UPGRADE)
|
||||
#define CUSTOM_MACHINE_TIME "T-REX 3(u)"
|
||||
#elif ENABLED(TREX3)
|
||||
#define CUSTOM_MACHINE_NAME "T-REX 3"
|
||||
#else
|
||||
#define CUSTOM_MACHINE_NAME "T-REX 2+"
|
||||
#endif
|
||||
|
||||
// Printer's unique ID, used by some programs to differentiate between machines.
|
||||
// Choose your own or use a service like https://www.uuidgenerator.net/version4
|
||||
@@ -139,9 +221,65 @@
|
||||
* 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
|
||||
|
||||
#if ENABLED(SKR12Pro)
|
||||
#if ENABLED(TMC2209Upgrade)
|
||||
#define X_DRIVER_TYPE TMC2209
|
||||
#define X2_DRIVER_TYPE TMC2209
|
||||
#define Y_DRIVER_TYPE TMC2209
|
||||
#define Z_DRIVER_TYPE TMC2209
|
||||
#define E0_DRIVER_TYPE TMC2209
|
||||
#define E1_DRIVER_TYPE TMC2209
|
||||
#else
|
||||
#define X_DRIVER_TYPE TMC2208
|
||||
#define X2_DRIVER_TYPE TMC2208
|
||||
#define Y_DRIVER_TYPE TMC2208
|
||||
#define Z_DRIVER_TYPE TMC2208
|
||||
#define E0_DRIVER_TYPE TMC2208
|
||||
#define E1_DRIVER_TYPE TMC2208
|
||||
#endif
|
||||
#else
|
||||
#if ENABLED(X_2208)
|
||||
#define X_DRIVER_TYPE TMC2208_STANDALONE
|
||||
#define X2_DRIVER_TYPE TMC2208_STANDALONE
|
||||
#else
|
||||
#define X_DRIVER_TYPE A4988
|
||||
#define X2_DRIVER_TYPE A4988
|
||||
#endif
|
||||
#if ENABLED(Y_2208)
|
||||
#define Y_DRIVER_TYPE TMC2208_STANDALONE
|
||||
#elif ENABLED(Y_4988)
|
||||
#define Y_DRIVER_TYPE A4988
|
||||
#else
|
||||
#define Y_DRIVER_TYPE DRV8825
|
||||
#endif
|
||||
#if ENABLED(Z_2208)
|
||||
#define Z_DRIVER_TYPE TMC2208_STANDALONE
|
||||
#elif ENABLED(Z_4988)
|
||||
#define Z_DRIVER_TYPE A4988
|
||||
#else
|
||||
#define Z_DRIVER_TYPE DRV8825
|
||||
#endif
|
||||
|
||||
#if ENABLED(E_2208)
|
||||
#define E0_DRIVER_TYPE TMC2208_STANDALONE
|
||||
#define E1_DRIVER_TYPE TMC2208_STANDALONE
|
||||
#else
|
||||
#define E0_DRIVER_TYPE DRV8825
|
||||
#define E1_DRIVER_TYPE DRV8825
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//#define E2_DRIVER_TYPE A4988
|
||||
//#define E3_DRIVER_TYPE A4988
|
||||
//#define E4_DRIVER_TYPE A4988
|
||||
//#define E5_DRIVER_TYPE A4988
|
||||
//#define E6_DRIVER_TYPE A4988
|
||||
//#define E7_DRIVER_TYPE A4988
|
||||
|
||||
//#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
|
||||
@@ -153,7 +291,7 @@
|
||||
//#define U_DRIVER_TYPE A4988
|
||||
//#define V_DRIVER_TYPE A4988
|
||||
//#define W_DRIVER_TYPE A4988
|
||||
#define E0_DRIVER_TYPE A4988
|
||||
//#define E0_DRIVER_TYPE A4988
|
||||
//#define E1_DRIVER_TYPE A4988
|
||||
//#define E2_DRIVER_TYPE A4988
|
||||
//#define E3_DRIVER_TYPE A4988
|
||||
@@ -208,7 +346,7 @@
|
||||
|
||||
// This defines the number of extruders
|
||||
// :[0, 1, 2, 3, 4, 5, 6, 7, 8]
|
||||
#define EXTRUDERS 1
|
||||
#define EXTRUDERS 2
|
||||
|
||||
// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
|
||||
#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
|
||||
@@ -362,7 +500,12 @@
|
||||
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
|
||||
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
|
||||
// For the other hotends it is their distance from the extruder 0 hotend.
|
||||
//#define HOTEND_OFFSET_X { 0.0, 20.00 } // (mm) relative X-offset for each nozzle
|
||||
#if ENABLED(TREX3)
|
||||
#define HOTEND_OFFSET_X {0.0, 438.5} // (mm) relative X-offset for each nozzle
|
||||
#else
|
||||
#define HOTEND_OFFSET_X {0.0, 442.0} // (mm) relative X-offset for each nozzle
|
||||
#endif
|
||||
|
||||
//#define HOTEND_OFFSET_Y { 0.0, 5.00 } // (mm) relative Y-offset for each nozzle
|
||||
//#define HOTEND_OFFSET_Z { 0.0, 0.00 } // (mm) relative Z-offset for each nozzle
|
||||
|
||||
@@ -553,15 +696,24 @@
|
||||
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
|
||||
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
|
||||
*/
|
||||
#define TEMP_SENSOR_0 1
|
||||
#define TEMP_SENSOR_1 0
|
||||
#if ENABLED(TREX3)
|
||||
#define TEMP_SENSOR_0 1047
|
||||
#define TEMP_SENSOR_1 61
|
||||
#else
|
||||
#define TEMP_SENSOR_0 1
|
||||
#define TEMP_SENSOR_1 1
|
||||
#endif
|
||||
#define TEMP_SENSOR_2 0
|
||||
#define TEMP_SENSOR_3 0
|
||||
#define TEMP_SENSOR_4 0
|
||||
#define TEMP_SENSOR_5 0
|
||||
#define TEMP_SENSOR_6 0
|
||||
#define TEMP_SENSOR_7 0
|
||||
#define TEMP_SENSOR_BED 1
|
||||
#if(ENABLED(BedAC))
|
||||
#define TEMP_SENSOR_BED 11
|
||||
#else
|
||||
#define TEMP_SENSOR_BED 0
|
||||
#endif
|
||||
#define TEMP_SENSOR_PROBE 0
|
||||
#define TEMP_SENSOR_CHAMBER 0
|
||||
#define TEMP_SENSOR_COOLER 0
|
||||
@@ -588,14 +740,14 @@
|
||||
#endif
|
||||
|
||||
#if HAS_E_TEMP_SENSOR
|
||||
#define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109
|
||||
#define TEMP_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
|
||||
#define TEMP_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
|
||||
#define TEMP_RESIDENCY_TIME 2 // (seconds) Time to wait for hotend to "settle" in M109
|
||||
#define TEMP_WINDOW 5 // (°C) Temperature proximity for the "temperature reached" timer
|
||||
#define TEMP_HYSTERESIS 5 // (°C) Temperature proximity considered "close enough" to the target
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_BED
|
||||
#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) Time to wait for bed to "settle" in M190
|
||||
#define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
|
||||
#define TEMP_BED_WINDOW 2 // (°C) Temperature proximity for the "temperature reached" timer
|
||||
#define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
|
||||
#endif
|
||||
|
||||
@@ -637,8 +789,13 @@
|
||||
// Above this temperature the heater will be switched off.
|
||||
// This can protect components from overheating, but NOT from shorts and failures.
|
||||
// (Use MINTEMP for thermistor short/failure protection.)
|
||||
#define HEATER_0_MAXTEMP 275
|
||||
#define HEATER_1_MAXTEMP 275
|
||||
#if ENABLED(TREX3)
|
||||
#define HEATER_0_MAXTEMP 350
|
||||
#define HEATER_1_MAXTEMP 350
|
||||
#else
|
||||
#define HEATER_0_MAXTEMP 410
|
||||
#define HEATER_1_MAXTEMP 295
|
||||
#endif
|
||||
#define HEATER_2_MAXTEMP 275
|
||||
#define HEATER_3_MAXTEMP 275
|
||||
#define HEATER_4_MAXTEMP 275
|
||||
@@ -679,19 +836,25 @@
|
||||
|
||||
#if ENABLED(PIDTEMP)
|
||||
//#define PID_DEBUG // Print PID debug data to the serial port. Use 'M303 D' to toggle activation.
|
||||
//#define PID_PARAMS_PER_HOTEND // Use separate PID parameters for each extruder (useful for mismatched extruders)
|
||||
#define PID_PARAMS_PER_HOTEND // Use separate PID parameters for each extruder (useful for mismatched extruders)
|
||||
// Set/get with G-code: M301 E[extruder number, 0-2]
|
||||
|
||||
#if ENABLED(PID_PARAMS_PER_HOTEND)
|
||||
// Specify up to one value per hotend here, according to your setup.
|
||||
// If there are fewer values, the last one applies to the remaining hotends.
|
||||
#define DEFAULT_Kp_LIST { 22.20, 22.20 }
|
||||
#define DEFAULT_Ki_LIST { 1.08, 1.08 }
|
||||
#define DEFAULT_Kd_LIST { 114.00, 114.00 }
|
||||
#if ENABLED(TREX3)
|
||||
#define DEFAULT_Kp_LIST { 14.64, 14.64 }
|
||||
#define DEFAULT_Ki_LIST { 1.08, 1.08 }
|
||||
#define DEFAULT_Kd_LIST { 53.36, 53.36 }
|
||||
#else
|
||||
#define DEFAULT_Kp_LIST { 22.20, 22.20 }
|
||||
#define DEFAULT_Ki_LIST { 1.08, 1.08 }
|
||||
#define DEFAULT_Kd_LIST { 114.00, 114.00 }
|
||||
#endif
|
||||
#else
|
||||
#define DEFAULT_Kp 22.20
|
||||
#define DEFAULT_Ki 1.08
|
||||
#define DEFAULT_Kd 114.00
|
||||
#define DEFAULT_Kp 22.2
|
||||
#define DEFAULT_Ki 1.08
|
||||
#define DEFAULT_Kd 114
|
||||
#endif
|
||||
#else
|
||||
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
|
||||
@@ -771,7 +934,7 @@
|
||||
*
|
||||
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
|
||||
*/
|
||||
//#define PIDTEMPBED
|
||||
#define PIDTEMPBED
|
||||
|
||||
#if ENABLED(PIDTEMPBED)
|
||||
//#define MIN_BED_POWER 0
|
||||
@@ -842,8 +1005,8 @@
|
||||
#define PID_FUNCTIONAL_RANGE 10 // 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.
|
||||
|
||||
//#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of flash)
|
||||
//#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of flash)
|
||||
#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of flash)
|
||||
#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of flash)
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
@@ -1172,7 +1335,7 @@
|
||||
*/
|
||||
#define X_MIN_ENDSTOP_HIT_STATE HIGH
|
||||
#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
|
||||
@@ -1192,7 +1355,7 @@
|
||||
|
||||
// Enable this feature if all enabled endstop pins are interrupt-capable.
|
||||
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
|
||||
//#define ENDSTOP_INTERRUPTS_FEATURE
|
||||
#define ENDSTOP_INTERRUPTS_FEATURE
|
||||
|
||||
/**
|
||||
* Endstop Noise Threshold
|
||||
@@ -1229,14 +1392,28 @@
|
||||
* following movement settings. If fewer factors are given than the
|
||||
* total number of extruders, the last value applies to the rest.
|
||||
*/
|
||||
//#define DISTINCT_E_FACTORS
|
||||
#define DISTINCT_E_FACTORS
|
||||
|
||||
/**
|
||||
* Default Axis Steps Per Unit (linear=steps/mm, rotational=steps/°)
|
||||
* 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 }
|
||||
|
||||
|
||||
#if(ENABLED(Y_2208) || ENABLED(Y_4988) || ENABLED(Y_S109))
|
||||
#define Y_STEPSMM 80
|
||||
#else
|
||||
#define Y_STEPSMM 160
|
||||
#endif
|
||||
|
||||
#if(ENABLED(Z_2208) || ENABLED(Z_4988))
|
||||
#define Z_STEPSMM 800
|
||||
#else
|
||||
#define Z_STEPSMM 1600
|
||||
#endif
|
||||
|
||||
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, Y_STEPSMM, Z_STEPSMM, 93, 93 }
|
||||
|
||||
/**
|
||||
* Enable support for M92. Disable to save at least ~530 bytes of flash.
|
||||
@@ -1248,11 +1425,16 @@
|
||||
* Override with M203
|
||||
* X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]]
|
||||
*/
|
||||
#define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 }
|
||||
#if ENABLED(Y_2208) && DISABLED(Y_Spreadcycle)
|
||||
#define Y_MAXFEED 100
|
||||
#else
|
||||
#define Y_MAXFEED 150
|
||||
#endif
|
||||
#define DEFAULT_MAX_FEEDRATE { 200, Y_MAXFEED, 8, 75, 75 }
|
||||
|
||||
//#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, 200, 15, 150 } // ...or, set your own edit limits
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1261,11 +1443,11 @@
|
||||
* 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, 500, 400, 3000, 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 { 6000, 6000, 200, 20000 } // ...or, set your own edit limits
|
||||
#define MAX_ACCEL_EDIT_VALUES { 1500, 1500, 800, 5000 } // ...or, set your own edit limits
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1276,9 +1458,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 500 // X, Y, Z and E acceleration for printing moves
|
||||
#define DEFAULT_RETRACT_ACCELERATION 2000 // E acceleration for retracts
|
||||
#define DEFAULT_TRAVEL_ACCELERATION 500 // X, Y, Z acceleration for travel (non printing) moves
|
||||
|
||||
/**
|
||||
* Default Jerk limits (mm/s)
|
||||
@@ -1288,10 +1470,10 @@
|
||||
* 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_YJERK 5.0
|
||||
#define DEFAULT_ZJERK 0.3
|
||||
#define DEFAULT_EJERK 5.0
|
||||
//#define DEFAULT_IJERK 0.3
|
||||
@@ -1305,7 +1487,7 @@
|
||||
|
||||
//#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, 0.6, 10 } // ...or, set your own edit limits
|
||||
#define MAX_JERK_EDIT_VALUES { 20, 20, 0.6, 10, 10 } // ...or, set your own edit limits
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1330,7 +1512,7 @@
|
||||
*
|
||||
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
|
||||
*/
|
||||
//#define S_CURVE_ACCELERATION
|
||||
#define S_CURVE_ACCELERATION
|
||||
|
||||
//===========================================================================
|
||||
//============================= Z Probe Options =============================
|
||||
@@ -1406,7 +1588,7 @@
|
||||
/**
|
||||
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
|
||||
*/
|
||||
//#define BLTOUCH
|
||||
#define BLTOUCH
|
||||
|
||||
/**
|
||||
* MagLev V4 probe by MDD
|
||||
@@ -1581,7 +1763,6 @@
|
||||
* | [-] |
|
||||
* O-- FRONT --+
|
||||
*/
|
||||
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
|
||||
|
||||
// Enable and set to use a specific tool for probing. Disable to allow any tool.
|
||||
#define PROBING_TOOL 0
|
||||
@@ -1589,6 +1770,11 @@
|
||||
//#define PROBE_TOOLCHANGE_NO_MOVE // Suppress motion on probe tool-change
|
||||
#endif
|
||||
|
||||
#if ENABLED(TREX3)
|
||||
#define NOZZLE_TO_PROBE_OFFSET { -3, 31, 0 }
|
||||
#else
|
||||
#define NOZZLE_TO_PROBE_OFFSET { -7, 29, 0 }
|
||||
#endif
|
||||
// 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
|
||||
@@ -1597,7 +1783,7 @@
|
||||
#define XY_PROBE_FEEDRATE (133*60)
|
||||
|
||||
// Feedrate (mm/min) for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
||||
#define Z_PROBE_FEEDRATE_FAST (4*60)
|
||||
#define Z_PROBE_FEEDRATE_FAST (10*60)
|
||||
|
||||
// Feedrate (mm/min) for the "accurate" probe of each point
|
||||
#define Z_PROBE_FEEDRATE_SLOW (Z_PROBE_FEEDRATE_FAST / 2)
|
||||
@@ -1647,7 +1833,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 2
|
||||
//#define EXTRA_PROBING 1
|
||||
|
||||
/**
|
||||
@@ -1664,21 +1850,27 @@
|
||||
* 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 10 // (mm) Z Clearance for Deploy/Stow
|
||||
#if ENABLED(TREX3)
|
||||
#define NOZZLE_TO_PROBE_OFFSET { -3, 31, 0 }
|
||||
#else
|
||||
#define NOZZLE_TO_PROBE_OFFSET { -7, 29, 0 }
|
||||
#endif
|
||||
|
||||
#define Z_CLEARANCE_DEPLOY_PROBE 5 // (mm) Z Clearance for Deploy/Stow
|
||||
#define Z_CLEARANCE_BETWEEN_PROBES 5 // (mm) Z Clearance between probe points
|
||||
#define Z_CLEARANCE_MULTI_PROBE 5 // (mm) Z Clearance between multiple probes
|
||||
#define Z_PROBE_ERROR_TOLERANCE 3 // (mm) Tolerance for early trigger (<= -probe.offset.z + ZPET)
|
||||
//#define Z_AFTER_PROBING 5 // (mm) Z position after probing is done
|
||||
|
||||
#define Z_PROBE_LOW_POINT -2 // (mm) Farthest distance below the trigger-point to go before stopping
|
||||
#define Z_PROBE_LOW_POINT -3 // (mm) Farthest distance below the trigger-point to go before stopping
|
||||
|
||||
// For M851 provide ranges for adjusting the X, Y, and Z probe offsets
|
||||
//#define PROBE_OFFSET_XMIN -50 // (mm)
|
||||
//#define PROBE_OFFSET_XMAX 50 // (mm)
|
||||
//#define PROBE_OFFSET_YMIN -50 // (mm)
|
||||
//#define PROBE_OFFSET_YMAX 50 // (mm)
|
||||
//#define PROBE_OFFSET_ZMIN -20 // (mm)
|
||||
//#define PROBE_OFFSET_ZMAX 20 // (mm)
|
||||
#define PROBE_OFFSET_ZMIN -3 // (mm)
|
||||
#define PROBE_OFFSET_ZMAX 3 // (mm)
|
||||
|
||||
// Enable the M48 repeatability test to test probe accuracy
|
||||
//#define Z_MIN_PROBE_REPEATABILITY_TEST
|
||||
@@ -1749,9 +1941,21 @@
|
||||
// @section motion
|
||||
|
||||
// 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
|
||||
#if ANY(X_2208, SKR12Pro)
|
||||
#define INVERT_X_DIR true
|
||||
#else
|
||||
#define INVERT_X_DIR false
|
||||
#endif
|
||||
#if ANY(Y_2208, SKR12Pro)
|
||||
#define INVERT_Y_DIR true
|
||||
#else
|
||||
#define INVERT_Y_DIR false
|
||||
#endif
|
||||
#if ANY(Z_2208, SKR12Pro)
|
||||
#define INVERT_Z_DIR false
|
||||
#else
|
||||
#define INVERT_Z_DIR true
|
||||
#endif
|
||||
//#define INVERT_I_DIR false
|
||||
//#define INVERT_J_DIR false
|
||||
//#define INVERT_K_DIR false
|
||||
@@ -1762,8 +1966,13 @@
|
||||
// @section extruder
|
||||
|
||||
// For direct drive extruder v9 set to true, for geared extruder set to false.
|
||||
#define INVERT_E0_DIR false
|
||||
#define INVERT_E1_DIR false
|
||||
#if ANY(E_2208, SKR12Pro) && DISABLED(TREX3)
|
||||
#define INVERT_E0_DIR true
|
||||
#define INVERT_E1_DIR false
|
||||
#else
|
||||
#define INVERT_E0_DIR false
|
||||
#define INVERT_E1_DIR true
|
||||
#endif
|
||||
#define INVERT_E2_DIR false
|
||||
#define INVERT_E3_DIR false
|
||||
#define INVERT_E4_DIR false
|
||||
@@ -1794,7 +2003,7 @@
|
||||
// Direction of endstops when homing; 1=MAX, -1=MIN
|
||||
// :[-1,1]
|
||||
#define X_HOME_DIR -1
|
||||
#define Y_HOME_DIR -1
|
||||
#define Y_HOME_DIR 1
|
||||
#define Z_HOME_DIR -1
|
||||
//#define I_HOME_DIR -1
|
||||
//#define J_HOME_DIR -1
|
||||
@@ -1820,17 +2029,29 @@
|
||||
|
||||
// @section geometry
|
||||
|
||||
// The size of the printable area
|
||||
#define X_BED_SIZE 200
|
||||
#define Y_BED_SIZE 200
|
||||
// The size of the print bed
|
||||
#define X_BED_SIZE 400
|
||||
#define Y_BED_SIZE 400
|
||||
|
||||
// Travel limits (linear=mm, rotational=°) 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 Y_MAX_POS Y_BED_SIZE
|
||||
#define Z_MAX_POS 200
|
||||
#if DISABLED(TREX3) || ENABLED(TREX3_UPGRADE)
|
||||
#define X_MIN_POS -42
|
||||
#define Y_MIN_POS 0
|
||||
#define Z_MIN_POS -3
|
||||
#define X_MAX_POS 450
|
||||
#define Y_MAX_POS Y_BED_SIZE
|
||||
#else
|
||||
#define X_MIN_POS -47
|
||||
#define Y_MIN_POS 0
|
||||
#define Z_MIN_POS -3
|
||||
#define X_MAX_POS 460
|
||||
#define Y_MAX_POS Y_BED_SIZE
|
||||
#endif
|
||||
#if(ENABLED(tallVersion))
|
||||
#define Z_MAX_POS 700
|
||||
#else
|
||||
#define Z_MAX_POS 500
|
||||
#endif
|
||||
//#define I_MIN_POS 0
|
||||
//#define I_MAX_POS 50
|
||||
//#define J_MIN_POS 0
|
||||
@@ -1882,7 +2103,7 @@
|
||||
#endif
|
||||
|
||||
#if ANY(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
|
||||
|
||||
/**
|
||||
@@ -1893,15 +2114,19 @@
|
||||
* Marlin knows a print job is running when:
|
||||
* 1. Running a print job from media started with M24.
|
||||
* 2. The Print Job Timer has been started with M75.
|
||||
* 3. The heaters were turned on and PRINTJOB_TIMER_AUTOSTART is enabled.
|
||||
* 3. The heaters were turned on with a wait command (M109) and PRINTJOB_TIMER_AUTOSTART is enabled.
|
||||
*
|
||||
* 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 NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
|
||||
#if ENABLED(TREX3)
|
||||
#define NUM_RUNOUT_SENSORS 2
|
||||
#else
|
||||
#define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
|
||||
#endif
|
||||
|
||||
#define FIL_RUNOUT_STATE LOW // Pin state indicating that filament is NOT present.
|
||||
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
|
||||
@@ -1944,13 +2169,17 @@
|
||||
|
||||
// Commands to execute on filament runout.
|
||||
// With multiple runout sensors use the %c placeholder for the current tool in commands (e.g., "M600 T%c")
|
||||
// NOTE: After 'M412 H1' the host handles filament runout and this script does not apply.
|
||||
#define FILAMENT_RUNOUT_SCRIPT "M600"
|
||||
// NOTE: After 'M591 H1' the host handles filament runout and this script does not apply.
|
||||
#define FILAMENT_RUNOUT_SCRIPT "M600 %c"
|
||||
|
||||
// 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
|
||||
#if ENABLED(TREX3)
|
||||
// #define FIL_RUNOUT_DISTANCE_MM { 15, 15 }
|
||||
#else
|
||||
// #define FIL_RUNOUT_DISTANCE_MM { 15 }
|
||||
#endif
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
|
||||
// Enable this option to use an encoder disc that toggles the runout pin
|
||||
@@ -1999,6 +2228,34 @@
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
|
||||
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
|
||||
|
||||
// Override individually if the runout sensors vary
|
||||
//#define FIL_RUNOUT1_PULLUP
|
||||
//#define FIL_RUNOUT1_PULLDOWN
|
||||
|
||||
//#define FIL_RUNOUT2_PULLUP
|
||||
//#define FIL_RUNOUT2_PULLDOWN
|
||||
|
||||
//#define FIL_RUNOUT3_PULLUP
|
||||
//#define FIL_RUNOUT3_PULLDOWN
|
||||
|
||||
//#define FIL_RUNOUT4_PULLUP
|
||||
//#define FIL_RUNOUT4_PULLDOWN
|
||||
|
||||
//#define FIL_RUNOUT5_PULLUP
|
||||
//#define FIL_RUNOUT5_PULLDOWN
|
||||
|
||||
//#define FIL_RUNOUT6_PULLUP
|
||||
//#define FIL_RUNOUT6_PULLDOWN
|
||||
|
||||
//#define FIL_RUNOUT7_PULLUP
|
||||
//#define FIL_RUNOUT7_PULLDOWN
|
||||
|
||||
//#define FIL_RUNOUT8_PULLUP
|
||||
//#define FIL_RUNOUT8_PULLDOWN
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
@@ -2041,8 +2298,11 @@
|
||||
*/
|
||||
//#define AUTO_BED_LEVELING_3POINT
|
||||
//#define AUTO_BED_LEVELING_LINEAR
|
||||
//#define AUTO_BED_LEVELING_BILINEAR
|
||||
//#define AUTO_BED_LEVELING_UBL
|
||||
#if ENABLED(ABL_Bilinear)
|
||||
#define AUTO_BED_LEVELING_BILINEAR
|
||||
#else
|
||||
#define AUTO_BED_LEVELING_UBL
|
||||
#endif
|
||||
//#define MESH_BED_LEVELING
|
||||
|
||||
/**
|
||||
@@ -2056,7 +2316,7 @@
|
||||
* these options to restore the prior leveling state or to always enable
|
||||
* leveling immediately after G28.
|
||||
*/
|
||||
//#define RESTORE_LEVELING_AFTER_G28
|
||||
#define RESTORE_LEVELING_AFTER_G28
|
||||
//#define ENABLE_LEVELING_AFTER_G28
|
||||
|
||||
/**
|
||||
@@ -2088,7 +2348,7 @@
|
||||
*/
|
||||
#define ENABLE_LEVELING_FADE_HEIGHT
|
||||
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
|
||||
#define DEFAULT_LEVELING_FADE_HEIGHT 10.0 // (mm) Default fade height.
|
||||
#define DEFAULT_LEVELING_FADE_HEIGHT 0.0 // (mm) Default fade height.
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -2102,7 +2362,9 @@
|
||||
/**
|
||||
* Enable the G26 Mesh Validation Pattern tool.
|
||||
*/
|
||||
//#define G26_MESH_VALIDATION
|
||||
#if ENABLED(ABL_Bilinear)
|
||||
#define G26_MESH_VALIDATION
|
||||
#endif
|
||||
#if ENABLED(G26_MESH_VALIDATION)
|
||||
#define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
|
||||
#define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for G26.
|
||||
@@ -2118,7 +2380,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 11
|
||||
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
|
||||
|
||||
// Probe along the Y axis, advancing X after each column
|
||||
@@ -2148,13 +2410,13 @@
|
||||
//========================= Unified Bed Leveling ============================
|
||||
//===========================================================================
|
||||
|
||||
//#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
|
||||
#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
|
||||
|
||||
#define MESH_INSET 1 // 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 MESH_INSET 3 // Set Mesh bounds as an inset region of the bed
|
||||
#define GRID_MAX_POINTS_X 15 // Don't use more than 15 points per axis, implementation limited.
|
||||
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
|
||||
|
||||
//#define UBL_HILBERT_CURVE // Use Hilbert distribution for less travel when probing multiple points
|
||||
#define UBL_HILBERT_CURVE // Use Hilbert distribution for less travel when probing multiple points
|
||||
|
||||
//#define UBL_TILT_ON_MESH_POINTS // Use nearest mesh points with G29 J for better Z reference
|
||||
//#define UBL_TILT_ON_MESH_POINTS_3POINT // Use nearest mesh points with G29 J0 (3-point)
|
||||
@@ -2162,7 +2424,7 @@
|
||||
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
|
||||
#define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
|
||||
|
||||
//#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
|
||||
#define UBL_Z_RAISE_WHEN_OFF_MESH 0.0 // When the nozzle is off the mesh, this value is used
|
||||
// as the Z-Height correction value.
|
||||
|
||||
//#define UBL_MESH_WIZARD // Run several commands in a row to get a complete mesh
|
||||
@@ -2256,7 +2518,7 @@
|
||||
// For DELTA this is the top-center of the Cartesian print volume.
|
||||
//#define MANUAL_X_HOME_POS 0
|
||||
//#define MANUAL_Y_HOME_POS 0
|
||||
//#define MANUAL_Z_HOME_POS 0
|
||||
#define MANUAL_Z_HOME_POS 0
|
||||
//#define MANUAL_I_HOME_POS 0
|
||||
//#define MANUAL_J_HOME_POS 0
|
||||
//#define MANUAL_K_HOME_POS 0
|
||||
@@ -2271,7 +2533,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
|
||||
@@ -2358,13 +2620,13 @@
|
||||
* 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_INIT_NOW // Init EEPROM on first boot after a new build.
|
||||
#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors.
|
||||
#define EEPROM_INIT_NOW // Init EEPROM on first boot after a new build.
|
||||
#endif
|
||||
|
||||
// @section host
|
||||
@@ -2421,11 +2683,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 { 150, (Y_MIN_POS + 10), 10 }
|
||||
#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)
|
||||
@@ -2468,7 +2730,7 @@
|
||||
*
|
||||
* Caveats: The ending Z should be the same as starting Z.
|
||||
*/
|
||||
//#define NOZZLE_CLEAN_FEATURE
|
||||
#define NOZZLE_CLEAN_FEATURE
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
#define NOZZLE_CLEAN_PATTERN_LINE // Provide 'G12 P0' - a simple linear cleaning pattern
|
||||
@@ -2478,7 +2740,7 @@
|
||||
// Default pattern to use when 'P' is not provided to G12. One of the enabled options above.
|
||||
#define NOZZLE_CLEAN_DEFAULT_PATTERN 0
|
||||
|
||||
#define NOZZLE_CLEAN_STROKES 12 // Default number of pattern repetitions
|
||||
#define NOZZLE_CLEAN_STROKES 4 // Default number of pattern repetitions
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_PATTERN_ZIGZAG)
|
||||
#define NOZZLE_CLEAN_TRIANGLES 3 // Default number of triangles
|
||||
@@ -2486,8 +2748,8 @@
|
||||
|
||||
// Specify positions for each tool as { { X, Y, Z }, { X, Y, Z } }
|
||||
// Dual hotend system may use { { -20, (Y_BED_SIZE / 2), (Z_MIN_POS + 1) }, { 420, (Y_BED_SIZE / 2), (Z_MIN_POS + 1) }}
|
||||
#define NOZZLE_CLEAN_START_POINT { { 30, 30, (Z_MIN_POS + 1) } }
|
||||
#define NOZZLE_CLEAN_END_POINT { { 100, 60, (Z_MIN_POS + 1) } }
|
||||
#define NOZZLE_CLEAN_START_POINT { { -20, (Y_BED_SIZE / 2), (Z_MIN_POS + 1) }, { 420, (Y_BED_SIZE / 2), (Z_MIN_POS + 1) }}
|
||||
#define NOZZLE_CLEAN_END_POINT { { (-30), (Y_BED_SIZE / 2), (Z_MIN_POS + 1) }, { (430), (Y_BED_SIZE / 2), (Z_MIN_POS + 1) }}
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_PATTERN_CIRCLE)
|
||||
#define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 // (mm) Circular pattern radius
|
||||
@@ -2498,11 +2760,11 @@
|
||||
// Move the nozzle to the initial position after cleaning
|
||||
#define NOZZLE_CLEAN_GOBACK
|
||||
|
||||
// For a purge/clean station that's always at the gantry height (thus no Z move)
|
||||
//#define NOZZLE_CLEAN_NO_Z
|
||||
// Enable for a purge/clean station that's always at the gantry height (thus no Z move)
|
||||
#define NOZZLE_CLEAN_NO_Z
|
||||
|
||||
// For a purge/clean station mounted on the X axis
|
||||
//#define NOZZLE_CLEAN_NO_Y
|
||||
#define NOZZLE_CLEAN_NO_Y
|
||||
|
||||
// Require a minimum hotend temperature for cleaning
|
||||
#define NOZZLE_CLEAN_MIN_TEMP 170
|
||||
@@ -2648,7 +2910,8 @@
|
||||
* 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 SD_SPI_SPEED SPI_HALF_SPEED
|
||||
#define SDSUPPORT
|
||||
|
||||
/**
|
||||
* SD CARD: ENABLE CRC
|
||||
@@ -2728,8 +2991,8 @@
|
||||
//
|
||||
// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu.
|
||||
//
|
||||
//#define INDIVIDUAL_AXIS_HOMING_MENU
|
||||
//#define INDIVIDUAL_AXIS_HOMING_SUBMENU
|
||||
#define INDIVIDUAL_AXIS_HOMING_MENU
|
||||
#define INDIVIDUAL_AXIS_HOMING_SUBMENU
|
||||
|
||||
//
|
||||
// SPEAKER/BUZZER
|
||||
@@ -2931,7 +3194,7 @@
|
||||
// RepRapDiscount FULL GRAPHIC Smart Controller
|
||||
// https://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
|
||||
//
|
||||
//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
||||
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
||||
|
||||
//
|
||||
// K.3D Full Graphic Smart Controller
|
||||
@@ -3459,8 +3722,9 @@
|
||||
// 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
|
||||
|
||||
#if ENABLED(TREX3) && DISABLED(SKR12Pro)
|
||||
#define FAN_SOFT_PWM
|
||||
#endif
|
||||
// Incrementing this by 1 will double the software PWM frequency,
|
||||
// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
|
||||
// However, control resolution will be halved for each increment;
|
||||
|
||||
+158
-128
@@ -304,14 +304,14 @@
|
||||
* THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
|
||||
*/
|
||||
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
|
||||
#define THERMAL_PROTECTION_PERIOD 40 // (seconds)
|
||||
#define THERMAL_PROTECTION_HYSTERESIS 4 // (°C)
|
||||
#define THERMAL_PROTECTION_PERIOD 60 // (seconds)
|
||||
#define THERMAL_PROTECTION_HYSTERESIS 15 // (°C)
|
||||
|
||||
//#define ADAPTIVE_FAN_SLOWING // Slow down the part-cooling fan if the temperature drops
|
||||
#define ADAPTIVE_FAN_SLOWING // Slow down the part-cooling fan if the temperature drops
|
||||
#if ENABLED(ADAPTIVE_FAN_SLOWING)
|
||||
//#define REPORT_ADAPTIVE_FAN_SLOWING // Report fan slowing activity to the console
|
||||
#if ANY(MPCTEMP, PIDTEMP)
|
||||
//#define TEMP_TUNING_MAINTAIN_FAN // Don't slow down the fan speed during M303 or M306 T
|
||||
#define TEMP_TUNING_MAINTAIN_FAN // Don't slow down the fan speed during M303 or M306 T
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -327,7 +327,7 @@
|
||||
* and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
|
||||
* below 2.
|
||||
*/
|
||||
#define WATCH_TEMP_PERIOD 40 // (seconds)
|
||||
#define WATCH_TEMP_PERIOD 60 // (seconds)
|
||||
#define WATCH_TEMP_INCREASE 2 // (°C)
|
||||
#endif
|
||||
|
||||
@@ -335,13 +335,13 @@
|
||||
* Thermal Protection parameters for the bed are just as above for hotends.
|
||||
*/
|
||||
#if ENABLED(THERMAL_PROTECTION_BED)
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 20 // (seconds)
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 120 // (seconds)
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // (°C)
|
||||
|
||||
/**
|
||||
* As described above, except for the bed (M140/M190/M303).
|
||||
*/
|
||||
#define WATCH_BED_TEMP_PERIOD 60 // (seconds)
|
||||
#define WATCH_BED_TEMP_PERIOD 120 // (seconds)
|
||||
#define WATCH_BED_TEMP_INCREASE 2 // (°C)
|
||||
#endif
|
||||
|
||||
@@ -547,9 +547,9 @@
|
||||
* 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_TIMEOUT_SEC (15*60) // (seconds) Time without extruder movement to trigger protection
|
||||
#define HOTEND_IDLE_MIN_TRIGGER 180 // (°C) Minimum temperature to enable hotend protection
|
||||
#define HOTEND_IDLE_NOZZLE_TARGET 0 // (°C) Safe temperature for the nozzle after timeout
|
||||
#define HOTEND_IDLE_BED_TARGET 0 // (°C) Safe temperature for the bed after timeout
|
||||
@@ -602,7 +602,7 @@
|
||||
* gets it spinning reliably for a short time before setting the requested speed.
|
||||
* (Does not work on Sanguinololu with FAN_SOFT_PWM.)
|
||||
*/
|
||||
//#define FAN_KICKSTART_TIME 100 // (ms)
|
||||
#define FAN_KICKSTART_TIME 100 // (ms)
|
||||
//#define FAN_KICKSTART_POWER 180 // 64-255
|
||||
|
||||
// Some coolers may require a non-zero "off" state.
|
||||
@@ -681,8 +681,17 @@
|
||||
* 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 E1_AUTO_FAN_PIN -1
|
||||
#if ENABLED(SKR12Pro, TREX3)
|
||||
#define E0_AUTO_FAN_PIN FAN2_PIN
|
||||
#define E1_AUTO_FAN_PIN FAN2_PIN
|
||||
#elif ENABLED(TREX3)
|
||||
#define E0_AUTO_FAN_PIN 6
|
||||
#define E1_AUTO_FAN_PIN 45
|
||||
#else
|
||||
#define E0_AUTO_FAN_PIN -1
|
||||
#define E1_AUTO_FAN_PIN -1
|
||||
#endif
|
||||
|
||||
#define E2_AUTO_FAN_PIN -1
|
||||
#define E3_AUTO_FAN_PIN -1
|
||||
#define E4_AUTO_FAN_PIN -1
|
||||
@@ -748,15 +757,17 @@
|
||||
* @section caselight
|
||||
* M355 Case Light on-off / brightness
|
||||
*/
|
||||
//#define CASE_LIGHT_ENABLE
|
||||
#define CASE_LIGHT_ENABLE
|
||||
#if ENABLED(CASE_LIGHT_ENABLE)
|
||||
//#define CASE_LIGHT_PIN 4 // Override the default pin if needed
|
||||
#if ENABLED(SKR12Pro)
|
||||
#define CASE_LIGHT_PIN HEATER_2_PIN // Override the default pin if needed
|
||||
#endif
|
||||
#define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW
|
||||
#define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on
|
||||
#define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin)
|
||||
#define CASE_LIGHT_DEFAULT_BRIGHTNESS 255 // Set default power-up brightness (0-255, requires PWM pin)
|
||||
//#define CASE_LIGHT_NO_BRIGHTNESS // Disable brightness control. Enable for non-PWM lighting.
|
||||
//#define CASE_LIGHT_MAX_PWM 128 // Limit PWM duty cycle (0-255)
|
||||
//#define CASE_LIGHT_MENU // Add Case Light options to the LCD menu
|
||||
#define CASE_LIGHT_MENU // Add Case Light options to the LCD menu
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
//#define CASE_LIGHT_USE_NEOPIXEL // Use NeoPixel LED as case light
|
||||
#endif
|
||||
@@ -815,22 +826,26 @@
|
||||
* Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and
|
||||
* follow with M605 S3 to initiate mirrored movement.
|
||||
*/
|
||||
//#define DUAL_X_CARRIAGE
|
||||
#define DUAL_X_CARRIAGE
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
#define X1_MIN_POS X_MIN_POS // Set to X_MIN_POS
|
||||
#define X1_MAX_POS X_BED_SIZE // A max coordinate so the X1 carriage can't hit the parked X2 carriage
|
||||
#define X2_MIN_POS 80 // A min coordinate so the X2 carriage can't hit the parked X1 carriage
|
||||
#define X2_MAX_POS 353 // The max position of the X2 carriage, typically also the home position
|
||||
#define X2_MIN_POS 0 // A min coordinate so the X2 carriage can't hit the parked X1 carriage
|
||||
#if DISABLED(TREX3) || ENABLED(TREX3_UPGRADE)
|
||||
#define X2_MAX_POS 442 // The max position of the X2 carriage, typically also the home position
|
||||
#else
|
||||
#define X2_MAX_POS 446 // The max position of the X2 carriage, typically also the home position
|
||||
#endif
|
||||
#define X2_HOME_POS X2_MAX_POS // Default X2 home position. Set to X2_MAX_POS.
|
||||
// NOTE: For Dual X Carriage use M218 T1 Xn to override the X2_HOME_POS.
|
||||
// This allows recalibration of endstops distance without a rebuild.
|
||||
// Remember to set the second extruder's X-offset to 0 in your slicer.
|
||||
|
||||
// This is the default power-up mode which can be changed later using M605 S<mode>.
|
||||
// This is the default power-up mode which can be later using M605.
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
|
||||
|
||||
// Default x offset in duplication mode (typically set to half print bed width)
|
||||
#define DEFAULT_DUPLICATION_X_OFFSET 100
|
||||
#define DEFAULT_DUPLICATION_X_OFFSET 200
|
||||
|
||||
// Default action to execute following M605 mode change commands. Typically G28X to apply new mode.
|
||||
//#define EVENT_GCODE_IDEX_AFTER_MODECHANGE "G28X"
|
||||
@@ -931,7 +946,7 @@
|
||||
//#define HOMING_BACKOFF_POST_MM { 2, 2, 2 } // (linear=mm, rotational=°) Backoff from endstops after homing
|
||||
//#define XY_COUNTERPART_BACKOFF_MM 0 // (mm) Backoff X after homing Y, and vice-versa
|
||||
|
||||
//#define QUICK_HOME // If G28 contains XY do a diagonal move first
|
||||
#define QUICK_HOME // If G28 contains XY do a diagonal move first
|
||||
//#define HOME_Y_BEFORE_X // If G28 contains XY home Y before X
|
||||
//#define HOME_Z_FIRST // Home Z first. Requires a real endstop (not a probe).
|
||||
//#define CODEPENDENT_XY_HOMING // If X/Y can't home without homing Y/X first
|
||||
@@ -1003,7 +1018,7 @@
|
||||
*
|
||||
* Set the default state here, change with 'M401 S' or UI, use M500 to save, M502 to reset.
|
||||
*/
|
||||
//#define BLTOUCH_HS_MODE true
|
||||
#define BLTOUCH_HS_MODE true
|
||||
|
||||
#ifdef BLTOUCH_HS_MODE
|
||||
// The probe Z offset (M851 Z) is the height at which the probe triggers.
|
||||
@@ -1263,7 +1278,11 @@
|
||||
// Increase the slowdown divisor for larger buffer sizes.
|
||||
#define SLOWDOWN
|
||||
#if ENABLED(SLOWDOWN)
|
||||
#define SLOWDOWN_DIVISOR 2
|
||||
#if ENABLED(SKR12Pro)
|
||||
#define SLOWDOWN_DIVISOR 6
|
||||
#else
|
||||
#define SLOWDOWN_DIVISOR 2
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1281,12 +1300,12 @@
|
||||
// Backlash Compensation
|
||||
// Adds extra movement to axes on direction-changes to account for backlash.
|
||||
//
|
||||
//#define BACKLASH_COMPENSATION
|
||||
#define BACKLASH_COMPENSATION
|
||||
#if ENABLED(BACKLASH_COMPENSATION)
|
||||
// Define values for backlash distance and correction.
|
||||
// If BACKLASH_GCODE is enabled these values are the defaults.
|
||||
#define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (linear=mm, rotational=°) One value for each linear axis
|
||||
#define BACKLASH_CORRECTION 0.0 // 0.0 = no correction; 1.0 = full correction
|
||||
#define BACKLASH_CORRECTION 0.5 // 0.0 = no correction; 1.0 = full correction
|
||||
|
||||
// Add steps for motor direction changes on CORE kinematics
|
||||
//#define CORE_BACKLASH
|
||||
@@ -1296,11 +1315,11 @@
|
||||
//#define BACKLASH_SMOOTHING_MM 3 // (mm)
|
||||
|
||||
// Add runtime configuration and tuning of backlash values (M425)
|
||||
//#define BACKLASH_GCODE
|
||||
#define BACKLASH_GCODE
|
||||
|
||||
#if ENABLED(BACKLASH_GCODE)
|
||||
// Measure the Z backlash when probing (G29) and set with "M425 Z"
|
||||
#define MEASURE_BACKLASH_WHEN_PROBING
|
||||
//#define MEASURE_BACKLASH_WHEN_PROBING
|
||||
|
||||
#if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
|
||||
// When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
|
||||
@@ -1326,7 +1345,9 @@
|
||||
* Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
|
||||
* ±5mm of true values for G425 to succeed.
|
||||
*/
|
||||
//#define CALIBRATION_GCODE
|
||||
#if ENABLED(autoCalibrationKit)
|
||||
#define CALIBRATION_GCODE
|
||||
#endif
|
||||
#if ENABLED(CALIBRATION_GCODE)
|
||||
|
||||
//#define CALIBRATION_SCRIPT_PRE "M117 Starting Auto-Calibration\nT0\nG28\nG12\nM117 Calibrating..."
|
||||
@@ -1343,11 +1364,13 @@
|
||||
#define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
|
||||
|
||||
// Uncomment to enable reporting (required for "G425 V", but consumes flash).
|
||||
//#define CALIBRATION_REPORTING
|
||||
#if ENABLED(SKR12Pro)
|
||||
#define CALIBRATION_REPORTING
|
||||
#endif
|
||||
|
||||
// The true location and dimension the cube/bolt/washer on the bed.
|
||||
#define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0 } // mm
|
||||
#define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0 } // mm
|
||||
#define CALIBRATION_OBJECT_CENTER { 264.0, 25.0, 12.5 } // mm
|
||||
#define CALIBRATION_OBJECT_DIMENSIONS { 12.55, 12.55, 4.0 } // mm
|
||||
|
||||
// Comment out any sides which are unreachable by the probe. For best
|
||||
// auto-calibration results, all sides must be reachable.
|
||||
@@ -1371,12 +1394,16 @@
|
||||
|
||||
// Probing at the exact top center only works if the center is flat. If
|
||||
// probing on a screw head or hollow washer, probe near the edges.
|
||||
//#define CALIBRATION_MEASURE_AT_TOP_EDGES
|
||||
#define CALIBRATION_MEASURE_AT_TOP_EDGES
|
||||
|
||||
// Define the pin to read during calibration
|
||||
#ifndef CALIBRATION_PIN
|
||||
//#define CALIBRATION_PIN -1 // Define here to override the default pin
|
||||
#define CALIBRATION_PIN_INVERTING false // Set to true to invert the custom pin
|
||||
#if ENABLED(SKR12Pro)
|
||||
#define CALIBRATION_PIN Z_MAX
|
||||
#else
|
||||
#define CALIBRATION_PIN 58 // Override in pins.h or set to -1 to use your Z endstop
|
||||
#endif
|
||||
#define CALIBRATION_PIN_INVERTING true // Set to true to invert the pin
|
||||
//#define CALIBRATION_PIN_PULLDOWN
|
||||
#define CALIBRATION_PIN_PULLUP
|
||||
#endif
|
||||
@@ -1529,7 +1556,7 @@
|
||||
#endif
|
||||
|
||||
// Include a page of printer information in the LCD Main Menu
|
||||
//#define LCD_INFO_MENU
|
||||
#define LCD_INFO_MENU
|
||||
#if ENABLED(LCD_INFO_MENU)
|
||||
//#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages
|
||||
#endif
|
||||
@@ -1656,7 +1683,7 @@
|
||||
#endif
|
||||
|
||||
// Add 'M73' to set print job progress, overrides Marlin's built-in estimate
|
||||
//#define SET_PROGRESS_MANUALLY
|
||||
#define SET_PROGRESS_MANUALLY
|
||||
#if ENABLED(SET_PROGRESS_MANUALLY)
|
||||
#define SET_PROGRESS_PERCENT // Add 'P' parameter to set percentage done
|
||||
#define SET_REMAINING_TIME // Add 'R' parameter to set remaining time
|
||||
@@ -1813,13 +1840,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 <dosname>' and list long filenames with 'M20 L'
|
||||
#define LONG_FILENAME_HOST_SUPPORT // Get the long filename of a file/folder with 'M33 <dosname>' 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!)
|
||||
|
||||
@@ -1920,7 +1947,9 @@
|
||||
*
|
||||
* :[ 'LCD', 'ONBOARD', 'CUSTOM_CABLE' ]
|
||||
*/
|
||||
//#define SDCARD_CONNECTION LCD
|
||||
#if ENABLED(SKR12Pro)
|
||||
#define SDCARD_CONNECTION ONBOARD
|
||||
#endif
|
||||
|
||||
// Enable if SD detect is rendered useless (e.g., by using an SD extender)
|
||||
//#define NO_SD_DETECT
|
||||
@@ -2266,18 +2295,18 @@
|
||||
*
|
||||
* 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
|
||||
//#define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement)
|
||||
#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 // Enable 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 1 // (steps or mm) Steps or millimeter distance for each Z babystep
|
||||
#define BABYSTEP_MULTIPLICATOR_Z 20 // (steps or mm) Steps or millimeter distance for each Z babystep
|
||||
#define BABYSTEP_MULTIPLICATOR_XY 1 // (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.
|
||||
#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
|
||||
#if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING)
|
||||
#define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
|
||||
// Note: Extra time may be added to mitigate controller latency.
|
||||
@@ -2289,10 +2318,10 @@
|
||||
|
||||
//#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
|
||||
#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets
|
||||
#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -2313,12 +2342,12 @@
|
||||
*
|
||||
* 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
|
||||
#define ADVANCE_K { 0.0 } // (mm) Compression length per 1mm/s extruder speed, per extruder
|
||||
#else
|
||||
#define ADVANCE_K 0.22 // (mm) Compression length applying to all extruders
|
||||
#define ADVANCE_K 0.0 // (mm) Compression length applying to all extruders
|
||||
#endif
|
||||
//#define ADVANCE_K_EXTRA // Add a second linear advance constant, configurable with M900 L.
|
||||
//#define LA_DEBUG // Print debug information to serial during operation. Disable for production use.
|
||||
@@ -2388,10 +2417,10 @@
|
||||
|
||||
#if ANY(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 X_MIN_POS + MESH_INSET
|
||||
#define MESH_MIN_Y Y_MIN_POS + MESH_INSET
|
||||
#define MESH_MAX_X X_MAX_POS - MESH_INSET
|
||||
#define MESH_MAX_Y Y_MAX_POS - MESH_INSET
|
||||
#endif
|
||||
|
||||
#if ALL(AUTO_BED_LEVELING_UBL, EEPROM_SETTINGS)
|
||||
@@ -2600,14 +2629,18 @@
|
||||
#elif HAS_MEDIA
|
||||
#define BLOCK_BUFFER_SIZE 16
|
||||
#else
|
||||
#define BLOCK_BUFFER_SIZE 16
|
||||
#define BLOCK_BUFFER_SIZE 16 // maximize block buffer
|
||||
#endif
|
||||
|
||||
// @section serial
|
||||
|
||||
// The ASCII buffer for serial input
|
||||
#define MAX_CMD_SIZE 96
|
||||
#define BUFSIZE 4
|
||||
#if ENABLED(SKR12Pro)
|
||||
#define BUFSIZE 16
|
||||
#else
|
||||
#define BUFSIZE 4
|
||||
#endif
|
||||
|
||||
// Transmission to Host Buffer Size
|
||||
// To save 386 bytes of flash (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
|
||||
@@ -2654,7 +2687,7 @@
|
||||
* Currently handles M108, M112, M410, M876
|
||||
* NOTE: Not yet implemented for all platforms.
|
||||
*/
|
||||
//#define EMERGENCY_PARSER
|
||||
#define EMERGENCY_PARSER
|
||||
|
||||
/**
|
||||
* Realtime Reporting (requires EMERGENCY_PARSER)
|
||||
@@ -2685,7 +2718,7 @@
|
||||
//#define NO_TIMEOUTS 1000 // (ms)
|
||||
|
||||
// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
|
||||
//#define ADVANCED_OK
|
||||
#define ADVANCED_OK
|
||||
|
||||
// Printrun may have trouble receiving long strings all at once.
|
||||
// This option inserts short delays between lines of serial output.
|
||||
@@ -2739,7 +2772,9 @@
|
||||
*
|
||||
* Note that M207 / M208 / M209 settings are saved to EEPROM.
|
||||
*/
|
||||
//#define FWRETRACT
|
||||
#if ANY(ABL_Bilinear, SKR12Pro)
|
||||
#define FWRETRACT
|
||||
#endif
|
||||
#if ENABLED(FWRETRACT)
|
||||
#define FWRETRACT_AUTORETRACT // Override slicer retractions
|
||||
#if ENABLED(FWRETRACT_AUTORETRACT)
|
||||
@@ -2769,9 +2804,9 @@
|
||||
// Z raise distance for tool-change, as needed for some extruders
|
||||
#define TOOLCHANGE_ZRAISE 2 // (mm)
|
||||
//#define TOOLCHANGE_ZRAISE_BEFORE_RETRACT // Apply raise before swap retraction (if enabled)
|
||||
//#define TOOLCHANGE_NO_RETURN // Never return to previous position on tool-change
|
||||
#define TOOLCHANGE_NO_RETURN // Never return to previous position on tool-change
|
||||
#if ENABLED(TOOLCHANGE_NO_RETURN)
|
||||
//#define EVENT_GCODE_AFTER_TOOLCHANGE "G12X" // Extra G-code to run after tool-change
|
||||
#define EVENT_GCODE_AFTER_TOOLCHANGE "G12X" // Extra G-code to run after tool-change
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -2800,11 +2835,11 @@
|
||||
* Retract and prime filament on tool-change to reduce
|
||||
* ooze and stringing and to get cleaner transitions.
|
||||
*/
|
||||
//#define TOOLCHANGE_FILAMENT_SWAP
|
||||
#define TOOLCHANGE_FILAMENT_SWAP
|
||||
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
|
||||
// Load / Unload
|
||||
#define TOOLCHANGE_FS_LENGTH 12 // (mm) Load / Unload length
|
||||
#define TOOLCHANGE_FS_EXTRA_RESUME_LENGTH 0 // (mm) Extra length for better restart. Adjust with LCD or M217 B.
|
||||
#define TOOLCHANGE_FS_LENGTH 4 // (mm) Load / Unload length
|
||||
#define TOOLCHANGE_FS_EXTRA_RESUME_LENGTH 2 // (mm) Extra length for better restart. Adjust with LCD or M217 B.
|
||||
#define TOOLCHANGE_FS_RETRACT_SPEED (50*60) // (mm/min) (Unloading)
|
||||
#define TOOLCHANGE_FS_UNRETRACT_SPEED (25*60) // (mm/min) (On SINGLENOZZLE or Bowden loading must be slowed down)
|
||||
|
||||
@@ -2887,51 +2922,51 @@
|
||||
*
|
||||
* Enable PARK_HEAD_ON_PAUSE to add the G-code M125 Pause and Park.
|
||||
*/
|
||||
//#define ADVANCED_PAUSE_FEATURE
|
||||
#define ADVANCED_PAUSE_FEATURE
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
#define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
|
||||
#define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
|
||||
#define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract.
|
||||
// This short retract is done immediately, before parking the nozzle.
|
||||
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
|
||||
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 41 // (mm/s) Unload filament feedrate. This can be pretty fast.
|
||||
#define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
||||
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
|
||||
#define FILAMENT_CHANGE_UNLOAD_LENGTH 70 // (mm) The length of filament for a complete unload.
|
||||
// For Bowden, the full length of the tube and nozzle.
|
||||
// For direct drive, the full length of the nozzle.
|
||||
// Set to 0 for manual unloading.
|
||||
#define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
|
||||
#define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
|
||||
// 0 to disable start loading and skip to fast load only
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 30 // (mm/s) Load filament feedrate. This can be pretty fast.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 50 // (mm) Load length of filament, from extruder gear to nozzle.
|
||||
// For Bowden, the full length of the tube and nozzle.
|
||||
// For direct drive, the full length of the nozzle.
|
||||
//#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
|
||||
#define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
|
||||
#define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
|
||||
#define ADVANCED_PAUSE_PURGE_LENGTH 20 // (mm) Length to extrude after loading.
|
||||
// Set to 0 for manual extrusion.
|
||||
// Filament can be extruded repeatedly from the Filament Change menu
|
||||
// until extrusion is consistent, and to purge old filament.
|
||||
#define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
|
||||
//#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused.
|
||||
#define ADVANCED_PAUSE_RESUME_PRIME 2 // (mm) Extra distance to prime nozzle after returning from park.
|
||||
#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused.
|
||||
|
||||
// Filament Unload does a Retract, Delay, and Purge first:
|
||||
#define FILAMENT_UNLOAD_PURGE_RETRACT 13 // (mm) Unload initial retract length.
|
||||
#define FILAMENT_UNLOAD_PURGE_DELAY 5000 // (ms) Delay for the filament to cool after retract.
|
||||
#define FILAMENT_UNLOAD_PURGE_RETRACT 4 // (mm) Unload initial retract length.
|
||||
#define FILAMENT_UNLOAD_PURGE_DELAY 2000 // (ms) Delay for the filament to cool after retract.
|
||||
#define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
|
||||
#define FILAMENT_UNLOAD_PURGE_FEEDRATE 25 // (mm/s) feedrate to purge before unload
|
||||
|
||||
#define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
|
||||
#define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
|
||||
#define FILAMENT_CHANGE_ALERT_BEEPS 1 // Number of alert beeps to play when a response is needed.
|
||||
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
|
||||
//#define FILAMENT_CHANGE_RESUME_ON_INSERT // Automatically continue / load filament when runout sensor is triggered again.
|
||||
//#define PAUSE_REHEAT_FAST_RESUME // Reduce number of waits by not prompting again post-timeout before continuing.
|
||||
|
||||
//#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
|
||||
//#define HOME_BEFORE_FILAMENT_CHANGE // If needed, home before parking for filament change
|
||||
#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
|
||||
#define HOME_BEFORE_FILAMENT_CHANGE // If needed, home before parking for filament change
|
||||
|
||||
//#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
|
||||
//#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
|
||||
#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
|
||||
#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
|
||||
#define CONFIGURE_FILAMENT_CHANGE // Add M603 G-code and menu items. Requires ~1.3K bytes of flash.
|
||||
#endif
|
||||
|
||||
@@ -3300,7 +3335,7 @@
|
||||
* Define your own with:
|
||||
* { <off_time[1..15]>, <hysteresis_end[-3..12]>, 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)
|
||||
@@ -3337,7 +3372,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]
|
||||
@@ -3354,7 +3389,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
|
||||
@@ -3444,7 +3479,7 @@
|
||||
/**
|
||||
* Step on both rising and falling edge signals (as with a square wave).
|
||||
*/
|
||||
//#define EDGE_STEPPING
|
||||
#define EDGE_STEPPING
|
||||
|
||||
/**
|
||||
* Enable M122 debugging command for TMC stepper drivers.
|
||||
@@ -3572,7 +3607,10 @@
|
||||
#if ANY(SPINDLE_FEATURE, LASER_FEATURE)
|
||||
#define SPINDLE_LASER_ACTIVE_STATE LOW // Set to "HIGH" if SPINDLE_LASER_ENA_PIN is active HIGH
|
||||
|
||||
#define SPINDLE_LASER_USE_PWM // Enable if your controller supports setting the speed/power
|
||||
#if ENABLED(SKR12Pro)
|
||||
#define SPINDLE_LASER_ENA_PIN PE4
|
||||
#endif
|
||||
//#define SPINDLE_LASER_USE_PWM // Enable if your controller supports setting the speed/power
|
||||
#if ENABLED(SPINDLE_LASER_USE_PWM)
|
||||
#define SPINDLE_LASER_PWM_INVERT false // Set to "true" if the speed/power goes up when you want it to go slower
|
||||
#define SPINDLE_LASER_FREQUENCY 2500 // (Hz) Spindle/laser frequency (only on supported HALs: AVR, ESP32, and LPC)
|
||||
@@ -3623,8 +3661,8 @@
|
||||
#define SPINDLE_CHANGE_DIR_STOP // Enable if the spindle should stop before changing spin direction
|
||||
#define SPINDLE_INVERT_DIR false // Set to "true" if the spin direction is reversed
|
||||
|
||||
#define SPINDLE_LASER_POWERUP_DELAY 5000 // (ms) Delay to allow the spindle/laser to come up to speed/power
|
||||
#define SPINDLE_LASER_POWERDOWN_DELAY 5000 // (ms) Delay to allow the spindle to stop
|
||||
#define SPINDLE_LASER_POWERUP_DELAY 1 // (ms) Delay to allow the spindle/laser to come up to speed/power
|
||||
#define SPINDLE_LASER_POWERDOWN_DELAY 1 // (ms) Delay to allow the spindle to stop
|
||||
|
||||
/**
|
||||
* M3/M4 Power Equation
|
||||
@@ -4003,33 +4041,41 @@
|
||||
// @section custom main menu
|
||||
|
||||
// Custom Menu: Main Menu
|
||||
//#define CUSTOM_MENU_MAIN
|
||||
#define CUSTOM_MENU_MAIN
|
||||
#if ENABLED(CUSTOM_MENU_MAIN)
|
||||
//#define CUSTOM_MENU_MAIN_TITLE "Custom Commands"
|
||||
#define CUSTOM_MENU_MAIN_SCRIPT_DONE "M117 User Script Done"
|
||||
//#define CUSTOM_MENU_MAIN_SCRIPT_DONE "M117 User Script Done"
|
||||
#define CUSTOM_MENU_MAIN_TITLE "Setup"
|
||||
#define CUSTOM_MENU_MAIN_SCRIPT_AUDIBLE_FEEDBACK
|
||||
//#define CUSTOM_MENU_MAIN_SCRIPT_RETURN // Return to status screen after a script
|
||||
#define CUSTOM_MENU_MAIN_SCRIPT_RETURN // Return to status screen after a script
|
||||
#define CUSTOM_MENU_MAIN_ONLY_IDLE // Only show custom menu when the machine is idle
|
||||
|
||||
#define MAIN_MENU_ITEM_1_DESC "Home & UBL Info"
|
||||
#define MAIN_MENU_ITEM_1_GCODE "G28\nG29 W"
|
||||
//#define MAIN_MENU_ITEM_1_CONFIRM // Show a confirmation dialog before this action
|
||||
#if ENABLED(TREX3)
|
||||
#define COMMFANNSPEED " "
|
||||
#else
|
||||
#define COMMFANNSPEED "M106 S128 \n"
|
||||
#endif
|
||||
|
||||
#define MAIN_MENU_ITEM_2_DESC "Preheat for " PREHEAT_1_LABEL
|
||||
#define MAIN_MENU_ITEM_2_GCODE "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
|
||||
//#define MAIN_MENU_ITEM_2_CONFIRM
|
||||
#define MAIN_MENU_ITEM_1_DESC "Mesh Setup"
|
||||
#define MAIN_MENU_ITEM_1_CONFIRM
|
||||
#define MAIN_MENU_ITEM_3_DESC "Prep for Z Adjust"
|
||||
#if ENABLED(ABL_Bilinear)
|
||||
#define MAIN_MENU_ITEM_1_GCODE "M502 \n M500 \n M501 \n M190 S75 \n G28 \n G29 \n M500 \n G28 \n M420 S1 \n " COMMFANNSPEED " M109 S225 \n G1 X100 Y 100 \n G1 Z0 \n M77 \n M117 Set Z Offset"
|
||||
#define MAIN_MENU_ITEM_3_GCODE "M190 S75 \n " COMMFANNSPEED " M104 235 \n G28 \n M420 S1 \n G1 X100 Y 100 \n G1 Z0"
|
||||
#else
|
||||
#define MAIN_MENU_ITEM_1_GCODE "M502 \n M500 \n M501 \n M190 S75 \n G28 \n G29 P1 \n G29 S1 \n G29 S0 \n G29 F 10.0 \n G29 A \n M500 \n G28 \n G29 L1 \n " COMMFANNSPEED " M109 S225 \n G1 X150 Y 150 \n G1 Z0 \n M77 \n M117 Set Z Offset"
|
||||
#define MAIN_MENU_ITEM_3_GCODE "M190 S75 \n " COMMFANNSPEED " M104 235 \n G28 \n G29 L1 \n G1 X100 Y 100 \n G1 Z0"
|
||||
#endif
|
||||
|
||||
//#define MAIN_MENU_ITEM_3_DESC "Preheat for " PREHEAT_2_LABEL
|
||||
//#define MAIN_MENU_ITEM_3_GCODE "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
|
||||
//#define MAIN_MENU_ITEM_3_CONFIRM
|
||||
#define MAIN_MENU_ITEM_4_DESC "Fill Mesh Points"
|
||||
#define MAIN_MENU_ITEM_4_GCODE "G29 P3 \n G29 P3 \n G29 P3 \n G29 T"
|
||||
|
||||
//#define MAIN_MENU_ITEM_4_DESC "Heat Bed/Home/Level"
|
||||
//#define MAIN_MENU_ITEM_4_GCODE "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
|
||||
//#define MAIN_MENU_ITEM_4_CONFIRM
|
||||
#define MAIN_MENU_ITEM_2_DESC "PID Bed"
|
||||
#define MAIN_MENU_ITEM_2_GCODE "M303 C4 S75 E-1 U \n M500 \n M117 PID Tune Done"
|
||||
#define MAIN_MENU_ITEM_2_CONFIRM
|
||||
|
||||
//#define MAIN_MENU_ITEM_5_DESC "Home & Info"
|
||||
//#define MAIN_MENU_ITEM_5_GCODE "G28\nM503"
|
||||
//#define MAIN_MENU_ITEM_5_CONFIRM
|
||||
#define MAIN_MENU_ITEM_5_DESC "Run Mesh Validation"
|
||||
#define MAIN_MENU_ITEM_5_GCODE "G26"
|
||||
#define MAIN_MENU_ITEM_5_CONFIRM
|
||||
#endif
|
||||
|
||||
// @section custom config menu
|
||||
@@ -4079,22 +4125,6 @@
|
||||
#define BUTTON1_GCODE "G28"
|
||||
#define BUTTON1_DESC "Homing" // Optional string to set the LCD status
|
||||
#endif
|
||||
|
||||
//#define BUTTON2_PIN -1
|
||||
#if PIN_EXISTS(BUTTON2)
|
||||
#define BUTTON2_HIT_STATE LOW
|
||||
#define BUTTON2_WHEN_PRINTING false
|
||||
#define BUTTON2_GCODE "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
|
||||
#define BUTTON2_DESC "Preheat for " PREHEAT_1_LABEL
|
||||
#endif
|
||||
|
||||
//#define BUTTON3_PIN -1
|
||||
#if PIN_EXISTS(BUTTON3)
|
||||
#define BUTTON3_HIT_STATE LOW
|
||||
#define BUTTON3_WHEN_PRINTING false
|
||||
#define BUTTON3_GCODE "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
|
||||
#define BUTTON3_DESC "Preheat for " PREHEAT_2_LABEL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// @section host
|
||||
@@ -4113,14 +4143,14 @@
|
||||
* 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
|
||||
#define HOST_PROMPT_SUPPORT // Initiate host prompts to get user feedback
|
||||
#if ENABLED(HOST_PROMPT_SUPPORT)
|
||||
//#define HOST_STATUS_NOTIFICATIONS // Send some status messages to the host as notifications
|
||||
#define HOST_STATUS_NOTIFICATIONS // Send some status messages to the host as notifications
|
||||
#endif
|
||||
//#define HOST_START_MENU_ITEM // Add a menu item that tells the host to start
|
||||
#define HOST_START_MENU_ITEM // Add a menu item that tells the host to start
|
||||
//#define HOST_SHUTDOWN_MENU_ITEM // Add a menu item that tells the host to shut down
|
||||
#endif
|
||||
|
||||
@@ -4342,7 +4372,7 @@
|
||||
* Extras for an ESP32-based motherboard with WIFISUPPORT
|
||||
* These options don't apply to add-on WiFi modules based on ESP32 WiFi101.
|
||||
*/
|
||||
#if ENABLED(WIFISUPPORT)
|
||||
#if ANY(WIFISUPPORT, ESP3D_WIFISUPPORT)
|
||||
//#define WEBSUPPORT // Start a webserver (which may include auto-discovery) using SPIFFS
|
||||
//#define OTASUPPORT // Support over-the-air firmware updates
|
||||
//#define WIFI_CUSTOM_COMMAND // Accept feature config commands (e.g., WiFi ESP3D) from the host
|
||||
|
||||
+6
-6
@@ -28,25 +28,25 @@
|
||||
/**
|
||||
* Marlin release version identifier
|
||||
*/
|
||||
//#define SHORT_BUILD_VERSION "bugfix-2.1.x"
|
||||
#define SHORT_BUILD_VERSION "2.1.x-TR1"
|
||||
|
||||
/**
|
||||
* Verbose version identifier which should contain a reference to the location
|
||||
* from where the binary was downloaded or the source code was compiled.
|
||||
*/
|
||||
//#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION
|
||||
#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " TM3D"
|
||||
|
||||
/**
|
||||
* The STRING_DISTRIBUTION_DATE represents when the binary file was built,
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
//#define STRING_DISTRIBUTION_DATE "2024-04-08"
|
||||
//#define STRING_DISTRIBUTION_DATE "2024-04-11"
|
||||
|
||||
/**
|
||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||
*/
|
||||
//#define MACHINE_NAME "3D Printer"
|
||||
#define MACHINE_NAME "TM3D Trex"
|
||||
|
||||
/**
|
||||
* The SOURCE_CODE_URL is the location where users will find the Marlin Source
|
||||
@@ -54,7 +54,7 @@
|
||||
* has a distinct Github fork— the Source Code URL should just be the main
|
||||
* Marlin repository.
|
||||
*/
|
||||
//#define SOURCE_CODE_URL "github.com/MarlinFirmware/Marlin"
|
||||
#define SOURCE_CODE_URL "https://github.com/InsanityAutomation/Marlin/tree/TM_Trex2+_2.0.x"
|
||||
|
||||
/**
|
||||
* Default generic printer UUID.
|
||||
@@ -65,7 +65,7 @@
|
||||
* The WEBSITE_URL is the location where users can get more information such as
|
||||
* documentation about a specific Marlin release.
|
||||
*/
|
||||
//#define WEBSITE_URL "marlinfw.org"
|
||||
#define WEBSITE_URL "tinymachines3d.com"
|
||||
|
||||
/**
|
||||
* Set the vendor info the serial USB interface, if changable
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Custom Bitmap for splashscreen
|
||||
*
|
||||
* You may use one of the following tools to generate the C++ bitmap array from
|
||||
* a black and white image:
|
||||
*
|
||||
* - http://www.marlinfw.org/tools/u8glib/converter.html
|
||||
* - http://www.digole.com/tools/PicturetoC_Hex_converter.php
|
||||
*/
|
||||
|
||||
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500
|
||||
#define CUSTOM_BOOTSCREEN_BMPWIDTH 128
|
||||
#define CUSTOM_BOOTSCREEN_INVERTED
|
||||
|
||||
const unsigned char custom_start_bmp[] PROGMEM = {
|
||||
B11111101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11111110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11111101,B00000000,B00000000,B00000111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11111110,B00000111,B11000000,B00000101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11111100,B00001010,B00100000,B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11111110,B00010100,B00010000,B00000101,B00000000,B00000000,B00000111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11111100,B00101000,B00001000,B00000110,B00000111,B11000000,B00000101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,B11111111,B11111111,B11111111,
|
||||
B11111110,B01010100,B00000100,B00000100,B00001010,B00100000,B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111111,B11111111,
|
||||
B11111100,B01100000,B00000100,B00000110,B00010100,B00010000,B00000101,B00000000,B00000000,B00000111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11111110,B01010000,B00000100,B00000100,B00101000,B00001000,B00000110,B00000111,B11000000,B00000101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,
|
||||
B11111100,B01100000,B00000100,B00000110,B01010100,B00000100,B00000100,B00001010,B00100000,B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,
|
||||
B11111110,B01010100,B00000100,B00011100,B01100000,B00000100,B00000110,B00010100,B00010000,B00000101,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,
|
||||
B11111100,B00101000,B00001000,B00101110,B01010000,B00000100,B00000100,B00101000,B00001000,B00000110,B00000111,B11000000,B00000000,B00000001,B11110000,B00111111,
|
||||
B11111110,B00010100,B00010000,B01010100,B01100000,B00000100,B00000110,B01010100,B00000100,B00000100,B00001010,B00100000,B00000000,B00000010,B00001000,B00011111,
|
||||
B11111100,B00001010,B00100000,B01100110,B01010100,B00000100,B00011100,B01100000,B00000100,B00000110,B00010100,B00010000,B00000000,B00000101,B00000100,B00111111,
|
||||
B11111110,B00000111,B11000000,B01010100,B00101000,B00001000,B00101110,B01010000,B00000100,B00000100,B00101000,B00001000,B00000000,B00001010,B00000010,B00011111,
|
||||
B11111100,B00000000,B00000000,B00101110,B00010100,B00010000,B01010100,B01100000,B00000100,B00000110,B01010100,B00000100,B00000000,B00010101,B00000001,B00111111,
|
||||
B11111110,B00000000,B00000000,B00011100,B00001010,B00100000,B01100110,B01010100,B00000100,B00011100,B01100000,B00000100,B00000000,B00011000,B00000001,B00011111,
|
||||
B11111100,B00000000,B00000000,B00000110,B00000111,B11000000,B01010100,B00101000,B00001000,B00101110,B01010000,B00000100,B00000000,B00010100,B00000001,B00111111,
|
||||
B11111110,B00000000,B00000000,B00000100,B00000000,B00000000,B00101110,B00010100,B00010000,B01010100,B01100000,B00000100,B00000000,B00011000,B00000001,B00011111,
|
||||
B11111100,B11111111,B11111111,B11111110,B00000000,B00000000,B00011100,B00001010,B00100000,B01100110,B01010100,B00000100,B00011100,B00010101,B00000001,B00111111,
|
||||
B11111110,B11010101,B01010101,B01010100,B00000000,B00000000,B00000110,B00000111,B11000000,B01010100,B00101000,B00001000,B00101010,B00001010,B00000010,B00011111,
|
||||
B11111100,B10000100,B00010000,B01000110,B00000000,B00000000,B00000100,B00000000,B00000000,B00101110,B00010100,B00010000,B01010001,B00000101,B00000100,B00111111,
|
||||
B11111110,B11000100,B00010000,B01000100,B11111111,B11111111,B11111110,B00000000,B00000000,B00011100,B00001010,B00100000,B01100001,B00000010,B10001000,B00011111,
|
||||
B11111100,B10000100,B00010000,B01000110,B11010101,B01010101,B01010100,B00000000,B00000000,B00000110,B00000111,B11000000,B01010001,B00000001,B11110000,B00111111,
|
||||
B11111110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000110,B00000000,B00000000,B00000100,B00000000,B00000000,B00101010,B00000000,B00000000,B00011111,
|
||||
B11111100,B11000100,B00010000,B01000110,B11000100,B00010000,B01000100,B11111111,B11111111,B11111110,B00000000,B00000000,B00011100,B00000000,B00000000,B00111111,
|
||||
B11111110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000110,B11010101,B01010101,B01010100,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,
|
||||
B11111100,B11010101,B01010101,B01010110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,
|
||||
B11111100,B11111111,B11111111,B11111100,B11000100,B00010000,B01000110,B11000100,B00010000,B01000100,B11111111,B11111111,B11111111,B11111111,B11111111,B10011111,
|
||||
B11111110,B00000000,B00000000,B00000110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000110,B11010101,B01010101,B01010101,B01010101,B01010101,B10111111,
|
||||
B11111101,B01010101,B01010101,B01010100,B11010101,B01010101,B01010110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000001,B00000100,B00010000,B10011111,
|
||||
B11111111,B11111111,B11111111,B11111100,B11111111,B11111111,B11111100,B11000100,B00010000,B01000110,B11000100,B00010000,B01000001,B00000100,B00010001,B10111111,
|
||||
B11111111,B11111111,B11111111,B11111110,B00000000,B00000000,B00000110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000001,B00000100,B00010000,B10011111,
|
||||
B11111111,B11111111,B11111111,B11111101,B01010101,B01010101,B01010100,B11010101,B01010101,B01010110,B10000100,B00010000,B01000001,B00000100,B00010000,B10011111,
|
||||
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B11111111,B11111111,B11111100,B11000100,B00010000,B01000001,B00000100,B00010001,B10111111,
|
||||
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B00000000,B00000000,B00000110,B10000100,B00010000,B01000001,B00000100,B00010000,B10011111,
|
||||
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111101,B01010101,B01010101,B01010100,B11010101,B01010101,B01010101,B01010101,B01010101,B10111111,
|
||||
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B11111111,B11111111,B11111111,B11111111,B11111111,B10011111,
|
||||
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,
|
||||
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,
|
||||
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11100000,B00101110,B11111011,B01111101,B11111011,B11111011,B11001111,B11000001,B11011111,B10111011,B00111110,B11000000,B11100001,B11111110,B00111100,B00011111,
|
||||
B11111101,B11101110,B01111011,B00111001,B11111001,B11110011,B11001111,B10011110,B11011111,B10111011,B00111110,B11011111,B11011110,B11111100,B11011101,B11100111,
|
||||
B11111101,B11101110,B00111011,B10111011,B11111001,B11101011,B11010111,B10111111,B01011111,B10111011,B01011110,B11011111,B11011110,B11111101,B11101101,B11110111,
|
||||
B11111101,B11101110,B10111011,B11010011,B11111010,B11101011,B10110111,B00111111,B11011111,B10111011,B01001110,B11011111,B11011111,B11111111,B11001101,B11110011,
|
||||
B11111101,B11101110,B11011011,B11000111,B11111010,B11101011,B10111011,B01111111,B11000000,B00111011,B01101110,B11000000,B11100011,B11111111,B00011101,B11110011,
|
||||
B11111101,B11101110,B11001011,B11101111,B11111010,B11011011,B10111011,B01111111,B11011111,B10111011,B01100110,B11011111,B11111000,B11111111,B11001101,B11110011,
|
||||
B11111101,B11101110,B11101011,B11101111,B11111011,B01011011,B00000011,B00111111,B01011111,B10111011,B01110110,B11011111,B11111110,B01111111,B11101101,B11110011,
|
||||
B11111101,B11101110,B11110011,B11101111,B11111011,B01011011,B01111001,B10111110,B11011111,B10111011,B01111010,B11011111,B11011110,B01111101,B11101101,B11110111,
|
||||
B11111101,B11101110,B11110011,B11101111,B11111011,B10111010,B11111101,B10011110,B11011111,B10111011,B01111100,B11011111,B11011110,B11111101,B11001101,B11100111,
|
||||
B11111101,B11101110,B11111011,B11101111,B11111011,B10111010,B11111101,B11000001,B11011111,B10111011,B01111110,B11000000,B11100000,B11111110,B00011100,B00011111
|
||||
};
|
||||
@@ -0,0 +1,74 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Custom Status Screen bitmap
|
||||
*
|
||||
* Place this file in the root with your configuration files
|
||||
* and enable CUSTOM_STATUS_SCREEN_IMAGE in Configuration.h.
|
||||
*
|
||||
* Use the Marlin Bitmap Converter to make your own:
|
||||
* http://marlinfw.org/tools/u8glib/converter.html
|
||||
*/
|
||||
|
||||
//
|
||||
// Status Screen Logo bitmap
|
||||
//
|
||||
#define STATUS_LOGO_Y 3
|
||||
#define STATUS_LOGO_WIDTH 24
|
||||
|
||||
const unsigned char status_logo_bmp[] PROGMEM = {
|
||||
B11111111,B11111111,B11111111,
|
||||
B10000000,B00000000,B00000001,
|
||||
B10001110,B00000000,B11100001,
|
||||
B10011111,B00000001,B11110001,
|
||||
B10010011,B10000001,B00111001,
|
||||
B10011111,B10000001,B11111001,
|
||||
B10011111,B10000001,B11111001,
|
||||
B10011111,B10111001,B11111001,
|
||||
B10001111,B00101000,B11110001,
|
||||
B10000000,B00111000,B00000001,
|
||||
B10000000,B00000000,B00000001,
|
||||
B10011111,B11111111,B11111001,
|
||||
B10010001,B01110100,B10011001,
|
||||
B10011011,B00000110,B10101001,
|
||||
B10011011,B01010100,B10101001,
|
||||
B10011011,B01010110,B10101001,
|
||||
B10011011,B01010100,B10011001,
|
||||
B10011111,B11111111,B11111001,
|
||||
B11111111,B11111111,B11111111
|
||||
};
|
||||
|
||||
//
|
||||
// Use default bitmaps
|
||||
//
|
||||
#define STATUS_HOTEND_ANIM
|
||||
#define STATUS_BED_ANIM
|
||||
#if HOTENDS < 2
|
||||
#define STATUS_LOGO_X 8
|
||||
#define STATUS_HEATERS_X 40
|
||||
#define STATUS_BED_X 72
|
||||
#else
|
||||
#define STATUS_LOGO_X 0
|
||||
#define STATUS_HEATERS_X 32
|
||||
#define STATUS_BED_X 80
|
||||
#endif
|
||||
@@ -266,7 +266,7 @@ PGMSTR(M112_KILL_STR, "M112 Shutdown");
|
||||
MarlinState marlin_state = MF_INITIALIZING;
|
||||
|
||||
// For M109 and M190, this flag may be cleared (by M108) to exit the wait loop
|
||||
bool wait_for_heatup = false;
|
||||
bool wait_for_heatup = true;
|
||||
|
||||
// For M0/M1, this flag may be cleared (by M108) to exit the wait-for-user loop
|
||||
#if HAS_RESUME_CONTINUE
|
||||
|
||||
@@ -25,10 +25,6 @@
|
||||
#include "../MarlinCore.h"
|
||||
#include "../module/temperature.h"
|
||||
|
||||
#if ENABLED(MARLIN_DEV_MODE)
|
||||
MarlinError marlin_error_number; // Error Number - Marlin can beep X times periodically, display, and emit...
|
||||
#endif
|
||||
|
||||
void safe_delay(millis_t ms) {
|
||||
while (ms > 50) {
|
||||
ms -= 50;
|
||||
@@ -80,8 +76,6 @@ void safe_delay(millis_t ms) {
|
||||
TERN_(Z_PROBE_ALLEN_KEY, "Z_PROBE_ALLEN_KEY")
|
||||
TERN_(SOLENOID_PROBE, "SOLENOID_PROBE")
|
||||
TERN_(MAGLEV4, "MAGLEV4")
|
||||
TERN_(BIQU_MICROPROBE_V1, "BIQU_MICROPROBE_V1")
|
||||
TERN_(BIQU_MICROPROBE_V2, "BIQU_MICROPROBE_V2")
|
||||
IF_DISABLED(PROBE_SELECTED, "NONE")
|
||||
);
|
||||
|
||||
@@ -101,9 +95,9 @@ void safe_delay(millis_t ms) {
|
||||
SERIAL_ECHOPGM(" (Aligned With");
|
||||
|
||||
if (probe.offset_xy.y > 0)
|
||||
SERIAL_ECHO(F(TERN(IS_SCARA, "-Distal", "-Back")));
|
||||
SERIAL_ECHOPGM(TERN(IS_SCARA, "-Distal", "-Back"));
|
||||
else if (probe.offset_xy.y < 0)
|
||||
SERIAL_ECHO(F(TERN(IS_SCARA, "-Proximal", "-Front")));
|
||||
SERIAL_ECHOPGM(TERN(IS_SCARA, "-Proximal", "-Front"));
|
||||
else if (probe.offset_xy.x != 0)
|
||||
SERIAL_ECHOPGM("-Center");
|
||||
|
||||
@@ -111,7 +105,7 @@ void safe_delay(millis_t ms) {
|
||||
|
||||
#endif
|
||||
|
||||
SERIAL_ECHO(probe.offset.z < 0 ? F("Below") : probe.offset.z > 0 ? F("Above") : F("Same Z as"));
|
||||
SERIAL_ECHOF(probe.offset.z < 0 ? F("Below") : probe.offset.z > 0 ? F("Above") : F("Same Z as"));
|
||||
SERIAL_ECHOLNPGM(" Nozzle)");
|
||||
|
||||
#endif
|
||||
|
||||
@@ -197,7 +197,7 @@ void HostUI::action(FSTR_P const fstr, const bool eol) {
|
||||
#endif
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
if (runout.filament_ran_out) { // Disable a triggered sensor
|
||||
runout.enabled = false;
|
||||
runout.enabled[active_extruder] = false;
|
||||
runout.reset();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -76,7 +76,7 @@ MMU2 mmu2;
|
||||
#define MMU2_NO_TOOL 99
|
||||
#define MMU_BAUD 115200
|
||||
|
||||
bool MMU2::_enabled, MMU2::ready;
|
||||
bool MMU2::_enabled, MMU2::ready, MMU2::mmu_print_saved;
|
||||
#if HAS_PRUSA_MMU2S
|
||||
bool MMU2::mmu2s_triggered;
|
||||
#endif
|
||||
@@ -84,6 +84,7 @@ uint8_t MMU2::cmd, MMU2::cmd_arg, MMU2::last_cmd, MMU2::extruder;
|
||||
int8_t MMU2::state = 0;
|
||||
volatile int8_t MMU2::finda = 1;
|
||||
volatile bool MMU2::finda_runout_valid;
|
||||
int16_t MMU2::version = -1, MMU2::buildnr = -1;
|
||||
millis_t MMU2::prev_request, MMU2::prev_P0_request;
|
||||
char MMU2::rx_buffer[MMU_RX_SIZE], MMU2::tx_buffer[MMU_TX_SIZE];
|
||||
|
||||
@@ -92,11 +93,14 @@ struct E_Step {
|
||||
feedRate_t feedRate; //!< feed rate in mm/s
|
||||
};
|
||||
|
||||
inline void unscaled_mmu2_e_move(const float &dist, const feedRate_t fr_mm_s, const bool sync=true) {
|
||||
current_position.e += dist / planner.e_factor[active_extruder];
|
||||
line_to_current_position(fr_mm_s);
|
||||
if (sync) planner.synchronize();
|
||||
}
|
||||
static constexpr E_Step
|
||||
ramming_sequence[] PROGMEM = { MMU2_RAMMING_SEQUENCE }
|
||||
, load_to_nozzle_sequence[] PROGMEM = { MMU2_LOAD_TO_NOZZLE_SEQUENCE }
|
||||
#if HAS_PRUSA_MMU2S
|
||||
, can_load_sequence[] PROGMEM = { MMU2_CAN_LOAD_SEQUENCE }
|
||||
, can_load_increment_sequence[] PROGMEM = { MMU2_CAN_LOAD_INCREMENT_SEQUENCE }
|
||||
#endif
|
||||
;
|
||||
|
||||
MMU2::MMU2() {
|
||||
rx_buffer[0] = '\0';
|
||||
@@ -132,12 +136,12 @@ void MMU2::reset() {
|
||||
#endif
|
||||
}
|
||||
|
||||
int8_t MMU2::get_current_tool() { return extruder == MMU2_NO_TOOL ? -1 : extruder; }
|
||||
uint8_t MMU2::get_current_tool() {
|
||||
return extruder == MMU2_NO_TOOL ? -1 : extruder;
|
||||
}
|
||||
|
||||
#if ANY(HAS_PRUSA_MMU2S, MMU_EXTRUDER_SENSOR)
|
||||
#define FILAMENT_PRESENT() (READ(FIL_RUNOUT1_PIN) != FIL_RUNOUT1_STATE)
|
||||
#else
|
||||
#define FILAMENT_PRESENT() true
|
||||
#if EITHER(HAS_PRUSA_MMU2S, MMU_EXTRUDER_SENSOR)
|
||||
#define FILAMENT_PRESENT() (READ(FIL_RUNOUT1_PIN) != runout.out_state())
|
||||
#endif
|
||||
|
||||
void mmu2_attn_buzz(const bool two=false) {
|
||||
@@ -145,7 +149,6 @@ void mmu2_attn_buzz(const bool two=false) {
|
||||
if (two) { BUZZ(10, 0); BUZZ(200, 404); }
|
||||
}
|
||||
|
||||
// Avoiding sscanf significantly reduces build size
|
||||
void MMU2::mmu_loop() {
|
||||
|
||||
switch (state) {
|
||||
@@ -160,7 +163,7 @@ void MMU2::mmu_loop() {
|
||||
MMU2_SEND("S1"); // Read Version
|
||||
state = -2;
|
||||
}
|
||||
else if (ELAPSED(millis(), prev_request + 30000)) { // 30sec after reset disable MMU
|
||||
else if (millis() > 30000) { // 30sec after reset disable MMU
|
||||
SERIAL_ECHOLNPGM("MMU not responding - DISABLED");
|
||||
state = 0;
|
||||
}
|
||||
@@ -168,7 +171,7 @@ void MMU2::mmu_loop() {
|
||||
|
||||
case -2:
|
||||
if (rx_ok()) {
|
||||
const uint16_t version = uint16_t(strtoul(rx_buffer, nullptr, 10));
|
||||
sscanf(rx_buffer, "%huok\n", &version);
|
||||
DEBUG_ECHOLNPGM("MMU => ", version, "\nMMU <= 'S2'");
|
||||
MMU2_SEND("S2"); // Read Build Number
|
||||
state = -3;
|
||||
@@ -177,15 +180,17 @@ void MMU2::mmu_loop() {
|
||||
|
||||
case -3:
|
||||
if (rx_ok()) {
|
||||
const uint16_t buildnr = uint16_t(strtoul(rx_buffer, nullptr, 10));
|
||||
sscanf(rx_buffer, "%huok\n", &buildnr);
|
||||
|
||||
DEBUG_ECHOLNPGM("MMU => ", buildnr);
|
||||
|
||||
check_version(buildnr);
|
||||
check_version();
|
||||
|
||||
#if ENABLED(MMU2_MODE_12V)
|
||||
DEBUG_ECHOLNPGM("MMU <= 'M1'");
|
||||
MMU2_SEND("M1"); // Stealth Mode
|
||||
state = -5;
|
||||
|
||||
#else
|
||||
DEBUG_ECHOLNPGM("MMU <= 'P0'");
|
||||
MMU2_SEND("P0"); // Read FINDA
|
||||
@@ -195,21 +200,20 @@ void MMU2::mmu_loop() {
|
||||
break;
|
||||
|
||||
#if ENABLED(MMU2_MODE_12V)
|
||||
case -5:
|
||||
// response to M1
|
||||
if (rx_ok()) {
|
||||
DEBUG_ECHOLNPGM("MMU => ok");
|
||||
DEBUG_ECHOLNPGM("MMU <= 'P0'");
|
||||
MMU2_SEND("P0"); // Read FINDA
|
||||
state = -4;
|
||||
}
|
||||
break;
|
||||
case -5:
|
||||
// response to M1
|
||||
if (rx_ok()) {
|
||||
DEBUG_ECHOLNPGM("MMU => ok");
|
||||
DEBUG_ECHOLNPGM("MMU <= 'P0'");
|
||||
MMU2_SEND("P0"); // Read FINDA
|
||||
state = -4;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
case -4:
|
||||
if (rx_ok()) {
|
||||
const uint8_t findex = uint8_t(rx_buffer[0] - '0');
|
||||
if (findex <= 1) finda = findex;
|
||||
sscanf(rx_buffer, "%hhuok\n", &finda);
|
||||
|
||||
DEBUG_ECHOLNPGM("MMU => ", finda, "\nMMU - ENABLED");
|
||||
|
||||
@@ -282,11 +286,10 @@ void MMU2::mmu_loop() {
|
||||
|
||||
case 2: // response to command P0
|
||||
if (rx_ok()) {
|
||||
const uint8_t findex = uint8_t(rx_buffer[0] - '0');
|
||||
if (findex <= 1) finda = findex;
|
||||
sscanf(rx_buffer, "%hhuok\n", &finda);
|
||||
|
||||
// This is super annoying. Only activate if necessary
|
||||
//if (finda_runout_valid) DEBUG_ECHOLNPGM("MMU <= 'P0'\nMMU => ", p_float_t(finda, 6));
|
||||
// if (finda_runout_valid) DEBUG_ECHOLNPAIR_F("MMU <= 'P0'\nMMU => ", finda, 6);
|
||||
|
||||
if (!finda && finda_runout_valid) filament_runout();
|
||||
if (cmd == MMU_CMD_NONE) ready = true;
|
||||
@@ -403,7 +406,7 @@ void MMU2::tx_str(FSTR_P fstr) {
|
||||
void MMU2::tx_printf(FSTR_P format, int argument = -1) {
|
||||
clear_rx_buffer();
|
||||
const uint8_t len = sprintf_P(tx_buffer, FTOP(format), argument);
|
||||
for (uint8_t i = 0; i < len; ++i) MMU2_SERIAL.write(tx_buffer[i]);
|
||||
LOOP_L_N(i, len) MMU2_SERIAL.write(tx_buffer[i]);
|
||||
prev_request = millis();
|
||||
}
|
||||
|
||||
@@ -413,7 +416,7 @@ void MMU2::tx_printf(FSTR_P format, int argument = -1) {
|
||||
void MMU2::tx_printf(FSTR_P format, int argument1, int argument2) {
|
||||
clear_rx_buffer();
|
||||
const uint8_t len = sprintf_P(tx_buffer, FTOP(format), argument1, argument2);
|
||||
for (uint8_t i = 0; i < len; ++i) MMU2_SERIAL.write(tx_buffer[i]);
|
||||
LOOP_L_N(i, len) MMU2_SERIAL.write(tx_buffer[i]);
|
||||
prev_request = millis();
|
||||
}
|
||||
|
||||
@@ -439,7 +442,7 @@ bool MMU2::rx_ok() {
|
||||
/**
|
||||
* Check if MMU has compatible firmware
|
||||
*/
|
||||
void MMU2::check_version(const uint16_t buildnr) {
|
||||
void MMU2::check_version() {
|
||||
if (buildnr < MMU_REQUIRED_FW_BUILDNR) {
|
||||
SERIAL_ERROR_MSG("Invalid MMU2 firmware. Version >= " STRINGIFY(MMU_REQUIRED_FW_BUILDNR) " required.");
|
||||
kill(GET_TEXT_F(MSG_KILL_MMU2_FIRMWARE));
|
||||
@@ -455,19 +458,12 @@ static void mmu2_not_responding() {
|
||||
BUZZ(100, 659);
|
||||
}
|
||||
|
||||
inline void beep_bad_cmd() { BUZZ(400, 40); }
|
||||
|
||||
#if HAS_PRUSA_MMU2S
|
||||
|
||||
/**
|
||||
* Load filament until the sensor at the gears is triggered
|
||||
* and give up after a number of attempts set with MMU2_C0_RETRY.
|
||||
* Each try has a timeout before returning a fail state.
|
||||
*/
|
||||
bool MMU2::load_to_gears() {
|
||||
command(MMU_CMD_C0);
|
||||
manage_response(true, true);
|
||||
for (uint8_t i = 0; i < MMU2_C0_RETRY; ++i) { // Keep loading until filament reaches gears
|
||||
LOOP_L_N(i, MMU2_C0_RETRY) { // Keep loading until filament reaches gears
|
||||
if (mmu2s_triggered) break;
|
||||
command(MMU_CMD_C0);
|
||||
manage_response(true, true);
|
||||
@@ -488,11 +484,6 @@ inline void beep_bad_cmd() { BUZZ(400, 40); }
|
||||
set_runout_valid(false);
|
||||
|
||||
if (index != extruder) {
|
||||
if (ENABLED(MMU_IR_UNLOAD_MOVE) && FILAMENT_PRESENT()) {
|
||||
DEBUG_ECHOLNPGM("Unloading\n");
|
||||
while (FILAMENT_PRESENT()) // Filament present? Keep unloading.
|
||||
unscaled_mmu2_e_move(-0.25, MMM_TO_MMS(120)); // 0.25mm is a guessed value. Adjust to preference.
|
||||
}
|
||||
|
||||
stepper.disable_extruder();
|
||||
ui.status_printf(0, GET_TEXT_F(MSG_MMU2_LOADING_FILAMENT), int(index + 1));
|
||||
@@ -529,9 +520,9 @@ inline void beep_bad_cmd() { BUZZ(400, 40); }
|
||||
#if ENABLED(MMU2_MENUS)
|
||||
const uint8_t index = mmu2_choose_filament();
|
||||
while (!thermalManager.wait_for_hotend(active_extruder, false)) safe_delay(100);
|
||||
load_to_nozzle(index);
|
||||
load_filament_to_nozzle(index);
|
||||
#else
|
||||
beep_bad_cmd();
|
||||
ERR_BUZZ();
|
||||
#endif
|
||||
} break;
|
||||
|
||||
@@ -550,13 +541,13 @@ inline void beep_bad_cmd() { BUZZ(400, 40); }
|
||||
active_extruder = 0;
|
||||
}
|
||||
#else
|
||||
beep_bad_cmd();
|
||||
ERR_BUZZ();
|
||||
#endif
|
||||
} break;
|
||||
|
||||
case 'c': {
|
||||
while (!thermalManager.wait_for_hotend(active_extruder, false)) safe_delay(100);
|
||||
load_to_nozzle_sequence();
|
||||
load_to_nozzle();
|
||||
} break;
|
||||
}
|
||||
|
||||
@@ -617,9 +608,9 @@ inline void beep_bad_cmd() { BUZZ(400, 40); }
|
||||
#if ENABLED(MMU2_MENUS)
|
||||
uint8_t index = mmu2_choose_filament();
|
||||
while (!thermalManager.wait_for_hotend(active_extruder, false)) safe_delay(100);
|
||||
load_to_nozzle(index);
|
||||
load_filament_to_nozzle(index);
|
||||
#else
|
||||
beep_bad_cmd();
|
||||
ERR_BUZZ();
|
||||
#endif
|
||||
} break;
|
||||
|
||||
@@ -639,14 +630,14 @@ inline void beep_bad_cmd() { BUZZ(400, 40); }
|
||||
extruder = index;
|
||||
active_extruder = 0;
|
||||
#else
|
||||
beep_bad_cmd();
|
||||
ERR_BUZZ();
|
||||
#endif
|
||||
} break;
|
||||
|
||||
case 'c': {
|
||||
DEBUG_ECHOLNPGM("case c\n");
|
||||
while (!thermalManager.wait_for_hotend(active_extruder, false)) safe_delay(100);
|
||||
load_to_nozzle_sequence();
|
||||
execute_extruder_sequence((const E_Step *)load_to_nozzle_sequence, COUNT(load_to_nozzle_sequence));
|
||||
} break;
|
||||
}
|
||||
|
||||
@@ -732,9 +723,9 @@ inline void beep_bad_cmd() { BUZZ(400, 40); }
|
||||
#if ENABLED(MMU2_MENUS)
|
||||
uint8_t index = mmu2_choose_filament();
|
||||
while (!thermalManager.wait_for_hotend(active_extruder, false)) safe_delay(100);
|
||||
load_to_nozzle(index);
|
||||
load_filament_to_nozzle(index);
|
||||
#else
|
||||
beep_bad_cmd();
|
||||
ERR_BUZZ();
|
||||
#endif
|
||||
} break;
|
||||
|
||||
@@ -753,14 +744,14 @@ inline void beep_bad_cmd() { BUZZ(400, 40); }
|
||||
extruder = index;
|
||||
active_extruder = 0;
|
||||
#else
|
||||
beep_bad_cmd();
|
||||
ERR_BUZZ();
|
||||
#endif
|
||||
} break;
|
||||
|
||||
case 'c': {
|
||||
DEBUG_ECHOLNPGM("case c\n");
|
||||
while (!thermalManager.wait_for_hotend(active_extruder, false)) safe_delay(100);
|
||||
load_to_nozzle_sequence();
|
||||
execute_extruder_sequence((const E_Step *)load_to_nozzle_sequence, COUNT(load_to_nozzle_sequence));
|
||||
} break;
|
||||
}
|
||||
|
||||
@@ -801,7 +792,8 @@ bool MMU2::get_response() {
|
||||
void MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) {
|
||||
|
||||
constexpr xyz_pos_t park_point = NOZZLE_PARK_POINT;
|
||||
bool response = false, mmu_print_saved = false;
|
||||
bool response = false;
|
||||
mmu_print_saved = false;
|
||||
xyz_pos_t resume_position;
|
||||
celsius_t resume_hotend_temp = thermalManager.degTargetHotend(active_extruder);
|
||||
|
||||
@@ -823,7 +815,8 @@ void MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) {
|
||||
resume_hotend_temp = thermalManager.degTargetHotend(active_extruder);
|
||||
resume_position = current_position;
|
||||
|
||||
if (move_axes && all_axes_homed()) nozzle.park(0, park_point);
|
||||
if (move_axes && all_axes_homed())
|
||||
nozzle.park(0, park_point /*= NOZZLE_PARK_POINT*/);
|
||||
|
||||
if (turn_off_nozzle) thermalManager.setTargetHotend(0, active_extruder);
|
||||
|
||||
@@ -831,12 +824,13 @@ void MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) {
|
||||
}
|
||||
}
|
||||
else if (mmu_print_saved) {
|
||||
SERIAL_ECHOLNPGM("\nMMU starts responding");
|
||||
SERIAL_ECHOLNPGM("MMU starts responding\n");
|
||||
|
||||
if (turn_off_nozzle && resume_hotend_temp) {
|
||||
thermalManager.setTargetHotend(resume_hotend_temp, active_extruder);
|
||||
LCD_MESSAGE(MSG_HEATING);
|
||||
ERR_BUZZ();
|
||||
|
||||
while (!thermalManager.wait_for_hotend(active_extruder, false)) safe_delay(1000);
|
||||
}
|
||||
|
||||
@@ -849,6 +843,7 @@ void MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) {
|
||||
if (move_axes && all_axes_homed()) {
|
||||
// Move XY to starting position, then Z
|
||||
do_blocking_move_to_xy(resume_position, feedRate_t(NOZZLE_PARK_XY_FEEDRATE));
|
||||
|
||||
// Move Z_AXIS to saved position
|
||||
do_blocking_move_to_z(resume_position.z, feedRate_t(NOZZLE_PARK_Z_FEEDRATE));
|
||||
}
|
||||
@@ -883,24 +878,23 @@ void MMU2::filament_runout() {
|
||||
}
|
||||
// Slowly spin the extruder during C0
|
||||
else {
|
||||
while (planner.movesplanned() < 3)
|
||||
unscaled_mmu2_e_move(0.25, MMM_TO_MMS(120), false);
|
||||
while (planner.movesplanned() < 3) {
|
||||
current_position.e += 0.25;
|
||||
line_to_current_position(MMM_TO_MMS(120));
|
||||
}
|
||||
}
|
||||
}
|
||||
mmu2s_triggered = present;
|
||||
}
|
||||
|
||||
bool MMU2::can_load() {
|
||||
static const E_Step can_load_sequence[] PROGMEM = { MMU2_CAN_LOAD_SEQUENCE },
|
||||
can_load_increment_sequence[] PROGMEM = { MMU2_CAN_LOAD_INCREMENT_SEQUENCE };
|
||||
|
||||
execute_extruder_sequence(can_load_sequence, COUNT(can_load_sequence));
|
||||
execute_extruder_sequence((const E_Step *)can_load_sequence, COUNT(can_load_sequence));
|
||||
|
||||
int filament_detected_count = 0;
|
||||
const int steps = (MMU2_CAN_LOAD_RETRACT) / (MMU2_CAN_LOAD_INCREMENT);
|
||||
DEBUG_ECHOLNPGM("MMU can_load:");
|
||||
for (uint8_t i = 0; i < steps; ++i) {
|
||||
execute_extruder_sequence(can_load_increment_sequence, COUNT(can_load_increment_sequence));
|
||||
LOOP_L_N(i, steps) {
|
||||
execute_extruder_sequence((const E_Step *)can_load_increment_sequence, COUNT(can_load_increment_sequence));
|
||||
check_filament(); // Don't trust the idle function
|
||||
DEBUG_CHAR(mmu2s_triggered ? 'O' : 'o');
|
||||
if (mmu2s_triggered) ++filament_detected_count;
|
||||
@@ -918,7 +912,7 @@ void MMU2::filament_runout() {
|
||||
#endif
|
||||
|
||||
// Load filament into MMU2
|
||||
void MMU2::load_to_feeder(const uint8_t index) {
|
||||
void MMU2::load_filament(const uint8_t index) {
|
||||
if (!_enabled) return;
|
||||
|
||||
command(MMU_CMD_L0 + index);
|
||||
@@ -929,7 +923,8 @@ void MMU2::load_to_feeder(const uint8_t index) {
|
||||
/**
|
||||
* Switch material and load to nozzle
|
||||
*/
|
||||
bool MMU2::load_to_nozzle(const uint8_t index) {
|
||||
bool MMU2::load_filament_to_nozzle(const uint8_t index) {
|
||||
|
||||
if (!_enabled) return false;
|
||||
|
||||
if (thermalManager.tooColdToExtrude(active_extruder)) {
|
||||
@@ -938,13 +933,6 @@ bool MMU2::load_to_nozzle(const uint8_t index) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (TERN0(MMU_IR_UNLOAD_MOVE, index != extruder) && FILAMENT_PRESENT()) {
|
||||
DEBUG_ECHOLNPGM("Unloading\n");
|
||||
ramming_sequence(); // Unloading instructions from printer side when operating LCD
|
||||
while (FILAMENT_PRESENT()) // Filament present? Keep unloading.
|
||||
unscaled_mmu2_e_move(-0.25, MMM_TO_MMS(120)); // 0.25mm is a guessed value. Adjust to preference.
|
||||
}
|
||||
|
||||
stepper.disable_extruder();
|
||||
command(MMU_CMD_T0 + index);
|
||||
manage_response(true, true);
|
||||
@@ -954,12 +942,23 @@ bool MMU2::load_to_nozzle(const uint8_t index) {
|
||||
mmu_loop();
|
||||
extruder = index;
|
||||
active_extruder = 0;
|
||||
load_to_nozzle_sequence();
|
||||
load_to_nozzle();
|
||||
mmu2_attn_buzz();
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load filament to nozzle of multimaterial printer
|
||||
*
|
||||
* This function is used only after T? (user select filament) and M600 (change filament).
|
||||
* It is not used after T0 .. T4 command (select filament), in such case, G-code is responsible for loading
|
||||
* filament to nozzle.
|
||||
*/
|
||||
void MMU2::load_to_nozzle() {
|
||||
execute_extruder_sequence((const E_Step *)load_to_nozzle_sequence, COUNT(load_to_nozzle_sequence));
|
||||
}
|
||||
|
||||
bool MMU2::eject_filament(const uint8_t index, const bool recover) {
|
||||
|
||||
if (!_enabled) return false;
|
||||
@@ -972,17 +971,20 @@ bool MMU2::eject_filament(const uint8_t index, const bool recover) {
|
||||
|
||||
LCD_MESSAGE(MSG_MMU2_EJECTING_FILAMENT);
|
||||
|
||||
unscaled_mmu2_e_move(-(MMU2_FILAMENTCHANGE_EJECT_FEED), MMM_TO_MMS(2500));
|
||||
stepper.enable_extruder();
|
||||
current_position.e -= MMU2_FILAMENTCHANGE_EJECT_FEED;
|
||||
line_to_current_position(MMM_TO_MMS(2500));
|
||||
planner.synchronize();
|
||||
command(MMU_CMD_E0 + index);
|
||||
manage_response(false, false);
|
||||
|
||||
if (recover) {
|
||||
LCD_MESSAGE(MSG_MMU2_REMOVE_AND_CLICK);
|
||||
LCD_MESSAGE(MSG_MMU2_EJECT_RECOVER);
|
||||
mmu2_attn_buzz();
|
||||
TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(GET_TEXT_F(MSG_MMU2_EJECT_RECOVER)));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_MMU2_EJECT_RECOVER)));
|
||||
TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, F("MMU2 Eject Recover"), FPSTR(CONTINUE_STR)));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(F("MMU2 Eject Recover")));
|
||||
TERN_(HAS_RESUME_CONTINUE, wait_for_user_response());
|
||||
mmu2_attn_buzz();
|
||||
mmu2_attn_buzz(true);
|
||||
|
||||
command(MMU_CMD_R0);
|
||||
manage_response(false, false);
|
||||
@@ -1016,7 +1018,7 @@ bool MMU2::unload() {
|
||||
}
|
||||
|
||||
// Unload sequence to optimize shape of the tip of the unloaded filament
|
||||
ramming_sequence();
|
||||
execute_extruder_sequence((const E_Step *)ramming_sequence, sizeof(ramming_sequence) / sizeof(E_Step));
|
||||
|
||||
command(MMU_CMD_U0);
|
||||
manage_response(false, true);
|
||||
@@ -1031,26 +1033,23 @@ bool MMU2::unload() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void MMU2::ramming_sequence() {
|
||||
static const E_Step sequence[] PROGMEM = { MMU2_RAMMING_SEQUENCE };
|
||||
execute_extruder_sequence(sequence, COUNT(sequence));
|
||||
}
|
||||
|
||||
void MMU2::load_to_nozzle_sequence() {
|
||||
static const E_Step sequence[] PROGMEM = { MMU2_LOAD_TO_NOZZLE_SEQUENCE };
|
||||
execute_extruder_sequence(sequence, COUNT(sequence));
|
||||
}
|
||||
|
||||
void MMU2::execute_extruder_sequence(const E_Step * sequence, int steps) {
|
||||
|
||||
planner.synchronize();
|
||||
stepper.enable_extruder();
|
||||
|
||||
const E_Step *step = sequence;
|
||||
const E_Step* step = sequence;
|
||||
|
||||
for (uint8_t i = 0; i < steps; ++i) {
|
||||
LOOP_L_N(i, steps) {
|
||||
const float es = pgm_read_float(&(step->extrude));
|
||||
const feedRate_t fr_mm_m = pgm_read_float(&(step->feedRate));
|
||||
|
||||
DEBUG_ECHO_MSG("E step ", es, "/", fr_mm_m);
|
||||
unscaled_mmu2_e_move(es, MMM_TO_MMS(fr_mm_m));
|
||||
|
||||
current_position.e += es;
|
||||
line_to_current_position(MMM_TO_MMS(fr_mm_m));
|
||||
planner.synchronize();
|
||||
|
||||
step++;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
/**
|
||||
* feature/pause.cpp - Pause feature support functions
|
||||
* This may be combined with related G-codes if features are consolidated.
|
||||
*
|
||||
* Note: Calls to ui.pause_show_message are passed to either ExtUI or MarlinUI.
|
||||
*/
|
||||
|
||||
#include "../inc/MarlinConfigPre.h"
|
||||
@@ -62,6 +60,8 @@
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
#include "../lcd/marlinui.h"
|
||||
@@ -89,11 +89,9 @@ static xyze_pos_t resume_position;
|
||||
PauseMode pause_mode = PAUSE_MODE_PAUSE_PRINT;
|
||||
#endif
|
||||
|
||||
#if ENABLED(CONFIGURE_FILAMENT_CHANGE)
|
||||
fil_change_settings_t fc_settings[EXTRUDERS];
|
||||
#endif
|
||||
fil_change_settings_t fc_settings[EXTRUDERS];
|
||||
|
||||
#if HAS_MEDIA
|
||||
#if ENABLED(SDSUPPORT)
|
||||
#include "../sd/cardreader.h"
|
||||
#endif
|
||||
|
||||
@@ -148,7 +146,7 @@ static bool ensure_safe_temperature(const bool wait=true, const PauseMode mode=P
|
||||
thermalManager.setTargetHotend(thermalManager.extrude_min_temp, active_extruder);
|
||||
#endif
|
||||
|
||||
ui.pause_show_message(PAUSE_MESSAGE_HEATING, mode);
|
||||
ui.pause_show_message(PAUSE_MESSAGE_HEATING, mode); UNUSED(mode);
|
||||
|
||||
if (wait) return thermalManager.wait_for_hotend(active_extruder);
|
||||
|
||||
@@ -203,7 +201,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load
|
||||
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
||||
wait_for_user = true; // LCD click or M108 will clear this
|
||||
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENTLOAD)));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(F("Load Filament")));
|
||||
|
||||
#if ENABLED(HOST_PROMPT_SUPPORT)
|
||||
const char tool = '0' + TERN0(MULTI_FILAMENT_SENSOR, active_extruder);
|
||||
@@ -212,14 +210,23 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load
|
||||
|
||||
while (wait_for_user) {
|
||||
impatient_beep(max_beep_count);
|
||||
#if ALL(FILAMENT_CHANGE_RESUME_ON_INSERT, FILAMENT_RUNOUT_SENSOR)
|
||||
#if BOTH(FILAMENT_CHANGE_RESUME_ON_INSERT, FILAMENT_RUNOUT_SENSOR)
|
||||
#if MULTI_FILAMENT_SENSOR
|
||||
#define _CASE_INSERTED(N) case N-1: if (READ(FIL_RUNOUT##N##_PIN) != FIL_RUNOUT##N##_STATE) wait_for_user = false; break;
|
||||
switch (active_extruder) {
|
||||
REPEAT_1(NUM_RUNOUT_SENSORS, _CASE_INSERTED)
|
||||
LOOP_S_LE_N(i, 1, NUM_RUNOUT_SENSORS) {
|
||||
pin_t pin;
|
||||
switch (i) {
|
||||
default: continue;
|
||||
#define _CASE_RUNOUT(N) case N: pin = FIL_RUNOUT##N##_PIN; break;
|
||||
REPEAT_1(NUM_RUNOUT_SENSORS, _CASE_RUNOUT)
|
||||
#undef _CASE_RUNOUT
|
||||
}
|
||||
const RunoutMode rm = runout.mode[i - 1];
|
||||
if (rm != RM_NONE && rm != RM_MOTION_SENSOR && extDigitalRead(pin) != runout.out_state(i - 1))
|
||||
wait_for_user = false;
|
||||
}
|
||||
#else
|
||||
if (READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_STATE) wait_for_user = false;
|
||||
if (READ(FIL_RUNOUT_PIN) != runout.out_state(active_extruder))
|
||||
wait_for_user = false;
|
||||
#endif
|
||||
#endif
|
||||
idle_no_sleep();
|
||||
@@ -236,8 +243,6 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load
|
||||
|
||||
TERN_(BELTPRINTER, do_blocking_move_to_xy(0.00, 50.00));
|
||||
|
||||
TERN_(MPCTEMP, MPC::e_paused = true);
|
||||
|
||||
// Slow Load filament
|
||||
if (slow_load_length) unscaled_e_move(slow_load_length, FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE);
|
||||
|
||||
@@ -264,7 +269,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load
|
||||
if (show_lcd) ui.pause_show_message(PAUSE_MESSAGE_PURGE);
|
||||
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_PURGE)));
|
||||
TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(GET_TEXT_F(MSG_FILAMENT_CHANGE_PURGE)));
|
||||
TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_FILAMENT_CHANGE_PURGE), FPSTR(CONTINUE_STR)));
|
||||
wait_for_user = true; // A click or M108 breaks the purge_length loop
|
||||
for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count)
|
||||
unscaled_e_move(1, ADVANCED_PAUSE_PURGE_FEEDRATE);
|
||||
@@ -288,8 +293,8 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load
|
||||
// Show "Purge More" / "Resume" menu and wait for reply
|
||||
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
||||
wait_for_user = false;
|
||||
#if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI)
|
||||
ui.pause_show_message(PAUSE_MESSAGE_OPTION); // MarlinUI and MKS UI also set PAUSE_RESPONSE_WAIT_FOR
|
||||
#if EITHER(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
|
||||
ui.pause_show_message(PAUSE_MESSAGE_OPTION); // Also sets PAUSE_RESPONSE_WAIT_FOR
|
||||
#else
|
||||
pause_menu_response = PAUSE_RESPONSE_WAIT_FOR;
|
||||
#endif
|
||||
@@ -301,9 +306,6 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load
|
||||
} while (TERN0(M600_PURGE_MORE_RESUMABLE, pause_menu_response == PAUSE_RESPONSE_EXTRUDE_MORE));
|
||||
|
||||
#endif
|
||||
|
||||
TERN_(MPCTEMP, MPC::e_paused = false);
|
||||
|
||||
TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_end());
|
||||
|
||||
return true;
|
||||
@@ -333,18 +335,18 @@ inline void disable_active_extruder() {
|
||||
*/
|
||||
bool unload_filament(const_float_t unload_length, const bool show_lcd/*=false*/,
|
||||
const PauseMode mode/*=PAUSE_MODE_PAUSE_PRINT*/
|
||||
#if ALL(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
|
||||
#if BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
|
||||
, const_float_t mix_multiplier/*=1.0*/
|
||||
#endif
|
||||
) {
|
||||
DEBUG_SECTION(uf, "unload_filament", true);
|
||||
DEBUG_ECHOLNPGM("... unloadlen:", unload_length, " showlcd:", show_lcd, " mode:", mode
|
||||
#if ALL(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
|
||||
#if BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
|
||||
, " mixmult:", mix_multiplier
|
||||
#endif
|
||||
);
|
||||
|
||||
#if !ALL(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
|
||||
#if !BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
|
||||
constexpr float mix_multiplier = 1.0f;
|
||||
#endif
|
||||
|
||||
@@ -404,6 +406,8 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool
|
||||
DEBUG_SECTION(pp, "pause_print", true);
|
||||
DEBUG_ECHOLNPGM("... park.x:", park_point.x, " y:", park_point.y, " z:", park_point.z, " unloadlen:", unload_length, " showlcd:", show_lcd DXC_SAY);
|
||||
|
||||
UNUSED(show_lcd);
|
||||
|
||||
if (did_pause_print) return false; // already paused
|
||||
|
||||
#if ENABLED(HOST_ACTION_COMMANDS)
|
||||
@@ -415,12 +419,13 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool
|
||||
#endif
|
||||
|
||||
TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_open(PROMPT_INFO, F("Pause"), FPSTR(DISMISS_STR)));
|
||||
TERN_(DWIN_LCD_PROUI, DWIN_Print_Pause());
|
||||
|
||||
// Indicate that the printer is paused
|
||||
++did_pause_print;
|
||||
|
||||
// Pause the print job and timer
|
||||
#if HAS_MEDIA
|
||||
#if ENABLED(SDSUPPORT)
|
||||
const bool was_sd_printing = IS_SD_PRINTING();
|
||||
if (was_sd_printing) {
|
||||
card.pauseSDPrint();
|
||||
@@ -445,7 +450,7 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool
|
||||
// Wait for buffered blocks to complete
|
||||
planner.synchronize();
|
||||
|
||||
#if ALL(ADVANCED_PAUSE_FANS_PAUSE, HAS_FAN)
|
||||
#if ENABLED(ADVANCED_PAUSE_FANS_PAUSE) && HAS_FAN
|
||||
thermalManager.set_fans_paused(true);
|
||||
#endif
|
||||
|
||||
@@ -465,7 +470,6 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool
|
||||
|
||||
// If axes don't need to home then the nozzle can park
|
||||
if (do_park) nozzle.park(0, park_point); // Park the nozzle by doing a Minimum Z Raise followed by an XY Move
|
||||
if (!do_park) LCD_MESSAGE(MSG_PARK_FAILED);
|
||||
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
const int8_t saved_ext = active_extruder;
|
||||
@@ -477,7 +481,9 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool
|
||||
if (unload_length)
|
||||
unload_filament(unload_length, show_lcd, PAUSE_MODE_CHANGE_FILAMENT);
|
||||
|
||||
TERN_(DUAL_X_CARRIAGE, set_duplication_enabled(saved_ext_dup_mode, saved_ext));
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
set_duplication_enabled(saved_ext_dup_mode, saved_ext);
|
||||
#endif
|
||||
|
||||
// Disable the Extruder for manual change
|
||||
disable_active_extruder();
|
||||
@@ -504,7 +510,7 @@ void show_continue_prompt(const bool is_reload) {
|
||||
|
||||
ui.pause_show_message(is_reload ? PAUSE_MESSAGE_INSERT : PAUSE_MESSAGE_WAITING);
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHO(is_reload ? F(_PMSG(STR_FILAMENT_CHANGE_INSERT) "\n") : F(_PMSG(STR_FILAMENT_CHANGE_WAIT) "\n"));
|
||||
SERIAL_ECHOF(is_reload ? F(_PMSG(STR_FILAMENT_CHANGE_INSERT) "\n") : F(_PMSG(STR_FILAMENT_CHANGE_WAIT) "\n"));
|
||||
}
|
||||
|
||||
void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep_count/*=0*/ DXC_ARGS) {
|
||||
@@ -530,7 +536,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
|
||||
|
||||
// Wait for filament insert by user and press button
|
||||
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
||||
TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(GET_TEXT_F(MSG_NOZZLE_PARKED)));
|
||||
TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_NOZZLE_PARKED), FPSTR(CONTINUE_STR)));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_NOZZLE_PARKED)));
|
||||
wait_for_user = true; // LCD click or M108 will clear this
|
||||
while (wait_for_user) {
|
||||
@@ -548,17 +554,15 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
|
||||
|
||||
TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_HEATER_TIMEOUT), GET_TEXT_F(MSG_REHEAT)));
|
||||
|
||||
#if ENABLED(TOUCH_UI_FTDI_EVE)
|
||||
ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FTDI_HEATER_TIMEOUT));
|
||||
#elif ENABLED(EXTENSIBLE_UI)
|
||||
ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_HEATER_TIMEOUT));
|
||||
#endif
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_HEATER_TIMEOUT)));
|
||||
|
||||
TERN_(HAS_RESUME_CONTINUE, wait_for_user_response(0, true)); // Wait for LCD click or M108
|
||||
|
||||
TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_INFO, GET_TEXT_F(MSG_REHEATING)));
|
||||
|
||||
LCD_MESSAGE(MSG_REHEATING);
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onStatusChanged(GET_TEXT_F(MSG_REHEATING)));
|
||||
|
||||
TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_REHEATING));
|
||||
|
||||
// Re-enable the heaters if they timed out
|
||||
HOTEND_LOOP() thermalManager.reset_hotend_idle_timer(e);
|
||||
@@ -574,12 +578,9 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
|
||||
|
||||
HOTEND_LOOP() thermalManager.heater_idle[e].start(nozzle_timeout);
|
||||
|
||||
TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(GET_TEXT_F(MSG_REHEATDONE)));
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_REHEATDONE));
|
||||
#else
|
||||
LCD_MESSAGE(MSG_REHEATDONE);
|
||||
#endif
|
||||
TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_REHEATDONE), FPSTR(CONTINUE_STR)));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_REHEATDONE)));
|
||||
TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_REHEATDONE));
|
||||
|
||||
IF_DISABLED(PAUSE_REHEAT_FAST_RESUME, wait_for_user = true);
|
||||
|
||||
@@ -588,7 +589,9 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
|
||||
}
|
||||
idle_no_sleep();
|
||||
}
|
||||
TERN_(DUAL_X_CARRIAGE, set_duplication_enabled(saved_ext_dup_mode, saved_ext));
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
set_duplication_enabled(saved_ext_dup_mode, saved_ext);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -705,7 +708,7 @@ void resume_print(const_float_t slow_load_length/*=0*/, const_float_t fast_load_
|
||||
// Resume the print job timer if it was running
|
||||
if (print_job_timer.isPaused()) print_job_timer.start();
|
||||
|
||||
#if HAS_MEDIA
|
||||
#if ENABLED(SDSUPPORT)
|
||||
if (did_pause_print) {
|
||||
--did_pause_print;
|
||||
card.startOrResumeFilePrinting();
|
||||
@@ -720,8 +723,13 @@ void resume_print(const_float_t slow_load_length/*=0*/, const_float_t fast_load_
|
||||
|
||||
TERN_(HAS_FILAMENT_SENSOR, runout.reset());
|
||||
|
||||
ui.reset_status();
|
||||
ui.return_to_status();
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
DWIN_Print_Resume();
|
||||
HMI_ReturnScreen();
|
||||
#else
|
||||
ui.reset_status();
|
||||
ui.return_to_status();
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // ADVANCED_PAUSE_FEATURE
|
||||
|
||||
@@ -57,9 +57,7 @@ enum PauseMessage : char {
|
||||
};
|
||||
|
||||
#if M600_PURGE_MORE_RESUMABLE
|
||||
/**
|
||||
* Input methods can Purge More, Resume, or request input
|
||||
*/
|
||||
// Input methods can Purge More, Resume, or request input
|
||||
enum PauseMenuResponse : char {
|
||||
PAUSE_RESPONSE_WAIT_FOR,
|
||||
PAUSE_RESPONSE_EXTRUDE_MORE,
|
||||
@@ -109,7 +107,7 @@ void wait_for_confirmation(
|
||||
void resume_print(
|
||||
const_float_t slow_load_length=0, // (mm) Slow Load Length for finishing move
|
||||
const_float_t fast_load_length=0, // (mm) Fast Load Length for initial move
|
||||
const_float_t extrude_length=ADVANCED_PAUSE_PURGE_LENGTH, // (mm) Purge length
|
||||
const_float_t purge_length=ADVANCED_PAUSE_PURGE_LENGTH, // (mm) Purge length
|
||||
const int8_t max_beep_count=0, // Beep alert for attention
|
||||
const celsius_t targetTemp=0 // (°C) A target temperature for the hotend
|
||||
DXC_PARAMS // Dual-X-Carriage extruder index
|
||||
@@ -118,7 +116,7 @@ void resume_print(
|
||||
bool load_filament(
|
||||
const_float_t slow_load_length=0, // (mm) Slow Load Length for finishing move
|
||||
const_float_t fast_load_length=0, // (mm) Fast Load Length for initial move
|
||||
const_float_t extrude_length=0, // (mm) Purge length
|
||||
const_float_t purge_length=0, // (mm) Purge length
|
||||
const int8_t max_beep_count=0, // Beep alert for attention
|
||||
const bool show_lcd=false, // Set LCD status messages?
|
||||
const bool pause_for_user=false, // Pause for user before returning?
|
||||
|
||||
@@ -32,28 +32,23 @@
|
||||
|
||||
FilamentMonitor runout;
|
||||
|
||||
bool FilamentMonitorBase::enabled = true,
|
||||
FilamentMonitorBase::filament_ran_out; // = false
|
||||
|
||||
bool FilamentMonitorBase::enabled[NUM_RUNOUT_SENSORS], // Initialized by settings.load
|
||||
FilamentMonitorBase::filament_ran_out; // = false
|
||||
RunoutMode FilamentMonitorBase::mode[NUM_RUNOUT_SENSORS]; // Initialized by settings.load
|
||||
#if ENABLED(HOST_ACTION_COMMANDS)
|
||||
bool FilamentMonitorBase::host_handling; // = false
|
||||
#endif
|
||||
|
||||
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
|
||||
#define DEBUG_TOOLCHANGE_MIGRATION_FEATURE
|
||||
#include "../module/tool_change.h"
|
||||
#define DEBUG_OUT ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
|
||||
#include "../core/debug_out.h"
|
||||
#endif
|
||||
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
float RunoutResponseDelayed::runout_distance_mm = FILAMENT_RUNOUT_DISTANCE_MM;
|
||||
countdown_t RunoutResponseDelayed::mm_countdown;
|
||||
#if ENABLED(FILAMENT_MOTION_SENSOR)
|
||||
uint8_t FilamentSensorEncoder::motion_detected;
|
||||
#endif
|
||||
#else
|
||||
int8_t RunoutResponseDebounced::runout_count[NUM_RUNOUT_SENSORS]; // = 0
|
||||
#endif
|
||||
float RunoutResponseDelayed::runout_distance_mm[NUM_RUNOUT_SENSORS]; // Initialized by settings.load
|
||||
volatile float RunoutResponseDelayed::runout_mm_countdown[NUM_RUNOUT_SENSORS];
|
||||
uint8_t FilamentSensorCore::motion_detected;
|
||||
|
||||
//
|
||||
// Filament Runout event handler
|
||||
@@ -68,6 +63,8 @@ bool FilamentMonitorBase::enabled = true,
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
void event_filament_runout(const uint8_t extruder) {
|
||||
@@ -86,6 +83,7 @@ void event_filament_runout(const uint8_t extruder) {
|
||||
#endif
|
||||
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onFilamentRunout(ExtUI::getTool(extruder)));
|
||||
TERN_(DWIN_LCD_PROUI, DWIN_FilamentRunout(extruder));
|
||||
|
||||
#if ANY(HOST_PROMPT_SUPPORT, HOST_ACTION_COMMANDS, MULTI_FILAMENT_SENSOR)
|
||||
const char tool = '0' + TERN0(MULTI_FILAMENT_SENSOR, extruder);
|
||||
@@ -99,16 +97,12 @@ void event_filament_runout(const uint8_t extruder) {
|
||||
const bool run_runout_script = !runout.host_handling;
|
||||
|
||||
#if ENABLED(HOST_ACTION_COMMANDS)
|
||||
|
||||
const bool park_or_pause = (false
|
||||
#ifdef FILAMENT_RUNOUT_SCRIPT
|
||||
|| strstr(FILAMENT_RUNOUT_SCRIPT, "M600")
|
||||
if (run_runout_script
|
||||
&& ( strstr(FILAMENT_RUNOUT_SCRIPT, "M600")
|
||||
|| strstr(FILAMENT_RUNOUT_SCRIPT, "M125")
|
||||
|| TERN0(ADVANCED_PAUSE_FEATURE, strstr(FILAMENT_RUNOUT_SCRIPT, "M25"))
|
||||
#endif
|
||||
);
|
||||
|
||||
if (run_runout_script && park_or_pause) {
|
||||
)
|
||||
) {
|
||||
hostui.paused(false);
|
||||
}
|
||||
else {
|
||||
@@ -125,27 +119,24 @@ void event_filament_runout(const uint8_t extruder) {
|
||||
SERIAL_ECHOPGM(" " ACTION_REASON_ON_FILAMENT_RUNOUT " ");
|
||||
SERIAL_CHAR(tool);
|
||||
SERIAL_EOL();
|
||||
|
||||
#endif // HOST_ACTION_COMMANDS
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_SCRIPT
|
||||
if (run_runout_script) {
|
||||
#if MULTI_FILAMENT_SENSOR
|
||||
MString<strlen(FILAMENT_RUNOUT_SCRIPT)> script;
|
||||
script.setf(F(FILAMENT_RUNOUT_SCRIPT), C(tool));
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG)
|
||||
SERIAL_ECHOLNPGM("Runout Command: ", &script);
|
||||
#endif
|
||||
queue.inject(&script);
|
||||
#else
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG)
|
||||
SERIAL_ECHOPGM("Runout Command: ");
|
||||
SERIAL_ECHOLNPGM(FILAMENT_RUNOUT_SCRIPT);
|
||||
#endif
|
||||
queue.inject(F(FILAMENT_RUNOUT_SCRIPT));
|
||||
if (run_runout_script) {
|
||||
#if MULTI_FILAMENT_SENSOR
|
||||
char script[strlen(FILAMENT_RUNOUT_SCRIPT) + 1];
|
||||
sprintf_P(script, PSTR(FILAMENT_RUNOUT_SCRIPT), tool);
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG)
|
||||
SERIAL_ECHOLNPGM("Runout Command: ", script);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
queue.inject(script);
|
||||
#else
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG)
|
||||
SERIAL_ECHOPGM("Runout Command: ");
|
||||
SERIAL_ECHOLNPGM(FILAMENT_RUNOUT_SCRIPT);
|
||||
#endif
|
||||
queue.inject(F(FILAMENT_RUNOUT_SCRIPT));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#endif // HAS_FILAMENT_SENSOR
|
||||
|
||||
+163
-304
@@ -30,8 +30,7 @@
|
||||
#include "../module/planner.h"
|
||||
#include "../module/stepper.h" // for block_t
|
||||
#include "../gcode/queue.h"
|
||||
#include "../feature/pause.h" // for did_pause_print
|
||||
#include "../MarlinCore.h" // for printingIsActive()
|
||||
#include "../feature/pause.h"
|
||||
|
||||
#include "../inc/MarlinConfig.h"
|
||||
|
||||
@@ -44,44 +43,41 @@
|
||||
#define FILAMENT_RUNOUT_THRESHOLD 5
|
||||
#endif
|
||||
|
||||
#if ENABLED(FILAMENT_MOTION_SENSOR)
|
||||
#define HAS_FILAMENT_MOTION 1
|
||||
#endif
|
||||
#if DISABLED(FILAMENT_MOTION_SENSOR) || ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
#define HAS_FILAMENT_SWITCH 1
|
||||
#endif
|
||||
|
||||
typedef Flags<
|
||||
#if NUM_MOTION_SENSORS > NUM_RUNOUT_SENSORS
|
||||
NUM_MOTION_SENSORS
|
||||
#else
|
||||
NUM_RUNOUT_SENSORS
|
||||
#endif
|
||||
> runout_flags_t;
|
||||
|
||||
void event_filament_runout(const uint8_t extruder);
|
||||
inline bool should_monitor_runout() { return did_pause_print || printingIsActive(); }
|
||||
|
||||
template<class RESPONSE_T, class SENSOR_T>
|
||||
class TFilamentMonitor;
|
||||
class FilamentSensor;
|
||||
class FilamentSensorCore;
|
||||
class RunoutResponseDelayed;
|
||||
class RunoutResponseDebounced;
|
||||
|
||||
/********************************* TEMPLATE SPECIALIZATION *********************************/
|
||||
|
||||
typedef TFilamentMonitor<
|
||||
TERN(HAS_FILAMENT_RUNOUT_DISTANCE, RunoutResponseDelayed, RunoutResponseDebounced),
|
||||
FilamentSensor
|
||||
RunoutResponseDelayed,
|
||||
FilamentSensorCore
|
||||
> FilamentMonitor;
|
||||
|
||||
extern FilamentMonitor runout;
|
||||
|
||||
/*******************************************************************************************/
|
||||
|
||||
enum RunoutMode : uint8_t {
|
||||
RM_NONE,
|
||||
RM_OUT_ON_LOW,
|
||||
RM_OUT_ON_HIGH,
|
||||
RM_RESERVED3,
|
||||
RM_RESERVED4,
|
||||
RM_RESERVED5,
|
||||
RM_RESERVED6,
|
||||
RM_MOTION_SENSOR
|
||||
};
|
||||
|
||||
class FilamentMonitorBase {
|
||||
public:
|
||||
static bool enabled, filament_ran_out;
|
||||
static bool enabled[NUM_RUNOUT_SENSORS], filament_ran_out;
|
||||
static RunoutMode mode[NUM_RUNOUT_SENSORS];
|
||||
|
||||
static uint8_t out_state(const uint8_t e=0) { return mode[e] == RM_OUT_ON_HIGH ? HIGH : LOW; }
|
||||
|
||||
#if ENABLED(HOST_ACTION_COMMANDS)
|
||||
static bool host_handling;
|
||||
@@ -111,24 +107,14 @@ class TFilamentMonitor : public FilamentMonitorBase {
|
||||
|
||||
// Call this method when filament is present,
|
||||
// so the response can reset its counter.
|
||||
static void filament_present(const uint8_t extruder) {
|
||||
response.filament_present(extruder);
|
||||
}
|
||||
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
static void filament_motion_present(const uint8_t extruder) {
|
||||
response.filament_motion_present(extruder);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
static float& runout_distance() { return response.runout_distance_mm; }
|
||||
static void set_runout_distance(const_float_t mm) { response.runout_distance_mm = mm; }
|
||||
#endif
|
||||
static void filament_present(const uint8_t e) { response.filament_present(e); }
|
||||
static float& runout_distance(const uint8_t e=0) { return response.runout_distance_mm[e]; }
|
||||
static void set_runout_distance(const_float_t mm, const uint8_t e=0) { response.runout_distance_mm[e] = mm; }
|
||||
|
||||
// Handle a block completion. RunoutResponseDelayed uses this to
|
||||
// add up the length of filament moved while the filament is out.
|
||||
static void block_completed(const block_t * const b) {
|
||||
if (enabled) {
|
||||
if (enabled[active_extruder]) {
|
||||
response.block_completed(b);
|
||||
sensor.block_completed(b);
|
||||
}
|
||||
@@ -136,33 +122,43 @@ class TFilamentMonitor : public FilamentMonitorBase {
|
||||
|
||||
// Give the response a chance to update its counter.
|
||||
static void run() {
|
||||
if (enabled && !filament_ran_out && should_monitor_runout()) {
|
||||
TERN_(HAS_FILAMENT_RUNOUT_DISTANCE, cli()); // Prevent RunoutResponseDelayed::block_completed from accumulating here
|
||||
if (enabled[active_extruder] && mode[active_extruder] != RM_NONE && !filament_ran_out && (printingIsActive() || did_pause_print)) {
|
||||
cli(); // Prevent RunoutResponseDelayed::block_completed from accumulating here
|
||||
response.run();
|
||||
sensor.run();
|
||||
const runout_flags_t runout_flags = response.has_run_out();
|
||||
TERN_(HAS_FILAMENT_RUNOUT_DISTANCE, sei());
|
||||
const uint8_t runout_flags = response.has_run_out();
|
||||
sei();
|
||||
#if MULTI_FILAMENT_SENSOR
|
||||
#if ENABLED(WATCH_ALL_RUNOUT_SENSORS)
|
||||
const bool ran_out = bool(runout_flags); // any sensor triggers
|
||||
const bool ran_out = !!runout_flags; // any sensor triggers
|
||||
uint8_t extruder = 0;
|
||||
if (ran_out) while (!runout_flags.test(extruder)) extruder++;
|
||||
if (ran_out) {
|
||||
uint8_t bitmask = runout_flags;
|
||||
while (!(bitmask & 1)) {
|
||||
bitmask >>= 1;
|
||||
extruder++;
|
||||
}
|
||||
}
|
||||
#else
|
||||
const bool ran_out = runout_flags[active_extruder]; // suppress non active extruders
|
||||
const bool ran_out = TEST(runout_flags, active_extruder); // suppress non active extruders
|
||||
uint8_t extruder = active_extruder;
|
||||
#endif
|
||||
#else
|
||||
const bool ran_out = bool(runout_flags);
|
||||
const bool ran_out = !!runout_flags;
|
||||
uint8_t extruder = active_extruder;
|
||||
#endif
|
||||
|
||||
if (ran_out) {
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG)
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG)
|
||||
if (runout_flags) {
|
||||
SERIAL_ECHOPGM("Runout Sensors: ");
|
||||
for (uint8_t i = 0; i < 8; ++i) SERIAL_CHAR('0' + char(runout_flags[i]));
|
||||
SERIAL_ECHOLNPGM(" -> ", extruder, " RUN OUT");
|
||||
#endif
|
||||
LOOP_L_N(i, 8) SERIAL_ECHO('0' + TEST(runout_flags, i));
|
||||
SERIAL_ECHOPGM(" -> ", extruder);
|
||||
if (ran_out) SERIAL_ECHOPGM(" RUN OUT");
|
||||
SERIAL_EOL();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (ran_out) {
|
||||
filament_ran_out = true;
|
||||
event_filament_runout(extruder);
|
||||
planner.synchronize();
|
||||
@@ -182,26 +178,39 @@ class FilamentSensorBase {
|
||||
static void filament_present(const uint8_t extruder) {
|
||||
runout.filament_present(extruder); // ...which calls response.filament_present(extruder)
|
||||
}
|
||||
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
static void filament_motion_present(const uint8_t extruder) {
|
||||
runout.filament_motion_present(extruder); // ...which calls response.filament_motion_present(extruder)
|
||||
}
|
||||
#endif
|
||||
|
||||
public:
|
||||
static void setup() {
|
||||
#define _INIT_RUNOUT_PIN(P,S,U,D) do{ if (ENABLED(U)) SET_INPUT_PULLUP(P); else if (ENABLED(D)) SET_INPUT_PULLDOWN(P); else SET_INPUT(P); }while(0);
|
||||
#define INIT_RUNOUT_PIN(N) _INIT_RUNOUT_PIN(FIL_RUNOUT##N##_PIN, FIL_RUNOUT##N##_STATE, FIL_RUNOUT##N##_PULLUP, FIL_RUNOUT##N##_PULLDOWN);
|
||||
REPEAT_1(NUM_RUNOUT_SENSORS, INIT_RUNOUT_PIN)
|
||||
#undef INIT_RUNOUT_PIN
|
||||
|
||||
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
#define INIT_MOTION_PIN(N) _INIT_RUNOUT_PIN(FIL_MOTION##N##_PIN, FIL_MOTION##N##_STATE, FIL_MOTION##N##_PULLUP, FIL_MOTION##N##_PULLDOWN);
|
||||
REPEAT_1(NUM_MOTION_SENSORS, INIT_MOTION_PIN)
|
||||
#undef INIT_MOTION_PIN
|
||||
#define _INIT_RUNOUT_PIN(P,S,U,D) do{ if (ENABLED(U)) SET_INPUT_PULLUP(P); else if (ENABLED(D)) SET_INPUT_PULLDOWN(P); else SET_INPUT(P); }while(0)
|
||||
#define INIT_RUNOUT_PIN(N) _INIT_RUNOUT_PIN(FIL_RUNOUT##N##_PIN, FIL_RUNOUT##N##_STATE, FIL_RUNOUT##N##_PULLUP, FIL_RUNOUT##N##_PULLDOWN)
|
||||
#if NUM_RUNOUT_SENSORS >= 1
|
||||
INIT_RUNOUT_PIN(1);
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 2
|
||||
INIT_RUNOUT_PIN(2);
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 3
|
||||
INIT_RUNOUT_PIN(3);
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 4
|
||||
INIT_RUNOUT_PIN(4);
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 5
|
||||
INIT_RUNOUT_PIN(5);
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 6
|
||||
INIT_RUNOUT_PIN(6);
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 7
|
||||
INIT_RUNOUT_PIN(7);
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS >= 8
|
||||
INIT_RUNOUT_PIN(8);
|
||||
#endif
|
||||
#undef _INIT_RUNOUT_PIN
|
||||
#undef INIT_RUNOUT_PIN
|
||||
}
|
||||
|
||||
|
||||
// Return a bitmask of runout pin states
|
||||
static uint8_t poll_runout_pins() {
|
||||
@@ -212,275 +221,125 @@ class FilamentSensorBase {
|
||||
|
||||
// Return a bitmask of runout flag states (1 bits always indicates runout)
|
||||
static uint8_t poll_runout_states() {
|
||||
#define _INVERT_BIT(N) | (FIL_RUNOUT##N##_STATE ? 0 : _BV(N - 1))
|
||||
return poll_runout_pins() ^ uint8_t(0 REPEAT_1(NUM_RUNOUT_SENSORS, _INVERT_BIT));
|
||||
#undef _INVERT_BIT
|
||||
#define _OR_INVERT(N) | (runout.out_state(N-1) ? 0 : _BV(N-1))
|
||||
return poll_runout_pins() ^ uint8_t(0 REPEAT_1(NUM_RUNOUT_SENSORS, _OR_INVERT));
|
||||
#undef _OR_INVERT
|
||||
}
|
||||
|
||||
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
// Return a bitmask of motion pin states
|
||||
static uint8_t poll_motion_pins() {
|
||||
#define _OR_MOTION(N) | (READ(FIL_MOTION##N##_PIN) ? _BV((N) - 1) : 0)
|
||||
return (0 REPEAT_1(NUM_MOTION_SENSORS, _OR_MOTION));
|
||||
#undef _OR_MOTION
|
||||
}
|
||||
|
||||
// Return a bitmask of motion flag states (1 bits always indicates runout)
|
||||
static uint8_t poll_motion_states() {
|
||||
#define _OR_MOTION(N) | (FIL_MOTION##N##_STATE ? 0 : _BV(N - 1))
|
||||
return poll_motion_pins() ^ uint8_t(0 REPEAT_1(NUM_MOTION_SENSORS, _OR_MOTION));
|
||||
#undef _OR_MOTION
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
#if HAS_FILAMENT_MOTION
|
||||
class FilamentSensorCore : public FilamentSensorBase {
|
||||
private:
|
||||
static uint8_t motion_detected;
|
||||
|
||||
/**
|
||||
* This sensor uses a magnetic encoder disc and a Hall effect
|
||||
* sensor (or a slotted disc and optical sensor). The state
|
||||
* will toggle between 0 and 1 on filament movement. It can detect
|
||||
* filament runout and stripouts or jams.
|
||||
*/
|
||||
class FilamentSensorEncoder : public FilamentSensorBase {
|
||||
private:
|
||||
static uint8_t motion_detected;
|
||||
static bool poll_runout_state(const uint8_t extruder) {
|
||||
const uint8_t runout_states = poll_runout_states();
|
||||
#if MULTI_FILAMENT_SENSOR
|
||||
if ( !TERN0(DUAL_X_CARRIAGE, idex_is_duplicating())
|
||||
&& !TERN0(MULTI_NOZZLE_DUPLICATION, extruder_duplication_enabled)
|
||||
) return TEST(runout_states, extruder); // A specific extruder ran out
|
||||
#else
|
||||
UNUSED(extruder);
|
||||
#endif
|
||||
return !!runout_states; // Any extruder ran out
|
||||
}
|
||||
|
||||
static void poll_motion_sensor() {
|
||||
static uint8_t old_state;
|
||||
const uint8_t new_state = TERN(FILAMENT_SWITCH_AND_MOTION, poll_motion_pins, poll_runout_pins)(),
|
||||
change = old_state ^ new_state;
|
||||
old_state = new_state;
|
||||
static void poll_motion_sensor() {
|
||||
static uint8_t old_state;
|
||||
const uint8_t new_state = poll_runout_pins(),
|
||||
change = old_state ^ new_state;
|
||||
old_state = new_state;
|
||||
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG)
|
||||
if (change) {
|
||||
SERIAL_ECHOPGM("Motion detected:");
|
||||
for (uint8_t e = 0; e < TERN(FILAMENT_SWITCH_AND_MOTION, NUM_MOTION_SENSORS, NUM_RUNOUT_SENSORS); ++e)
|
||||
if (TEST(change, e)) SERIAL_CHAR(' ', '0' + e);
|
||||
SERIAL_EOL();
|
||||
}
|
||||
#endif
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG)
|
||||
if (change) {
|
||||
SERIAL_ECHOPGM("Motion detected:");
|
||||
LOOP_L_N(e, NUM_RUNOUT_SENSORS)
|
||||
if (TEST(change, e)) SERIAL_CHAR(' ', '0' + e);
|
||||
SERIAL_EOL();
|
||||
}
|
||||
#endif
|
||||
|
||||
motion_detected |= change;
|
||||
motion_detected |= change;
|
||||
}
|
||||
|
||||
public:
|
||||
static void block_completed(const block_t * const b) {
|
||||
if (runout.mode[active_extruder] != RM_MOTION_SENSOR) return;
|
||||
|
||||
// If the sensor wheel has moved since the last call to
|
||||
// this method reset the runout counter for the extruder.
|
||||
if (TEST(motion_detected, b->extruder))
|
||||
filament_present(b->extruder);
|
||||
|
||||
// Clear motion triggers for next block
|
||||
motion_detected = 0;
|
||||
}
|
||||
|
||||
static void run() {
|
||||
if (runout.mode[active_extruder] == RM_MOTION_SENSOR) {
|
||||
poll_motion_sensor();
|
||||
}
|
||||
|
||||
public:
|
||||
static void block_completed(const block_t * const b) {
|
||||
// If the sensor wheel has moved since the last call to
|
||||
// this method reset the runout counter for the extruder.
|
||||
if (TEST(motion_detected, b->extruder))
|
||||
TERN(FILAMENT_SWITCH_AND_MOTION, filament_motion_present, filament_present)(b->extruder);
|
||||
|
||||
// Clear motion triggers for next block
|
||||
motion_detected = 0;
|
||||
}
|
||||
|
||||
static void run() { poll_motion_sensor(); }
|
||||
};
|
||||
|
||||
#endif // HAS_FILAMENT_MOTION
|
||||
|
||||
#if HAS_FILAMENT_SWITCH
|
||||
|
||||
/**
|
||||
* This is a simple endstop switch in the path of the filament.
|
||||
* It can detect filament runout, but not stripouts or jams.
|
||||
*/
|
||||
class FilamentSensorSwitch : public FilamentSensorBase {
|
||||
private:
|
||||
static bool poll_runout_state(const uint8_t extruder) {
|
||||
const uint8_t runout_states = poll_runout_states();
|
||||
#if MULTI_FILAMENT_SENSOR
|
||||
if ( !TERN0(DUAL_X_CARRIAGE, idex_is_duplicating())
|
||||
&& !TERN0(MULTI_NOZZLE_DUPLICATION, extruder_duplication_enabled)
|
||||
) return TEST(runout_states, extruder); // A specific extruder ran out
|
||||
#else
|
||||
UNUSED(extruder);
|
||||
#endif
|
||||
return !!runout_states; // Any extruder ran out
|
||||
}
|
||||
|
||||
public:
|
||||
static void block_completed(const block_t * const) {}
|
||||
|
||||
static void run() {
|
||||
for (uint8_t s = 0; s < NUM_RUNOUT_SENSORS; ++s) {
|
||||
else if (runout.mode[active_extruder] != RM_NONE) {
|
||||
LOOP_L_N(s, NUM_RUNOUT_SENSORS) {
|
||||
const bool out = poll_runout_state(s);
|
||||
if (!out) filament_present(s);
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG)
|
||||
static uint8_t was_out; // = 0
|
||||
if (out != TEST(was_out, s)) {
|
||||
TBI(was_out, s);
|
||||
SERIAL_ECHOLN(F("Filament Sensor "), AS_DIGIT(s), out ? F(" OUT") : F(" IN"));
|
||||
SERIAL_ECHOLNF(F("Filament Sensor "), AS_DIGIT(s), out ? F(" OUT") : F(" IN"));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
#endif // HAS_FILAMENT_SWITCH
|
||||
|
||||
/**
|
||||
* This is a simple endstop switch in the path of the filament.
|
||||
* It can detect filament runout, but not stripouts or jams.
|
||||
*/
|
||||
class FilamentSensor : public FilamentSensorBase {
|
||||
private:
|
||||
TERN_(HAS_FILAMENT_MOTION, static FilamentSensorEncoder encoder_sensor);
|
||||
TERN_(HAS_FILAMENT_SWITCH, static FilamentSensorSwitch switch_sensor);
|
||||
|
||||
public:
|
||||
static void block_completed(const block_t * const b) {
|
||||
TERN_(HAS_FILAMENT_MOTION, encoder_sensor.block_completed(b));
|
||||
TERN_(HAS_FILAMENT_SWITCH, switch_sensor.block_completed(b));
|
||||
}
|
||||
|
||||
static void run() {
|
||||
TERN_(HAS_FILAMENT_MOTION, encoder_sensor.run());
|
||||
TERN_(HAS_FILAMENT_SWITCH, switch_sensor.run());
|
||||
}
|
||||
};
|
||||
|
||||
/********************************* RESPONSE TYPE *********************************/
|
||||
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
// RunoutResponseDelayed triggers a runout event only if the length
|
||||
// of filament specified by FIL_RUNOUT_DISTANCE_MM has been fed
|
||||
// during a runout condition.
|
||||
class RunoutResponseDelayed {
|
||||
private:
|
||||
static volatile float runout_mm_countdown[NUM_RUNOUT_SENSORS];
|
||||
|
||||
typedef struct {
|
||||
float runout[NUM_RUNOUT_SENSORS];
|
||||
Flags<NUM_RUNOUT_SENSORS> runout_reset; // Reset runout later
|
||||
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
float motion[NUM_MOTION_SENSORS];
|
||||
Flags<NUM_MOTION_SENSORS> motion_reset; // Reset motion later
|
||||
#endif
|
||||
} countdown_t;
|
||||
public:
|
||||
static float runout_distance_mm[NUM_RUNOUT_SENSORS];
|
||||
|
||||
// RunoutResponseDelayed triggers a runout event only if the length
|
||||
// of filament specified by FILAMENT_RUNOUT_DISTANCE_MM has been fed
|
||||
// during a runout condition.
|
||||
class RunoutResponseDelayed {
|
||||
private:
|
||||
static countdown_t mm_countdown;
|
||||
static void reset() {
|
||||
LOOP_L_N(i, NUM_RUNOUT_SENSORS) filament_present(i);
|
||||
}
|
||||
|
||||
public:
|
||||
static float runout_distance_mm;
|
||||
|
||||
static void reset() {
|
||||
for (uint8_t i = 0; i < NUM_RUNOUT_SENSORS; ++i) filament_present(i);
|
||||
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
for (uint8_t i = 0; i < NUM_MOTION_SENSORS; ++i) filament_motion_present(i);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void run() {
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG)
|
||||
static millis_t t = 0;
|
||||
const millis_t ms = millis();
|
||||
if (ELAPSED(ms, t)) {
|
||||
t = millis() + 1000UL;
|
||||
for (uint8_t i = 0; i < NUM_RUNOUT_SENSORS; ++i)
|
||||
SERIAL_ECHO(i ? F(", ") : F("Runout remaining mm: "), mm_countdown.runout[i]);
|
||||
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
for (uint8_t i = 0; i < NUM_MOTION_SENSORS; ++i)
|
||||
SERIAL_ECHO(i ? F(", ") : F("Motion remaining mm: "), mm_countdown.motion[i]);
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static runout_flags_t has_run_out() {
|
||||
runout_flags_t runout_flags{0};
|
||||
for (uint8_t i = 0; i < NUM_RUNOUT_SENSORS; ++i) if (mm_countdown.runout[i] < 0) runout_flags.set(i);
|
||||
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
for (uint8_t i = 0; i < NUM_MOTION_SENSORS; ++i) if (mm_countdown.motion[i] < 0) runout_flags.set(i);
|
||||
#endif
|
||||
return runout_flags;
|
||||
}
|
||||
|
||||
static void filament_present(const uint8_t extruder) {
|
||||
if (mm_countdown.runout[extruder] < runout_distance_mm || did_pause_print) {
|
||||
// Reset runout only if it is smaller than runout_distance or printing is paused.
|
||||
// On Bowden systems retract may be larger than runout_distance_mm, so if retract
|
||||
// was added leave it in place, or the following unretract will cause runout event.
|
||||
mm_countdown.runout[extruder] = runout_distance_mm;
|
||||
mm_countdown.runout_reset.clear(extruder);
|
||||
}
|
||||
else {
|
||||
// If runout is larger than runout distance, we cannot reset right now, as Bowden and retract
|
||||
// distance larger than runout_distance_mm leads to negative runout right after unretract.
|
||||
// But we cannot ignore filament_present event. After unretract, runout will become smaller
|
||||
// than runout_distance_mm and should be reset after that. So activate delayed reset.
|
||||
mm_countdown.runout_reset.set(extruder);
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
static void filament_motion_present(const uint8_t extruder) {
|
||||
// Same logic as filament_present
|
||||
if (mm_countdown.motion[extruder] < runout_distance_mm || did_pause_print) {
|
||||
mm_countdown.motion[extruder] = runout_distance_mm;
|
||||
mm_countdown.motion_reset.clear(extruder);
|
||||
}
|
||||
else
|
||||
mm_countdown.motion_reset.set(extruder);
|
||||
static void run() {
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG)
|
||||
static millis_t t = 0;
|
||||
const millis_t ms = millis();
|
||||
if (ELAPSED(ms, t)) {
|
||||
t = millis() + 1000UL;
|
||||
LOOP_L_N(i, NUM_RUNOUT_SENSORS)
|
||||
SERIAL_ECHOF(i ? F(", ") : F("Remaining mm: "), runout_mm_countdown[i]);
|
||||
SERIAL_EOL();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void block_completed(const block_t * const b) {
|
||||
const int32_t esteps = b->steps.e;
|
||||
if (!esteps) return;
|
||||
static uint8_t has_run_out() {
|
||||
uint8_t runout_flags = 0;
|
||||
LOOP_L_N(i, NUM_RUNOUT_SENSORS) if (runout_mm_countdown[i] < 0) SBI(runout_flags, i);
|
||||
return runout_flags;
|
||||
}
|
||||
|
||||
// No calculation unless paused or printing
|
||||
if (!should_monitor_runout()) return;
|
||||
static void filament_present(const uint8_t extruder) {
|
||||
runout_mm_countdown[extruder] = runout_distance_mm[extruder];
|
||||
}
|
||||
|
||||
// No need to ignore retract/unretract movement since they complement each other
|
||||
static void block_completed(const block_t * const b) {
|
||||
if (b->steps.x || b->steps.y || b->steps.z || did_pause_print) { // Allow pause purge move to re-trigger runout state
|
||||
// Only trigger on extrusion with XYZ movement to allow filament change and retract/recover.
|
||||
const uint8_t e = b->extruder;
|
||||
const float mm = (b->direction_bits.e ? esteps : -esteps) * planner.mm_per_step[E_AXIS_N(e)];
|
||||
|
||||
if (e < NUM_RUNOUT_SENSORS) {
|
||||
mm_countdown.runout[e] -= mm;
|
||||
if (mm_countdown.runout_reset[e]) filament_present(e); // Reset pending. Try to reset.
|
||||
}
|
||||
|
||||
#if ENABLED(FILAMENT_SWITCH_AND_MOTION)
|
||||
if (e < NUM_MOTION_SENSORS) {
|
||||
mm_countdown.motion[e] -= mm;
|
||||
if (mm_countdown.motion_reset[e]) filament_motion_present(e); // Reset pending. Try to reset.
|
||||
}
|
||||
#endif
|
||||
const int32_t steps = b->steps.e;
|
||||
runout_mm_countdown[e] -= (TEST(b->direction_bits, E_AXIS) ? -steps : steps) * planner.mm_per_step[E_AXIS_N(e)];
|
||||
}
|
||||
};
|
||||
|
||||
#else // !HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
|
||||
// RunoutResponseDebounced triggers a runout event after a runout
|
||||
// condition has been detected runout_threshold times in a row.
|
||||
|
||||
class RunoutResponseDebounced {
|
||||
private:
|
||||
static constexpr int8_t runout_threshold = FILAMENT_RUNOUT_THRESHOLD;
|
||||
static int8_t runout_count[NUM_RUNOUT_SENSORS];
|
||||
|
||||
public:
|
||||
static void reset() {
|
||||
for (uint8_t i = 0; i < NUM_RUNOUT_SENSORS; ++i) filament_present(i);
|
||||
}
|
||||
|
||||
static void run() {
|
||||
for (uint8_t i = 0; i < NUM_RUNOUT_SENSORS; ++i) if (runout_count[i] >= 0) runout_count[i]--;
|
||||
}
|
||||
|
||||
static runout_flags_t has_run_out() {
|
||||
runout_flags_t runout_flags{0};
|
||||
for (uint8_t i = 0; i < NUM_RUNOUT_SENSORS; ++i) if (runout_count[i] < 0) runout_flags.set(i);
|
||||
return runout_flags;
|
||||
}
|
||||
|
||||
static void block_completed(const block_t * const) { }
|
||||
|
||||
static void filament_present(const uint8_t extruder) {
|
||||
runout_count[extruder] = runout_threshold;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // !HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
}
|
||||
};
|
||||
|
||||
@@ -94,7 +94,7 @@ void GcodeSuite::M600() {
|
||||
// In this case, for duplicating modes set DXC_ext to the extruder that ran out.
|
||||
#if MULTI_FILAMENT_SENSOR
|
||||
if (idex_is_duplicating())
|
||||
DXC_ext = (READ(FIL_RUNOUT2_PIN) == FIL_RUNOUT2_STATE) ? 1 : 0;
|
||||
DXC_ext = (READ(FIL_RUNOUT2_PIN) == runout.out_state(1)) ? 1 : 0;
|
||||
#else
|
||||
DXC_ext = active_extruder;
|
||||
#endif
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../../../inc/MarlinConfig.h"
|
||||
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
|
||||
#include "../../gcode.h"
|
||||
#include "../../../feature/runout.h"
|
||||
|
||||
/**
|
||||
* M412: Enable / Disable filament runout detection
|
||||
*
|
||||
* Parameters
|
||||
* R : Reset the runout sensor
|
||||
* S<bool> : Reset and enable/disable the runout sensor
|
||||
* H<bool> : Enable/disable host handling of filament runout
|
||||
* D<linear> : Extra distance to continue after runout is triggered
|
||||
*/
|
||||
void GcodeSuite::M412() {
|
||||
if (parser.seen("RS"
|
||||
TERN_(HAS_FILAMENT_RUNOUT_DISTANCE, "D")
|
||||
TERN_(HOST_ACTION_COMMANDS, "H")
|
||||
)) {
|
||||
#if ENABLED(HOST_ACTION_COMMANDS)
|
||||
if (parser.seen('H')) runout.host_handling = parser.value_bool();
|
||||
#endif
|
||||
const bool seenR = parser.seen_test('R'), seenS = parser.seen('S');
|
||||
if (seenR || seenS) runout.reset();
|
||||
if (seenS) runout.enabled = parser.value_bool();
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
if (parser.seenval('D')) runout.set_runout_distance(parser.value_linear_units());
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM("Filament runout ");
|
||||
serialprint_onoff(runout.enabled);
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
SERIAL_ECHOPGM(" ; Distance ", runout.runout_distance(), "mm");
|
||||
#endif
|
||||
#if ENABLED(HOST_ACTION_COMMANDS)
|
||||
SERIAL_ECHOPGM(" ; Host handling ");
|
||||
serialprint_onoff(runout.host_handling);
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
}
|
||||
}
|
||||
|
||||
void GcodeSuite::M412_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_FILAMENT_RUNOUT_SENSOR));
|
||||
SERIAL_ECHOPGM(
|
||||
" M412 S", runout.enabled
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
, " D", LINEAR_UNIT(runout.runout_distance())
|
||||
#endif
|
||||
, " ; Sensor "
|
||||
);
|
||||
serialprintln_onoff(runout.enabled);
|
||||
}
|
||||
|
||||
#endif // HAS_FILAMENT_SENSOR
|
||||
@@ -0,0 +1,97 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../../../inc/MarlinConfig.h"
|
||||
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
|
||||
#include "../../gcode.h"
|
||||
#include "../../../feature/runout.h"
|
||||
|
||||
/**
|
||||
* M591: Configure filament runout detection
|
||||
*
|
||||
* Parameters
|
||||
* R : Reset the runout sensor
|
||||
* S<bool> : Reset and enable/disable the runout sensor
|
||||
* H<bool> : Enable/disable host handling of filament runout
|
||||
* L<linear> : Extra distance to continue after runout is triggered or motion interval
|
||||
* D<linear> : Alias for L
|
||||
* P<index> : Mode 0 = NONE
|
||||
* 1 = Switch NO (HIGH = filament present)
|
||||
* 2 = Switch NC (LOW = filament present)
|
||||
* 3 = Encoder / Motion Sensor
|
||||
*/
|
||||
void GcodeSuite::M591() {
|
||||
if (parser.seen("RSDP" TERN_(HOST_ACTION_COMMANDS, "H"))) {
|
||||
#if ENABLED(HOST_ACTION_COMMANDS)
|
||||
if (parser.seen('H')) runout.host_handling = parser.value_bool();
|
||||
#endif
|
||||
const bool seenR = parser.seen_test('R'), seenS = parser.seen('S');
|
||||
if (seenR || seenS) runout.reset();
|
||||
const uint8_t tool = TERN0(MULTI_FILAMENT_SENSOR, parser.ushortval('E', active_extruder));
|
||||
if (seenS) runout.enabled[tool] = parser.value_bool();
|
||||
if (parser.seen('D') || parser.seen('L')) runout.set_runout_distance(parser.value_linear_units(), tool);
|
||||
if (parser.seen('P')) {
|
||||
const RunoutMode tmp_mode = (RunoutMode)parser.value_int();
|
||||
switch (tmp_mode) {
|
||||
case RM_NONE ... RM_OUT_ON_HIGH:
|
||||
case RM_MOTION_SENSOR:
|
||||
runout.mode[tool] = tmp_mode;
|
||||
runout.setup();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
#if DISABLED(SLIM_LCD_MENUS)
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM("Filament runout ");
|
||||
serialprint_onoff(runout.enabled[active_extruder]);
|
||||
SERIAL_ECHOPGM(" ; Distance ", runout.runout_distance(active_extruder), "mm");
|
||||
SERIAL_ECHOPGM(" ; Mode ", runout.mode[active_extruder]);
|
||||
#if ENABLED(HOST_ACTION_COMMANDS)
|
||||
SERIAL_ECHOPGM(" ; Host handling ");
|
||||
serialprint_onoff(runout.host_handling);
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
#else
|
||||
M591_report(false);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void GcodeSuite::M591_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, F(STR_FILAMENT_RUNOUT_SENSOR));
|
||||
LOOP_S_L_N(e, 1, NUM_RUNOUT_SENSORS)
|
||||
SERIAL_ECHOLNPGM(
|
||||
" M591"
|
||||
#if MULTI_FILAMENT_SENSOR
|
||||
" E", e,
|
||||
#endif
|
||||
" S", runout.enabled[e]
|
||||
, " D", LINEAR_UNIT(runout.runout_distance(e))
|
||||
, " P", runout.mode[e]
|
||||
);
|
||||
}
|
||||
|
||||
#endif // HAS_FILAMENT_SENSOR
|
||||
+60
-80
@@ -75,14 +75,26 @@ GcodeSuite gcode;
|
||||
millis_t GcodeSuite::previous_move_ms = 0,
|
||||
GcodeSuite::max_inactive_time = 0;
|
||||
|
||||
#if HAS_DISABLE_IDLE_AXES
|
||||
millis_t GcodeSuite::stepper_inactive_time = SEC_TO_MS(DEFAULT_STEPPER_TIMEOUT_SEC);
|
||||
#if HAS_DISABLE_INACTIVE_AXIS
|
||||
millis_t GcodeSuite::stepper_inactive_time = SEC_TO_MS(DEFAULT_STEPPER_DEACTIVE_TIME);
|
||||
#endif
|
||||
|
||||
// Relative motion mode for each logical axis
|
||||
relative_t GcodeSuite::axis_relative; // Init in constructor
|
||||
static constexpr xyze_bool_t ar_init = AXIS_RELATIVE_MODES;
|
||||
axis_bits_t GcodeSuite::axis_relative = 0 LOGICAL_AXIS_GANG(
|
||||
| (ar_init.e << REL_E),
|
||||
| (ar_init.x << REL_X),
|
||||
| (ar_init.y << REL_Y),
|
||||
| (ar_init.z << REL_Z),
|
||||
| (ar_init.i << REL_I),
|
||||
| (ar_init.j << REL_J),
|
||||
| (ar_init.k << REL_K),
|
||||
| (ar_init.u << REL_U),
|
||||
| (ar_init.v << REL_V),
|
||||
| (ar_init.w << REL_W)
|
||||
);
|
||||
|
||||
#if ANY(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE)
|
||||
#if EITHER(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE)
|
||||
bool GcodeSuite::autoreport_paused; // = false
|
||||
#endif
|
||||
|
||||
@@ -105,7 +117,8 @@ void GcodeSuite::report_heading(const bool forReplay, FSTR_P const fstr, const b
|
||||
if (forReplay) return;
|
||||
if (fstr) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHO(F("; "), fstr);
|
||||
SERIAL_ECHOPGM("; ");
|
||||
SERIAL_ECHOF(fstr);
|
||||
}
|
||||
if (eol) { SERIAL_CHAR(':'); SERIAL_EOL(); }
|
||||
}
|
||||
@@ -122,16 +135,14 @@ void GcodeSuite::say_units() {
|
||||
* Return -1 if the T parameter is out of range
|
||||
*/
|
||||
int8_t GcodeSuite::get_target_extruder_from_command() {
|
||||
#if HAS_TOOLCHANGE
|
||||
if (parser.seenval('T')) {
|
||||
const int8_t e = parser.value_byte();
|
||||
if (e < EXTRUDERS) return e;
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum);
|
||||
SERIAL_ECHOLNPGM(" " STR_INVALID_EXTRUDER " ", e);
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
if (parser.seenval('T')) {
|
||||
const int8_t e = parser.value_byte();
|
||||
if (e < EXTRUDERS) return e;
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum);
|
||||
SERIAL_ECHOLNPGM(" " STR_INVALID_EXTRUDER " ", e);
|
||||
return -1;
|
||||
}
|
||||
return active_extruder;
|
||||
}
|
||||
|
||||
@@ -155,7 +166,7 @@ int8_t GcodeSuite::get_target_e_stepper_from_command(const int8_t dval/*=-1*/) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set XYZ...E destination and feedrate from the current G-Code command
|
||||
* Set XYZ...E destination and feedrate from the current GCode command
|
||||
*
|
||||
* - Set destination from included axis codes
|
||||
* - Set to current for missing axis codes
|
||||
@@ -205,13 +216,13 @@ void GcodeSuite::get_destination_from_command() {
|
||||
TERN_(LASER_FEATURE, cutter.feedrate_mm_m = MMS_TO_MMM(feedrate_mm_s));
|
||||
}
|
||||
|
||||
#if ALL(PRINTCOUNTER, HAS_EXTRUDERS)
|
||||
#if BOTH(PRINTCOUNTER, HAS_EXTRUDERS)
|
||||
if (!DEBUGGING(DRYRUN) && !skip_move)
|
||||
print_job_timer.incFilamentUsed(destination.e - current_position.e);
|
||||
#endif
|
||||
|
||||
// Get ABCDHI mixing factors
|
||||
#if ALL(MIXING_EXTRUDER, DIRECT_MIXING_IN_G1)
|
||||
#if BOTH(MIXING_EXTRUDER, DIRECT_MIXING_IN_G1)
|
||||
M165();
|
||||
#endif
|
||||
|
||||
@@ -443,7 +454,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 61: G61(); break; // G61: Apply/restore saved coordinates.
|
||||
#endif
|
||||
|
||||
#if ALL(PTC_PROBE, PTC_BED)
|
||||
#if BOTH(PTC_PROBE, PTC_BED)
|
||||
case 76: G76(); break; // G76: Calibrate first layer compensation values
|
||||
#endif
|
||||
|
||||
@@ -461,7 +472,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
#endif
|
||||
|
||||
#if ENABLED(DEBUG_GCODE_PARSER)
|
||||
case 800: parser.debug(); break; // G800: G-Code Parser Test for G
|
||||
case 800: parser.debug(); break; // G800: GCode Parser Test for G
|
||||
#endif
|
||||
|
||||
default: parser.unknown_command_warning(); break;
|
||||
@@ -485,11 +496,11 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 7: M7(); break; // M7: Coolant Mist ON
|
||||
#endif
|
||||
|
||||
#if ANY(AIR_ASSIST, COOLANT_FLOOD)
|
||||
#if EITHER(AIR_ASSIST, COOLANT_FLOOD)
|
||||
case 8: M8(); break; // M8: Air Assist / Coolant Flood ON
|
||||
#endif
|
||||
|
||||
#if ANY(AIR_ASSIST, COOLANT_CONTROL)
|
||||
#if EITHER(AIR_ASSIST, COOLANT_CONTROL)
|
||||
case 9: M9(); break; // M9: Air Assist / Coolant OFF
|
||||
#endif
|
||||
|
||||
@@ -508,7 +519,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
|
||||
case 17: M17(); break; // M17: Enable all stepper motors
|
||||
|
||||
#if HAS_MEDIA
|
||||
#if ENABLED(SDSUPPORT)
|
||||
case 20: M20(); break; // M20: List SD card
|
||||
case 21: M21(); break; // M21: Init SD card
|
||||
case 22: M22(); break; // M22: Release SD card
|
||||
@@ -529,12 +540,12 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 33: M33(); break; // M33: Get the long full path to a file or folder
|
||||
#endif
|
||||
|
||||
#if ALL(SDCARD_SORT_ALPHA, SDSORT_GCODE)
|
||||
#if BOTH(SDCARD_SORT_ALPHA, SDSORT_GCODE)
|
||||
case 34: M34(); break; // M34: Set SD card sorting options
|
||||
#endif
|
||||
|
||||
case 928: M928(); break; // M928: Start SD write
|
||||
#endif // HAS_MEDIA
|
||||
#endif // SDSUPPORT
|
||||
|
||||
case 31: M31(); break; // M31: Report time since the start of SD print or last M109
|
||||
|
||||
@@ -570,7 +581,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 102: M102(); break; // M102: Configure Bed Distance Sensor
|
||||
#endif
|
||||
|
||||
#if HAS_HOTEND
|
||||
#if HAS_EXTRUDERS
|
||||
case 104: M104(); break; // M104: Set hot end temperature
|
||||
case 109: M109(); break; // M109: Wait for hotend temperature to reach target
|
||||
#endif
|
||||
@@ -629,7 +640,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 154: M154(); break; // M154: Set position auto-report interval
|
||||
#endif
|
||||
|
||||
#if ALL(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR)
|
||||
#if BOTH(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR)
|
||||
case 155: M155(); break; // M155: Set temperature auto-report interval
|
||||
#endif
|
||||
|
||||
@@ -660,24 +671,11 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 82: M82(); break; // M82: Set E axis normal mode (same as other axes)
|
||||
case 83: M83(); break; // M83: Set E axis relative mode
|
||||
#endif
|
||||
|
||||
case 18: case 84: M18_M84(); break; // M18/M84: Disable Steppers / Set Timeout
|
||||
case 85: M85(); break; // M85: Set inactivity stepper shutdown timeout
|
||||
|
||||
#if ENABLED(HOTEND_IDLE_TIMEOUT)
|
||||
case 86: M86(); break; // M86: Set Hotend Idle Timeout
|
||||
case 87: M87(); break; // M87: Cancel Hotend Idle Timeout
|
||||
#endif
|
||||
|
||||
#if ENABLED(EDITABLE_STEPS_PER_UNIT)
|
||||
case 92: M92(); break; // M92: Set the steps-per-unit for one or more axes
|
||||
#endif
|
||||
|
||||
case 92: M92(); break; // M92: Set the steps-per-unit for one or more axes
|
||||
case 114: M114(); break; // M114: Report current position
|
||||
|
||||
#if ENABLED(CAPABILITIES_REPORT)
|
||||
case 115: M115(); break; // M115: Report capabilities
|
||||
#endif
|
||||
case 115: M115(); break; // M115: Report capabilities
|
||||
|
||||
case 117: TERN_(HAS_STATUS_MESSAGE, M117()); break; // M117: Set LCD message text, if possible
|
||||
|
||||
@@ -723,7 +721,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 204: M204(); break; // M204: Set acceleration
|
||||
case 205: M205(); break; // M205: Set advanced settings
|
||||
|
||||
#if HAS_HOME_OFFSET
|
||||
#if HAS_M206_COMMAND
|
||||
case 206: M206(); break; // M206: Set home offsets
|
||||
#endif
|
||||
|
||||
@@ -771,10 +769,6 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
case 290: M290(); break; // M290: Babystepping
|
||||
#if ENABLED(EP_BABYSTEPPING)
|
||||
case 293: IF_DISABLED(EMERGENCY_PARSER, M293()); break; // M293: Babystep up
|
||||
case 294: IF_DISABLED(EMERGENCY_PARSER, M294()); break; // M294: Babystep down
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_SOUND
|
||||
@@ -801,7 +795,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 250: M250(); break; // M250: Set LCD contrast
|
||||
#endif
|
||||
|
||||
#if ENABLED(EDITABLE_DISPLAY_TIMEOUT)
|
||||
#if HAS_GCODE_M255
|
||||
case 255: M255(); break; // M255: Set LCD Sleep/Backlight Timeout (Minutes)
|
||||
#endif
|
||||
|
||||
@@ -842,7 +836,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 364: if (M364()) return; break; // M364: SCARA Psi pos3 (90 deg to Theta)
|
||||
#endif
|
||||
|
||||
#if ANY(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL)
|
||||
#if EITHER(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL)
|
||||
case 380: M380(); break; // M380: Activate solenoid on active (or specified) extruder
|
||||
case 381: M381(); break; // M381: Disable all solenoids or, if MANUAL_SOLENOID_CONTROL, active (or specified) solenoid
|
||||
#endif
|
||||
@@ -865,10 +859,6 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 407: M407(); break; // M407: Display measured filament diameter
|
||||
#endif
|
||||
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
case 412: M412(); break; // M412: Enable/Disable filament runout detection
|
||||
#endif
|
||||
|
||||
#if HAS_MULTI_LANGUAGE
|
||||
case 414: M414(); break; // M414: Select multi language menu
|
||||
#endif
|
||||
@@ -889,7 +879,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 425: M425(); break; // M425: Tune backlash compensation
|
||||
#endif
|
||||
|
||||
#if HAS_HOME_OFFSET
|
||||
#if HAS_M206_COMMAND
|
||||
case 428: M428(); break; // M428: Apply current_position to home_offset
|
||||
#endif
|
||||
|
||||
@@ -901,10 +891,6 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 486: M486(); break; // M486: Identify and cancel objects
|
||||
#endif
|
||||
|
||||
#if ENABLED(FT_MOTION)
|
||||
case 493: M493(); break; // M493: Fixed-Time Motion control
|
||||
#endif
|
||||
|
||||
case 500: M500(); break; // M500: Store settings in EEPROM
|
||||
case 501: M501(); break; // M501: Read settings from EEPROM
|
||||
case 502: M502(); break; // M502: Revert to default settings
|
||||
@@ -925,7 +911,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_MEDIA
|
||||
#if ENABLED(SDSUPPORT)
|
||||
case 524: M524(); break; // M524: Abort the current SD print job
|
||||
#endif
|
||||
|
||||
@@ -943,19 +929,14 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 575: M575(); break; // M575: Set serial baudrate
|
||||
#endif
|
||||
|
||||
#if ENABLED(NONLINEAR_EXTRUSION)
|
||||
case 592: M592(); break; // M592: Nonlinear Extrusion control
|
||||
#endif
|
||||
|
||||
#if HAS_ZV_SHAPING
|
||||
case 593: M593(); break; // M593: Input Shaping control
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
case 412: M412(); break; // Alias to M591
|
||||
case 591: M591(); break; // M591 Configure filament runout detection
|
||||
#endif
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
case 600: M600(); break; // M600: Pause for Filament Change
|
||||
#if ENABLED(CONFIGURE_FILAMENT_CHANGE)
|
||||
case 603: M603(); break; // M603: Configure Filament Change
|
||||
#endif
|
||||
case 603: M603(); break; // M603: Configure Filament Change
|
||||
#endif
|
||||
|
||||
#if HAS_DUPLICATION_MODE
|
||||
@@ -966,7 +947,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 665: M665(); break; // M665: Set Kinematics parameters
|
||||
#endif
|
||||
|
||||
#if ANY(DELTA, HAS_EXTRA_ENDSTOPS)
|
||||
#if ENABLED(DELTA) || HAS_EXTRA_ENDSTOPS
|
||||
case 666: M666(); break; // M666: Set delta or multiple endstop adjustment
|
||||
#endif
|
||||
|
||||
@@ -1007,7 +988,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
|
||||
#if ANY(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_PWM, HAS_MOTOR_CURRENT_I2C, HAS_MOTOR_CURRENT_DAC)
|
||||
case 907: M907(); break; // M907: Set digital trimpot motor current using axis codes.
|
||||
#if ANY(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_DAC)
|
||||
#if EITHER(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_DAC)
|
||||
case 908: M908(); break; // M908: Control digital trimpot directly.
|
||||
#if HAS_MOTOR_CURRENT_DAC
|
||||
case 909: M909(); break; // M909: Print digipot/DAC current value
|
||||
@@ -1045,7 +1026,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
#endif
|
||||
|
||||
#if ENABLED(DEBUG_GCODE_PARSER)
|
||||
case 800: parser.debug(); break; // M800: G-Code Parser Test for M
|
||||
case 800: parser.debug(); break; // M800: GCode Parser Test for M
|
||||
#endif
|
||||
|
||||
#if ENABLED(GCODE_REPEAT_MARKERS)
|
||||
@@ -1073,11 +1054,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 422: M422(); break; // M422: Set Z Stepper automatic alignment position using probe
|
||||
#endif
|
||||
|
||||
#if ENABLED(OTA_FIRMWARE_UPDATE)
|
||||
case 936: M936(); break; // M936: OTA update firmware.
|
||||
#endif
|
||||
|
||||
#if SPI_FLASH_BACKUP
|
||||
#if ALL(SPI_FLASH, SDSUPPORT, MARLIN_DEV_MODE)
|
||||
case 993: M993(); break; // M993: Backup SPI Flash to SD
|
||||
case 994: M994(); break; // M994: Load a Backup from SD to SPI Flash
|
||||
#endif
|
||||
@@ -1097,11 +1074,11 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 1000: M1000(); break; // M1000: [INTERNAL] Resume from power-loss
|
||||
#endif
|
||||
|
||||
#if HAS_MEDIA
|
||||
#if ENABLED(SDSUPPORT)
|
||||
case 1001: M1001(); break; // M1001: [INTERNAL] Handle SD completion
|
||||
#endif
|
||||
|
||||
#if DGUS_LCD_UI_MKS
|
||||
#if ENABLED(DGUS_LCD_UI_MKS)
|
||||
case 1002: M1002(); break; // M1002: [INTERNAL] Tool-change and Relative E Move
|
||||
#endif
|
||||
|
||||
@@ -1140,7 +1117,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
|
||||
if (!no_ok) queue.ok_to_send();
|
||||
|
||||
SERIAL_IMPL.msgDone(); // Call the msgDone serial hook to signal command processing done
|
||||
SERIAL_OUT(msgDone); // Call the msgDone serial hook to signal command processing done
|
||||
}
|
||||
|
||||
#if ENABLED(M100_FREE_MEMORY_DUMPER)
|
||||
@@ -1187,7 +1164,10 @@ void GcodeSuite::process_subcommands_now(FSTR_P fgcode) {
|
||||
for (;;) {
|
||||
PGM_P const delim = strchr_P(pgcode, '\n'); // Get address of next newline
|
||||
const size_t len = delim ? delim - pgcode : strlen_P(pgcode); // Get the command length
|
||||
parser.parse(MString<MAX_CMD_SIZE>().setn_P(pgcode, len)); // Parse the command
|
||||
char cmd[len + 1]; // Allocate a stack buffer
|
||||
strncpy_P(cmd, pgcode, len); // Copy the command to the stack
|
||||
cmd[len] = '\0'; // End with a nul
|
||||
parser.parse(cmd); // Parse the command
|
||||
process_parsed_command(true); // Process it (no "ok")
|
||||
if (!delim) break; // Last command?
|
||||
pgcode = delim + 1; // Get the next command
|
||||
|
||||
@@ -234,7 +234,6 @@
|
||||
* M406 - Disable Filament Sensor flow control. (Requires FILAMENT_WIDTH_SENSOR)
|
||||
* M407 - Display measured filament diameter in millimeters. (Requires FILAMENT_WIDTH_SENSOR)
|
||||
* M410 - Quickstop. Abort all planned moves.
|
||||
* M412 - Enable / Disable Filament Runout Detection. (Requires FILAMENT_RUNOUT_SENSOR)
|
||||
* M413 - Enable / Disable Power-Loss Recovery. (Requires POWER_LOSS_RECOVERY)
|
||||
* M414 - Set language by index. (Requires LCD_LANGUAGE_2...)
|
||||
* M420 - Enable/Disable Leveling (with current values) S1=enable S0=disable (Requires MESH_BED_LEVELING or ABL)
|
||||
@@ -261,6 +260,7 @@
|
||||
* M575 - Change the serial baud rate. (Requires BAUD_RATE_GCODE)
|
||||
* M592 - Get or set nonlinear extrusion parameters. (Requires NONLINEAR_EXTRUSION)
|
||||
* M593 - Get or set input shaping parameters. (Requires INPUT_SHAPING_[XY])
|
||||
* M591 - Configure Filament Runout Detection. (Requires FILAMENT_RUNOUT_SENSOR)
|
||||
* M600 - Pause for filament change: "M600 X<pos> Y<pos> Z<raise> E<first_retract> L<later_retract>". (Requires ADVANCED_PAUSE_FEATURE)
|
||||
* M603 - Configure filament change: "M603 T<tool> U<unload_length> L<load_length>". (Requires ADVANCED_PAUSE_FEATURE)
|
||||
* M605 - Set Dual X-Carriage movement mode: "M605 S<mode> [X<x_offset>] [R<temp_offset>]". (Requires DUAL_X_CARRIAGE)
|
||||
@@ -1035,8 +1035,9 @@ private:
|
||||
#endif
|
||||
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
static void M412();
|
||||
static void M412_report(const bool forReplay=true);
|
||||
static void M412() { M591(); }
|
||||
static void M591();
|
||||
static void M591_report(const bool forReplay=true);
|
||||
#endif
|
||||
|
||||
#if HAS_MULTI_LANGUAGE
|
||||
|
||||
@@ -154,7 +154,7 @@ void GcodeSuite::M115() {
|
||||
// AUTOLEVEL (G29)
|
||||
cap_line(F("AUTOLEVEL"), ENABLED(HAS_AUTOLEVEL));
|
||||
|
||||
// RUNOUT (M412, M600)
|
||||
// RUNOUT (M591, M600)
|
||||
cap_line(F("RUNOUT"), ENABLED(FILAMENT_RUNOUT_SENSOR));
|
||||
|
||||
// Z_PROBE (G30)
|
||||
|
||||
+704
-919
File diff suppressed because it is too large
Load Diff
+256
-577
File diff suppressed because it is too large
Load Diff
+1448
-1402
File diff suppressed because it is too large
Load Diff
@@ -42,7 +42,7 @@
|
||||
* version was tagged.
|
||||
*/
|
||||
#ifndef STRING_DISTRIBUTION_DATE
|
||||
#define STRING_DISTRIBUTION_DATE "2024-04-08"
|
||||
#define STRING_DISTRIBUTION_DATE "2024-04-11"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -1169,7 +1169,7 @@ void MarlinUI::draw_status_screen() {
|
||||
|
||||
lcd_moveto(LCD_WIDTH - 9, 2);
|
||||
lcd_put_lchar('S');
|
||||
|
||||
|
||||
|
||||
#endif // LCD_INFO_SCREEN_STYLE
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ TFT_IO tftio;
|
||||
#define X_HI (UPSCALE(TFT_PIXEL_OFFSET_X, WIDTH) - 1)
|
||||
#define Y_HI (UPSCALE(TFT_PIXEL_OFFSET_Y, HEIGHT) - 1)
|
||||
|
||||
// RGB565 color picker: https://embeddednotepad.com/page/rgb565-color-picker
|
||||
// RGB565 color picker: https://rgbcolorpicker.com/565
|
||||
// Hex code to color name: https://www.color-name.com/
|
||||
|
||||
#define COLOR_BLACK 0x0000 // #000000
|
||||
|
||||
+1650
-1983
File diff suppressed because it is too large
Load Diff
@@ -23,8 +23,8 @@
|
||||
/**
|
||||
* DWIN Endstops diagnostic page for PRO UI
|
||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||
* Version: 1.4.3
|
||||
* Date: 2023/05/10
|
||||
* Version: 1.2.2
|
||||
* Date: 2022/02/24
|
||||
*/
|
||||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
@@ -36,9 +36,13 @@
|
||||
#if HAS_ESDIAG
|
||||
|
||||
#include "endstop_diag.h"
|
||||
|
||||
#include "../../../core/types.h"
|
||||
#include "../../marlinui.h"
|
||||
#include "dwin.h"
|
||||
#include "dwin_lcd.h"
|
||||
#include "dwinui.h"
|
||||
#include "dwin_popup.h"
|
||||
#include "dwin.h"
|
||||
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
#include "../../../feature/runout.h"
|
||||
@@ -48,45 +52,61 @@
|
||||
#include "../../../module/probe.h"
|
||||
#endif
|
||||
|
||||
ESDiag esDiag;
|
||||
ESDiagClass ESDiag;
|
||||
|
||||
void draw_es_label(FSTR_P const flabel=nullptr) {
|
||||
DWINUI::cursor.x = 40;
|
||||
if (flabel) DWINUI::drawString(F(flabel));
|
||||
DWINUI::drawString(F(": "));
|
||||
DWINUI::moveBy(0, 25);
|
||||
if (flabel) DWINUI::Draw_String(F(flabel));
|
||||
DWINUI::Draw_String(F(": "));
|
||||
DWINUI::MoveBy(0, 25);
|
||||
}
|
||||
|
||||
void draw_es_state(const bool is_hit) {
|
||||
const uint8_t LM = 130;
|
||||
DWINUI::cursor.x = LM;
|
||||
dwinDrawRectangle(1, hmiData.colorPopupBg, LM, DWINUI::cursor.y, LM + 100, DWINUI::cursor.y + 20);
|
||||
is_hit ? DWINUI::drawString(RGB(31,31,16), F(STR_ENDSTOP_HIT)) : DWINUI::drawString(RGB(16,63,16), F(STR_ENDSTOP_OPEN));
|
||||
DWINUI::moveBy(0, 25);
|
||||
DWIN_Draw_Rectangle(1, HMI_data.PopupBg_color, LM, DWINUI::cursor.y, LM + 100, DWINUI::cursor.y + 20);
|
||||
is_hit ? DWINUI::Draw_String(RGB(31,31,16), F(STR_ENDSTOP_HIT)) : DWINUI::Draw_String(RGB(16,63,16), F(STR_ENDSTOP_OPEN));
|
||||
DWINUI::MoveBy(0, 25);
|
||||
}
|
||||
|
||||
void ESDiag::draw() {
|
||||
title.showCaption(GET_TEXT_F(MSG_ENDSTOP_TEST));
|
||||
DWINUI::clearMainArea();
|
||||
drawPopupBkgd();
|
||||
DWINUI::drawButton(BTN_Continue, 86, 250);
|
||||
void ESDiagClass::Draw() {
|
||||
Title.ShowCaption(F("End-stops Diagnostic"));
|
||||
DWINUI::ClearMainArea();
|
||||
Draw_Popup_Bkgd();
|
||||
DWINUI::Draw_Button(BTN_Continue, 86, 250);
|
||||
DWINUI::cursor.y = 80;
|
||||
#define ES_LABEL(S) draw_es_label(F(STR_##S))
|
||||
TERN_(USE_X_MIN, ES_LABEL(X_MIN)); TERN_(USE_X_MAX, ES_LABEL(X_MAX));
|
||||
TERN_(USE_Y_MIN, ES_LABEL(Y_MIN)); TERN_(USE_Y_MAX, ES_LABEL(Y_MAX));
|
||||
TERN_(USE_Z_MIN, ES_LABEL(Z_MIN)); TERN_(USE_Z_MAX, ES_LABEL(Z_MAX));
|
||||
TERN_(HAS_FILAMENT_SENSOR, draw_es_label(F(STR_FILAMENT)));
|
||||
update();
|
||||
#if HAS_X_MIN
|
||||
ES_LABEL(X_MIN);
|
||||
#endif
|
||||
#if HAS_Y_MIN
|
||||
ES_LABEL(Y_MIN);
|
||||
#endif
|
||||
#if HAS_Z_MIN
|
||||
ES_LABEL(Z_MIN);
|
||||
#endif
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
draw_es_label(F(STR_FILAMENT));
|
||||
#endif
|
||||
Update();
|
||||
}
|
||||
|
||||
void ESDiag::update() {
|
||||
void ESDiagClass::Update() {
|
||||
DWINUI::cursor.y = 80;
|
||||
#define ES_REPORT(S) draw_es_state(READ(S##_PIN) == S##_ENDSTOP_HIT_STATE)
|
||||
TERN_(USE_X_MIN, ES_REPORT(X_MIN)); TERN_(USE_X_MAX, ES_REPORT(X_MAX));
|
||||
TERN_(USE_Y_MIN, ES_REPORT(Y_MIN)); TERN_(USE_Y_MAX, ES_REPORT(Y_MAX));
|
||||
TERN_(USE_Z_MIN, ES_REPORT(Z_MIN)); TERN_(USE_Z_MAX, ES_REPORT(Z_MAX));
|
||||
TERN_(HAS_FILAMENT_SENSOR, draw_es_state(READ(FIL_RUNOUT1_PIN) != FIL_RUNOUT1_STATE));
|
||||
dwinUpdateLCD();
|
||||
#define ES_REPORT(S) draw_es_state(READ(S##_PIN) != S##_ENDSTOP_INVERTING)
|
||||
#if HAS_X_MIN
|
||||
ES_REPORT(X_MIN);
|
||||
#endif
|
||||
#if HAS_Y_MIN
|
||||
ES_REPORT(Y_MIN);
|
||||
#endif
|
||||
#if HAS_Z_MIN
|
||||
ES_REPORT(Z_MIN);
|
||||
#endif
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
draw_es_state(READ(FIL_RUNOUT1_PIN) != runout.out_state());
|
||||
#endif
|
||||
DWIN_UpdateLCD();
|
||||
}
|
||||
|
||||
#endif // HAS_ESDIAG
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#if ENABLED(ANYCUBIC_LCD_CHIRON)
|
||||
|
||||
#include "chiron_tft.h"
|
||||
#include "../anycubic/Tunes.h"
|
||||
#include "Tunes.h"
|
||||
#include "FileNavigator.h"
|
||||
|
||||
#include "../../../gcode/queue.h"
|
||||
@@ -42,13 +42,9 @@
|
||||
#include "../../../libs/numtostr.h"
|
||||
#include "../../../MarlinCore.h"
|
||||
|
||||
#define DEBUG_OUT ACDEBUGLEVEL
|
||||
#include "../../../core/debug_out.h"
|
||||
|
||||
namespace Anycubic {
|
||||
|
||||
ChironTFT chiron;
|
||||
|
||||
ChironTFT Chiron;
|
||||
#if AUTO_DETECT_CHIRON_TFT
|
||||
panel_type_t ChironTFT::panel_type = AC_panel_unknown;
|
||||
#endif
|
||||
@@ -64,7 +60,7 @@ uint8_t ChironTFT::command_len;
|
||||
float ChironTFT::live_Zoffset;
|
||||
file_menu_t ChironTFT::file_menu;
|
||||
|
||||
void ChironTFT::startup() {
|
||||
void ChironTFT::Startup() {
|
||||
selectedfile[0] = '\0';
|
||||
panel_command[0] = '\0';
|
||||
command_len = 0;
|
||||
@@ -76,9 +72,14 @@ void ChironTFT::startup() {
|
||||
live_Zoffset = 0.0;
|
||||
file_menu = AC_menu_file;
|
||||
|
||||
// Filament runout is handled by Marlin settings in Configuration.h
|
||||
// opt_set FIL_RUNOUT_STATE HIGH // Pin state indicating that filament is NOT present.
|
||||
// opt_enable FIL_RUNOUT_PULLUP
|
||||
// Setup pins for powerloss detection
|
||||
// Two IO pins are connected on the Trigorilla Board
|
||||
// On a power interruption the OUTAGECON_PIN goes low.
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
OUT_WRITE(OUTAGECON_PIN, HIGH);
|
||||
#endif
|
||||
|
||||
TFTSer.begin(115200);
|
||||
|
||||
// Wait for the TFT panel to initialize and finish the animation
|
||||
@@ -88,76 +89,81 @@ void ChironTFT::startup() {
|
||||
// So we need to know what we are working with.
|
||||
// Panel type can be defined otherwise detect it automatically
|
||||
switch (panel_type) {
|
||||
case AC_panel_new: SERIAL_ECHOLN(AC_msg_new_panel_set); break;
|
||||
case AC_panel_standard: SERIAL_ECHOLN(AC_msg_old_panel_set); break;
|
||||
default: SERIAL_ECHOLN(AC_msg_auto_panel_detection);
|
||||
detectPanelType();
|
||||
case AC_panel_new:
|
||||
SERIAL_ECHOLNF(AC_msg_new_panel_set);
|
||||
break;
|
||||
case AC_panel_standard:
|
||||
SERIAL_ECHOLNF(AC_msg_old_panel_set);
|
||||
break;
|
||||
default:
|
||||
SERIAL_ECHOLNF(AC_msg_auto_panel_detection);
|
||||
DetectPanelType();
|
||||
break;
|
||||
}
|
||||
|
||||
// Signal Board has reset
|
||||
tftSendLn(AC_msg_main_board_has_reset);
|
||||
SendtoTFTLN(AC_msg_main_board_has_reset);
|
||||
|
||||
// Enable leveling and Disable end stops during print
|
||||
// as Z home places nozzle above the bed so we need to allow it past the end stops
|
||||
injectCommands(AC_cmnd_enable_leveling);
|
||||
|
||||
// startup tunes are defined in Tunes.h
|
||||
playTune(TERN(AC_DEFAULT_STARTUP_TUNE, Anycubic_PowerOn, GB_PowerOn));
|
||||
// Startup tunes are defined in Tunes.h
|
||||
PlayTune(BEEPER_PIN, TERN(AC_DEFAULT_STARTUP_TUNE, Anycubic_PowerOn, GB_PowerOn), 1);
|
||||
|
||||
#if ACDEBUGLEVEL
|
||||
DEBUG_ECHOLNPGM("AC Debug Level ", ACDEBUGLEVEL);
|
||||
SERIAL_ECHOLNPGM("AC Debug Level ", ACDEBUGLEVEL);
|
||||
#endif
|
||||
tftSendLn(AC_msg_ready);
|
||||
SendtoTFTLN(AC_msg_ready);
|
||||
}
|
||||
|
||||
void ChironTFT::detectPanelType() {
|
||||
void ChironTFT::DetectPanelType() {
|
||||
#if AUTO_DETECT_CHIRON_TFT
|
||||
// Send a query to the TFT
|
||||
tftSendLn(AC_Test_for_OldPanel); // The panel will respond with 'SXY 480 320'
|
||||
tftSendLn(AC_Test_for_NewPanel); // the panel will respond with '[0]=0 ' to '[19]=0 '
|
||||
SendtoTFTLN(AC_Test_for_OldPanel); // The panel will respond with 'SXY 480 320'
|
||||
SendtoTFTLN(AC_Test_for_NewPanel); // the panel will respond with '[0]=0 ' to '[19]=0 '
|
||||
#endif
|
||||
}
|
||||
|
||||
void ChironTFT::idleLoop() {
|
||||
if (readTFTCommand()) {
|
||||
processPanelRequest();
|
||||
void ChironTFT::IdleLoop() {
|
||||
if (ReadTFTCommand()) {
|
||||
ProcessPanelRequest();
|
||||
command_len = 0;
|
||||
}
|
||||
checkHeaters();
|
||||
CheckHeaters();
|
||||
}
|
||||
|
||||
void ChironTFT::printerKilled(FSTR_P const error, FSTR_P const component) {
|
||||
tftSendLn(AC_msg_kill_lcd);
|
||||
void ChironTFT::PrinterKilled(FSTR_P const error, FSTR_P const component) {
|
||||
SendtoTFTLN(AC_msg_kill_lcd);
|
||||
#if ACDEBUG(AC_MARLIN)
|
||||
DEBUG_ECHOLNPGM("printerKilled()\nerror: ", error , "\ncomponent: ", component);
|
||||
SERIAL_ECHOLNPGM("PrinterKilled()\nerror: ", error , "\ncomponent: ", component);
|
||||
#endif
|
||||
}
|
||||
|
||||
void ChironTFT::mediaEvent(media_event_t event) {
|
||||
void ChironTFT::MediaEvent(media_event_t event) {
|
||||
#if ACDEBUG(AC_MARLIN)
|
||||
DEBUG_ECHOLNPGM("ProcessMediaStatus() ", event);
|
||||
SERIAL_ECHOLNPGM("ProcessMediaStatus() ", event);
|
||||
#endif
|
||||
switch (event) {
|
||||
case AC_media_inserted:
|
||||
tftSendLn(AC_msg_sd_card_inserted);
|
||||
SendtoTFTLN(AC_msg_sd_card_inserted);
|
||||
break;
|
||||
|
||||
case AC_media_removed:
|
||||
tftSendLn(AC_msg_sd_card_removed);
|
||||
SendtoTFTLN(AC_msg_sd_card_removed);
|
||||
break;
|
||||
|
||||
case AC_media_error:
|
||||
last_error = AC_error_noSD;
|
||||
tftSendLn(AC_msg_no_sd_card);
|
||||
SendtoTFTLN(AC_msg_no_sd_card);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ChironTFT::timerEvent(timer_event_t event) {
|
||||
void ChironTFT::TimerEvent(timer_event_t event) {
|
||||
#if ACDEBUG(AC_MARLIN)
|
||||
DEBUG_ECHOLNPGM("timerEvent() ", event);
|
||||
DEBUG_ECHOLNPGM("Printer State: ", printer_state);
|
||||
SERIAL_ECHOLNPGM("TimerEvent() ", event);
|
||||
SERIAL_ECHOLNPGM("Printer State: ", printer_state);
|
||||
#endif
|
||||
|
||||
switch (event) {
|
||||
@@ -165,44 +171,44 @@ void ChironTFT::timerEvent(timer_event_t event) {
|
||||
live_Zoffset = 0.0; // reset print offset
|
||||
setSoftEndstopState(false); // disable endstops to print
|
||||
printer_state = AC_printer_printing;
|
||||
tftSendLn(AC_msg_print_from_sd_card);
|
||||
SendtoTFTLN(AC_msg_print_from_sd_card);
|
||||
} break;
|
||||
|
||||
case AC_timer_paused: {
|
||||
printer_state = AC_printer_paused;
|
||||
pause_state = AC_paused_idle;
|
||||
tftSendLn(AC_msg_paused);
|
||||
SendtoTFTLN(AC_msg_paused);
|
||||
} break;
|
||||
|
||||
case AC_timer_stopped: {
|
||||
if (printer_state != AC_printer_idle) {
|
||||
printer_state = AC_printer_stopping;
|
||||
tftSendLn(AC_msg_print_complete);
|
||||
SendtoTFTLN(AC_msg_print_complete);
|
||||
}
|
||||
setSoftEndstopState(true); // enable endstops
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
void ChironTFT::filamentRunout() {
|
||||
void ChironTFT::FilamentRunout() {
|
||||
#if ACDEBUG(AC_MARLIN)
|
||||
DEBUG_ECHOLNPGM("filamentRunout() printer_state ", printer_state);
|
||||
SERIAL_ECHOLNPGM("FilamentRunout() printer_state ", printer_state);
|
||||
#endif
|
||||
// 1 Signal filament out
|
||||
last_error = AC_error_filament_runout;
|
||||
tftSendLn(isPrintingFromMedia() ? AC_msg_filament_out_alert : AC_msg_filament_out_block);
|
||||
playTune(FilamentOut);
|
||||
SendtoTFTLN(isPrintingFromMedia() ? AC_msg_filament_out_alert : AC_msg_filament_out_block);
|
||||
PlayTune(BEEPER_PIN, FilamentOut, 1);
|
||||
}
|
||||
|
||||
void ChironTFT::confirmationRequest(const char * const msg) {
|
||||
void ChironTFT::ConfirmationRequest(const char * const msg) {
|
||||
// M108 continue
|
||||
#if ACDEBUG(AC_MARLIN)
|
||||
DEBUG_ECHOLNPGM("confirmationRequest() ", msg, " printer_state:", printer_state);
|
||||
SERIAL_ECHOLNPGM("ConfirmationRequest() ", msg, " printer_state:", printer_state);
|
||||
#endif
|
||||
switch (printer_state) {
|
||||
case AC_printer_pausing: {
|
||||
if (strcmp_P(msg, MARLIN_msg_print_paused) == 0 || strcmp_P(msg, MARLIN_msg_nozzle_parked) == 0) {
|
||||
tftSendLn(AC_msg_paused); // enable continue button
|
||||
SendtoTFTLN(AC_msg_paused); // enable continue button
|
||||
printer_state = AC_printer_paused;
|
||||
}
|
||||
} break;
|
||||
@@ -213,18 +219,18 @@ void ChironTFT::confirmationRequest(const char * const msg) {
|
||||
// Heater timeout, send acknowledgement
|
||||
if (strcmp_P(msg, MARLIN_msg_heater_timeout) == 0) {
|
||||
pause_state = AC_paused_heater_timed_out;
|
||||
tftSendLn(AC_msg_paused); // enable continue button
|
||||
playTune(HeaterTimeout);
|
||||
SendtoTFTLN(AC_msg_paused); // enable continue button
|
||||
PlayTune(BEEPER_PIN,Heater_Timedout,1);
|
||||
}
|
||||
// Reheat finished, send acknowledgement
|
||||
else if (strcmp_P(msg, MARLIN_msg_reheat_done) == 0) {
|
||||
pause_state = AC_paused_idle;
|
||||
tftSendLn(AC_msg_paused); // enable continue button
|
||||
SendtoTFTLN(AC_msg_paused); // enable continue button
|
||||
}
|
||||
// Filament Purging, send acknowledgement enter run mode
|
||||
else if (strcmp_P(msg, MARLIN_msg_filament_purging) == 0) {
|
||||
pause_state = AC_paused_purging_filament;
|
||||
tftSendLn(AC_msg_paused); // enable continue button
|
||||
SendtoTFTLN(AC_msg_paused); // enable continue button
|
||||
}
|
||||
} break;
|
||||
default:
|
||||
@@ -232,10 +238,10 @@ void ChironTFT::confirmationRequest(const char * const msg) {
|
||||
}
|
||||
}
|
||||
|
||||
void ChironTFT::statusChange(const char * const msg) {
|
||||
void ChironTFT::StatusChange(const char * const msg) {
|
||||
#if ACDEBUG(AC_MARLIN)
|
||||
DEBUG_ECHOLNPGM("statusChange() ", msg);
|
||||
DEBUG_ECHOLNPGM("printer_state:", printer_state);
|
||||
SERIAL_ECHOLNPGM("StatusChange() ", msg);
|
||||
SERIAL_ECHOLNPGM("printer_state:", printer_state);
|
||||
#endif
|
||||
bool msg_matched = false;
|
||||
// The only way to get printer status is to parse messages
|
||||
@@ -246,15 +252,15 @@ void ChironTFT::statusChange(const char * const msg) {
|
||||
// Ignore the custom machine name
|
||||
if (strcmp_P(msg + strlen(MACHINE_NAME), MARLIN_msg_ready) == 0) {
|
||||
injectCommands(F("M500\nG27"));
|
||||
tftSendLn(AC_msg_probing_complete);
|
||||
SendtoTFTLN(AC_msg_probing_complete);
|
||||
printer_state = AC_printer_idle;
|
||||
msg_matched = true;
|
||||
}
|
||||
// If probing fails don't save the mesh raise the probe above the bad point
|
||||
if (strcmp_P(msg, MARLIN_msg_probing_failed) == 0) {
|
||||
playTune(BeepBeepBeeep);
|
||||
PlayTune(BEEPER_PIN, BeepBeepBeeep, 1);
|
||||
injectCommands(F("G1 Z50 F500"));
|
||||
tftSendLn(AC_msg_probing_complete);
|
||||
SendtoTFTLN(AC_msg_probing_complete);
|
||||
printer_state = AC_printer_idle;
|
||||
msg_matched = true;
|
||||
}
|
||||
@@ -262,14 +268,14 @@ void ChironTFT::statusChange(const char * const msg) {
|
||||
|
||||
case AC_printer_printing: {
|
||||
if (strcmp_P(msg, MARLIN_msg_reheating) == 0) {
|
||||
tftSendLn(AC_msg_paused); // enable continue button
|
||||
SendtoTFTLN(AC_msg_paused); // enable continue button
|
||||
msg_matched = true;
|
||||
}
|
||||
} break;
|
||||
|
||||
case AC_printer_pausing: {
|
||||
if (strcmp_P(msg, MARLIN_msg_print_paused) == 0) {
|
||||
tftSendLn(AC_msg_paused);
|
||||
SendtoTFTLN(AC_msg_paused);
|
||||
printer_state = AC_printer_paused;
|
||||
pause_state = AC_paused_idle;
|
||||
msg_matched = true;
|
||||
@@ -278,7 +284,7 @@ void ChironTFT::statusChange(const char * const msg) {
|
||||
|
||||
case AC_printer_stopping: {
|
||||
if (strcmp_P(msg, MARLIN_msg_print_aborted) == 0) {
|
||||
tftSendLn(AC_msg_stop);
|
||||
SendtoTFTLN(AC_msg_stop);
|
||||
printer_state = AC_printer_idle;
|
||||
msg_matched = true;
|
||||
}
|
||||
@@ -290,11 +296,11 @@ void ChironTFT::statusChange(const char * const msg) {
|
||||
// If not matched earlier see if this was a heater message
|
||||
if (!msg_matched) {
|
||||
if (strcmp_P(msg, MARLIN_msg_extruder_heating) == 0) {
|
||||
tftSendLn(AC_msg_nozzle_heating);
|
||||
SendtoTFTLN(AC_msg_nozzle_heating);
|
||||
hotend_state = AC_heater_temp_set;
|
||||
}
|
||||
else if (strcmp_P(msg, MARLIN_msg_bed_heating) == 0) {
|
||||
tftSendLn(AC_msg_bed_heating);
|
||||
SendtoTFTLN(AC_msg_bed_heating);
|
||||
hotbed_state = AC_heater_temp_set;
|
||||
}
|
||||
else if (strcmp_P(msg, MARLIN_msg_EEPROM_version) == 0) {
|
||||
@@ -303,33 +309,33 @@ void ChironTFT::statusChange(const char * const msg) {
|
||||
}
|
||||
}
|
||||
|
||||
void ChironTFT::powerLossRecovery() {
|
||||
void ChironTFT::PowerLossRecovery() {
|
||||
printer_state = AC_printer_resuming_from_power_outage; // Play tune to notify user we can recover.
|
||||
last_error = AC_error_powerloss;
|
||||
playTune(SOS);
|
||||
SERIAL_ECHOLN(AC_msg_powerloss_recovery);
|
||||
PlayTune(BEEPER_PIN, SOS, 1);
|
||||
SERIAL_ECHOLNF(AC_msg_powerloss_recovery);
|
||||
}
|
||||
|
||||
void ChironTFT::printComplete() {
|
||||
tftSend(AC_msg_print_complete);
|
||||
void ChironTFT::PrintComplete() {
|
||||
SendtoTFT(AC_msg_print_complete);
|
||||
printer_state = AC_printer_idle;
|
||||
setSoftEndstopState(true); // enable endstops
|
||||
}
|
||||
|
||||
void ChironTFT::tftSend(FSTR_P const fstr/*=nullptr*/) { // A helper to print PROGMEM string to the panel
|
||||
void ChironTFT::SendtoTFT(FSTR_P const fstr/*=nullptr*/) { // A helper to print PROGMEM string to the panel
|
||||
#if ACDEBUG(AC_SOME)
|
||||
DEBUG_ECHO(fstr);
|
||||
SERIAL_ECHOF(fstr);
|
||||
#endif
|
||||
PGM_P str = FTOP(fstr);
|
||||
while (const char c = pgm_read_byte(str++)) TFTSer.write(c);
|
||||
}
|
||||
|
||||
void ChironTFT::tftSendLn(FSTR_P const fstr/*=nullptr*/) {
|
||||
void ChironTFT::SendtoTFTLN(FSTR_P const fstr/*=nullptr*/) {
|
||||
if (fstr) {
|
||||
#if ACDEBUG(AC_SOME)
|
||||
DEBUG_ECHOPGM("> ");
|
||||
SERIAL_ECHOPGM("> ");
|
||||
#endif
|
||||
tftSend(fstr);
|
||||
SendtoTFT(fstr);
|
||||
#if ACDEBUG(AC_SOME)
|
||||
SERIAL_EOL();
|
||||
#endif
|
||||
@@ -337,7 +343,7 @@ void ChironTFT::tftSendLn(FSTR_P const fstr/*=nullptr*/) {
|
||||
TFTSer.println();
|
||||
}
|
||||
|
||||
bool ChironTFT::readTFTCommand() {
|
||||
bool ChironTFT::ReadTFTCommand() {
|
||||
bool command_ready = false;
|
||||
while (TFTSer.available() > 0 && command_len < MAX_CMND_LEN) {
|
||||
panel_command[command_len] = TFTSer.read();
|
||||
@@ -351,29 +357,29 @@ bool ChironTFT::readTFTCommand() {
|
||||
if (command_ready || command_len == MAX_CMND_LEN) {
|
||||
panel_command[command_len] = '\0';
|
||||
#if ACDEBUG(AC_ALL)
|
||||
DEBUG_ECHOLNPGM("len(",command_len,") < ", panel_command);
|
||||
SERIAL_ECHOLNPGM("len(",command_len,") < ", panel_command);
|
||||
#endif
|
||||
command_ready = true;
|
||||
}
|
||||
return command_ready;
|
||||
}
|
||||
|
||||
int8_t ChironTFT::findToken(char c) {
|
||||
int8_t ChironTFT::FindToken(char c) {
|
||||
for (int8_t pos = 0; pos < command_len; pos++) {
|
||||
if (panel_command[pos] == c) {
|
||||
#if ACDEBUG(AC_INFO)
|
||||
DEBUG_ECHOLNPGM("Tpos:", pos, " ", c);
|
||||
SERIAL_ECHOLNPGM("Tpos:", pos, " ", c);
|
||||
#endif
|
||||
return pos;
|
||||
}
|
||||
}
|
||||
#if ACDEBUG(AC_INFO)
|
||||
DEBUG_ECHOLNPGM("Not found: ", c);
|
||||
SERIAL_ECHOLNPGM("Not found: ", c);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
void ChironTFT::checkHeaters() {
|
||||
void ChironTFT::CheckHeaters() {
|
||||
uint8_t faultDuration = 0;
|
||||
|
||||
// if the hotend temp is abnormal, confirm state before signalling panel
|
||||
@@ -381,7 +387,7 @@ void ChironTFT::checkHeaters() {
|
||||
while (!WITHIN(temp, HEATER_0_MINTEMP, HEATER_0_MAXTEMP)) {
|
||||
faultDuration++;
|
||||
if (faultDuration >= AC_HEATER_FAULT_VALIDATION_TIME) {
|
||||
tftSendLn(AC_msg_nozzle_temp_abnormal);
|
||||
SendtoTFTLN(AC_msg_nozzle_temp_abnormal);
|
||||
last_error = AC_error_abnormal_temp_t0;
|
||||
SERIAL_ECHOLNPGM("Extruder temp abnormal! : ", temp);
|
||||
break;
|
||||
@@ -396,7 +402,7 @@ void ChironTFT::checkHeaters() {
|
||||
while (!WITHIN(temp, BED_MINTEMP, BED_MAXTEMP)) {
|
||||
faultDuration++;
|
||||
if (faultDuration >= AC_HEATER_FAULT_VALIDATION_TIME) {
|
||||
tftSendLn(AC_msg_nozzle_temp_abnormal);
|
||||
SendtoTFTLN(AC_msg_nozzle_temp_abnormal);
|
||||
last_error = AC_error_abnormal_temp_bed;
|
||||
SERIAL_ECHOLNPGM("Bed temp abnormal! : ", temp);
|
||||
break;
|
||||
@@ -408,7 +414,7 @@ void ChironTFT::checkHeaters() {
|
||||
// Update panel with hotend heater status
|
||||
if (hotend_state != AC_heater_temp_reached) {
|
||||
if (WITHIN(getActualTemp_celsius(E0) - getTargetTemp_celsius(E0), -(TEMP_WINDOW), TEMP_WINDOW)) {
|
||||
tftSendLn(AC_msg_nozzle_heating_done);
|
||||
SendtoTFTLN(AC_msg_nozzle_heating_done);
|
||||
hotend_state = AC_heater_temp_reached;
|
||||
}
|
||||
}
|
||||
@@ -416,84 +422,90 @@ void ChironTFT::checkHeaters() {
|
||||
// Update panel with bed heater status
|
||||
if (hotbed_state != AC_heater_temp_reached) {
|
||||
if (WITHIN(getActualTemp_celsius(BED) - getTargetTemp_celsius(BED), -(TEMP_BED_WINDOW), TEMP_BED_WINDOW)) {
|
||||
tftSendLn(AC_msg_bed_heating_done);
|
||||
SendtoTFTLN(AC_msg_bed_heating_done);
|
||||
hotbed_state = AC_heater_temp_reached;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ChironTFT::sendFileList(int8_t startindex) {
|
||||
void ChironTFT::SendFileList(int8_t startindex) {
|
||||
// Respond to panel request for 4 files starting at index
|
||||
#if ACDEBUG(AC_INFO)
|
||||
DEBUG_ECHOLNPGM("## sendFileList ## ", startindex);
|
||||
SERIAL_ECHOLNPGM("## SendFileList ## ", startindex);
|
||||
#endif
|
||||
tftSendLn(F("FN "));
|
||||
SendtoTFTLN(F("FN "));
|
||||
filenavigator.getFiles(startindex, panel_type, 4);
|
||||
tftSendLn(F("END"));
|
||||
SendtoTFTLN(F("END"));
|
||||
}
|
||||
|
||||
void ChironTFT::selectFile() {
|
||||
const size_t fnlen = command_len - 4 + (panel_type <= AC_panel_new);
|
||||
strlcpy(selectedfile, panel_command + 4, fnlen + 1);
|
||||
void ChironTFT::SelectFile() {
|
||||
if (panel_type <= AC_panel_new) {
|
||||
strncpy(selectedfile, panel_command + 4, command_len - 3);
|
||||
selectedfile[command_len - 4] = '\0';
|
||||
}
|
||||
else {
|
||||
strncpy(selectedfile, panel_command + 4, command_len - 4);
|
||||
selectedfile[command_len - 5] = '\0';
|
||||
}
|
||||
#if ACDEBUG(AC_FILE)
|
||||
DEBUG_ECHOLNPGM(" Selected File: ", selectedfile);
|
||||
SERIAL_ECHOLNPGM(" Selected File: ",selectedfile);
|
||||
#endif
|
||||
|
||||
switch (selectedfile[0]) {
|
||||
case '/': // Valid file selected
|
||||
tftSendLn(AC_msg_sd_file_open_success);
|
||||
SendtoTFTLN(AC_msg_sd_file_open_success);
|
||||
break;
|
||||
|
||||
case '<': // .. (go up folder level)
|
||||
filenavigator.upDIR();
|
||||
tftSendLn(AC_msg_sd_file_open_failed);
|
||||
sendFileList( 0 );
|
||||
SendtoTFTLN(AC_msg_sd_file_open_failed);
|
||||
SendFileList( 0 );
|
||||
break;
|
||||
default: // enter subfolder
|
||||
// For new panel remove the '.GCO' tag that was added to the end of the path
|
||||
if (panel_type <= AC_panel_new) selectedfile[fnlen - 4] = '\0';
|
||||
default: // enter sub folder
|
||||
// for new panel remove the '.GCO' tag that was added to the end of the path
|
||||
if (panel_type <= AC_panel_new)
|
||||
selectedfile[strlen(selectedfile) - 4] = '\0';
|
||||
filenavigator.changeDIR(selectedfile);
|
||||
tftSendLn(AC_msg_sd_file_open_failed);
|
||||
sendFileList( 0 );
|
||||
SendtoTFTLN(AC_msg_sd_file_open_failed);
|
||||
SendFileList( 0 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ChironTFT::processPanelRequest() {
|
||||
void ChironTFT::ProcessPanelRequest() {
|
||||
// Break these up into logical blocks // as its easier to navigate than one huge switch case!
|
||||
int8_t tpos = findToken('A');
|
||||
int8_t tpos = FindToken('A');
|
||||
// Panel request are 'A0' - 'A36'
|
||||
if (tpos >= 0) {
|
||||
const int8_t req = atoi(&panel_command[tpos + 1]);
|
||||
|
||||
// Information requests A0 - A8 and A33
|
||||
if (req <= 8 || req == 33) panelInfo(req);
|
||||
if (req <= 8 || req == 33) PanelInfo(req);
|
||||
|
||||
// Simple Actions A9 - A28
|
||||
else if (req <= 28) panelAction(req);
|
||||
else if (req <= 28) PanelAction(req);
|
||||
|
||||
// Process Initiation
|
||||
else if (req <= 36) panelProcess(req);
|
||||
else if (req <= 36) PanelProcess(req);
|
||||
}
|
||||
else {
|
||||
#if AUTO_DETECT_CHIRON_TFT
|
||||
// This may be a response to a panel type detection query
|
||||
if (panel_type == AC_panel_unknown) {
|
||||
tpos = findToken('S'); // old panel will respond to 'SIZE' with 'SXY 480 320'
|
||||
tpos = FindToken('S'); // old panel will respond to 'SIZE' with 'SXY 480 320'
|
||||
if (tpos >= 0) {
|
||||
if (panel_command[tpos + 1] == 'X' && panel_command[tpos + 2] =='Y') {
|
||||
panel_type = AC_panel_standard;
|
||||
SERIAL_ECHOLN(AC_msg_old_panel_detected);
|
||||
SERIAL_ECHOLNF(AC_msg_old_panel_detected);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// new panel will respond to 'J200' with '[0]=0'
|
||||
// it seems only after a power cycle so detection assumes a new panel
|
||||
tpos = findToken('[');
|
||||
tpos = FindToken('[');
|
||||
if (tpos >= 0) {
|
||||
if (panel_command[tpos + 1] == '0' && panel_command[tpos + 2] ==']') {
|
||||
panel_type = AC_panel_new;
|
||||
SERIAL_ECHOLN(AC_msg_new_panel_detected);
|
||||
SERIAL_ECHOLNF(AC_msg_new_panel_detected);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -501,94 +513,94 @@ void ChironTFT::processPanelRequest() {
|
||||
}
|
||||
#endif
|
||||
|
||||
tftSendLn(); // Ignore unknown requests
|
||||
SendtoTFTLN(); // Ignore unknown requests
|
||||
}
|
||||
}
|
||||
|
||||
void ChironTFT::panelInfo(uint8_t req) {
|
||||
void ChironTFT::PanelInfo(uint8_t req) {
|
||||
// information requests A0-A8 and A33
|
||||
switch (req) {
|
||||
case 0: // A0 Get HOTEND Temp
|
||||
tftSend(F("A0V "));
|
||||
SendtoTFT(F("A0V "));
|
||||
TFTSer.println(getActualTemp_celsius(E0));
|
||||
break;
|
||||
|
||||
case 1: // A1 Get HOTEND Target Temp
|
||||
tftSend(F("A1V "));
|
||||
SendtoTFT(F("A1V "));
|
||||
TFTSer.println(getTargetTemp_celsius(E0));
|
||||
break;
|
||||
|
||||
case 2: // A2 Get BED Temp
|
||||
tftSend(F("A2V "));
|
||||
SendtoTFT(F("A2V "));
|
||||
TFTSer.println(getActualTemp_celsius(BED));
|
||||
break;
|
||||
|
||||
case 3: // A3 Get BED Target Temp
|
||||
tftSend(F("A3V "));
|
||||
SendtoTFT(F("A3V "));
|
||||
TFTSer.println(getTargetTemp_celsius(BED));
|
||||
break;
|
||||
|
||||
case 4: // A4 Get FAN Speed
|
||||
tftSend(F("A4V "));
|
||||
SendtoTFT(F("A4V "));
|
||||
TFTSer.println(getActualFan_percent(FAN0));
|
||||
break;
|
||||
|
||||
case 5: // A5 Get Current Coordinates
|
||||
tftSend(F("A5V X: "));
|
||||
SendtoTFT(F("A5V X: "));
|
||||
TFTSer.print(getAxisPosition_mm(X));
|
||||
tftSend(F(" Y: "));
|
||||
SendtoTFT(F(" Y: "));
|
||||
TFTSer.print(getAxisPosition_mm(Y));
|
||||
tftSend(F(" Z: "));
|
||||
SendtoTFT(F(" Z: "));
|
||||
TFTSer.println(getAxisPosition_mm(Z));
|
||||
break;
|
||||
|
||||
case 6: // A6 Get printing progress
|
||||
if (isPrintingFromMedia()) {
|
||||
tftSend(F("A6V "));
|
||||
SendtoTFT(F("A6V "));
|
||||
TFTSer.println(ui8tostr2(getProgress_percent()));
|
||||
}
|
||||
else
|
||||
tftSendLn(F("A6V ---"));
|
||||
SendtoTFTLN(F("A6V ---"));
|
||||
break;
|
||||
|
||||
case 7: { // A7 Get Printing Time
|
||||
uint32_t time = getProgress_seconds_elapsed() / 60;
|
||||
tftSend(F("A7V "));
|
||||
SendtoTFT(F("A7V "));
|
||||
TFTSer.print(ui8tostr2(time / 60));
|
||||
tftSend(F(" H "));
|
||||
SendtoTFT(F(" H "));
|
||||
TFTSer.print(ui8tostr2(time % 60));
|
||||
tftSend(F(" M"));
|
||||
SendtoTFT(F(" M"));
|
||||
#if ACDEBUG(AC_ALL)
|
||||
DEBUG_ECHOLNPGM("Print time ", ui8tostr2(time / 60), ":", ui8tostr2(time % 60));
|
||||
SERIAL_ECHOLNPGM("Print time ", ui8tostr2(time / 60), ":", ui8tostr2(time % 60));
|
||||
#endif
|
||||
} break;
|
||||
|
||||
case 8: // A8 Get SD Card list A8 S0
|
||||
if (!isMediaInserted()) safe_delay(500);
|
||||
if (!isMediaInserted()) // Make sure the card is removed
|
||||
tftSendLn(AC_msg_no_sd_card);
|
||||
SendtoTFTLN(AC_msg_no_sd_card);
|
||||
else if (panel_command[3] == 'S')
|
||||
sendFileList( atoi( &panel_command[4] ) );
|
||||
SendFileList( atoi( &panel_command[4] ) );
|
||||
break;
|
||||
|
||||
case 33: // A33 Get firmware info
|
||||
tftSend(F("J33 "));
|
||||
SendtoTFT(F("J33 "));
|
||||
// If there is an error recorded, show that instead of the FW version
|
||||
if (!getLastError()) tftSendLn(F(SHORT_BUILD_VERSION));
|
||||
if (!GetLastError()) SendtoTFTLN(F(SHORT_BUILD_VERSION));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ChironTFT::panelAction(uint8_t req) {
|
||||
void ChironTFT::PanelAction(uint8_t req) {
|
||||
switch (req) {
|
||||
case 9: // A9 Pause SD print
|
||||
if (isPrintingFromMedia()) {
|
||||
tftSendLn(AC_msg_pause);
|
||||
SendtoTFTLN(AC_msg_pause);
|
||||
pausePrint();
|
||||
printer_state = AC_printer_pausing;
|
||||
}
|
||||
else
|
||||
tftSendLn(AC_msg_stop);
|
||||
SendtoTFTLN(AC_msg_stop);
|
||||
break;
|
||||
|
||||
case 10: // A10 Resume SD Print
|
||||
@@ -606,7 +618,7 @@ void ChironTFT::panelAction(uint8_t req) {
|
||||
else {
|
||||
if (printer_state == AC_printer_resuming_from_power_outage)
|
||||
injectCommands(F("M1000 C")); // Cancel recovery
|
||||
tftSendLn(AC_msg_stop);
|
||||
SendtoTFTLN(AC_msg_stop);
|
||||
printer_state = AC_printer_idle;
|
||||
}
|
||||
break;
|
||||
@@ -616,7 +628,7 @@ void ChironTFT::panelAction(uint8_t req) {
|
||||
break;
|
||||
|
||||
case 13: // A13 Select file
|
||||
selectFile();
|
||||
SelectFile();
|
||||
break;
|
||||
|
||||
case 14: // A14 Start Printing
|
||||
@@ -625,9 +637,11 @@ void ChironTFT::panelAction(uint8_t req) {
|
||||
injectCommands(F("M1000 C")); // Cancel recovery
|
||||
printer_state = AC_printer_idle;
|
||||
}
|
||||
DEBUG_ECHOLNPGM("Print: ", selectedfile);
|
||||
#if ACDebugLevel >= 1
|
||||
SERIAL_ECHOLNPGM("Print: ", selectedfile);
|
||||
#endif
|
||||
printFile(selectedfile);
|
||||
tftSendLn(AC_msg_print_from_sd_card);
|
||||
SendtoTFTLN(AC_msg_print_from_sd_card);
|
||||
break;
|
||||
|
||||
case 15: // A15 Resuming from outage
|
||||
@@ -662,7 +676,7 @@ void ChironTFT::panelAction(uint8_t req) {
|
||||
case 19: // A19 Motors off
|
||||
if (!isPrinting()) {
|
||||
stepper.disable_all_steppers();
|
||||
tftSendLn(AC_msg_ready);
|
||||
SendtoTFTLN(AC_msg_ready);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -670,7 +684,7 @@ void ChironTFT::panelAction(uint8_t req) {
|
||||
if (panel_command[4] == 'S')
|
||||
setFeedrate_percent(atoi(&panel_command[5]));
|
||||
else {
|
||||
tftSend(F("A20V "));
|
||||
SendtoTFT(F("A20V "));
|
||||
TFTSer.println(getFeedrate_percent());
|
||||
}
|
||||
break;
|
||||
@@ -698,7 +712,7 @@ void ChironTFT::panelAction(uint8_t req) {
|
||||
char MoveCmnd[30];
|
||||
sprintf_P(MoveCmnd, PSTR("G91\nG0%s\nG90"), panel_command + 3);
|
||||
#if ACDEBUG(AC_ACTION)
|
||||
DEBUG_ECHOLNPGM("Move: ", MoveCmnd);
|
||||
SERIAL_ECHOLNPGM("Move: ", MoveCmnd);
|
||||
#endif
|
||||
setSoftEndstopState(true); // enable endstops
|
||||
injectCommands(MoveCmnd);
|
||||
@@ -711,7 +725,7 @@ void ChironTFT::panelAction(uint8_t req) {
|
||||
// Temps defined in configuration.h
|
||||
setTargetTemp_celsius(PREHEAT_1_TEMP_BED, BED);
|
||||
setTargetTemp_celsius(PREHEAT_1_TEMP_HOTEND, E0);
|
||||
tftSendLn();
|
||||
SendtoTFTLN();
|
||||
hotbed_state = AC_heater_temp_set;
|
||||
hotend_state = AC_heater_temp_set;
|
||||
}
|
||||
@@ -722,7 +736,7 @@ void ChironTFT::panelAction(uint8_t req) {
|
||||
if (!isPrinting()) {
|
||||
setTargetTemp_celsius(PREHEAT_2_TEMP_BED, BED);
|
||||
setTargetTemp_celsius(PREHEAT_2_TEMP_HOTEND, E0);
|
||||
tftSendLn();
|
||||
SendtoTFTLN();
|
||||
hotbed_state = AC_heater_temp_set;
|
||||
hotend_state = AC_heater_temp_set;
|
||||
}
|
||||
@@ -733,7 +747,7 @@ void ChironTFT::panelAction(uint8_t req) {
|
||||
if (!isPrinting()) {
|
||||
setTargetTemp_celsius(0, E0);
|
||||
setTargetTemp_celsius(0, BED);
|
||||
tftSendLn(AC_msg_ready);
|
||||
SendtoTFTLN(AC_msg_ready);
|
||||
hotbed_state = AC_heater_off;
|
||||
hotend_state = AC_heater_off;
|
||||
}
|
||||
@@ -752,21 +766,21 @@ void ChironTFT::panelAction(uint8_t req) {
|
||||
case 28: // A28 Filament set A28 O/C
|
||||
// Ignore request if printing
|
||||
if (isPrinting()) break;
|
||||
tftSendLn();
|
||||
SendtoTFTLN();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ChironTFT::panelProcess(uint8_t req) {
|
||||
void ChironTFT::PanelProcess(uint8_t req) {
|
||||
switch (req) {
|
||||
case 29: { // A29 Read Mesh Point A29 X1 Y1
|
||||
xy_uint8_t pos;
|
||||
float pos_z;
|
||||
pos.x = atoi(&panel_command[findToken('X')+1]);
|
||||
pos.y = atoi(&panel_command[findToken('Y')+1]);
|
||||
pos.x = atoi(&panel_command[FindToken('X')+1]);
|
||||
pos.y = atoi(&panel_command[FindToken('Y')+1]);
|
||||
pos_z = getMeshPoint(pos);
|
||||
|
||||
tftSend(F("A29V "));
|
||||
SendtoTFT(F("A29V "));
|
||||
TFTSer.println(pos_z * 100);
|
||||
if (!isPrinting()) {
|
||||
setSoftEndstopState(true); // disable endstops
|
||||
@@ -777,7 +791,7 @@ void ChironTFT::panelProcess(uint8_t req) {
|
||||
|
||||
if (isPositionKnown()) {
|
||||
#if ACDEBUG(AC_INFO)
|
||||
DEBUG_ECHOLNPGM("Moving to mesh point at x: ", pos.x, " y: ", pos.y, " z: ", pos_z);
|
||||
SERIAL_ECHOLNPGM("Moving to mesh point at x: ", pos.x, " y: ", pos.y, " z: ", pos_z);
|
||||
#endif
|
||||
// Go up before moving
|
||||
setAxisPosition_mm(3.0,Z);
|
||||
@@ -786,7 +800,7 @@ void ChironTFT::panelProcess(uint8_t req) {
|
||||
setAxisPosition_mm(20 + (93 * pos.y), Y);
|
||||
setAxisPosition_mm(0.0, Z);
|
||||
#if ACDEBUG(AC_INFO)
|
||||
DEBUG_ECHOLNPGM("Current Z: ", getAxisPosition_mm(Z));
|
||||
SERIAL_ECHOLNPGM("Current Z: ", getAxisPosition_mm(Z));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -796,42 +810,42 @@ void ChironTFT::panelProcess(uint8_t req) {
|
||||
} break;
|
||||
|
||||
case 30: // A30 Auto leveling
|
||||
if (findToken('S') >= 0) { // Start probing New panel adds spaces..
|
||||
if (FindToken('S') >= 0) { // Start probing New panel adds spaces..
|
||||
// Ignore request if printing
|
||||
if (isPrinting())
|
||||
tftSendLn(AC_msg_probing_not_allowed); // forbid auto leveling
|
||||
SendtoTFTLN(AC_msg_probing_not_allowed); // forbid auto leveling
|
||||
else {
|
||||
tftSendLn(AC_msg_start_probing);
|
||||
SendtoTFTLN(AC_msg_start_probing);
|
||||
injectCommands(F("G28\nG29"));
|
||||
printer_state = AC_printer_probing;
|
||||
}
|
||||
}
|
||||
else
|
||||
tftSendLn(AC_msg_start_probing); // Just enter levelling menu
|
||||
SendtoTFTLN(AC_msg_start_probing); // Just enter levelling menu
|
||||
break;
|
||||
|
||||
case 31: // A31 Adjust all Probe Points
|
||||
// The tokens can occur in different places on the new panel so we need to find it.
|
||||
|
||||
if (findToken('C') >= 0) { // Restore and apply original offsets
|
||||
if (FindToken('C') >= 0) { // Restore and apply original offsets
|
||||
if (!isPrinting()) {
|
||||
injectCommands(F("M501\nM420 S1"));
|
||||
selectedmeshpoint.x = selectedmeshpoint.y = 99;
|
||||
SERIAL_ECHOLN(AC_msg_mesh_changes_abandoned);
|
||||
SERIAL_ECHOLNF(AC_msg_mesh_changes_abandoned);
|
||||
}
|
||||
}
|
||||
|
||||
else if (findToken('D') >= 0) { // Save Z Offset tables and restore leveling state
|
||||
else if (FindToken('D') >= 0) { // Save Z Offset tables and restore leveling state
|
||||
if (!isPrinting()) {
|
||||
setAxisPosition_mm(1.0,Z); // Lift nozzle before any further movements are made
|
||||
injectCommands(F("M500"));
|
||||
SERIAL_ECHOLN(AC_msg_mesh_changes_saved);
|
||||
SERIAL_ECHOLNF(AC_msg_mesh_changes_saved);
|
||||
selectedmeshpoint.x = selectedmeshpoint.y = 99;
|
||||
}
|
||||
}
|
||||
|
||||
else if (findToken('G') >= 0) { // Get current offset
|
||||
tftSend(F("A31V "));
|
||||
else if (FindToken('G') >= 0) { // Get current offset
|
||||
SendtoTFT(F("A31V "));
|
||||
// When printing use the live z Offset position
|
||||
// we will use babystepping to move the print head
|
||||
if (isPrinting())
|
||||
@@ -843,7 +857,7 @@ void ChironTFT::panelProcess(uint8_t req) {
|
||||
}
|
||||
|
||||
else {
|
||||
int8_t tokenpos = findToken('S');
|
||||
int8_t tokenpos = FindToken('S');
|
||||
if (tokenpos >= 0) { // Set offset (adjusts all points by value)
|
||||
float Zshift = atof(&panel_command[tokenpos+1]);
|
||||
setSoftEndstopState(false); // disable endstops
|
||||
@@ -851,22 +865,22 @@ void ChironTFT::panelProcess(uint8_t req) {
|
||||
// From the leveling panel use the all points UI to adjust the print pos.
|
||||
if (isPrinting()) {
|
||||
#if ACDEBUG(AC_INFO)
|
||||
DEBUG_ECHOLNPGM("Change Zoffset from:", live_Zoffset, " to ", live_Zoffset + Zshift);
|
||||
SERIAL_ECHOLNPGM("Change Zoffset from:", live_Zoffset, " to ", live_Zoffset + Zshift);
|
||||
#endif
|
||||
if (isAxisPositionKnown(Z)) {
|
||||
#if ACDEBUG(AC_INFO)
|
||||
const float currZpos = getAxisPosition_mm(Z);
|
||||
DEBUG_ECHOLNPGM("Nudge Z pos from ", currZpos, " to ", currZpos + constrain(Zshift, -0.05, 0.05));
|
||||
SERIAL_ECHOLNPGM("Nudge Z pos from ", currZpos, " to ", currZpos + constrain(Zshift, -0.05, 0.05));
|
||||
#endif
|
||||
// Use babystepping to adjust the head position
|
||||
int16_t steps = mmToWholeSteps(constrain(Zshift,-0.05,0.05), Z);
|
||||
#if ACDEBUG(AC_INFO)
|
||||
DEBUG_ECHOLNPGM("Steps to move Z: ", steps);
|
||||
SERIAL_ECHOLNPGM("Steps to move Z: ", steps);
|
||||
#endif
|
||||
babystepAxis_steps(steps, Z);
|
||||
live_Zoffset += Zshift;
|
||||
}
|
||||
tftSend(F("A31V "));
|
||||
SendtoTFT(F("A31V "));
|
||||
TFTSer.println(live_Zoffset);
|
||||
}
|
||||
else {
|
||||
@@ -875,23 +889,23 @@ void ChironTFT::panelProcess(uint8_t req) {
|
||||
const float currval = getMeshPoint(pos);
|
||||
setMeshPoint(pos, constrain(currval + Zshift, AC_LOWEST_MESHPOINT_VAL, 2));
|
||||
#if ACDEBUG(AC_INFO)
|
||||
DEBUG_ECHOLNPGM("Change mesh point X", x," Y",y ," from ", currval, " to ", getMeshPoint(pos) );
|
||||
SERIAL_ECHOLNPGM("Change mesh point X", x," Y",y ," from ", currval, " to ", getMeshPoint(pos) );
|
||||
#endif
|
||||
}
|
||||
const float currZOffset = getZOffset_mm();
|
||||
#if ACDEBUG(AC_INFO)
|
||||
DEBUG_ECHOLNPGM("Change probe offset from ", currZOffset, " to ", currZOffset + Zshift);
|
||||
SERIAL_ECHOLNPGM("Change probe offset from ", currZOffset, " to ", currZOffset + Zshift);
|
||||
#endif
|
||||
|
||||
setZOffset_mm(currZOffset + Zshift);
|
||||
tftSend(F("A31V "));
|
||||
SendtoTFT(F("A31V "));
|
||||
TFTSer.println(getZOffset_mm());
|
||||
|
||||
if (isAxisPositionKnown(Z)) {
|
||||
// Move Z axis
|
||||
const float currZpos = getAxisPosition_mm(Z);
|
||||
#if ACDEBUG(AC_INFO)
|
||||
DEBUG_ECHOLNPGM("Move Z pos from ", currZpos, " to ", currZpos + constrain(Zshift, -0.05, 0.05));
|
||||
SERIAL_ECHOLNPGM("Move Z pos from ", currZpos, " to ", currZpos + constrain(Zshift, -0.05, 0.05));
|
||||
#endif
|
||||
setAxisPosition_mm(currZpos+constrain(Zshift,-0.05,0.05),Z);
|
||||
}
|
||||
@@ -907,7 +921,7 @@ void ChironTFT::panelProcess(uint8_t req) {
|
||||
//TFTSer.println();
|
||||
break;
|
||||
|
||||
// A33 firmware info request see panelInfo()
|
||||
// A33 firmware info request see PanelInfo()
|
||||
|
||||
case 34: // A34 Adjust single mesh point A34 C/S X1 Y1 V123
|
||||
if (panel_command[3] == 'C') { // Restore original offsets
|
||||
@@ -923,8 +937,8 @@ void ChironTFT::panelProcess(uint8_t req) {
|
||||
float currmesh = getMeshPoint(pos);
|
||||
float newval = atof(&panel_command[11])/100;
|
||||
#if ACDEBUG(AC_INFO)
|
||||
DEBUG_ECHOLNPGM("Change mesh point x:", pos.x, " y:", pos.y);
|
||||
DEBUG_ECHOLNPGM("from ", currmesh, " to ", newval);
|
||||
SERIAL_ECHOLNPGM("Change mesh point x:", pos.x, " y:", pos.y);
|
||||
SERIAL_ECHOLNPGM("from ", currmesh, " to ", newval);
|
||||
#endif
|
||||
// Update Meshpoint
|
||||
setMeshPoint(pos,newval);
|
||||
@@ -935,7 +949,7 @@ void ChironTFT::panelProcess(uint8_t req) {
|
||||
setSoftEndstopState(false);
|
||||
float currZpos = getAxisPosition_mm(Z);
|
||||
#if ACDEBUG(AC_INFO)
|
||||
DEBUG_ECHOLNPGM("Move Z pos from ", currZpos, " to ", currZpos + constrain(newval - currmesh, -0.05, 0.05));
|
||||
SERIAL_ECHOLNPGM("Move Z pos from ", currZpos, " to ", currZpos + constrain(newval - currmesh, -0.05, 0.05));
|
||||
#endif
|
||||
setAxisPosition_mm(currZpos + constrain(newval - currmesh, -0.05, 0.05), Z);
|
||||
}
|
||||
@@ -944,19 +958,19 @@ void ChironTFT::panelProcess(uint8_t req) {
|
||||
break;
|
||||
|
||||
case 36: // A36 Auto leveling for new TFT bet that was a typo in the panel code!
|
||||
tftSendLn(AC_msg_start_probing);
|
||||
SendtoTFTLN(AC_msg_start_probing);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool ChironTFT::getLastError() {
|
||||
bool ChironTFT::GetLastError() {
|
||||
switch (last_error) {
|
||||
case AC_error_abnormal_temp_bed: tftSendLn(AC_msg_error_bed_temp); break;
|
||||
case AC_error_abnormal_temp_t0: tftSendLn(AC_msg_error_hotend_temp); break;
|
||||
case AC_error_noSD: tftSendLn(AC_msg_error_sd_card); break;
|
||||
case AC_error_powerloss: tftSendLn(AC_msg_power_loss); break;
|
||||
case AC_error_EEPROM: tftSendLn(AC_msg_eeprom_version); break;
|
||||
case AC_error_filament_runout: tftSendLn(AC_msg_filament_out); break;
|
||||
case AC_error_abnormal_temp_bed: SendtoTFTLN(AC_msg_error_bed_temp); break;
|
||||
case AC_error_abnormal_temp_t0: SendtoTFTLN(AC_msg_error_hotend_temp); break;
|
||||
case AC_error_noSD: SendtoTFTLN(AC_msg_error_sd_card); break;
|
||||
case AC_error_powerloss: SendtoTFTLN(AC_msg_power_loss); break;
|
||||
case AC_error_EEPROM: SendtoTFTLN(AC_msg_eeprom_version); break;
|
||||
case AC_error_filament_runout: SendtoTFTLN(AC_msg_filament_out); break;
|
||||
default: return false;
|
||||
}
|
||||
last_error = AC_error_none;
|
||||
|
||||
@@ -34,14 +34,13 @@ void FilamentRunoutScreen::onRedraw(draw_mode_t what) {
|
||||
w.heading( GET_TEXT_F(MSG_FILAMENT));
|
||||
w.toggle( 2, GET_TEXT_F(MSG_RUNOUT_SENSOR), getFilamentRunoutEnabled());
|
||||
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
w.heading(GET_TEXT_F(MSG_RUNOUT_DISTANCE_MM));
|
||||
w.units(GET_TEXT_F(MSG_UNITS_MM));
|
||||
w.precision(0);
|
||||
w.color(e_axis);
|
||||
w.adjuster( 10, FPSTR(NUL_STR), getFilamentRunoutDistance_mm(), getFilamentRunoutEnabled());
|
||||
w.increments();
|
||||
#endif
|
||||
w.heading(GET_TEXT_F(MSG_RUNOUT_DISTANCE_MM));
|
||||
w.units(GET_TEXT_F(MSG_UNITS_MM));
|
||||
w.precision(0);
|
||||
w.color(e_axis);
|
||||
w.adjuster( 10, FPSTR(NUL_STR), getFilamentRunoutDistance_mm(), getFilamentRunoutEnabled());
|
||||
w.increments();
|
||||
|
||||
}
|
||||
|
||||
bool FilamentRunoutScreen::onTouchHeld(uint8_t tag) {
|
||||
@@ -51,10 +50,8 @@ bool FilamentRunoutScreen::onTouchHeld(uint8_t tag) {
|
||||
#endif
|
||||
switch (tag) {
|
||||
case 2: setFilamentRunoutEnabled(!getFilamentRunoutEnabled()); break;
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
case 10: UI_DECREMENT(FilamentRunoutDistance_mm); break;
|
||||
case 11: UI_INCREMENT(FilamentRunoutDistance_mm); break;
|
||||
#endif
|
||||
case 10: UI_DECREMENT(FilamentRunoutDistance_mm); break;
|
||||
case 11: UI_INCREMENT(FilamentRunoutDistance_mm); break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -722,15 +722,12 @@ namespace ExtUI {
|
||||
}
|
||||
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
bool getFilamentRunoutEnabled() { return runout.enabled; }
|
||||
void setFilamentRunoutEnabled(const bool value) { runout.enabled = value; }
|
||||
bool getFilamentRunoutEnabled(const extruder_t extruder/*=E0*/) { return runout.enabled[extruder]; }
|
||||
void setFilamentRunoutEnabled(const bool value, const extruder_t extruder/*=E0*/) { runout.enabled[extruder] = value; }
|
||||
bool getFilamentRunoutState() { return runout.filament_ran_out; }
|
||||
void setFilamentRunoutState(const bool value) { runout.filament_ran_out = value; }
|
||||
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
float getFilamentRunoutDistance_mm() { return runout.runout_distance(); }
|
||||
void setFilamentRunoutDistance_mm(const_float_t value) { runout.set_runout_distance(constrain(value, 0, 999)); }
|
||||
#endif
|
||||
float getFilamentRunoutDistance_mm() { return runout.runout_distance(); }
|
||||
void setFilamentRunoutDistance_mm(const_float_t value) { runout.set_runout_distance(constrain(value, 0, 999)); }
|
||||
#endif
|
||||
|
||||
#if ENABLED(CASE_LIGHT_ENABLE)
|
||||
|
||||
@@ -385,15 +385,12 @@ namespace ExtUI {
|
||||
|
||||
// Filament Runout Sensor
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
bool getFilamentRunoutEnabled();
|
||||
void setFilamentRunoutEnabled(const bool);
|
||||
bool getFilamentRunoutEnabled(const extruder_t extruder=E0);
|
||||
void setFilamentRunoutEnabled(const bool, const extruder_t extruder=E0);
|
||||
bool getFilamentRunoutState();
|
||||
void setFilamentRunoutState(const bool);
|
||||
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
float getFilamentRunoutDistance_mm();
|
||||
void setFilamentRunoutDistance_mm(const_float_t);
|
||||
#endif
|
||||
float getFilamentRunoutDistance_mm();
|
||||
void setFilamentRunoutDistance_mm(const_float_t);
|
||||
#endif
|
||||
|
||||
// Case Light Control
|
||||
|
||||
@@ -719,6 +719,11 @@ namespace LanguageNarrow_en {
|
||||
LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Nozzle: ");
|
||||
LSTR MSG_RUNOUT_SENSOR = _UxGT("Runout Sensor");
|
||||
LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("Runout Dist mm");
|
||||
LSTR MSG_RUNOUT_MODE = _UxGT("Runout Mode");
|
||||
LSTR MSG_RUNOUT_MODE_HIGH = _UxGT("Sensor High");
|
||||
LSTR MSG_RUNOUT_MODE_LOW = _UxGT("Sensor Low");
|
||||
LSTR MSG_RUNOUT_MODE_MOTION = _UxGT("Motion Encoder");
|
||||
LSTR MSG_RUNOUT_MODE_NONE = _UxGT("No Sensor");
|
||||
LSTR MSG_RUNOUT_ENABLE = _UxGT("Enable Runout");
|
||||
LSTR MSG_RUNOUT_ACTIVE = _UxGT("Runout Active");
|
||||
LSTR MSG_INVERT_EXTRUDER = _UxGT("Invert Extruder");
|
||||
|
||||
@@ -1668,7 +1668,7 @@ void MarlinUI::host_notify(const char * const cstr) {
|
||||
card.abortFilePrintSoon();
|
||||
else if (card.isMounted())
|
||||
card.closefile();
|
||||
#endif
|
||||
#endif
|
||||
#ifdef ACTION_ON_CANCEL
|
||||
hostui.cancel();
|
||||
#endif
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include "../../module/temperature.h"
|
||||
#endif
|
||||
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
#include "../../feature/runout.h"
|
||||
#endif
|
||||
|
||||
@@ -99,6 +99,54 @@ void menu_backlash();
|
||||
|
||||
#endif
|
||||
|
||||
#if HAS_FILAMENT_SENSOR && DISABLED(SLIM_LCD_MENUS)
|
||||
|
||||
void set_runout_mode_none(const uint8_t e) { runout.mode[e] = RM_NONE; runout.setup(); }
|
||||
void set_runout_mode_high(const uint8_t e) { runout.mode[e] = RM_OUT_ON_HIGH; runout.setup(); }
|
||||
void set_runout_mode_low(const uint8_t e) { runout.mode[e] = RM_OUT_ON_LOW; runout.setup(); }
|
||||
void set_runout_mode_motion(const uint8_t e) { runout.mode[e] = RM_MOTION_SENSOR; runout.setup(); }
|
||||
|
||||
#define RUNOUT_EDIT_ITEMS(F) do{ \
|
||||
EDIT_ITEM(bool, MSG_RUNOUT_SENSOR, &runout.enabled[F]); \
|
||||
ACTION_ITEM(MSG_RUNOUT_MODE_NONE, []{ set_runout_mode_none(F); }); \
|
||||
ACTION_ITEM(MSG_RUNOUT_MODE_HIGH, []{ set_runout_mode_high(F); }); \
|
||||
ACTION_ITEM(MSG_RUNOUT_MODE_LOW, []{ set_runout_mode_low(F); }); \
|
||||
ACTION_ITEM(MSG_RUNOUT_MODE_MOTION, []{ set_runout_mode_motion(F); }); \
|
||||
editable.decimal = runout.runout_distance(F); \
|
||||
EDIT_ITEM_FAST(float3, MSG_RUNOUT_DISTANCE_MM, &editable.decimal, 1, 999, \
|
||||
[]{ runout.set_runout_distance(editable.decimal, F); }, true \
|
||||
); \
|
||||
}while(0)
|
||||
|
||||
void menu_runout_config() {
|
||||
START_MENU();
|
||||
BACK_ITEM(MSG_CONFIGURATION);
|
||||
RUNOUT_EDIT_ITEMS(0);
|
||||
#if NUM_RUNOUT_SENSORS > 1
|
||||
RUNOUT_EDIT_ITEMS(1);
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS > 2
|
||||
RUNOUT_EDIT_ITEMS(2);
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS > 3
|
||||
RUNOUT_EDIT_ITEMS(3);
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS > 4
|
||||
RUNOUT_EDIT_ITEMS(4);
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS > 5
|
||||
RUNOUT_EDIT_ITEMS(5);
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS > 6
|
||||
RUNOUT_EDIT_ITEMS(6);
|
||||
#endif
|
||||
#if NUM_RUNOUT_SENSORS > 7
|
||||
RUNOUT_EDIT_ITEMS(7);
|
||||
#endif
|
||||
END_MENU();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if DISABLED(NO_VOLUMETRICS) || ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
//
|
||||
// Advanced Settings > Filament
|
||||
@@ -152,11 +200,8 @@ void menu_backlash();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
editable.decimal = runout.runout_distance();
|
||||
EDIT_ITEM_FAST(float3, MSG_RUNOUT_DISTANCE_MM, &editable.decimal, 1, 999,
|
||||
[]{ runout.set_runout_distance(editable.decimal); }, true
|
||||
);
|
||||
#if HAS_FILAMENT_SENSOR && DISABLED(SLIM_LCD_MENUS)
|
||||
SUBMENU(MSG_RUNOUT_MODE, menu_runout_config);
|
||||
#endif
|
||||
|
||||
END_MENU();
|
||||
|
||||
@@ -634,7 +634,7 @@ void menu_configuration() {
|
||||
#endif
|
||||
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
EDIT_ITEM(bool, MSG_RUNOUT_SENSOR, &runout.enabled, runout.reset);
|
||||
EDIT_ITEM(bool, MSG_RUNOUT_SENSOR, &runout.enabled[active_extruder], runout.reset);
|
||||
#endif
|
||||
|
||||
#if HAS_FANCHECK
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ALL(HAS_MARLINUI_MENU, ADVANCED_PAUSE_FEATURE)
|
||||
#if BOTH(HAS_MARLINUI_MENU, ADVANCED_PAUSE_FEATURE)
|
||||
|
||||
#include "menu_item.h"
|
||||
#include "../../module/temperature.h"
|
||||
@@ -96,7 +96,7 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
|
||||
if (LCD_HEIGHT >= 4) STATIC_ITEM_F(change_filament_header(mode), SS_DEFAULT|SS_INVERT);
|
||||
BACK_ITEM(MSG_BACK);
|
||||
#if HAS_PREHEAT
|
||||
for (uint8_t m = 0; m < PREHEAT_COUNT; ++m)
|
||||
LOOP_L_N(m, PREHEAT_COUNT)
|
||||
ACTION_ITEM_N_f(m, ui.get_preheat_label(m), MSG_PREHEAT_M, _change_filament_with_preset);
|
||||
#endif
|
||||
EDIT_ITEM_FAST_N(int3, extruder, MSG_PREHEAT_CUSTOM, &thermalManager.temp_hotend[extruder].target,
|
||||
@@ -130,7 +130,7 @@ void menu_change_filament() {
|
||||
#endif
|
||||
|
||||
START_MENU();
|
||||
BACK_ITEM(MSG_MAIN_MENU);
|
||||
BACK_ITEM(MSG_MAIN);
|
||||
|
||||
// Change filament
|
||||
#if E_STEPPERS == 1
|
||||
@@ -141,7 +141,7 @@ void menu_change_filament() {
|
||||
GCODES_ITEM_F(fmsg, F("M600 B0"));
|
||||
#else
|
||||
FSTR_P const fmsg = GET_TEXT_F(MSG_FILAMENTCHANGE_E);
|
||||
for (uint8_t s = 0; s < E_STEPPERS; ++s) {
|
||||
LOOP_L_N(s, E_STEPPERS) {
|
||||
if (thermalManager.targetTooColdToExtrude(s))
|
||||
SUBMENU_N_F(s, fmsg, []{ _menu_temp_filament_op(PAUSE_MODE_CHANGE_FILAMENT, MenuItemBase::itemIndex); });
|
||||
else {
|
||||
@@ -166,7 +166,7 @@ void menu_change_filament() {
|
||||
GCODES_ITEM_F(msg_load, F("M701"));
|
||||
#else
|
||||
FSTR_P const msg_load = GET_TEXT_F(MSG_FILAMENTLOAD_E);
|
||||
for (uint8_t s = 0; s < E_STEPPERS; ++s) {
|
||||
LOOP_L_N(s, E_STEPPERS) {
|
||||
if (thermalManager.targetTooColdToExtrude(s))
|
||||
SUBMENU_N_F(s, msg_load, []{ _menu_temp_filament_op(PAUSE_MODE_LOAD_FILAMENT, MenuItemBase::itemIndex); });
|
||||
else {
|
||||
@@ -194,7 +194,7 @@ void menu_change_filament() {
|
||||
GCODES_ITEM(MSG_FILAMENTUNLOAD_ALL, F("M702"));
|
||||
#endif
|
||||
FSTR_P const msg_unload = GET_TEXT_F(MSG_FILAMENTUNLOAD_E);
|
||||
for (uint8_t s = 0; s < E_STEPPERS; ++s) {
|
||||
LOOP_L_N(s, E_STEPPERS) {
|
||||
if (thermalManager.targetTooColdToExtrude(s))
|
||||
SUBMENU_N_F(s, msg_unload, []{ _menu_temp_filament_op(PAUSE_MODE_UNLOAD_FILAMENT, MenuItemBase::itemIndex); });
|
||||
else {
|
||||
@@ -250,12 +250,6 @@ static FSTR_P pause_header() {
|
||||
}while(0)
|
||||
|
||||
void menu_pause_option() {
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
const bool still_out = runout.filament_ran_out;
|
||||
#else
|
||||
constexpr bool still_out = false;
|
||||
#endif
|
||||
|
||||
START_MENU();
|
||||
#if LCD_HEIGHT > 2
|
||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_OPTION_HEADER);
|
||||
@@ -263,8 +257,11 @@ void menu_pause_option() {
|
||||
ACTION_ITEM(MSG_FILAMENT_CHANGE_OPTION_PURGE, []{ pause_menu_response = PAUSE_RESPONSE_EXTRUDE_MORE; });
|
||||
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
const bool still_out = runout.filament_ran_out;
|
||||
if (still_out)
|
||||
EDIT_ITEM(bool, MSG_RUNOUT_SENSOR, &runout.enabled, runout.reset);
|
||||
EDIT_ITEM(bool, MSG_RUNOUT_SENSOR, &runout.enabled[active_extruder], runout.reset);
|
||||
#else
|
||||
constexpr bool still_out = false;
|
||||
#endif
|
||||
|
||||
if (!still_out)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#define COLOR(color) RGB(((color >> 16) & 0xFF), ((color >> 8) & 0xFF), (color & 0xFF))
|
||||
#define HALF(color) RGB(RED(color) >> 1, GREEN(color) >> 1, BLUE(color) >> 1)
|
||||
|
||||
// RGB565 color picker: https://embeddednotepad.com/page/rgb565-color-picker
|
||||
// RGB565 color picker: https://rgbcolorpicker.com/565
|
||||
// Hex code to color name: https://www.color-name.com/
|
||||
|
||||
#define COLOR_BLACK 0x0000 // #000000
|
||||
|
||||
+795
-497
File diff suppressed because it is too large
Load Diff
+298
-644
File diff suppressed because it is too large
Load Diff
@@ -122,7 +122,7 @@ Stepper stepper; // Singleton
|
||||
#include "../feature/mixing.h"
|
||||
#endif
|
||||
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
#include "../feature/runout.h"
|
||||
#endif
|
||||
|
||||
@@ -2292,7 +2292,7 @@ hal_timer_t Stepper::block_phase_isr() {
|
||||
PAGE_SEGMENT_UPDATE_POS(E);
|
||||
}
|
||||
#endif
|
||||
TERN_(HAS_FILAMENT_RUNOUT_DISTANCE, runout.block_completed(current_block));
|
||||
TERN_(HAS_FILAMENT_SENSOR, runout.block_completed(current_block));
|
||||
discard_current_block();
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -4419,7 +4419,6 @@ void Temperature::isr() {
|
||||
#if ENABLED(AUTO_REPORT_TEMPERATURES)
|
||||
AutoReporter<Temperature::AutoReportTemp> Temperature::auto_reporter;
|
||||
void Temperature::AutoReportTemp::report() {
|
||||
if (wait_for_heatup) return;
|
||||
print_heater_states(active_extruder OPTARG(HAS_TEMP_REDUNDANT, ENABLED(AUTO_REPORT_REDUNDANT)));
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
||||
@@ -69,7 +69,13 @@
|
||||
#endif
|
||||
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
#define BOARD_ST7920_DELAY_1 125
|
||||
#define BOARD_ST7920_DELAY_2 125
|
||||
#define BOARD_ST7920_DELAY_3 125
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 125
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 125
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 125
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -182,7 +182,14 @@
|
||||
#endif
|
||||
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
#define BOARD_ST7920_DELAY_1 125
|
||||
#define BOARD_ST7920_DELAY_2 125
|
||||
#define BOARD_ST7920_DELAY_3 125
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 125
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_2
|
||||
#define BOARD_ST7920_DELAY_2 125
|
||||
#endif
|
||||
#ifndef BOARD_ST7920_DELAY_3
|
||||
#define BOARD_ST7920_DELAY_3 125
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -12,8 +12,10 @@ opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 SERIAL_PORT -1 \
|
||||
# Not necessary to enable auto-fan for all extruders to hit problematic code paths
|
||||
opt_set E0_AUTO_FAN_PIN PC10 E1_AUTO_FAN_PIN PC11 E2_AUTO_FAN_PIN PC12 NEOPIXEL_PIN PF13 \
|
||||
X_DRIVER_TYPE TMC2208 Y_DRIVER_TYPE TMC2130 \
|
||||
NUM_RUNOUT_SENSORS 8 FIL_RUNOUT_PIN 3 FIL_RUNOUT2_PIN 4 FIL_RUNOUT3_PIN 5 FIL_RUNOUT4_PIN 6 FIL_RUNOUT5_PIN 7 \
|
||||
FIL_RUNOUT6_PIN 8 FIL_RUNOUT7_PIN 9 FIL_RUNOUT8_PIN 10 FIL_RUNOUT4_STATE HIGH FIL_RUNOUT8_STATE HIGH \
|
||||
FIL_RUNOUT_ENABLED '{ true, true, true, true, true, true, true, true }' \
|
||||
FIL_RUNOUT_MODE '{ 1, 1, 1, 1, 1, 1, 1, 1 }' \
|
||||
FIL_RUNOUT_DISTANCE_MM '{ 0, 1, 5, 10, 5, 5, 5, 5 }' \
|
||||
FIL_RUNOUT_PIN 3 FIL_RUNOUT2_PIN 4 FIL_RUNOUT3_PIN 5 FIL_RUNOUT4_PIN 6 FIL_RUNOUT5_PIN 7 FIL_RUNOUT6_PIN 8 FIL_RUNOUT7_PIN 9 FIL_RUNOUT8_PIN 10 \
|
||||
FILAMENT_RUNOUT_SCRIPT '"M600 T%c"'
|
||||
opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER BLTOUCH NEOPIXEL_LED Z_SAFE_HOMING NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE \
|
||||
FILAMENT_RUNOUT_SENSOR FIL_RUNOUT4_PULLUP FIL_RUNOUT8_PULLUP FILAMENT_CHANGE_RESUME_ON_INSERT PAUSE_REHEAT_FAST_RESUME \
|
||||
|
||||
@@ -16,7 +16,7 @@ opt_enable SDSUPPORT USB_FLASH_DRIVE_SUPPORT USE_OTG_USB_HOST \
|
||||
opt_set E0_AUTO_FAN_PIN PC10 E1_AUTO_FAN_PIN PC11 E2_AUTO_FAN_PIN PC12 NEOPIXEL_PIN PF13 \
|
||||
X_DRIVER_TYPE TMC2208 Y_DRIVER_TYPE TMC2130 \
|
||||
FIL_RUNOUT_PIN 3 FIL_RUNOUT2_PIN 4 FIL_RUNOUT3_PIN 5 FIL_RUNOUT4_PIN 6 FIL_RUNOUT5_PIN 7 FIL_RUNOUT6_PIN 8 FIL_RUNOUT7_PIN 9 FIL_RUNOUT8_PIN 10 \
|
||||
FIL_RUNOUT4_STATE HIGH FIL_RUNOUT8_STATE HIGH
|
||||
FIL_RUNOUT_MODE '{ 2, 2, 2, 1, 2, 2, 2, 1 }' FIL_RUNOUT_DISTANCE_MM '{ 0, 1, 5, 10, 5, 5, 5, 5 }'
|
||||
opt_enable FIL_RUNOUT4_PULLUP FIL_RUNOUT8_PULLUP
|
||||
exec_test $1 $2 "GTT GTR | OTG USB Flash Drive | 8 Extruders | Auto-Fan | Mixed TMC Drivers | Runout Sensors (distinct)" "$3"
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ opt_enable S_CURVE_ACCELERATION EEPROM_SETTINGS GCODE_MACROS \
|
||||
EEPROM_SETTINGS SDSUPPORT BINARY_FILE_TRANSFER \
|
||||
BLINKM PCA9533 PCA9632 RGB_LED RGB_LED_R_PIN RGB_LED_G_PIN RGB_LED_B_PIN \
|
||||
NEOPIXEL_LED NEOPIXEL_PIN CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CASE_LIGHT_USE_RGB_LED CASE_LIGHT_MENU \
|
||||
NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE FILAMENT_RUNOUT_DISTANCE_MM FILAMENT_RUNOUT_SENSOR \
|
||||
NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE FILAMENT_RUNOUT_SENSOR FIL_RUNOUT_DISTANCE_MM \
|
||||
AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \
|
||||
SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE CALIBRATION_GCODE \
|
||||
BACKLASH_COMPENSATION BACKLASH_GCODE BAUD_RATE_GCODE BEZIER_CURVE_SUPPORT \
|
||||
|
||||
+33
-49
@@ -26,14 +26,13 @@ ci_src_filter -y
|
||||
use_example_configs AnimationExample
|
||||
opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO LCD_LANGUAGE fr SAVED_POSITIONS 4 DEFAULT_EJERK 10 \
|
||||
EXTRUDERS 5 TEMP_SENSOR_1 1 TEMP_SENSOR_2 5 TEMP_SENSOR_3 20 TEMP_SENSOR_4 1000 TEMP_SENSOR_BED 1
|
||||
opt_enable AUTO_BED_LEVELING_UBL AVOID_OBSTACLES RESTORE_LEVELING_AFTER_G28 DEBUG_LEVELING_FEATURE G26_MESH_VALIDATION ENABLE_LEVELING_FADE_HEIGHT SKEW_CORRECTION \
|
||||
opt_enable AUTO_BED_LEVELING_UBL RESTORE_LEVELING_AFTER_G28 DEBUG_LEVELING_FEATURE G26_MESH_VALIDATION ENABLE_LEVELING_FADE_HEIGHT SKEW_CORRECTION \
|
||||
REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER LIGHTWEIGHT_UI STATUS_MESSAGE_SCROLLING SHOW_CUSTOM_BOOTSCREEN BOOT_MARLIN_LOGO_SMALL \
|
||||
SDSUPPORT SDCARD_SORT_ALPHA USB_FLASH_DRIVE_SUPPORT AUTO_REPORT_SD_STATUS SCROLL_LONG_FILENAMES MEDIA_MENU_AT_TOP \
|
||||
EEPROM_SETTINGS EEPROM_CHITCHAT GCODE_MACROS CUSTOM_MENU_MAIN FREEZE_FEATURE CANCEL_OBJECTS SOUND_MENU_ITEM \
|
||||
EMERGENCY_PARSER MULTI_NOZZLE_DUPLICATION CLASSIC_JERK LIN_ADVANCE ADVANCE_K_EXTRA QUICK_HOME \
|
||||
MULTI_NOZZLE_DUPLICATION CLASSIC_JERK LIN_ADVANCE ADVANCE_K_EXTRA QUICK_HOME \
|
||||
SET_PROGRESS_MANUALLY SET_PROGRESS_PERCENT PRINT_PROGRESS_SHOW_DECIMALS SHOW_REMAINING_TIME \
|
||||
ENCODER_NOISE_FILTER BABYSTEPPING BABYSTEP_XY NANODLP_Z_SYNC I2C_POSITION_ENCODERS M114_DETAIL
|
||||
opt_disable ENCODER_RATE_MULTIPLIER
|
||||
exec_test $1 $2 "Azteeg X3 Pro | EXTRUDERS 5 | RRDFGSC | UBL | LIN_ADVANCE ..." "$3"
|
||||
|
||||
#
|
||||
@@ -45,8 +44,7 @@ opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO LCD_LANGUAGE jp_kana DEFAULT_EJERK 10 \
|
||||
opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER LIGHTWEIGHT_UI SHOW_CUSTOM_BOOTSCREEN BOOT_MARLIN_LOGO_SMALL \
|
||||
SET_PROGRESS_MANUALLY SET_PROGRESS_PERCENT PRINT_PROGRESS_SHOW_DECIMALS SHOW_REMAINING_TIME STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES \
|
||||
SDSUPPORT LONG_FILENAME_WRITE_SUPPORT SDCARD_SORT_ALPHA NO_SD_AUTOSTART USB_FLASH_DRIVE_SUPPORT CANCEL_OBJECTS \
|
||||
Z_PROBE_SLED AUTO_BED_LEVELING_UBL UBL_HILBERT_CURVE UBL_TILT_ON_MESH_POINTS UBL_TILT_ON_MESH_POINTS_3POINT \
|
||||
RESTORE_LEVELING_AFTER_G28 DEBUG_LEVELING_FEATURE G26_MESH_VALIDATION ENABLE_LEVELING_FADE_HEIGHT \
|
||||
Z_PROBE_SLED AUTO_BED_LEVELING_UBL UBL_HILBERT_CURVE RESTORE_LEVELING_AFTER_G28 DEBUG_LEVELING_FEATURE G26_MESH_VALIDATION ENABLE_LEVELING_FADE_HEIGHT \
|
||||
EEPROM_SETTINGS EEPROM_CHITCHAT GCODE_MACROS CUSTOM_MENU_MAIN \
|
||||
MULTI_NOZZLE_DUPLICATION CLASSIC_JERK LIN_ADVANCE QUICK_HOME \
|
||||
NANODLP_Z_SYNC I2C_POSITION_ENCODERS M114_DETAIL \
|
||||
@@ -55,50 +53,36 @@ opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER LIGHTWEIGHT_UI SHOW_CUS
|
||||
opt_disable SEGMENT_LEVELED_MOVES
|
||||
exec_test $1 $2 "Azteeg X3 Pro | EXTRUDERS 5 | RRDFGSC | UBL | LIN_ADVANCE | Sled Probe | Skew | JP-Kana | Babystep offsets ..." "$3"
|
||||
|
||||
|
||||
#
|
||||
# 5 runout sensors with distinct states
|
||||
#
|
||||
restore_configs
|
||||
opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO NUM_SERVOS 1 \
|
||||
EXTRUDERS 4 TEMP_SENSOR_1 1 TEMP_SENSOR_2 1 TEMP_SENSOR_3 1 TEMP_SENSOR_4 1 FAN_KICKSTART_TIME 500 \
|
||||
NUM_RUNOUT_SENSORS 4 FIL_RUNOUT2_PIN 44 FIL_RUNOUT3_PIN 45 FIL_RUNOUT4_PIN 46 FIL_RUNOUT5_PIN 47 \
|
||||
FIL_RUNOUT3_STATE HIGH FILAMENT_RUNOUT_SCRIPT '"M600 T%c"'
|
||||
EXTRUDERS 5 TEMP_SENSOR_1 1 TEMP_SENSOR_2 1 TEMP_SENSOR_3 1 TEMP_SENSOR_4 1 \
|
||||
NUM_RUNOUT_SENSORS 5 FIL_RUNOUT2_PIN 44 FIL_RUNOUT3_PIN 45 FIL_RUNOUT4_PIN 46 FIL_RUNOUT5_PIN 47 \
|
||||
FIL_RUNOUT_ENABLED '{ true, true, true, true, true }' FIL_RUNOUT_MODE '{ 1, 2, 7, 0, 1 }' FIL_RUNOUT_DISTANCE_MM '{ 15, 15, 15, 15, 15 }'
|
||||
opt_enable VIKI2 BOOT_MARLIN_LOGO_ANIMATED SDSUPPORT AUTO_REPORT_SD_STATUS \
|
||||
Z_PROBE_SERVO_NR Z_SERVO_ANGLES Z_SERVO_MEASURE_ANGLE DEACTIVATE_SERVOS_AFTER_MOVE Z_SERVO_DEACTIVATE_AFTER_STOW \
|
||||
AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE PROBE_PT_1 PROBE_PT_2 PROBE_PT_3 \
|
||||
Z_PROBE_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE \
|
||||
EEPROM_SETTINGS EEPROM_CHITCHAT M114_DETAIL AUTO_REPORT_POSITION \
|
||||
NO_VOLUMETRICS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES AUTOTEMP G38_PROBE_TARGET JOYSTICK \
|
||||
DIRECT_STEPPING DETECT_BROKEN_ENDSTOP \
|
||||
FILAMENT_RUNOUT_SENSOR NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE Z_SAFE_HOMING FIL_RUNOUT3_PULLUP
|
||||
exec_test $1 $2 "Azteeg X3 Pro | EXTRUDERS 4 | VIKI2 | Servo Probe | Multiple runout sensors (x4)" "$3"
|
||||
exec_test $1 $2 "Multiple runout sensors (x5) | Distinct runout states" "$3"
|
||||
|
||||
|
||||
#
|
||||
# Extruder Only. No XYZ axes at all.
|
||||
# Mixing Extruder with 5 steppers, Greek
|
||||
#
|
||||
restore_configs
|
||||
opt_set DEFAULT_AXIS_STEPS_PER_UNIT '{ 4000 }' \
|
||||
DEFAULT_MAX_FEEDRATE '{ 5 }' \
|
||||
DEFAULT_MAX_ACCELERATION '{ 100 }' \
|
||||
MANUAL_FEEDRATE '{ 4*60 }' \
|
||||
AXIS_RELATIVE_MODES '{ false }' \
|
||||
HOMING_BUMP_MM '{}' HOMING_BUMP_DIVISOR '{}' HOMING_FEEDRATE_MM_M '{}'
|
||||
opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
||||
opt_disable X_DRIVER_TYPE Y_DRIVER_TYPE Z_DRIVER_TYPE
|
||||
exec_test $1 $2 "E Axis Only | DOGM MarlinUI" "$3"
|
||||
|
||||
#
|
||||
# Mixing Extruder with 5 steppers, Russian
|
||||
#
|
||||
restore_configs
|
||||
opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO MIXING_STEPPERS 5 LCD_LANGUAGE ru \
|
||||
NUM_RUNOUT_SENSORS E_STEPPERS TEMP_SENSOR_BED 0 REDUNDANT_PART_COOLING_FAN 1 \
|
||||
FIL_RUNOUT2_PIN 16 FIL_RUNOUT3_PIN 17 FIL_RUNOUT4_PIN 4 FIL_RUNOUT5_PIN 5
|
||||
opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO MIXING_STEPPERS 5 LCD_LANGUAGE ru REDUNDANT_PART_COOLING_FAN 1 \
|
||||
FIL_RUNOUT2_PIN 16 FIL_RUNOUT3_PIN 17 FIL_RUNOUT4_PIN 4 FIL_RUNOUT5_PIN 5 \
|
||||
FIL_RUNOUT_ENABLED '{ true, true, true, true, true }' FIL_RUNOUT_MODE '{ 1, 2, 7, 0, 1 }' FIL_RUNOUT_DISTANCE_MM '{ 15, 15, 15, 15, 15 }'
|
||||
opt_enable MIXING_EXTRUDER GRADIENT_MIX GRADIENT_VTOOL CR10_STOCKDISPLAY \
|
||||
USE_CONTROLLER_FAN CONTROLLER_FAN_EDITABLE CONTROLLER_FAN_IGNORE_Z \
|
||||
XY_AFTER_HOMING EVENT_GCODE_AFTER_HOMING \
|
||||
FILAMENT_RUNOUT_SENSOR ADVANCED_PAUSE_FEATURE NOZZLE_PARK_FEATURE INPUT_SHAPING_X INPUT_SHAPING_Y
|
||||
opt_disable DISABLE_OTHER_EXTRUDERS
|
||||
exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Input Shaping | Russian" "$3"
|
||||
FILAMENT_RUNOUT_SENSOR ADVANCED_PAUSE_FEATURE NOZZLE_PARK_FEATURE
|
||||
opt_disable DISABLE_INACTIVE_EXTRUDER
|
||||
exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Greek" "$3"
|
||||
|
||||
#
|
||||
# Test SPEAKER with BOARD_BQ_ZUM_MEGA_3D and BQ_LCD_SMART_CONTROLLER
|
||||
@@ -142,7 +126,7 @@ exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Input Shaping
|
||||
#opt_set MOTHERBOARD BOARD_RIGIDBOARD_V2
|
||||
#opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT BABYSTEPPING DAC_MOTOR_CURRENT_DEFAULT
|
||||
#exec_test $1 $2 "Stuff" "$3"
|
||||
#
|
||||
# #
|
||||
# G3D_PANEL with SDCARD_SORT_ALPHA and STATUS_MESSAGE_SCROLLING
|
||||
#
|
||||
#restore_configs
|
||||
@@ -193,9 +177,9 @@ exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Input Shaping
|
||||
#opt_enable LCM1602
|
||||
#exec_test $1 $2 "Stuff" "$3"
|
||||
|
||||
#
|
||||
# Test Laser features with 12864 LCD
|
||||
#
|
||||
# #
|
||||
# # Test Laser features with 12864 LCD
|
||||
# #
|
||||
# restore_configs
|
||||
# opt_set MOTHERBOARD BOARD_RAMPS_14_EFB EXTRUDERS 0 LCD_LANGUAGE en TEMP_SENSOR_COOLER 1 TEMP_SENSOR_1 0 SERIAL_PORT_2 2 \
|
||||
# DEFAULT_AXIS_STEPS_PER_UNIT '{ 80, 80, 400 }' \
|
||||
@@ -207,9 +191,9 @@ exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Input Shaping
|
||||
# LASER_FEATURE LASER_SAFETY_TIMEOUT_MS LASER_COOLANT_FLOW_METER AIR_EVACUATION AIR_EVACUATION_PIN AIR_ASSIST AIR_ASSIST_PIN LASER_SYNCHRONOUS_M106_M107
|
||||
# exec_test $1 $2 "MEGA2560 RAMPS | Laser Options | 12864 | Meatpack | Fan Sync | SERIAL_PORT_2 " "$3"
|
||||
|
||||
#
|
||||
# Test Laser features with 44780 LCD
|
||||
#
|
||||
# #
|
||||
# # Test Laser features with 44780 LCD
|
||||
# #
|
||||
# restore_configs
|
||||
# opt_set MOTHERBOARD BOARD_RAMPS_14_EFB EXTRUDERS 0 LCD_LANGUAGE en TEMP_SENSOR_COOLER 1 TEMP_SENSOR_1 0 \
|
||||
# DEFAULT_AXIS_STEPS_PER_UNIT '{ 80, 80, 400 }' \
|
||||
@@ -221,9 +205,9 @@ exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Input Shaping
|
||||
# LASER_FEATURE LASER_SAFETY_TIMEOUT_MS LASER_COOLANT_FLOW_METER AIR_EVACUATION AIR_EVACUATION_PIN AIR_ASSIST AIR_ASSIST_PIN
|
||||
# exec_test $1 $2 "MEGA2560 RAMPS | Laser Feature | Air Evacuation | Air Assist | Cooler | Laser Safety Timeout | Flowmeter | 44780 LCD " "$3"
|
||||
|
||||
#
|
||||
# Test redundant temperature sensors + MAX TC + Backlight Timeout
|
||||
#
|
||||
# #
|
||||
# # Test redundant temperature sensors + MAX TC + Backlight Timeout
|
||||
# #
|
||||
# restore_configs
|
||||
# opt_set MOTHERBOARD BOARD_RAMPS_14_EFB EXTRUDERS 1 \
|
||||
# TEMP_SENSOR_0 -2 TEMP_SENSOR_REDUNDANT -2 \
|
||||
@@ -234,9 +218,9 @@ exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Input Shaping
|
||||
# opt_disable PIDTEMP
|
||||
# exec_test $1 $2 "MEGA2560 RAMPS | Redundant temperature sensor | 2x MAX6675 | BL Timeout" "$3"
|
||||
|
||||
#
|
||||
# Polargraph Config
|
||||
#
|
||||
# #
|
||||
# # Polargraph Config
|
||||
# #
|
||||
# use_example_configs Polargraph
|
||||
# exec_test $1 $2 "RUMBA | POLARGRAPH | RRD LCD" "$3"
|
||||
|
||||
@@ -284,12 +268,12 @@ opt_set MOTHERBOARD BOARD_RAMPS_14_EFB
|
||||
opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER \
|
||||
SET_PROGRESS_MANUALLY SET_PROGRESS_PERCENT SET_REMAINING_TIME SET_INTERACTION_TIME M73_REPORT \
|
||||
SHOW_PROGRESS_PERCENT SHOW_ELAPSED_TIME SHOW_REMAINING_TIME SHOW_INTERACTION_TIME PRINT_PROGRESS_SHOW_DECIMALS
|
||||
exec_test $1 $2 "MEGA2560 RAMPS | 128x64 | progress rotation" "$3"
|
||||
exec_test $1 $2 "MEGA2560 RAMPS | 12864 | progress rotation" "$3"
|
||||
opt_enable LIGHTWEIGHT_UI
|
||||
exec_test $1 $2 "MEGA2560 RAMPS | 128x64 LIGHTWEIGHT_UI | progress rotation" "$3"
|
||||
exec_test $1 $2 "MEGA2560 RAMPS | 12864 LIGHTWEIGHT_UI | progress rotation" "$3"
|
||||
opt_disable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
||||
opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||
exec_test $1 $2 "MEGA2560 RAMPS | HD44780 | progress rotation" "$3"
|
||||
exec_test $1 $2 "MEGA2560 RAMPS | 44780 | progress rotation" "$3"
|
||||
|
||||
# clean up
|
||||
restore_configs
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ debug_build_flags = -fstack-protector-strong -g -g3 -ggdb
|
||||
lib_compat_mode = off
|
||||
build_src_filter = ${common.default_src_filter} +<src/HAL/NATIVE_SIM>
|
||||
lib_deps = ${common.lib_deps}
|
||||
MarlinSimUI=https://github.com/p3p/MarlinSimUI/archive/8791f3ff43.zip
|
||||
MarlinSimUI=https://github.com/p3p/MarlinSimUI/archive/66a2b82c8f.zip
|
||||
Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/c6b319f447.zip
|
||||
LiquidCrystal=https://github.com/p3p/LiquidCrystal/archive/322fb5fc23.zip
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
|
||||
Reference in New Issue
Block a user