Merge branch 'bugfix-2.1.x' into LulzbotTestBase
This commit is contained in:
+20
-16
@@ -634,6 +634,10 @@
|
||||
#define MAX31865_SENSOR_OHMS_1 100
|
||||
#define MAX31865_CALIBRATION_OHMS_1 430
|
||||
#endif
|
||||
#if TEMP_SENSOR_IS_MAX_TC(2)
|
||||
#define MAX31865_SENSOR_OHMS_2 100
|
||||
#define MAX31865_CALIBRATION_OHMS_2 430
|
||||
#endif
|
||||
|
||||
#if HAS_E_TEMP_SENSOR
|
||||
#define TEMP_RESIDENCY_TIME 5 // (seconds) Time to wait for hotend to "settle" in M109
|
||||
@@ -979,7 +983,7 @@
|
||||
//#define POLARGRAPH
|
||||
#if ENABLED(POLARGRAPH)
|
||||
#define POLARGRAPH_MAX_BELT_LEN 1035.0
|
||||
#define POLAR_SEGMENTS_PER_SECOND 5
|
||||
#define DEFAULT_SEGMENTS_PER_SECOND 5
|
||||
#endif
|
||||
|
||||
// @section delta
|
||||
@@ -991,28 +995,28 @@
|
||||
// Make delta curves from many straight lines (linear interpolation).
|
||||
// This is a trade-off between visible corners (not enough segments)
|
||||
// and processor overload (too many expensive sqrt calls).
|
||||
#define DELTA_SEGMENTS_PER_SECOND 200
|
||||
#define DEFAULT_SEGMENTS_PER_SECOND 200
|
||||
|
||||
// After homing move down to a height where XY movement is unconstrained
|
||||
//#define DELTA_HOME_TO_SAFE_ZONE
|
||||
|
||||
// Delta calibration menu
|
||||
// uncomment to add three points calibration menu option.
|
||||
// Add three-point calibration to the MarlinUI menu.
|
||||
// See http://minow.blogspot.com/index.html#4918805519571907051
|
||||
//#define DELTA_CALIBRATION_MENU
|
||||
|
||||
// uncomment to add G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
|
||||
// G33 Delta Auto-Calibration. Enable EEPROM_SETTINGS to store results.
|
||||
//#define DELTA_AUTO_CALIBRATION
|
||||
|
||||
// NOTE NB all values for DELTA_* values MUST be floating point, so always have a decimal point in them
|
||||
|
||||
#if ENABLED(DELTA_AUTO_CALIBRATION)
|
||||
// set the default number of probe points : n*n (1 -> 7)
|
||||
// Default number of probe points : n*n (1 -> 7)
|
||||
#define DELTA_CALIBRATION_DEFAULT_POINTS 4
|
||||
#endif
|
||||
|
||||
// NOTE: All values for DELTA_* values MUST be floating point, so always have a decimal point in them
|
||||
|
||||
#if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU)
|
||||
// Set the steprate for papertest probing
|
||||
// Step size for paper-test probing
|
||||
#define PROBE_MANUALLY_STEP 0.05 // (mm)
|
||||
#endif
|
||||
|
||||
@@ -1057,7 +1061,7 @@
|
||||
//#define MP_SCARA
|
||||
#if EITHER(MORGAN_SCARA, MP_SCARA)
|
||||
// If movement is choppy try lowering this value
|
||||
#define SCARA_SEGMENTS_PER_SECOND 200
|
||||
#define DEFAULT_SEGMENTS_PER_SECOND 200
|
||||
|
||||
// Length of inner and outer support arms. Measure arm lengths precisely.
|
||||
#define SCARA_LINKAGE_1 150 // (mm)
|
||||
@@ -1093,18 +1097,18 @@
|
||||
// Enable for TPARA kinematics and configure below
|
||||
//#define AXEL_TPARA
|
||||
#if ENABLED(AXEL_TPARA)
|
||||
#define DEBUG_ROBOT_KINEMATICS
|
||||
#define ROBOT_SEGMENTS_PER_SECOND 200
|
||||
#define DEBUG_TPARA_KINEMATICS
|
||||
#define DEFAULT_SEGMENTS_PER_SECOND 200
|
||||
|
||||
// Length of inner and outer support arms. Measure arm lengths precisely.
|
||||
#define ROBOT_LINKAGE_1 120 // (mm)
|
||||
#define ROBOT_LINKAGE_2 120 // (mm)
|
||||
#define TPARA_LINKAGE_1 120 // (mm)
|
||||
#define TPARA_LINKAGE_2 120 // (mm)
|
||||
|
||||
// SCARA tower offset (position of Tower relative to bed zero position)
|
||||
// This needs to be reasonably accurate as it defines the printbed position in the SCARA space.
|
||||
#define ROBOT_OFFSET_X 0 // (mm)
|
||||
#define ROBOT_OFFSET_Y 0 // (mm)
|
||||
#define ROBOT_OFFSET_Z 0 // (mm)
|
||||
#define TPARA_OFFSET_X 0 // (mm)
|
||||
#define TPARA_OFFSET_Y 0 // (mm)
|
||||
#define TPARA_OFFSET_Z 0 // (mm)
|
||||
|
||||
#define SCARA_FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
|
||||
|
||||
|
||||
+104
-195
@@ -177,6 +177,7 @@
|
||||
//#define TEMP_SENSOR_FORCE_HW_SPI // Ignore SCK/MOSI/MISO pins; use CS and the default SPI bus.
|
||||
//#define MAX31865_SENSOR_WIRES_0 2 // (2-4) Number of wires for the probe connected to a MAX31865 board.
|
||||
//#define MAX31865_SENSOR_WIRES_1 2
|
||||
//#define MAX31865_SENSOR_WIRES_2 2
|
||||
|
||||
//#define MAX31865_50HZ_FILTER // Use a 50Hz filter instead of the default 60Hz.
|
||||
//#define MAX31865_USE_READ_ERROR_DETECTION // Treat value spikes (20°C delta in under 1s) as read errors.
|
||||
@@ -187,6 +188,7 @@
|
||||
|
||||
//#define MAX31865_WIRE_OHMS_0 0.95f // For 2-wire, set the wire resistances for more accurate readings.
|
||||
//#define MAX31865_WIRE_OHMS_1 0.0f
|
||||
//#define MAX31865_WIRE_OHMS_2 0.0f
|
||||
|
||||
/**
|
||||
* Hephestos 2 24V heated bed upgrade kit.
|
||||
@@ -560,10 +562,14 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// When first starting the main fan, run it at full speed for the
|
||||
// given number of milliseconds. This gets the fan spinning reliably
|
||||
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
|
||||
#define FAN_KICKSTART_TIME 100
|
||||
/**
|
||||
* Fan Kickstart
|
||||
* When part cooling or controller fans first start, run at a speed that
|
||||
* 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_POWER 180 // 64-255
|
||||
|
||||
// Some coolers may require a non-zero "off" state.
|
||||
//#define FAN_OFF_PWM 1
|
||||
@@ -1070,6 +1076,42 @@
|
||||
|
||||
// @section motion
|
||||
|
||||
/**
|
||||
* Input Shaping -- EXPERIMENTAL
|
||||
*
|
||||
* Zero Vibration (ZV) Input Shaping for X and/or Y movements.
|
||||
*
|
||||
* This option uses a lot of SRAM for the step buffer, which is related to the
|
||||
* largest step rate possible for the shaped axes. If the build fails due to
|
||||
* low SRAM the buffer size may be reduced by setting smaller values for
|
||||
* DEFAULT_AXIS_STEPS_PER_UNIT and/or DEFAULT_MAX_FEEDRATE. Disabling
|
||||
* ADAPTIVE_STEP_SMOOTHING and reducing the step rate for non-shaped axes may
|
||||
* also reduce the buffer sizes. Runtime editing of max feedrate (M203) or
|
||||
* resonant frequency (M593) may result in input shaping losing effectiveness
|
||||
* during high speed movements to prevent buffer overruns.
|
||||
*
|
||||
* Tune with M593 D<factor> F<frequency>:
|
||||
*
|
||||
* D<factor> Set the zeta/damping factor. If axes (X, Y, etc.) are not specified, set for all axes.
|
||||
* F<frequency> Set the frequency. If axes (X, Y, etc.) are not specified, set for all axes.
|
||||
* T[map] Input Shaping type, 0:ZV, 1:EI, 2:2H EI (not implemented yet)
|
||||
* X<1> Set the given parameters only for the X axis.
|
||||
* Y<1> Set the given parameters only for the Y axis.
|
||||
*/
|
||||
//#define INPUT_SHAPING_X
|
||||
//#define INPUT_SHAPING_Y
|
||||
#if EITHER(INPUT_SHAPING_X, INPUT_SHAPING_Y)
|
||||
#if ENABLED(INPUT_SHAPING_X)
|
||||
#define SHAPING_FREQ_X 40 // (Hz) The default dominant resonant frequency on the X axis.
|
||||
#define SHAPING_ZETA_X 0.15f // Damping ratio of the X axis (range: 0.0 = no damping to 1.0 = critical damping).
|
||||
#endif
|
||||
#if ENABLED(INPUT_SHAPING_Y)
|
||||
#define SHAPING_FREQ_Y 40 // (Hz) The default dominant resonant frequency on the Y axis.
|
||||
#define SHAPING_ZETA_Y 0.15f // Damping ratio of the Y axis (range: 0.0 = no damping to 1.0 = critical damping).
|
||||
#endif
|
||||
//#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters.
|
||||
#endif
|
||||
|
||||
#define AXIS_RELATIVE_MODES { false, false, false, false }
|
||||
|
||||
// Add a Duplicate option for well-separated conjoined nozzles
|
||||
@@ -1189,7 +1231,7 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Automatic backlash, position and hotend offset calibration
|
||||
* Automatic backlash, position, and hotend offset calibration
|
||||
*
|
||||
* Enable G425 to run automatic calibration using an electrically-
|
||||
* conductive cube, bolt, or washer mounted on the bed.
|
||||
@@ -2752,167 +2794,33 @@
|
||||
#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* TMC26X Stepper Driver options
|
||||
*
|
||||
* The TMC26XStepper library is required for this stepper driver.
|
||||
* https://github.com/trinamic/TMC26XStepper
|
||||
* @section tmc/tmc26x
|
||||
*/
|
||||
#if HAS_DRIVER(TMC26X)
|
||||
|
||||
#if AXIS_DRIVER_TYPE_X(TMC26X)
|
||||
#define X_MAX_CURRENT 1000 // (mA)
|
||||
#define X_SENSE_RESISTOR 91 // (mOhms)
|
||||
#define X_MICROSTEPS 16 // Number of microsteps
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_X2(TMC26X)
|
||||
#define X2_MAX_CURRENT 1000
|
||||
#define X2_SENSE_RESISTOR 91
|
||||
#define X2_MICROSTEPS X_MICROSTEPS
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_Y(TMC26X)
|
||||
#define Y_MAX_CURRENT 1000
|
||||
#define Y_SENSE_RESISTOR 91
|
||||
#define Y_MICROSTEPS 16
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_Y2(TMC26X)
|
||||
#define Y2_MAX_CURRENT 1000
|
||||
#define Y2_SENSE_RESISTOR 91
|
||||
#define Y2_MICROSTEPS Y_MICROSTEPS
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_Z(TMC26X)
|
||||
#define Z_MAX_CURRENT 1000
|
||||
#define Z_SENSE_RESISTOR 91
|
||||
#define Z_MICROSTEPS 16
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_Z2(TMC26X)
|
||||
#define Z2_MAX_CURRENT 1000
|
||||
#define Z2_SENSE_RESISTOR 91
|
||||
#define Z2_MICROSTEPS Z_MICROSTEPS
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_Z3(TMC26X)
|
||||
#define Z3_MAX_CURRENT 1000
|
||||
#define Z3_SENSE_RESISTOR 91
|
||||
#define Z3_MICROSTEPS Z_MICROSTEPS
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_Z4(TMC26X)
|
||||
#define Z4_MAX_CURRENT 1000
|
||||
#define Z4_SENSE_RESISTOR 91
|
||||
#define Z4_MICROSTEPS Z_MICROSTEPS
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_I(TMC26X)
|
||||
#define I_MAX_CURRENT 1000
|
||||
#define I_SENSE_RESISTOR 91
|
||||
#define I_MICROSTEPS 16
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_J(TMC26X)
|
||||
#define J_MAX_CURRENT 1000
|
||||
#define J_SENSE_RESISTOR 91
|
||||
#define J_MICROSTEPS 16
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_K(TMC26X)
|
||||
#define K_MAX_CURRENT 1000
|
||||
#define K_SENSE_RESISTOR 91
|
||||
#define K_MICROSTEPS 16
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_U(TMC26X)
|
||||
#define U_MAX_CURRENT 1000
|
||||
#define U_SENSE_RESISTOR 91
|
||||
#define U_MICROSTEPS 16
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_V(TMC26X)
|
||||
#define V_MAX_CURRENT 1000
|
||||
#define V_SENSE_RESISTOR 91
|
||||
#define V_MICROSTEPS 16
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_W(TMC26X)
|
||||
#define W_MAX_CURRENT 1000
|
||||
#define W_SENSE_RESISTOR 91
|
||||
#define W_MICROSTEPS 16
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_E0(TMC26X)
|
||||
#define E0_MAX_CURRENT 1000
|
||||
#define E0_SENSE_RESISTOR 91
|
||||
#define E0_MICROSTEPS 16
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_E1(TMC26X)
|
||||
#define E1_MAX_CURRENT 1000
|
||||
#define E1_SENSE_RESISTOR 91
|
||||
#define E1_MICROSTEPS E0_MICROSTEPS
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_E2(TMC26X)
|
||||
#define E2_MAX_CURRENT 1000
|
||||
#define E2_SENSE_RESISTOR 91
|
||||
#define E2_MICROSTEPS E0_MICROSTEPS
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_E3(TMC26X)
|
||||
#define E3_MAX_CURRENT 1000
|
||||
#define E3_SENSE_RESISTOR 91
|
||||
#define E3_MICROSTEPS E0_MICROSTEPS
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_E4(TMC26X)
|
||||
#define E4_MAX_CURRENT 1000
|
||||
#define E4_SENSE_RESISTOR 91
|
||||
#define E4_MICROSTEPS E0_MICROSTEPS
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_E5(TMC26X)
|
||||
#define E5_MAX_CURRENT 1000
|
||||
#define E5_SENSE_RESISTOR 91
|
||||
#define E5_MICROSTEPS E0_MICROSTEPS
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_E6(TMC26X)
|
||||
#define E6_MAX_CURRENT 1000
|
||||
#define E6_SENSE_RESISTOR 91
|
||||
#define E6_MICROSTEPS E0_MICROSTEPS
|
||||
#endif
|
||||
|
||||
#if AXIS_DRIVER_TYPE_E7(TMC26X)
|
||||
#define E7_MAX_CURRENT 1000
|
||||
#define E7_SENSE_RESISTOR 91
|
||||
#define E7_MICROSTEPS E0_MICROSTEPS
|
||||
#endif
|
||||
|
||||
#endif // TMC26X
|
||||
// @section tmc_smart
|
||||
|
||||
/**
|
||||
* To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
|
||||
* connect your SPI pins to the hardware SPI interface on your board and define
|
||||
* the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
|
||||
* pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
|
||||
* You may also use software SPI if you wish to use general purpose IO pins.
|
||||
* Trinamic Smart Drivers
|
||||
*
|
||||
* To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
|
||||
* to the driver side PDN_UART pin with a 1K resistor.
|
||||
* To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
|
||||
* a resistor.
|
||||
* The drivers can also be used with hardware serial.
|
||||
* To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode:
|
||||
* - Connect your SPI pins to the Hardware SPI interface on the board.
|
||||
* Some boards have simple jumper connections! See your board's documentation.
|
||||
* - Define the required Stepper CS pins in your `pins_MYBOARD.h` file.
|
||||
* (See the RAMPS pins, for example.)
|
||||
* - You can also use Software SPI with GPIO pins instead of Hardware SPI.
|
||||
*
|
||||
* To use TMC220x stepper drivers with Serial UART:
|
||||
* - Connect PDN_UART to the #_SERIAL_TX_PIN through a 1K resistor.
|
||||
* For reading capabilities also connect PDN_UART to #_SERIAL_RX_PIN with no resistor.
|
||||
* Some boards have simple jumper connections! See your board's documentation.
|
||||
* - These drivers can also be used with Hardware Serial.
|
||||
*
|
||||
* The TMC26XStepper library is required for TMC26X stepper drivers.
|
||||
* https://github.com/MarlinFirmware/TMC26XStepper
|
||||
*
|
||||
* The TMCStepper library is required for other TMC stepper drivers.
|
||||
* https://github.com/teemuatlut/TMCStepper
|
||||
*
|
||||
* TMCStepper library is required to use TMC stepper drivers.
|
||||
* https://github.com/teemuatlut/TMCStepper
|
||||
* @section tmc/config
|
||||
*/
|
||||
#if HAS_TRINAMIC_CONFIG
|
||||
#if HAS_TRINAMIC_CONFIG || HAS_TMC26X
|
||||
|
||||
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
|
||||
|
||||
@@ -2922,17 +2830,17 @@
|
||||
*/
|
||||
#define INTERPOLATE true
|
||||
|
||||
#if AXIS_IS_TMC(X)
|
||||
#if AXIS_IS_TMC_CONFIG(X)
|
||||
#define X_CURRENT 975 // (mA) RMS current. Multiply by 1.414 for peak current.
|
||||
#define X_CURRENT_HOME X_CURRENT // (mA) RMS current for sensorless homing
|
||||
#define X_MICROSTEPS 16 // 0..256
|
||||
#define X_RSENSE 0.12
|
||||
#define X_RSENSE 0.12 // Multiplied x1000 for TMC26X
|
||||
#define X_CHAIN_POS -1 // -1..0: Not chained. 1: MCU MOSI connected. 2: Next in chain, ...
|
||||
//#define X_INTERPOLATE true // Enable to override 'INTERPOLATE' for the X axis
|
||||
//#define X_HOLD_MULTIPLIER 0.5 // Enable to override 'HOLD_MULTIPLIER' for the X axis
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(X2)
|
||||
#if AXIS_IS_TMC_CONFIG(X2)
|
||||
#define X2_CURRENT 800
|
||||
#define X2_CURRENT_HOME X2_CURRENT
|
||||
#define X2_MICROSTEPS X_MICROSTEPS
|
||||
@@ -2942,7 +2850,7 @@
|
||||
//#define X2_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(Y)
|
||||
#if AXIS_IS_TMC_CONFIG(Y)
|
||||
#define Y_CURRENT 975
|
||||
#define Y_CURRENT_HOME Y_CURRENT
|
||||
#define Y_MICROSTEPS 16
|
||||
@@ -2952,7 +2860,7 @@
|
||||
//#define Y_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(Y2)
|
||||
#if AXIS_IS_TMC_CONFIG(Y2)
|
||||
#define Y2_CURRENT 800
|
||||
#define Y2_CURRENT_HOME Y2_CURRENT
|
||||
#define Y2_MICROSTEPS Y_MICROSTEPS
|
||||
@@ -2962,7 +2870,7 @@
|
||||
//#define Y2_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(Z)
|
||||
#if AXIS_IS_TMC_CONFIG(Z)
|
||||
#define Z_CURRENT 975
|
||||
#define Z_CURRENT_HOME Z_CURRENT
|
||||
#if ENABLED(MiniV2)
|
||||
@@ -2976,7 +2884,7 @@
|
||||
//#define Z_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(Z2)
|
||||
#if AXIS_IS_TMC_CONFIG(Z2)
|
||||
#define Z2_CURRENT 800
|
||||
#define Z2_CURRENT_HOME Z2_CURRENT
|
||||
#define Z2_MICROSTEPS Z_MICROSTEPS
|
||||
@@ -2986,7 +2894,7 @@
|
||||
//#define Z2_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(Z3)
|
||||
#if AXIS_IS_TMC_CONFIG(Z3)
|
||||
#define Z3_CURRENT 800
|
||||
#define Z3_CURRENT_HOME Z3_CURRENT
|
||||
#define Z3_MICROSTEPS Z_MICROSTEPS
|
||||
@@ -2996,7 +2904,7 @@
|
||||
//#define Z3_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(Z4)
|
||||
#if AXIS_IS_TMC_CONFIG(Z4)
|
||||
#define Z4_CURRENT 800
|
||||
#define Z4_CURRENT_HOME Z4_CURRENT
|
||||
#define Z4_MICROSTEPS Z_MICROSTEPS
|
||||
@@ -3006,7 +2914,7 @@
|
||||
//#define Z4_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(I)
|
||||
#if AXIS_IS_TMC_CONFIG(I)
|
||||
#define I_CURRENT 800
|
||||
#define I_CURRENT_HOME I_CURRENT
|
||||
#define I_MICROSTEPS 16
|
||||
@@ -3016,7 +2924,7 @@
|
||||
//#define I_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(J)
|
||||
#if AXIS_IS_TMC_CONFIG(J)
|
||||
#define J_CURRENT 800
|
||||
#define J_CURRENT_HOME J_CURRENT
|
||||
#define J_MICROSTEPS 16
|
||||
@@ -3026,7 +2934,7 @@
|
||||
//#define J_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(K)
|
||||
#if AXIS_IS_TMC_CONFIG(K)
|
||||
#define K_CURRENT 800
|
||||
#define K_CURRENT_HOME K_CURRENT
|
||||
#define K_MICROSTEPS 16
|
||||
@@ -3036,7 +2944,7 @@
|
||||
//#define K_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(U)
|
||||
#if AXIS_IS_TMC_CONFIG(U)
|
||||
#define U_CURRENT 800
|
||||
#define U_CURRENT_HOME U_CURRENT
|
||||
#define U_MICROSTEPS 8
|
||||
@@ -3046,7 +2954,7 @@
|
||||
//#define U_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(V)
|
||||
#if AXIS_IS_TMC_CONFIG(V)
|
||||
#define V_CURRENT 800
|
||||
#define V_CURRENT_HOME V_CURRENT
|
||||
#define V_MICROSTEPS 8
|
||||
@@ -3056,7 +2964,7 @@
|
||||
//#define V_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(W)
|
||||
#if AXIS_IS_TMC_CONFIG(W)
|
||||
#define W_CURRENT 800
|
||||
#define W_CURRENT_HOME W_CURRENT
|
||||
#define W_MICROSTEPS 8
|
||||
@@ -3066,7 +2974,7 @@
|
||||
//#define W_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(E0)
|
||||
#if AXIS_IS_TMC_CONFIG(E0)
|
||||
#define E0_CURRENT 960
|
||||
#define E0_MICROSTEPS 16
|
||||
#define E0_RSENSE 0.12
|
||||
@@ -3075,16 +2983,16 @@
|
||||
//#define E0_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(E1)
|
||||
#if AXIS_IS_TMC_CONFIG(E1)
|
||||
#define E1_CURRENT 960
|
||||
#define E1_MICROSTEPS 16
|
||||
#define E1_MICROSTEPS E0_MICROSTEPS
|
||||
#define E1_RSENSE 0.12
|
||||
#define E1_CHAIN_POS -1
|
||||
//#define E1_INTERPOLATE true
|
||||
//#define E1_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(E2)
|
||||
#if AXIS_IS_TMC_CONFIG(E2)
|
||||
#define E2_CURRENT 800
|
||||
#define E2_MICROSTEPS E0_MICROSTEPS
|
||||
#define E2_RSENSE 0.11
|
||||
@@ -3093,7 +3001,7 @@
|
||||
//#define E2_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(E3)
|
||||
#if AXIS_IS_TMC_CONFIG(E3)
|
||||
#define E3_CURRENT 800
|
||||
#define E3_MICROSTEPS E0_MICROSTEPS
|
||||
#define E3_RSENSE 0.11
|
||||
@@ -3102,7 +3010,7 @@
|
||||
//#define E3_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(E4)
|
||||
#if AXIS_IS_TMC_CONFIG(E4)
|
||||
#define E4_CURRENT 800
|
||||
#define E4_MICROSTEPS E0_MICROSTEPS
|
||||
#define E4_RSENSE 0.11
|
||||
@@ -3111,7 +3019,7 @@
|
||||
//#define E4_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(E5)
|
||||
#if AXIS_IS_TMC_CONFIG(E5)
|
||||
#define E5_CURRENT 800
|
||||
#define E5_MICROSTEPS E0_MICROSTEPS
|
||||
#define E5_RSENSE 0.11
|
||||
@@ -3120,7 +3028,7 @@
|
||||
//#define E5_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(E6)
|
||||
#if AXIS_IS_TMC_CONFIG(E6)
|
||||
#define E6_CURRENT 800
|
||||
#define E6_MICROSTEPS E0_MICROSTEPS
|
||||
#define E6_RSENSE 0.11
|
||||
@@ -3129,7 +3037,7 @@
|
||||
//#define E6_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(E7)
|
||||
#if AXIS_IS_TMC_CONFIG(E7)
|
||||
#define E7_CURRENT 800
|
||||
#define E7_MICROSTEPS E0_MICROSTEPS
|
||||
#define E7_RSENSE 0.11
|
||||
@@ -3233,16 +3141,17 @@
|
||||
* Use Trinamic's ultra quiet stepping mode.
|
||||
* When disabled, Marlin will use spreadCycle stepping mode.
|
||||
*/
|
||||
//#define STEALTHCHOP_XY
|
||||
#define STEALTHCHOP_Z
|
||||
#define STEALTHCHOP_I
|
||||
#define STEALTHCHOP_J
|
||||
#define STEALTHCHOP_K
|
||||
|
||||
#define STEALTHCHOP_U
|
||||
#define STEALTHCHOP_V
|
||||
#define STEALTHCHOP_W
|
||||
//#define STEALTHCHOP_E
|
||||
#if HAS_STEALTHCHOP
|
||||
#define STEALTHCHOP_XY
|
||||
#define STEALTHCHOP_Z
|
||||
#define STEALTHCHOP_I
|
||||
#define STEALTHCHOP_J
|
||||
#define STEALTHCHOP_K
|
||||
#define STEALTHCHOP_U
|
||||
#define STEALTHCHOP_V
|
||||
#define STEALTHCHOP_W
|
||||
//#define STEALTHCHOP_E
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Optimize spreadCycle chopper parameters by using predefined parameter sets
|
||||
@@ -3437,7 +3346,7 @@
|
||||
#else
|
||||
#define TMC_ADV() { }
|
||||
#endif
|
||||
#endif // HAS_TRINAMIC_CONFIG
|
||||
#endif // HAS_TRINAMIC_CONFIG || HAS_TMC26X
|
||||
|
||||
// @section i2cbus
|
||||
|
||||
|
||||
+9
-7
@@ -307,20 +307,22 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1154)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1155)
|
||||
# Tenlog D3 Hero IDEX printer
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1156)
|
||||
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed)
|
||||
# Tenlog D3,5,6 Pro IDEX printers
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1157)
|
||||
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Hotend2, Bed)
|
||||
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1158)
|
||||
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed)
|
||||
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Hotend2, Bed)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1159)
|
||||
# Longer LK1 PRO / Alfawise U20 Pro (PRO version)
|
||||
# Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1160)
|
||||
# Longer LKx PRO / Alfawise Uxx Pro (PRO version)
|
||||
# Longer LK1 PRO / Alfawise U20 Pro (PRO version)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1161)
|
||||
# Zonestar zrib V5.3 (Chinese RAMPS replica)
|
||||
# Longer LKx PRO / Alfawise Uxx Pro (PRO version)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1162)
|
||||
# Pxmalion Core I3
|
||||
# Zonestar zrib V5.3 (Chinese RAMPS replica)
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1163)
|
||||
# Pxmalion Core I3
|
||||
else ifeq ($(HARDWARE_MOTHERBOARD),1164)
|
||||
|
||||
#
|
||||
# RAMBo and derivatives
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
//#define STRING_DISTRIBUTION_DATE "2022-10-18"
|
||||
//#define STRING_DISTRIBUTION_DATE "2022-11-29"
|
||||
|
||||
/**
|
||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||
|
||||
+11
-10
@@ -32,6 +32,7 @@
|
||||
#include <HardwareSerial.h>
|
||||
#else
|
||||
#include "MarlinSerial.h"
|
||||
#define BOARD_NO_NATIVE_USB
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
@@ -106,36 +107,36 @@ typedef Servo hal_servo_t;
|
||||
|
||||
#define MYSERIAL1 TERN(BLUETOOTH, btSerial, MSerial0)
|
||||
#else
|
||||
#if !WITHIN(SERIAL_PORT, -1, 3)
|
||||
#error "SERIAL_PORT must be from 0 to 3, or -1 for USB Serial."
|
||||
#if !WITHIN(SERIAL_PORT, 0, 3)
|
||||
#error "SERIAL_PORT must be from 0 to 3."
|
||||
#endif
|
||||
#define MYSERIAL1 customizedSerial1
|
||||
|
||||
#ifdef SERIAL_PORT_2
|
||||
#if !WITHIN(SERIAL_PORT_2, -1, 3)
|
||||
#error "SERIAL_PORT_2 must be from 0 to 3, or -1 for USB Serial."
|
||||
#if !WITHIN(SERIAL_PORT_2, 0, 3)
|
||||
#error "SERIAL_PORT_2 must be from 0 to 3."
|
||||
#endif
|
||||
#define MYSERIAL2 customizedSerial2
|
||||
#endif
|
||||
|
||||
#ifdef SERIAL_PORT_3
|
||||
#if !WITHIN(SERIAL_PORT_3, -1, 3)
|
||||
#error "SERIAL_PORT_3 must be from 0 to 3, or -1 for USB Serial."
|
||||
#if !WITHIN(SERIAL_PORT_3, 0, 3)
|
||||
#error "SERIAL_PORT_3 must be from 0 to 3."
|
||||
#endif
|
||||
#define MYSERIAL3 customizedSerial3
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MMU2_SERIAL_PORT
|
||||
#if !WITHIN(MMU2_SERIAL_PORT, -1, 3)
|
||||
#error "MMU2_SERIAL_PORT must be from 0 to 3, or -1 for USB Serial."
|
||||
#if !WITHIN(MMU2_SERIAL_PORT, 0, 3)
|
||||
#error "MMU2_SERIAL_PORT must be from 0 to 3"
|
||||
#endif
|
||||
#define MMU2_SERIAL mmuSerial
|
||||
#endif
|
||||
|
||||
#ifdef LCD_SERIAL_PORT
|
||||
#if !WITHIN(LCD_SERIAL_PORT, -1, 3)
|
||||
#error "LCD_SERIAL_PORT must be from 0 to 3, or -1 for USB Serial."
|
||||
#if !WITHIN(LCD_SERIAL_PORT, 0, 3)
|
||||
#error "LCD_SERIAL_PORT must be from 0 to 3."
|
||||
#endif
|
||||
#define LCD_SERIAL lcdSerial
|
||||
#if HAS_DGUS_LCD
|
||||
|
||||
@@ -146,11 +146,11 @@ void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
|
||||
LIMIT(res_pc_temp, 1U, maxtop);
|
||||
|
||||
// Calculate frequencies of test prescaler and resolution values
|
||||
const uint32_t f_diff = _MAX(f, f_desired) - _MIN(f, f_desired),
|
||||
f_fast_temp = (F_CPU) / (p * (1 + res_fast_temp)),
|
||||
f_fast_diff = _MAX(f_fast_temp, f_desired) - _MIN(f_fast_temp, f_desired),
|
||||
f_pc_temp = (F_CPU) / (2 * p * res_pc_temp),
|
||||
f_pc_diff = _MAX(f_pc_temp, f_desired) - _MIN(f_pc_temp, f_desired);
|
||||
const int f_diff = ABS(f - int(f_desired)),
|
||||
f_fast_temp = (F_CPU) / (p * (1 + res_fast_temp)),
|
||||
f_fast_diff = ABS(f_fast_temp - int(f_desired)),
|
||||
f_pc_temp = (F_CPU) / (2 * p * res_pc_temp),
|
||||
f_pc_diff = ABS(f_pc_temp - int(f_desired));
|
||||
|
||||
if (f_fast_diff < f_diff && f_fast_diff <= f_pc_diff) { // FAST values are closest to desired f
|
||||
// Set the Wave Generation Mode to FAST PWM
|
||||
|
||||
@@ -40,13 +40,15 @@
|
||||
#if SERIAL_IN_USE(0)
|
||||
// D0-D1. No known conflicts.
|
||||
#endif
|
||||
#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega1284P__)
|
||||
#if SERIAL_IN_USE(1) && (CHECK_SERIAL_PIN(18) || CHECK_SERIAL_PIN(19))
|
||||
#error "Serial Port 1 pin D18 and/or D19 conflicts with another pin on the board."
|
||||
#endif
|
||||
#else
|
||||
#if SERIAL_IN_USE(1) && (CHECK_SERIAL_PIN(10) || CHECK_SERIAL_PIN(11))
|
||||
#error "Serial Port 1 pin D10 and/or D11 conflicts with another pin on the board."
|
||||
#if SERIAL_IN_USE(1)
|
||||
#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega1284P__)
|
||||
#if CHECK_SERIAL_PIN(18) || CHECK_SERIAL_PIN(19)
|
||||
#error "Serial Port 1 pin D18 and/or D19 conflicts with another pin on the board."
|
||||
#endif
|
||||
#else
|
||||
#if CHECK_SERIAL_PIN(10) || CHECK_SERIAL_PIN(11)
|
||||
#error "Serial Port 1 pin D10 and/or D11 conflicts with another pin on the board."
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if SERIAL_IN_USE(2) && (CHECK_SERIAL_PIN(16) || CHECK_SERIAL_PIN(17))
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*
|
||||
* 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
|
||||
@@ -18,6 +19,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*/
|
||||
#ifdef __SAMD51__
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*
|
||||
* 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
|
||||
@@ -20,6 +21,10 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*/
|
||||
|
||||
#define CPU_32_BIT
|
||||
|
||||
#include "../shared/Marduino.h"
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*
|
||||
* 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
|
||||
@@ -19,6 +20,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*/
|
||||
|
||||
/**
|
||||
* Hardware and software SPI implementations are included in this file.
|
||||
*
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*
|
||||
* 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
|
||||
@@ -18,6 +19,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*/
|
||||
#ifdef ADAFRUIT_GRAND_CENTRAL_M4
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*
|
||||
* 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
|
||||
@@ -20,6 +21,10 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*/
|
||||
|
||||
#include "../../core/serial_hook.h"
|
||||
|
||||
typedef Serial1Class<Uart> UartT;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*
|
||||
* 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
|
||||
@@ -20,6 +21,10 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*/
|
||||
|
||||
#define SYNC(sc) while (sc) { \
|
||||
asm(""); \
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*
|
||||
* 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
|
||||
@@ -19,6 +20,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*/
|
||||
|
||||
/**
|
||||
* This comes from Arduino library which at the moment is buggy and uncompilable
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*
|
||||
* 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
|
||||
@@ -20,6 +21,10 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*/
|
||||
|
||||
#define _useTimer1
|
||||
#define _useTimer2
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*
|
||||
* 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
|
||||
@@ -18,6 +19,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*/
|
||||
#ifdef __SAMD51__
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*
|
||||
* 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
|
||||
@@ -18,6 +19,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*/
|
||||
#ifdef __SAMD51__
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*
|
||||
* 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
|
||||
@@ -18,6 +19,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*/
|
||||
#ifdef __SAMD51__
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*
|
||||
* 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
|
||||
@@ -20,6 +21,10 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*/
|
||||
|
||||
/**
|
||||
* Endstop interrupts for ATMEL SAMD51 based targets.
|
||||
*
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*
|
||||
* 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
|
||||
@@ -20,6 +21,10 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fast IO functions for SAMD51
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*
|
||||
* 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
|
||||
@@ -18,6 +19,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*/
|
||||
|
||||
/**
|
||||
* Test SAMD51 specific configuration values for errors at compile-time.
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*
|
||||
* 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
|
||||
@@ -20,6 +21,10 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*/
|
||||
|
||||
#define NUMBER_PINS_TOTAL PINS_COUNT
|
||||
|
||||
#define digitalRead_mod(p) extDigitalRead(p)
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*
|
||||
* 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
|
||||
@@ -20,6 +21,10 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*/
|
||||
|
||||
#ifdef ADAFRUIT_GRAND_CENTRAL_M4
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*
|
||||
* 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
|
||||
@@ -18,6 +19,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*/
|
||||
#ifdef __SAMD51__
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
*
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*
|
||||
* 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
|
||||
@@ -20,6 +21,10 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
@@ -221,7 +221,7 @@ bool PersistentStore::access_finish() {
|
||||
|
||||
return success;
|
||||
|
||||
#else !FLASH_EEPROM_LEVELING
|
||||
#else // !FLASH_EEPROM_LEVELING
|
||||
|
||||
// The following was written for the STM32F4 but may work with other MCUs as well.
|
||||
// Most STM32F4 flash does not allow reading from flash during erase operations.
|
||||
|
||||
@@ -50,3 +50,62 @@
|
||||
#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) && NOT_TARGET(STM32H7xx, STM32F4xx, STM32F1xx)
|
||||
#error "TFT_COLOR_UI, TFT_LVGL_UI and TFT_CLASSIC_UI are currently only supported on STM32H7, STM32F4 and STM32F1 hardware."
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Check for common serial pin conflicts
|
||||
*/
|
||||
#define _CHECK_SERIAL_PIN(N) (( \
|
||||
BTN_EN1 == N || DOGLCD_CS == N || HEATER_BED_PIN == N || FAN_PIN == N || \
|
||||
SDIO_D2_PIN == N || SDIO_D3_PIN == N || SDIO_CK_PIN == N || SDIO_CMD_PIN == N \
|
||||
))
|
||||
#define CHECK_SERIAL_PIN(T,N) defined(UART##N##_##T##_PIN) && _CHECK_SERIAL_PIN(UART##N##_##T##_PIN)
|
||||
#if SERIAL_IN_USE(1)
|
||||
#if CHECK_SERIAL_PIN(TX,1)
|
||||
#error "Serial Port 1 TX IO pins conflict with another pin on the board."
|
||||
#endif
|
||||
#if CHECK_SERIAL_PIN(RX,1)
|
||||
#error "Serial Port 1 RX IO pins conflict with another pin on the board."
|
||||
#endif
|
||||
#endif
|
||||
#if SERIAL_IN_USE(2)
|
||||
#if CHECK_SERIAL_PIN(TX,2)
|
||||
#error "Serial Port 2 TX IO pins conflict with another pin on the board."
|
||||
#endif
|
||||
#if CHECK_SERIAL_PIN(RX,2)
|
||||
#error "Serial Port 2 RX IO pins conflict with another pin on the board."
|
||||
#endif
|
||||
#endif
|
||||
#if SERIAL_IN_USE(3)
|
||||
#if CHECK_SERIAL_PIN(TX,3)
|
||||
#error "Serial Port 3 TX IO pins conflict with another pin on the board."
|
||||
#endif
|
||||
#if CHECK_SERIAL_PIN(RX,3)
|
||||
#error "Serial Port 3 RX IO pins conflict with another pin on the board."
|
||||
#endif
|
||||
#endif
|
||||
#if SERIAL_IN_USE(4)
|
||||
#if CHECK_SERIAL_PIN(TX,4)
|
||||
#error "Serial Port 4 TX IO pins conflict with another pin on the board."
|
||||
#endif
|
||||
#if CHECK_SERIAL_PIN(RX,4)
|
||||
#error "Serial Port 4 RX IO pins conflict with another pin on the board."
|
||||
#endif
|
||||
#endif
|
||||
#if SERIAL_IN_USE(5)
|
||||
#if CHECK_SERIAL_PIN(TX,5)
|
||||
#error "Serial Port 5 TX IO pins conflict with another pin on the board."
|
||||
#endif
|
||||
#if CHECK_SERIAL_PIN(RX,5)
|
||||
#error "Serial Port 5 RX IO pins conflict with another pin on the board."
|
||||
#endif
|
||||
#endif
|
||||
#if SERIAL_IN_USE(6)
|
||||
#if CHECK_SERIAL_PIN(TX,6)
|
||||
#error "Serial Port 6 TX IO pins conflict with another pin on the board."
|
||||
#endif
|
||||
#if CHECK_SERIAL_PIN(RX,6)
|
||||
#error "Serial Port 6 RX IO pins conflict with another pin on the board."
|
||||
#endif
|
||||
#endif
|
||||
#undef CHECK_SERIAL_PIN
|
||||
#undef _CHECK_SERIAL_PIN
|
||||
|
||||
@@ -33,8 +33,9 @@
|
||||
void UnwPrintf(const char *format, ...) {
|
||||
va_list args;
|
||||
|
||||
va_start( args, format );
|
||||
vprintf(format, args );
|
||||
va_start(args, format);
|
||||
vprintf(format, args);
|
||||
va_end(args);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -110,13 +110,14 @@
|
||||
#define BOARD_COPYMASTER_3D 1154 // Copymaster 3D
|
||||
#define BOARD_ORTUR_4 1155 // Ortur 4
|
||||
#define BOARD_TENLOG_D3_HERO 1156 // Tenlog D3 Hero IDEX printer
|
||||
#define BOARD_RAMPS_S_12_EEFB 1157 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed)
|
||||
#define BOARD_RAMPS_S_12_EEEB 1158 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Hotend2, Bed)
|
||||
#define BOARD_RAMPS_S_12_EFFB 1159 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed)
|
||||
#define BOARD_LONGER3D_LK1_PRO 1160 // Longer LK1 PRO / Alfawise U20 Pro (PRO version)
|
||||
#define BOARD_LONGER3D_LKx_PRO 1161 // Longer LKx PRO / Alfawise Uxx Pro (PRO version)
|
||||
#define BOARD_ZRIB_V53 1162 // Zonestar zrib V5.3 (Chinese RAMPS replica)
|
||||
#define BOARD_PXMALION_CORE_I3 1163 // Pxmalion Core I3
|
||||
#define BOARD_TENLOG_MB1_V23 1157 // Tenlog D3, D5, D6 IDEX Printer
|
||||
#define BOARD_RAMPS_S_12_EEFB 1158 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed)
|
||||
#define BOARD_RAMPS_S_12_EEEB 1159 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Hotend2, Bed)
|
||||
#define BOARD_RAMPS_S_12_EFFB 1160 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed)
|
||||
#define BOARD_LONGER3D_LK1_PRO 1161 // Longer LK1 PRO / Alfawise U20 Pro (PRO version)
|
||||
#define BOARD_LONGER3D_LKx_PRO 1162 // Longer LKx PRO / Alfawise Uxx Pro (PRO version)
|
||||
#define BOARD_ZRIB_V53 1163 // Zonestar zrib V5.3 (Chinese RAMPS replica)
|
||||
#define BOARD_PXMALION_CORE_I3 1164 // Pxmalion Core I3
|
||||
|
||||
//
|
||||
// RAMBo and derivatives
|
||||
|
||||
@@ -125,6 +125,8 @@
|
||||
|| AXIS_DRIVER_TYPE(A,TMC2660) \
|
||||
|| AXIS_DRIVER_TYPE(A,TMC5130) || AXIS_DRIVER_TYPE(A,TMC5160) )
|
||||
|
||||
#define AXIS_IS_TMC_CONFIG(A) ( AXIS_IS_TMC(A) || AXIS_DRIVER_TYPE(A,TMC26X) )
|
||||
|
||||
// Test for a driver that uses SPI - this allows checking whether a _CS_ pin
|
||||
// is considered sensitive
|
||||
#define AXIS_HAS_SPI(A) ( AXIS_DRIVER_TYPE(A,TMC2130) || AXIS_DRIVER_TYPE(A,TMC2160) \
|
||||
|
||||
@@ -36,6 +36,8 @@ struct IF { typedef R type; };
|
||||
template <class L, class R>
|
||||
struct IF<true, L, R> { typedef L type; };
|
||||
|
||||
#define ALL_AXIS_NAMES X, X2, Y, Y2, Z, Z2, Z3, Z4, I, J, K, U, V, W, E0, E1, E2, E3, E4, E5, E6, E7
|
||||
|
||||
#define NUM_AXIS_GANG(V...) GANG_N(NUM_AXES, V)
|
||||
#define NUM_AXIS_CODE(V...) CODE_N(NUM_AXES, V)
|
||||
#define NUM_AXIS_LIST(V...) LIST_N(NUM_AXES, V)
|
||||
|
||||
@@ -57,6 +57,7 @@ bool leveling_is_valid() {
|
||||
* Enable: Current position = "unleveled" physical position
|
||||
*/
|
||||
void set_bed_leveling_enabled(const bool enable/*=true*/) {
|
||||
DEBUG_SECTION(log_sble, "set_bed_leveling_enabled", DEBUGGING(LEVELING));
|
||||
|
||||
const bool can_change = TERN1(AUTO_BED_LEVELING_BILINEAR, !enable || leveling_is_valid());
|
||||
|
||||
|
||||
@@ -260,7 +260,7 @@ bool unified_bed_leveling::sanity_check() {
|
||||
*/
|
||||
void GcodeSuite::M1004() {
|
||||
|
||||
#define ALIGN_GCODE TERN(Z_STEPPER_AUTO_ALIGN, "G34", "")
|
||||
#define ALIGN_GCODE TERN(Z_STEPPER_AUTO_ALIGN, "G34\n", "")
|
||||
#define PROBE_GCODE TERN(HAS_BED_PROBE, "G29P1\nG29P3", "G29P4R")
|
||||
|
||||
#if HAS_HOTEND
|
||||
@@ -280,7 +280,7 @@ bool unified_bed_leveling::sanity_check() {
|
||||
#endif
|
||||
|
||||
process_subcommands_now(FPSTR(G28_STR)); // Home
|
||||
process_subcommands_now(F(ALIGN_GCODE "\n" // Align multi z axis if available
|
||||
process_subcommands_now(F(ALIGN_GCODE // Align multi z axis if available
|
||||
PROBE_GCODE "\n" // Build mesh with available hardware
|
||||
"G29P3\nG29P3")); // Ensure mesh is complete by running smart fill twice
|
||||
|
||||
|
||||
@@ -336,9 +336,9 @@
|
||||
#if IS_SCARA
|
||||
#define DELTA_SEGMENT_MIN_LENGTH 0.25 // SCARA minimum segment size is 0.25mm
|
||||
#elif ENABLED(DELTA)
|
||||
#define DELTA_SEGMENT_MIN_LENGTH 0.10 // mm (still subject to DELTA_SEGMENTS_PER_SECOND)
|
||||
#define DELTA_SEGMENT_MIN_LENGTH 0.10 // mm (still subject to DEFAULT_SEGMENTS_PER_SECOND)
|
||||
#elif ENABLED(POLARGRAPH)
|
||||
#define DELTA_SEGMENT_MIN_LENGTH 0.10 // mm (still subject to DELTA_SEGMENTS_PER_SECOND)
|
||||
#define DELTA_SEGMENT_MIN_LENGTH 0.10 // mm (still subject to DEFAULT_SEGMENTS_PER_SECOND)
|
||||
#else // CARTESIAN
|
||||
#ifdef LEVELED_SEGMENT_LENGTH
|
||||
#define DELTA_SEGMENT_MIN_LENGTH LEVELED_SEGMENT_LENGTH
|
||||
|
||||
@@ -72,6 +72,22 @@ void ControllerFan::update() {
|
||||
? settings.active_speed : settings.idle_speed
|
||||
);
|
||||
|
||||
speed = CALC_FAN_SPEED(speed);
|
||||
|
||||
#if FAN_KICKSTART_TIME
|
||||
static millis_t fan_kick_end = 0;
|
||||
if (speed > FAN_OFF_PWM) {
|
||||
if (!fan_kick_end) {
|
||||
fan_kick_end = ms + FAN_KICKSTART_TIME; // May be longer based on slow update interval for controller fn check. Sets minimum
|
||||
speed = FAN_KICKSTART_POWER;
|
||||
}
|
||||
else if (PENDING(ms, fan_kick_end))
|
||||
speed = FAN_KICKSTART_POWER;
|
||||
}
|
||||
else
|
||||
fan_kick_end = 0;
|
||||
#endif
|
||||
|
||||
#if ENABLED(FAN_SOFT_PWM)
|
||||
thermalManager.soft_pwm_controller_speed = speed;
|
||||
#else
|
||||
|
||||
@@ -30,18 +30,6 @@
|
||||
|
||||
#include "leds.h"
|
||||
|
||||
#if ENABLED(BLINKM)
|
||||
#include "blinkm.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(PCA9632)
|
||||
#include "pca9632.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(PCA9533)
|
||||
#include "pca9533.h"
|
||||
#endif
|
||||
|
||||
#if EITHER(CASE_LIGHT_USE_RGB_LED, CASE_LIGHT_USE_NEOPIXEL)
|
||||
#include "../../feature/caselight.h"
|
||||
#endif
|
||||
|
||||
@@ -40,6 +40,18 @@
|
||||
#undef _NEOPIXEL_INCLUDE_
|
||||
#endif
|
||||
|
||||
#if ENABLED(BLINKM)
|
||||
#include "blinkm.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(PCA9533)
|
||||
#include "pca9533.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(PCA9632)
|
||||
#include "pca9632.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LEDcolor type for use with leds.set_color
|
||||
*/
|
||||
@@ -107,6 +119,13 @@ typedef struct LEDColor {
|
||||
|
||||
class LEDLights {
|
||||
public:
|
||||
#if ANY(LED_CONTROL_MENU, PRINTER_EVENT_LEDS, CASE_LIGHT_IS_COLOR_LED)
|
||||
static LEDColor color; // last non-off color
|
||||
static bool lights_on; // the last set color was "on"
|
||||
#else
|
||||
static constexpr bool lights_on = true;
|
||||
#endif
|
||||
|
||||
LEDLights() {} // ctor
|
||||
|
||||
static void setup(); // init()
|
||||
@@ -142,15 +161,10 @@ public:
|
||||
static LEDColor get_color() { return lights_on ? color : LEDColorOff(); }
|
||||
#endif
|
||||
|
||||
#if ANY(LED_CONTROL_MENU, PRINTER_EVENT_LEDS, CASE_LIGHT_IS_COLOR_LED)
|
||||
static LEDColor color; // last non-off color
|
||||
static bool lights_on; // the last set color was "on"
|
||||
#endif
|
||||
|
||||
#if ENABLED(LED_CONTROL_MENU)
|
||||
static void toggle(); // swap "off" with color
|
||||
#endif
|
||||
#if EITHER(LED_CONTROL_MENU, CASE_LIGHT_USE_RGB_LED)
|
||||
#if EITHER(LED_CONTROL_MENU, CASE_LIGHT_USE_RGB_LED) || LED_POWEROFF_TIMEOUT > 0
|
||||
static void update() { set_color(color); }
|
||||
#endif
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ PowerMonitor power_monitor; // Single instance - this calls the constructor
|
||||
void PowerMonitor::draw_current() {
|
||||
const float amps = getAmps();
|
||||
lcd_put_u8str(amps < 100 ? ftostr31ns(amps) : ui16tostr4rj((uint16_t)amps));
|
||||
lcd_put_lchar('A');
|
||||
lcd_put_u8str(F("A"));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -61,7 +61,7 @@ PowerMonitor power_monitor; // Single instance - this calls the constructor
|
||||
void PowerMonitor::draw_voltage() {
|
||||
const float volts = getVolts();
|
||||
lcd_put_u8str(volts < 100 ? ftostr31ns(volts) : ui16tostr4rj((uint16_t)volts));
|
||||
lcd_put_lchar('V');
|
||||
lcd_put_u8str(F("V"));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -69,7 +69,7 @@ PowerMonitor power_monitor; // Single instance - this calls the constructor
|
||||
void PowerMonitor::draw_power() {
|
||||
const float power = getPower();
|
||||
lcd_put_u8str(power < 100 ? ftostr31ns(power) : ui16tostr4rj((uint16_t)power));
|
||||
lcd_put_lchar('W');
|
||||
lcd_put_u8str(F("W"));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -153,6 +153,9 @@ class PrintJobRecovery {
|
||||
static void prepare();
|
||||
|
||||
static void setup() {
|
||||
#if PIN_EXISTS(OUTAGECON)
|
||||
OUT_WRITE(OUTAGECON_PIN, HIGH);
|
||||
#endif
|
||||
#if PIN_EXISTS(POWER_LOSS)
|
||||
#if ENABLED(POWER_LOSS_PULLUP)
|
||||
SET_INPUT_PULLUP(POWER_LOSS_PIN);
|
||||
|
||||
@@ -42,7 +42,7 @@ void Repeat::add_marker(const uint32_t sdpos, const uint16_t count) {
|
||||
SERIAL_ECHO_MSG("!Too many markers.");
|
||||
else {
|
||||
marker[index].sdpos = sdpos;
|
||||
marker[index].counter = count ?: -1;
|
||||
marker[index].counter = count ? count - 1 : -1;
|
||||
index++;
|
||||
DEBUG_ECHOLNPGM("Add Marker ", index, " at ", sdpos, " (", count, ")");
|
||||
}
|
||||
|
||||
@@ -313,9 +313,16 @@ void GcodeSuite::M43() {
|
||||
|
||||
// 'P' Get the range of pins to test or watch
|
||||
uint8_t first_pin = PARSED_PIN_INDEX('P', 0),
|
||||
last_pin = parser.seenval('P') ? first_pin : (NUMBER_PINS_TOTAL) - 1;
|
||||
last_pin = parser.seenval('L') ? PARSED_PIN_INDEX('L', 0) : parser.seenval('P') ? first_pin : (NUMBER_PINS_TOTAL) - 1;
|
||||
|
||||
if (first_pin > last_pin) return;
|
||||
NOMORE(first_pin, (NUMBER_PINS_TOTAL) - 1);
|
||||
NOMORE(last_pin, (NUMBER_PINS_TOTAL) - 1);
|
||||
|
||||
if (first_pin > last_pin) {
|
||||
const uint8_t f = first_pin;
|
||||
first_pin = last_pin;
|
||||
last_pin = f;
|
||||
}
|
||||
|
||||
// 'I' to ignore protected pins
|
||||
const bool ignore_protection = parser.boolval('I');
|
||||
|
||||
@@ -50,6 +50,7 @@ void GcodeSuite::M900() {
|
||||
|
||||
#if EXTRUDERS < 2
|
||||
constexpr uint8_t tool_index = 0;
|
||||
UNUSED(tool_index);
|
||||
#else
|
||||
const uint8_t tool_index = parser.intval('T', active_extruder);
|
||||
if (tool_index >= EXTRUDERS) {
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2022 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_SHAPING
|
||||
|
||||
#include "../../gcode.h"
|
||||
#include "../../../module/stepper.h"
|
||||
|
||||
void GcodeSuite::M593_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, F("Input Shaping"));
|
||||
#if ENABLED(INPUT_SHAPING_X)
|
||||
SERIAL_ECHOLNPGM(" M593 X"
|
||||
" F", stepper.get_shaping_frequency(X_AXIS),
|
||||
" D", stepper.get_shaping_damping_ratio(X_AXIS)
|
||||
);
|
||||
#endif
|
||||
#if ENABLED(INPUT_SHAPING_Y)
|
||||
TERN_(INPUT_SHAPING_X, report_echo_start(forReplay));
|
||||
SERIAL_ECHOLNPGM(" M593 Y"
|
||||
" F", stepper.get_shaping_frequency(Y_AXIS),
|
||||
" D", stepper.get_shaping_damping_ratio(Y_AXIS)
|
||||
);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* M593: Get or Set Input Shaping Parameters
|
||||
* D<factor> Set the zeta/damping factor. If axes (X, Y, etc.) are not specified, set for all axes.
|
||||
* F<frequency> Set the frequency. If axes (X, Y, etc.) are not specified, set for all axes.
|
||||
* T[map] Input Shaping type, 0:ZV, 1:EI, 2:2H EI (not implemented yet)
|
||||
* X<1> Set the given parameters only for the X axis.
|
||||
* Y<1> Set the given parameters only for the Y axis.
|
||||
*/
|
||||
void GcodeSuite::M593() {
|
||||
if (!parser.seen_any()) return M593_report();
|
||||
|
||||
const bool seen_X = TERN0(INPUT_SHAPING_X, parser.seen_test('X')),
|
||||
seen_Y = TERN0(INPUT_SHAPING_Y, parser.seen_test('Y')),
|
||||
for_X = seen_X || TERN0(INPUT_SHAPING_X, (!seen_X && !seen_Y)),
|
||||
for_Y = seen_Y || TERN0(INPUT_SHAPING_Y, (!seen_X && !seen_Y));
|
||||
|
||||
if (parser.seen('D')) {
|
||||
const float zeta = parser.value_float();
|
||||
if (WITHIN(zeta, 0, 1)) {
|
||||
if (for_X) stepper.set_shaping_damping_ratio(X_AXIS, zeta);
|
||||
if (for_Y) stepper.set_shaping_damping_ratio(Y_AXIS, zeta);
|
||||
}
|
||||
else
|
||||
SERIAL_ECHO_MSG("?Zeta (D) value out of range (0-1)");
|
||||
}
|
||||
|
||||
if (parser.seen('F')) {
|
||||
const float freq = parser.value_float();
|
||||
constexpr float max_freq = float(uint32_t(STEPPER_TIMER_RATE) / 2) / shaping_time_t(-2);
|
||||
if (freq == 0.0f || freq > max_freq) {
|
||||
if (for_X) stepper.set_shaping_frequency(X_AXIS, freq);
|
||||
if (for_Y) stepper.set_shaping_frequency(Y_AXIS, freq);
|
||||
}
|
||||
else
|
||||
SERIAL_ECHOLNPGM("?Frequency (F) must be greater than ", max_freq, " or 0 to disable");
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -933,6 +933,10 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 575: M575(); break; // M575: Set serial baudrate
|
||||
#endif
|
||||
|
||||
#if HAS_SHAPING
|
||||
case 593: M593(); break; // M593: Set Input Shaping parameters
|
||||
#endif
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
case 600: M600(); break; // M600: Pause for Filament Change
|
||||
case 603: M603(); break; // M603: Configure Filament Change
|
||||
|
||||
@@ -259,6 +259,7 @@
|
||||
* M554 - Get or set IP gateway. (Requires enabled Ethernet port)
|
||||
* M569 - Enable stealthChop on an axis. (Requires at least one _DRIVER_TYPE to be TMC2130/2160/2208/2209/5130/5160)
|
||||
* M575 - Change the serial baud rate. (Requires BAUD_RATE_GCODE)
|
||||
* M593 - Get or set input shaping parameters. (Requires INPUT_SHAPING_[XY])
|
||||
* 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)
|
||||
@@ -1080,6 +1081,11 @@ private:
|
||||
static void M575();
|
||||
#endif
|
||||
|
||||
#if HAS_SHAPING
|
||||
static void M593();
|
||||
static void M593_report(const bool forReplay=true);
|
||||
#endif
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
static void M600();
|
||||
static void M603();
|
||||
|
||||
@@ -469,8 +469,11 @@ void GCodeQueue::get_serial_commands() {
|
||||
|
||||
const long gcode_N = strtol(npos + 1, nullptr, 10);
|
||||
|
||||
// The line number must be in the correct sequence.
|
||||
if (gcode_N != serial.last_N + 1 && !M110) {
|
||||
// In case of error on a serial port, don't prevent other serial port from making progress
|
||||
// A request-for-resend line was already in transit so we got two - oops!
|
||||
if (WITHIN(gcode_N, serial.last_N - 1, serial.last_N)) continue;
|
||||
// A corrupted line or too high, indicating a lost line
|
||||
gcode_line_error(F(STR_ERR_LINE_NO), p);
|
||||
break;
|
||||
}
|
||||
@@ -480,13 +483,11 @@ void GCodeQueue::get_serial_commands() {
|
||||
uint8_t checksum = 0, count = uint8_t(apos - command);
|
||||
while (count) checksum ^= command[--count];
|
||||
if (strtol(apos + 1, nullptr, 10) != checksum) {
|
||||
// In case of error on a serial port, don't prevent other serial port from making progress
|
||||
gcode_line_error(F(STR_ERR_CHECKSUM_MISMATCH), p);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// In case of error on a serial port, don't prevent other serial port from making progress
|
||||
gcode_line_error(F(STR_ERR_NO_CHECKSUM), p);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#if ENABLED(MPCTEMP)
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../lcd/marlinui.h"
|
||||
#include "../../module/temperature.h"
|
||||
|
||||
/**
|
||||
@@ -42,7 +43,12 @@
|
||||
*/
|
||||
|
||||
void GcodeSuite::M306() {
|
||||
if (parser.seen_test('T')) { thermalManager.MPC_autotune(); return; }
|
||||
if (parser.seen_test('T')) {
|
||||
LCD_MESSAGE(MSG_MPC_AUTOTUNE);
|
||||
thermalManager.MPC_autotune();
|
||||
ui.reset_status();
|
||||
return;
|
||||
}
|
||||
|
||||
if (parser.seen("ACFPRH")) {
|
||||
const heater_id_t hid = (heater_id_t)parser.intval('E', 0);
|
||||
|
||||
@@ -1020,8 +1020,11 @@
|
||||
#endif
|
||||
|
||||
// Helper macros for extruder and hotend arrays
|
||||
#define EXTRUDER_LOOP() for (int8_t e = 0; e < EXTRUDERS; e++)
|
||||
#define HOTEND_LOOP() for (int8_t e = 0; e < HOTENDS; e++)
|
||||
#define _EXTRUDER_LOOP(E) for (int8_t E = 0; E < EXTRUDERS; E++)
|
||||
#define EXTRUDER_LOOP() _EXTRUDER_LOOP(e)
|
||||
#define _HOTEND_LOOP(H) for (int8_t H = 0; H < HOTENDS; H++)
|
||||
#define HOTEND_LOOP() _HOTEND_LOOP(e)
|
||||
|
||||
#define ARRAY_BY_EXTRUDERS(V...) ARRAY_N(EXTRUDERS, V)
|
||||
#define ARRAY_BY_EXTRUDERS1(v1) ARRAY_N_1(EXTRUDERS, v1)
|
||||
#define ARRAY_BY_HOTENDS(V...) ARRAY_N(HOTENDS, V)
|
||||
|
||||
@@ -262,26 +262,72 @@
|
||||
#undef HEATER_1_MAXTEMP
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_IS_MAX_TC(2)
|
||||
#if TEMP_SENSOR_2 == -5
|
||||
#define TEMP_SENSOR_2_IS_MAX31865 1
|
||||
#define TEMP_SENSOR_2_MAX_TC_TMIN 0
|
||||
#define TEMP_SENSOR_2_MAX_TC_TMAX 1024
|
||||
#ifndef MAX31865_SENSOR_WIRES_2
|
||||
#define MAX31865_SENSOR_WIRES_2 2
|
||||
#endif
|
||||
#ifndef MAX31865_WIRE_OHMS_2
|
||||
#define MAX31865_WIRE_OHMS_2 0.0f
|
||||
#endif
|
||||
#elif TEMP_SENSOR_2 == -3
|
||||
#define TEMP_SENSOR_2_IS_MAX31855 1
|
||||
#define TEMP_SENSOR_2_MAX_TC_TMIN -270
|
||||
#define TEMP_SENSOR_2_MAX_TC_TMAX 1800
|
||||
#elif TEMP_SENSOR_2 == -2
|
||||
#define TEMP_SENSOR_2_IS_MAX6675 1
|
||||
#define TEMP_SENSOR_2_MAX_TC_TMIN 0
|
||||
#define TEMP_SENSOR_2_MAX_TC_TMAX 1024
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_2 != TEMP_SENSOR_0
|
||||
#if TEMP_SENSOR_2 == -5
|
||||
#error "If MAX31865 Thermocouple (-5) is used for TEMP_SENSOR_2 then TEMP_SENSOR_0 must match."
|
||||
#elif TEMP_SENSOR_2 == -3
|
||||
#error "If MAX31855 Thermocouple (-3) is used for TEMP_SENSOR_2 then TEMP_SENSOR_0 must match."
|
||||
#elif TEMP_SENSOR_2 == -2
|
||||
#error "If MAX6675 Thermocouple (-2) is used for TEMP_SENSOR_2 then TEMP_SENSOR_0 must match."
|
||||
#endif
|
||||
#endif
|
||||
#elif TEMP_SENSOR_2 == -4
|
||||
#define TEMP_SENSOR_2_IS_AD8495 1
|
||||
#elif TEMP_SENSOR_2 == -1
|
||||
#define TEMP_SENSOR_2_IS_AD595 1
|
||||
#elif TEMP_SENSOR_2 > 0
|
||||
#define TEMP_SENSOR_2_IS_THERMISTOR 1
|
||||
#if TEMP_SENSOR_2 == 1000
|
||||
#define TEMP_SENSOR_2_IS_CUSTOM 1
|
||||
#elif TEMP_SENSOR_2 == 998 || TEMP_SENSOR_2 == 999
|
||||
#define TEMP_SENSOR_2_IS_DUMMY 1
|
||||
#endif
|
||||
#else
|
||||
#undef HEATER_2_MINTEMP
|
||||
#undef HEATER_2_MAXTEMP
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_IS_MAX_TC(REDUNDANT)
|
||||
#if TEMP_SENSOR_REDUNDANT == -5
|
||||
#if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1)
|
||||
#error "MAX31865 Thermocouples (-5) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)."
|
||||
#if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1) && !REDUNDANT_TEMP_MATCH(SOURCE, E2)
|
||||
#error "MAX31865 Thermocouples (-5) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1/TEMP_SENSOR_2 (0/1/2)."
|
||||
#endif
|
||||
|
||||
#define TEMP_SENSOR_REDUNDANT_IS_MAX31865 1
|
||||
#define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN 0
|
||||
#define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1024
|
||||
#elif TEMP_SENSOR_REDUNDANT == -3
|
||||
#if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1)
|
||||
#error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)."
|
||||
#if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1) && !REDUNDANT_TEMP_MATCH(SOURCE, E2)
|
||||
#error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1/TEMP_SENSOR_2 (0/1/2)."
|
||||
#endif
|
||||
|
||||
#define TEMP_SENSOR_REDUNDANT_IS_MAX31855 1
|
||||
#define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN -270
|
||||
#define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1800
|
||||
#elif TEMP_SENSOR_REDUNDANT == -2
|
||||
#if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1)
|
||||
#error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)."
|
||||
#if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1) && !REDUNDANT_TEMP_MATCH(SOURCE, E2)
|
||||
#error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1/TEMP_SENSOR_2 (0/1/2)."
|
||||
#endif
|
||||
|
||||
#define TEMP_SENSOR_REDUNDANT_IS_MAX6675 1
|
||||
@@ -302,15 +348,21 @@
|
||||
#ifndef MAX31865_SENSOR_WIRES_1
|
||||
#define MAX31865_SENSOR_WIRES_1 2
|
||||
#endif
|
||||
#elif REDUNDANT_TEMP_MATCH(SOURCE, E2)
|
||||
#define TEMP_SENSOR_2_MAX_TC_TMIN TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN
|
||||
#define TEMP_SENSOR_2_MAX_TC_TMAX TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX
|
||||
#ifndef MAX31865_SENSOR_WIRES_2
|
||||
#define MAX31865_SENSOR_WIRES_2 2
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (TEMP_SENSOR_IS_MAX_TC(0) && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_0) || (TEMP_SENSOR_IS_MAX_TC(1) && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_1)
|
||||
#if (TEMP_SENSOR_IS_MAX_TC(0) && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_0) || (TEMP_SENSOR_IS_MAX_TC(1) && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_1) || (TEMP_SENSOR_IS_MAX_TC(2) && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_2)
|
||||
#if TEMP_SENSOR_REDUNDANT == -5
|
||||
#error "If MAX31865 Thermocouple (-5) is used for TEMP_SENSOR_0/TEMP_SENSOR_1 then TEMP_SENSOR_REDUNDANT must match."
|
||||
#error "If MAX31865 Thermocouple (-5) is used for TEMP_SENSOR_0/TEMP_SENSOR_1/TEMP_SENSOR_2 then TEMP_SENSOR_REDUNDANT must match."
|
||||
#elif TEMP_SENSOR_REDUNDANT == -3
|
||||
#error "If MAX31855 Thermocouple (-3) is used for TEMP_SENSOR_0/TEMP_SENSOR_1 then TEMP_SENSOR_REDUNDANT must match."
|
||||
#error "If MAX31855 Thermocouple (-3) is used for TEMP_SENSOR_0/TEMP_SENSOR_1/TEMP_SENSOR_2 then TEMP_SENSOR_REDUNDANT must match."
|
||||
#elif TEMP_SENSOR_REDUNDANT == -2
|
||||
#error "If MAX6675 Thermocouple (-2) is used for TEMP_SENSOR_0/TEMP_SENSOR_1 then TEMP_SENSOR_REDUNDANT must match."
|
||||
#error "If MAX6675 Thermocouple (-2) is used for TEMP_SENSOR_0/TEMP_SENSOR_1/TEMP_SENSOR_2 then TEMP_SENSOR_REDUNDANT must match."
|
||||
#endif
|
||||
#endif
|
||||
#elif TEMP_SENSOR_REDUNDANT == -4
|
||||
@@ -326,39 +378,19 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_IS_MAX_TC(0) || TEMP_SENSOR_IS_MAX_TC(1) || TEMP_SENSOR_IS_MAX_TC(REDUNDANT)
|
||||
#if TEMP_SENSOR_IS_MAX_TC(0) || TEMP_SENSOR_IS_MAX_TC(1) || TEMP_SENSOR_IS_MAX_TC(2) || TEMP_SENSOR_IS_MAX_TC(REDUNDANT)
|
||||
#define HAS_MAX_TC 1
|
||||
#endif
|
||||
#if TEMP_SENSOR_0_IS_MAX6675 || TEMP_SENSOR_1_IS_MAX6675 || TEMP_SENSOR_REDUNDANT_IS_MAX6675
|
||||
#if TEMP_SENSOR_0_IS_MAX6675 || TEMP_SENSOR_1_IS_MAX6675 || TEMP_SENSOR_2_IS_MAX6675 || TEMP_SENSOR_REDUNDANT_IS_MAX6675
|
||||
#define HAS_MAX6675 1
|
||||
#endif
|
||||
#if TEMP_SENSOR_0_IS_MAX31855 || TEMP_SENSOR_1_IS_MAX31855 || TEMP_SENSOR_REDUNDANT_IS_MAX31855
|
||||
#if TEMP_SENSOR_0_IS_MAX31855 || TEMP_SENSOR_1_IS_MAX31855 || TEMP_SENSOR_2_IS_MAX31855 || TEMP_SENSOR_REDUNDANT_IS_MAX31855
|
||||
#define HAS_MAX31855 1
|
||||
#endif
|
||||
#if TEMP_SENSOR_0_IS_MAX31865 || TEMP_SENSOR_1_IS_MAX31865 || TEMP_SENSOR_REDUNDANT_IS_MAX31865
|
||||
#if TEMP_SENSOR_0_IS_MAX31865 || TEMP_SENSOR_1_IS_MAX31865 || TEMP_SENSOR_2_IS_MAX31865 || TEMP_SENSOR_REDUNDANT_IS_MAX31865
|
||||
#define HAS_MAX31865 1
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_2 == -4
|
||||
#define TEMP_SENSOR_2_IS_AD8495 1
|
||||
#elif TEMP_SENSOR_2 == -3
|
||||
#error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_2."
|
||||
#elif TEMP_SENSOR_2 == -2
|
||||
#error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_2."
|
||||
#elif TEMP_SENSOR_2 == -1
|
||||
#define TEMP_SENSOR_2_IS_AD595 1
|
||||
#elif TEMP_SENSOR_2 > 0
|
||||
#define TEMP_SENSOR_2_IS_THERMISTOR 1
|
||||
#if TEMP_SENSOR_2 == 1000
|
||||
#define TEMP_SENSOR_2_IS_CUSTOM 1
|
||||
#elif TEMP_SENSOR_2 == 998 || TEMP_SENSOR_2 == 999
|
||||
#define TEMP_SENSOR_2_IS_DUMMY 1
|
||||
#endif
|
||||
#else
|
||||
#undef HEATER_2_MINTEMP
|
||||
#undef HEATER_2_MAXTEMP
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_3 == -4
|
||||
#define TEMP_SENSOR_3_IS_AD8495 1
|
||||
#elif TEMP_SENSOR_3 == -3
|
||||
@@ -962,8 +994,8 @@
|
||||
#undef CALIBRATION_MEASURE_IMIN
|
||||
#undef CALIBRATION_MEASURE_IMAX
|
||||
#if NUM_AXES < 3
|
||||
#undef Z_IDLE_HEIGHT
|
||||
#undef STEALTHCHOP_Z
|
||||
#undef Z_IDLE_HEIGHT
|
||||
#undef Z_PROBE_SLED
|
||||
#undef Z_SAFE_HOMING
|
||||
#undef HOME_Z_FIRST
|
||||
@@ -973,6 +1005,7 @@
|
||||
#undef CNC_WORKSPACE_PLANES
|
||||
#if NUM_AXES < 2
|
||||
#undef STEALTHCHOP_Y
|
||||
#undef QUICK_HOME
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
@@ -1045,7 +1078,7 @@
|
||||
*/
|
||||
#ifndef LCD_SERIAL_PORT
|
||||
#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI || HAS_DGUS_LCD
|
||||
#if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_MINI_E3_V3_0, BTT_SKR_E3_TURBO)
|
||||
#if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_MINI_E3_V3_0, BTT_SKR_E3_TURBO, BTT_OCTOPUS_V1_1)
|
||||
#define LCD_SERIAL_PORT 1
|
||||
#elif MB(CREALITY_V24S1_301, CREALITY_V24S1_301F4, CREALITY_V423, MKS_ROBIN)
|
||||
#define LCD_SERIAL_PORT 2 // Creality Ender3S1, MKS Robin
|
||||
@@ -1074,3 +1107,24 @@
|
||||
#if ANY(DISABLE_INACTIVE_X, DISABLE_INACTIVE_Y, DISABLE_INACTIVE_Z, DISABLE_INACTIVE_I, DISABLE_INACTIVE_J, DISABLE_INACTIVE_K, DISABLE_INACTIVE_U, DISABLE_INACTIVE_V, DISABLE_INACTIVE_W, DISABLE_INACTIVE_E)
|
||||
#define HAS_DISABLE_INACTIVE_AXIS 1
|
||||
#endif
|
||||
|
||||
// Fan Kickstart
|
||||
#if FAN_KICKSTART_TIME && !defined(FAN_KICKSTART_POWER)
|
||||
#define FAN_KICKSTART_POWER 180
|
||||
#endif
|
||||
|
||||
#if FAN_MIN_PWM == 0 && FAN_MAX_PWM == 255
|
||||
#define CALC_FAN_SPEED(f) (f ?: FAN_OFF_PWM)
|
||||
#else
|
||||
#define CALC_FAN_SPEED(f) (f ? map(f, 1, 255, FAN_MIN_PWM, FAN_MAX_PWM) : FAN_OFF_PWM)
|
||||
#endif
|
||||
|
||||
// Input shaping
|
||||
#if !HAS_Y_AXIS
|
||||
#undef INPUT_SHAPING_Y
|
||||
#undef SHAPING_FREQ_Y
|
||||
#undef SHAPING_BUFFER_Y
|
||||
#endif
|
||||
#if EITHER(INPUT_SHAPING_X, INPUT_SHAPING_Y)
|
||||
#define HAS_SHAPING 1
|
||||
#endif
|
||||
|
||||
+132
-496
@@ -275,10 +275,12 @@
|
||||
*/
|
||||
#if IS_SCARA
|
||||
#undef SLOWDOWN
|
||||
#if DISABLED(AXEL_TPARA)
|
||||
#if ENABLED(AXEL_TPARA)
|
||||
#define SCARA_PRINTABLE_RADIUS (TPARA_LINKAGE_1 + TPARA_LINKAGE_2)
|
||||
#else
|
||||
#define QUICK_HOME
|
||||
#define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
|
||||
#endif
|
||||
#define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -723,19 +725,19 @@
|
||||
#define TEMP_0_SCK_PIN MAX31855_SCK_PIN
|
||||
#endif
|
||||
|
||||
#elif TEMP_SENSOR_1_IS_MAX31865
|
||||
#if !PIN_EXISTS(TEMP_1_MISO) // DO
|
||||
#elif TEMP_SENSOR_0_IS_MAX31865
|
||||
#if !PIN_EXISTS(TEMP_0_MISO) // DO
|
||||
#if PIN_EXISTS(MAX31865_MISO)
|
||||
#define TEMP_1_MISO_PIN MAX31865_MISO_PIN
|
||||
#define TEMP_0_MISO_PIN MAX31865_MISO_PIN
|
||||
#elif PIN_EXISTS(MAX31865_DO)
|
||||
#define TEMP_1_MISO_PIN MAX31865_DO_PIN
|
||||
#define TEMP_0_MISO_PIN MAX31865_DO_PIN
|
||||
#endif
|
||||
#endif
|
||||
#if !PIN_EXISTS(TEMP_1_SCK) && PIN_EXISTS(MAX31865_SCK)
|
||||
#define TEMP_1_SCK_PIN MAX31865_SCK_PIN
|
||||
#if !PIN_EXISTS(TEMP_0_SCK) && PIN_EXISTS(MAX31865_SCK)
|
||||
#define TEMP_0_SCK_PIN MAX31865_SCK_PIN
|
||||
#endif
|
||||
#if !PIN_EXISTS(TEMP_1_MOSI) && PIN_EXISTS(MAX31865_MOSI) // MOSI for '65 only
|
||||
#define TEMP_1_MOSI_PIN MAX31865_MOSI_PIN
|
||||
#if !PIN_EXISTS(TEMP_0_MOSI) && PIN_EXISTS(MAX31865_MOSI) // MOSI for '65 only
|
||||
#define TEMP_0_MOSI_PIN MAX31865_MOSI_PIN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -819,6 +821,75 @@
|
||||
|
||||
#endif // TEMP_SENSOR_IS_MAX_TC(1)
|
||||
|
||||
#if TEMP_SENSOR_IS_MAX_TC(2) || (TEMP_SENSOR_IS_MAX_TC(REDUNDANT) && REDUNDANT_TEMP_MATCH(SOURCE, E2))
|
||||
|
||||
#if !PIN_EXISTS(TEMP_2_CS) // SS3, CS3
|
||||
#if PIN_EXISTS(MAX6675_SS3)
|
||||
#define TEMP_2_CS_PIN MAX6675_SS3_PIN
|
||||
#elif PIN_EXISTS(MAX6675_CS)
|
||||
#define TEMP_2_CS_PIN MAX6675_CS3_PIN
|
||||
#elif PIN_EXISTS(MAX31855_SS3)
|
||||
#define TEMP_2_CS_PIN MAX31855_SS3_PIN
|
||||
#elif PIN_EXISTS(MAX31855_CS3)
|
||||
#define TEMP_2_CS_PIN MAX31855_CS3_PIN
|
||||
#elif PIN_EXISTS(MAX31865_SS3)
|
||||
#define TEMP_2_CS_PIN MAX31865_SS3_PIN
|
||||
#elif PIN_EXISTS(MAX31865_CS3)
|
||||
#define TEMP_2_CS_PIN MAX31865_CS3_PIN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_2_IS_MAX6675
|
||||
#if !PIN_EXISTS(TEMP_2_MISO) // DO
|
||||
#if PIN_EXISTS(MAX6675_MISO)
|
||||
#define TEMP_2_MISO_PIN MAX6675_MISO_PIN
|
||||
#elif PIN_EXISTS(MAX6675_DO)
|
||||
#define TEMP_2_MISO_PIN MAX6675_DO_PIN
|
||||
#endif
|
||||
#endif
|
||||
#if !PIN_EXISTS(TEMP_2_SCK) && PIN_EXISTS(MAX6675_SCK)
|
||||
#define TEMP_2_SCK_PIN MAX6675_SCK_PIN
|
||||
#endif
|
||||
|
||||
#elif TEMP_SENSOR_2_IS_MAX31855
|
||||
#if !PIN_EXISTS(TEMP_2_MISO) // DO
|
||||
#if PIN_EXISTS(MAX31855_MISO)
|
||||
#define TEMP_2_MISO_PIN MAX31855_MISO_PIN
|
||||
#elif PIN_EXISTS(MAX31855_DO)
|
||||
#define TEMP_2_MISO_PIN MAX31855_DO_PIN
|
||||
#endif
|
||||
#endif
|
||||
#if !PIN_EXISTS(TEMP_2_SCK) && PIN_EXISTS(MAX31855_SCK)
|
||||
#define TEMP_2_SCK_PIN MAX31855_SCK_PIN
|
||||
#endif
|
||||
|
||||
#elif TEMP_SENSOR_2_IS_MAX31865
|
||||
#if !PIN_EXISTS(TEMP_2_MISO) // DO
|
||||
#if PIN_EXISTS(MAX31865_MISO)
|
||||
#define TEMP_2_MISO_PIN MAX31865_MISO_PIN
|
||||
#elif PIN_EXISTS(MAX31865_DO)
|
||||
#define TEMP_2_MISO_PIN MAX31865_DO_PIN
|
||||
#endif
|
||||
#endif
|
||||
#if !PIN_EXISTS(TEMP_2_SCK) && PIN_EXISTS(MAX31865_SCK)
|
||||
#define TEMP_2_SCK_PIN MAX31865_SCK_PIN
|
||||
#endif
|
||||
#if !PIN_EXISTS(TEMP_2_MOSI) && PIN_EXISTS(MAX31865_MOSI) // MOSI for '65 only
|
||||
#define TEMP_2_MOSI_PIN MAX31865_MOSI_PIN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Software SPI - enable if MISO/SCK are defined.
|
||||
#if PIN_EXISTS(TEMP_2_MISO) && PIN_EXISTS(TEMP_2_SCK) && DISABLED(TEMP_SENSOR_2_FORCE_HW_SPI)
|
||||
#if TEMP_SENSOR_2_IS_MAX31865 && !PIN_EXISTS(TEMP_2_MOSI)
|
||||
#error "TEMP_SENSOR_2 MAX31865 requires TEMP_2_MOSI_PIN defined for Software SPI. To use Hardware SPI instead, undefine MISO/SCK or enable TEMP_SENSOR_2_FORCE_HW_SPI."
|
||||
#else
|
||||
#define TEMP_SENSOR_2_HAS_SPI_PINS 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // TEMP_SENSOR_IS_MAX_TC(2)
|
||||
|
||||
//
|
||||
// User-defined thermocouple libraries
|
||||
//
|
||||
@@ -857,56 +928,8 @@
|
||||
#define X2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
|
||||
#elif X2_USE_ENDSTOP == _ZMAX_
|
||||
#define X2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
|
||||
#else
|
||||
#define X2_MAX_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(X2_MAX_PIN) && !defined(X2_STOP_PIN)
|
||||
#if X2_USE_ENDSTOP == _XMIN_
|
||||
#define X2_MAX_PIN X_MIN_PIN
|
||||
#elif X2_USE_ENDSTOP == _XMAX_
|
||||
#define X2_MAX_PIN X_MAX_PIN
|
||||
#elif X2_USE_ENDSTOP == _XSTOP_
|
||||
#define X2_MAX_PIN X_STOP_PIN
|
||||
#elif X2_USE_ENDSTOP == _YMIN_
|
||||
#define X2_MAX_PIN Y_MIN_PIN
|
||||
#elif X2_USE_ENDSTOP == _YMAX_
|
||||
#define X2_MAX_PIN Y_MAX_PIN
|
||||
#elif X2_USE_ENDSTOP == _YSTOP_
|
||||
#define X2_MAX_PIN Y_STOP_PIN
|
||||
#elif X2_USE_ENDSTOP == _ZMIN_
|
||||
#define X2_MAX_PIN Z_MIN_PIN
|
||||
#elif X2_USE_ENDSTOP == _ZMAX_
|
||||
#define X2_MAX_PIN Z_MAX_PIN
|
||||
#elif X2_USE_ENDSTOP == _ZSTOP_
|
||||
#define X2_MAX_PIN Z_STOP_PIN
|
||||
#elif X2_USE_ENDSTOP == _XDIAG_
|
||||
#define X2_MAX_PIN X_DIAG_PIN
|
||||
#elif X2_USE_ENDSTOP == _YDIAG_
|
||||
#define X2_MAX_PIN Y_DIAG_PIN
|
||||
#elif X2_USE_ENDSTOP == _ZDIAG_
|
||||
#define X2_MAX_PIN Z_DIAG_PIN
|
||||
#elif X2_USE_ENDSTOP == _E0DIAG_
|
||||
#define X2_MAX_PIN E0_DIAG_PIN
|
||||
#elif X2_USE_ENDSTOP == _E1DIAG_
|
||||
#define X2_MAX_PIN E1_DIAG_PIN
|
||||
#elif X2_USE_ENDSTOP == _E2DIAG_
|
||||
#define X2_MAX_PIN E2_DIAG_PIN
|
||||
#elif X2_USE_ENDSTOP == _E3DIAG_
|
||||
#define X2_MAX_PIN E3_DIAG_PIN
|
||||
#elif X2_USE_ENDSTOP == _E4DIAG_
|
||||
#define X2_MAX_PIN E4_DIAG_PIN
|
||||
#elif X2_USE_ENDSTOP == _E5DIAG_
|
||||
#define X2_MAX_PIN E5_DIAG_PIN
|
||||
#elif X2_USE_ENDSTOP == _E6DIAG_
|
||||
#define X2_MAX_PIN E6_DIAG_PIN
|
||||
#elif X2_USE_ENDSTOP == _E7DIAG_
|
||||
#define X2_MAX_PIN E7_DIAG_PIN
|
||||
#endif
|
||||
#endif
|
||||
#ifndef X2_MIN_ENDSTOP_INVERTING
|
||||
#define X2_MIN_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#else
|
||||
#ifndef X2_MIN_ENDSTOP_INVERTING
|
||||
#if X2_USE_ENDSTOP == _XMIN_
|
||||
@@ -921,56 +944,14 @@
|
||||
#define X2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
|
||||
#elif X2_USE_ENDSTOP == _ZMAX_
|
||||
#define X2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
|
||||
#else
|
||||
#define X2_MIN_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(X2_MIN_PIN) && !defined(X2_STOP_PIN)
|
||||
#if X2_USE_ENDSTOP == _XMIN_
|
||||
#define X2_MIN_PIN X_MIN_PIN
|
||||
#elif X2_USE_ENDSTOP == _XMAX_
|
||||
#define X2_MIN_PIN X_MAX_PIN
|
||||
#elif X2_USE_ENDSTOP == _XSTOP_
|
||||
#define X2_MIN_PIN X_STOP_PIN
|
||||
#elif X2_USE_ENDSTOP == _YMIN_
|
||||
#define X2_MIN_PIN Y_MIN_PIN
|
||||
#elif X2_USE_ENDSTOP == _YMAX_
|
||||
#define X2_MIN_PIN Y_MAX_PIN
|
||||
#elif X2_USE_ENDSTOP == _YSTOP_
|
||||
#define X2_MIN_PIN Y_STOP_PIN
|
||||
#elif X2_USE_ENDSTOP == _ZMIN_
|
||||
#define X2_MIN_PIN Z_MIN_PIN
|
||||
#elif X2_USE_ENDSTOP == _ZMAX_
|
||||
#define X2_MIN_PIN Z_MAX_PIN
|
||||
#elif X2_USE_ENDSTOP == _ZSTOP_
|
||||
#define X2_MIN_PIN Z_STOP_PIN
|
||||
#elif X2_USE_ENDSTOP == _XDIAG_
|
||||
#define X2_MIN_PIN X_DIAG_PIN
|
||||
#elif X2_USE_ENDSTOP == _YDIAG_
|
||||
#define X2_MIN_PIN Y_DIAG_PIN
|
||||
#elif X2_USE_ENDSTOP == _ZDIAG_
|
||||
#define X2_MIN_PIN Z_DIAG_PIN
|
||||
#elif X2_USE_ENDSTOP == _E0DIAG_
|
||||
#define X2_MIN_PIN E0_DIAG_PIN
|
||||
#elif X2_USE_ENDSTOP == _E1DIAG_
|
||||
#define X2_MIN_PIN E1_DIAG_PIN
|
||||
#elif X2_USE_ENDSTOP == _E2DIAG_
|
||||
#define X2_MIN_PIN E2_DIAG_PIN
|
||||
#elif X2_USE_ENDSTOP == _E3DIAG_
|
||||
#define X2_MIN_PIN E3_DIAG_PIN
|
||||
#elif X2_USE_ENDSTOP == _E4DIAG_
|
||||
#define X2_MIN_PIN E4_DIAG_PIN
|
||||
#elif X2_USE_ENDSTOP == _E5DIAG_
|
||||
#define X2_MIN_PIN E5_DIAG_PIN
|
||||
#elif X2_USE_ENDSTOP == _E6DIAG_
|
||||
#define X2_MIN_PIN E6_DIAG_PIN
|
||||
#elif X2_USE_ENDSTOP == _E7DIAG_
|
||||
#define X2_MIN_PIN E7_DIAG_PIN
|
||||
#endif
|
||||
#endif
|
||||
#ifndef X2_MAX_ENDSTOP_INVERTING
|
||||
#define X2_MAX_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
#ifndef X2_MAX_ENDSTOP_INVERTING
|
||||
#define X2_MAX_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#ifndef X2_MIN_ENDSTOP_INVERTING
|
||||
#define X2_MIN_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -992,56 +973,8 @@
|
||||
#define Y2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
|
||||
#elif Y2_USE_ENDSTOP == _ZMAX_
|
||||
#define Y2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
|
||||
#else
|
||||
#define Y2_MAX_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(Y2_MAX_PIN) && !defined(Y2_STOP_PIN)
|
||||
#if Y2_USE_ENDSTOP == _XMIN_
|
||||
#define Y2_MAX_PIN X_MIN_PIN
|
||||
#elif Y2_USE_ENDSTOP == _XMAX_
|
||||
#define Y2_MAX_PIN X_MAX_PIN
|
||||
#elif Y2_USE_ENDSTOP == _XSTOP_
|
||||
#define Y2_MAX_PIN X_STOP_PIN
|
||||
#elif Y2_USE_ENDSTOP == _YMIN_
|
||||
#define Y2_MAX_PIN Y_MIN_PIN
|
||||
#elif Y2_USE_ENDSTOP == _YMAX_
|
||||
#define Y2_MAX_PIN Y_MAX_PIN
|
||||
#elif Y2_USE_ENDSTOP == _YSTOP_
|
||||
#define Y2_MAX_PIN Y_STOP_PIN
|
||||
#elif Y2_USE_ENDSTOP == _ZMIN_
|
||||
#define Y2_MAX_PIN Z_MIN_PIN
|
||||
#elif Y2_USE_ENDSTOP == _ZMAX_
|
||||
#define Y2_MAX_PIN Z_MAX_PIN
|
||||
#elif Y2_USE_ENDSTOP == _ZSTOP_
|
||||
#define Y2_MAX_PIN Z_STOP_PIN
|
||||
#elif Y2_USE_ENDSTOP == _XDIAG_
|
||||
#define Y2_MAX_PIN X_DIAG_PIN
|
||||
#elif Y2_USE_ENDSTOP == _YDIAG_
|
||||
#define Y2_MAX_PIN Y_DIAG_PIN
|
||||
#elif Y2_USE_ENDSTOP == _ZDIAG_
|
||||
#define Y2_MAX_PIN Z_DIAG_PIN
|
||||
#elif Y2_USE_ENDSTOP == _E0DIAG_
|
||||
#define Y2_MAX_PIN E0_DIAG_PIN
|
||||
#elif Y2_USE_ENDSTOP == _E1DIAG_
|
||||
#define Y2_MAX_PIN E1_DIAG_PIN
|
||||
#elif Y2_USE_ENDSTOP == _E2DIAG_
|
||||
#define Y2_MAX_PIN E2_DIAG_PIN
|
||||
#elif Y2_USE_ENDSTOP == _E3DIAG_
|
||||
#define Y2_MAX_PIN E3_DIAG_PIN
|
||||
#elif Y2_USE_ENDSTOP == _E4DIAG_
|
||||
#define Y2_MAX_PIN E4_DIAG_PIN
|
||||
#elif Y2_USE_ENDSTOP == _E5DIAG_
|
||||
#define Y2_MAX_PIN E5_DIAG_PIN
|
||||
#elif Y2_USE_ENDSTOP == _E6DIAG_
|
||||
#define Y2_MAX_PIN E6_DIAG_PIN
|
||||
#elif Y2_USE_ENDSTOP == _E7DIAG_
|
||||
#define Y2_MAX_PIN E7_DIAG_PIN
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Y2_MIN_ENDSTOP_INVERTING
|
||||
#define Y2_MIN_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#else
|
||||
#ifndef Y2_MIN_ENDSTOP_INVERTING
|
||||
#if Y2_USE_ENDSTOP == _XMIN_
|
||||
@@ -1056,56 +989,14 @@
|
||||
#define Y2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
|
||||
#elif Y2_USE_ENDSTOP == _ZMAX_
|
||||
#define Y2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
|
||||
#else
|
||||
#define Y2_MIN_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(Y2_MIN_PIN) && !defined(Y2_STOP_PIN)
|
||||
#if Y2_USE_ENDSTOP == _XMIN_
|
||||
#define Y2_MIN_PIN X_MIN_PIN
|
||||
#elif Y2_USE_ENDSTOP == _XMAX_
|
||||
#define Y2_MIN_PIN X_MAX_PIN
|
||||
#elif Y2_USE_ENDSTOP == _XSTOP_
|
||||
#define Y2_MIN_PIN X_STOP_PIN
|
||||
#elif Y2_USE_ENDSTOP == _YMIN_
|
||||
#define Y2_MIN_PIN Y_MIN_PIN
|
||||
#elif Y2_USE_ENDSTOP == _YMAX_
|
||||
#define Y2_MIN_PIN Y_MAX_PIN
|
||||
#elif Y2_USE_ENDSTOP == _YSTOP_
|
||||
#define Y2_MIN_PIN Y_STOP_PIN
|
||||
#elif Y2_USE_ENDSTOP == _ZMIN_
|
||||
#define Y2_MIN_PIN Z_MIN_PIN
|
||||
#elif Y2_USE_ENDSTOP == _ZMAX_
|
||||
#define Y2_MIN_PIN Z_MAX_PIN
|
||||
#elif Y2_USE_ENDSTOP == _ZSTOP_
|
||||
#define Y2_MIN_PIN Z_STOP_PIN
|
||||
#elif Y2_USE_ENDSTOP == _XDIAG_
|
||||
#define Y2_MIN_PIN X_DIAG_PIN
|
||||
#elif Y2_USE_ENDSTOP == _YDIAG_
|
||||
#define Y2_MIN_PIN Y_DIAG_PIN
|
||||
#elif Y2_USE_ENDSTOP == _ZDIAG_
|
||||
#define Y2_MIN_PIN Z_DIAG_PIN
|
||||
#elif Y2_USE_ENDSTOP == _E0DIAG_
|
||||
#define Y2_MIN_PIN E0_DIAG_PIN
|
||||
#elif Y2_USE_ENDSTOP == _E1DIAG_
|
||||
#define Y2_MIN_PIN E1_DIAG_PIN
|
||||
#elif Y2_USE_ENDSTOP == _E2DIAG_
|
||||
#define Y2_MIN_PIN E2_DIAG_PIN
|
||||
#elif Y2_USE_ENDSTOP == _E3DIAG_
|
||||
#define Y2_MIN_PIN E3_DIAG_PIN
|
||||
#elif Y2_USE_ENDSTOP == _E4DIAG_
|
||||
#define Y2_MIN_PIN E4_DIAG_PIN
|
||||
#elif Y2_USE_ENDSTOP == _E5DIAG_
|
||||
#define Y2_MIN_PIN E5_DIAG_PIN
|
||||
#elif Y2_USE_ENDSTOP == _E6DIAG_
|
||||
#define Y2_MIN_PIN E6_DIAG_PIN
|
||||
#elif Y2_USE_ENDSTOP == _E7DIAG_
|
||||
#define Y2_MIN_PIN E7_DIAG_PIN
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Y2_MAX_ENDSTOP_INVERTING
|
||||
#define Y2_MAX_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Y2_MAX_ENDSTOP_INVERTING
|
||||
#define Y2_MAX_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#ifndef Y2_MIN_ENDSTOP_INVERTING
|
||||
#define Y2_MIN_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1128,56 +1019,8 @@
|
||||
#define Z2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
|
||||
#elif Z2_USE_ENDSTOP == _ZMAX_
|
||||
#define Z2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
|
||||
#else
|
||||
#define Z2_MAX_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(Z2_MAX_PIN) && !defined(Z2_STOP_PIN)
|
||||
#if Z2_USE_ENDSTOP == _XMIN_
|
||||
#define Z2_MAX_PIN X_MIN_PIN
|
||||
#elif Z2_USE_ENDSTOP == _XMAX_
|
||||
#define Z2_MAX_PIN X_MAX_PIN
|
||||
#elif Z2_USE_ENDSTOP == _XSTOP_
|
||||
#define Z2_MAX_PIN X_STOP_PIN
|
||||
#elif Z2_USE_ENDSTOP == _YMIN_
|
||||
#define Z2_MAX_PIN Y_MIN_PIN
|
||||
#elif Z2_USE_ENDSTOP == _YMAX_
|
||||
#define Z2_MAX_PIN Y_MAX_PIN
|
||||
#elif Z2_USE_ENDSTOP == _YSTOP_
|
||||
#define Z2_MAX_PIN Y_STOP_PIN
|
||||
#elif Z2_USE_ENDSTOP == _ZMIN_
|
||||
#define Z2_MAX_PIN Z_MIN_PIN
|
||||
#elif Z2_USE_ENDSTOP == _ZMAX_
|
||||
#define Z2_MAX_PIN Z_MAX_PIN
|
||||
#elif Z2_USE_ENDSTOP == _ZSTOP_
|
||||
#define Z2_MAX_PIN Z_STOP_PIN
|
||||
#elif Z2_USE_ENDSTOP == _XDIAG_
|
||||
#define Z2_MAX_PIN X_DIAG_PIN
|
||||
#elif Z2_USE_ENDSTOP == _YDIAG_
|
||||
#define Z2_MAX_PIN Y_DIAG_PIN
|
||||
#elif Z2_USE_ENDSTOP == _ZDIAG_
|
||||
#define Z2_MAX_PIN Z_DIAG_PIN
|
||||
#elif Z2_USE_ENDSTOP == _E0DIAG_
|
||||
#define Z2_MAX_PIN E0_DIAG_PIN
|
||||
#elif Z2_USE_ENDSTOP == _E1DIAG_
|
||||
#define Z2_MAX_PIN E1_DIAG_PIN
|
||||
#elif Z2_USE_ENDSTOP == _E2DIAG_
|
||||
#define Z2_MAX_PIN E2_DIAG_PIN
|
||||
#elif Z2_USE_ENDSTOP == _E3DIAG_
|
||||
#define Z2_MAX_PIN E3_DIAG_PIN
|
||||
#elif Z2_USE_ENDSTOP == _E4DIAG_
|
||||
#define Z2_MAX_PIN E4_DIAG_PIN
|
||||
#elif Z2_USE_ENDSTOP == _E5DIAG_
|
||||
#define Z2_MAX_PIN E5_DIAG_PIN
|
||||
#elif Z2_USE_ENDSTOP == _E6DIAG_
|
||||
#define Z2_MAX_PIN E6_DIAG_PIN
|
||||
#elif Z2_USE_ENDSTOP == _E7DIAG_
|
||||
#define Z2_MAX_PIN E7_DIAG_PIN
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Z2_MIN_ENDSTOP_INVERTING
|
||||
#define Z2_MIN_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#else
|
||||
#ifndef Z2_MIN_ENDSTOP_INVERTING
|
||||
#if Z2_USE_ENDSTOP == _XMIN_
|
||||
@@ -1192,56 +1035,14 @@
|
||||
#define Z2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
|
||||
#elif Z2_USE_ENDSTOP == _ZMAX_
|
||||
#define Z2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
|
||||
#else
|
||||
#define Z2_MIN_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Z2_MIN_PIN
|
||||
#if Z2_USE_ENDSTOP == _XMIN_
|
||||
#define Z2_MIN_PIN X_MIN_PIN
|
||||
#elif Z2_USE_ENDSTOP == _XMAX_
|
||||
#define Z2_MIN_PIN X_MAX_PIN
|
||||
#elif Z2_USE_ENDSTOP == _XSTOP_
|
||||
#define Z2_MIN_PIN X_STOP_PIN
|
||||
#elif Z2_USE_ENDSTOP == _YMIN_
|
||||
#define Z2_MIN_PIN Y_MIN_PIN
|
||||
#elif Z2_USE_ENDSTOP == _YMAX_
|
||||
#define Z2_MIN_PIN Y_MAX_PIN
|
||||
#elif Z2_USE_ENDSTOP == _YSTOP_
|
||||
#define Z2_MIN_PIN Y_STOP_PIN
|
||||
#elif Z2_USE_ENDSTOP == _ZMIN_
|
||||
#define Z2_MIN_PIN Z_MIN_PIN
|
||||
#elif Z2_USE_ENDSTOP == _ZMAX_
|
||||
#define Z2_MIN_PIN Z_MAX_PIN
|
||||
#elif Z2_USE_ENDSTOP == _ZSTOP_
|
||||
#define Z2_MIN_PIN Z_STOP_PIN
|
||||
#elif Z2_USE_ENDSTOP == _XDIAG_
|
||||
#define Z2_MIN_PIN X_DIAG_PIN
|
||||
#elif Z2_USE_ENDSTOP == _YDIAG_
|
||||
#define Z2_MIN_PIN Y_DIAG_PIN
|
||||
#elif Z2_USE_ENDSTOP == _ZDIAG_
|
||||
#define Z2_MIN_PIN Z_DIAG_PIN
|
||||
#elif Z2_USE_ENDSTOP == _E0DIAG_
|
||||
#define Z2_MIN_PIN E0_DIAG_PIN
|
||||
#elif Z2_USE_ENDSTOP == _E1DIAG_
|
||||
#define Z2_MIN_PIN E1_DIAG_PIN
|
||||
#elif Z2_USE_ENDSTOP == _E2DIAG_
|
||||
#define Z2_MIN_PIN E2_DIAG_PIN
|
||||
#elif Z2_USE_ENDSTOP == _E3DIAG_
|
||||
#define Z2_MIN_PIN E3_DIAG_PIN
|
||||
#elif Z2_USE_ENDSTOP == _E4DIAG_
|
||||
#define Z2_MIN_PIN E4_DIAG_PIN
|
||||
#elif Z2_USE_ENDSTOP == _E5DIAG_
|
||||
#define Z2_MIN_PIN E5_DIAG_PIN
|
||||
#elif Z2_USE_ENDSTOP == _E6DIAG_
|
||||
#define Z2_MIN_PIN E6_DIAG_PIN
|
||||
#elif Z2_USE_ENDSTOP == _E7DIAG_
|
||||
#define Z2_MIN_PIN E7_DIAG_PIN
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Z2_MAX_ENDSTOP_INVERTING
|
||||
#define Z2_MAX_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Z2_MAX_ENDSTOP_INVERTING
|
||||
#define Z2_MAX_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#ifndef Z2_MIN_ENDSTOP_INVERTING
|
||||
#define Z2_MIN_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
|
||||
#if NUM_Z_STEPPERS >= 3
|
||||
@@ -1259,56 +1060,8 @@
|
||||
#define Z3_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
|
||||
#elif Z3_USE_ENDSTOP == _ZMAX_
|
||||
#define Z3_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
|
||||
#else
|
||||
#define Z3_MAX_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Z3_MAX_PIN
|
||||
#if Z3_USE_ENDSTOP == _XMIN_
|
||||
#define Z3_MAX_PIN X_MIN_PIN
|
||||
#elif Z3_USE_ENDSTOP == _XMAX_
|
||||
#define Z3_MAX_PIN X_MAX_PIN
|
||||
#elif Z3_USE_ENDSTOP == _XSTOP_
|
||||
#define Z3_MAX_PIN X_STOP_PIN
|
||||
#elif Z3_USE_ENDSTOP == _YMIN_
|
||||
#define Z3_MAX_PIN Y_MIN_PIN
|
||||
#elif Z3_USE_ENDSTOP == _YMAX_
|
||||
#define Z3_MAX_PIN Y_MAX_PIN
|
||||
#elif Z3_USE_ENDSTOP == _YSTOP_
|
||||
#define Z3_MAX_PIN Y_STOP_PIN
|
||||
#elif Z3_USE_ENDSTOP == _ZMIN_
|
||||
#define Z3_MAX_PIN Z_MIN_PIN
|
||||
#elif Z3_USE_ENDSTOP == _ZMAX_
|
||||
#define Z3_MAX_PIN Z_MAX_PIN
|
||||
#elif Z3_USE_ENDSTOP == _ZSTOP_
|
||||
#define Z3_MAX_PIN Z_STOP_PIN
|
||||
#elif Z3_USE_ENDSTOP == _XDIAG_
|
||||
#define Z3_MAX_PIN X_DIAG_PIN
|
||||
#elif Z3_USE_ENDSTOP == _YDIAG_
|
||||
#define Z3_MAX_PIN Y_DIAG_PIN
|
||||
#elif Z3_USE_ENDSTOP == _ZDIAG_
|
||||
#define Z3_MAX_PIN Z_DIAG_PIN
|
||||
#elif Z3_USE_ENDSTOP == _E0DIAG_
|
||||
#define Z3_MAX_PIN E0_DIAG_PIN
|
||||
#elif Z3_USE_ENDSTOP == _E1DIAG_
|
||||
#define Z3_MAX_PIN E1_DIAG_PIN
|
||||
#elif Z3_USE_ENDSTOP == _E2DIAG_
|
||||
#define Z3_MAX_PIN E2_DIAG_PIN
|
||||
#elif Z3_USE_ENDSTOP == _E3DIAG_
|
||||
#define Z3_MAX_PIN E3_DIAG_PIN
|
||||
#elif Z3_USE_ENDSTOP == _E4DIAG_
|
||||
#define Z3_MAX_PIN E4_DIAG_PIN
|
||||
#elif Z3_USE_ENDSTOP == _E5DIAG_
|
||||
#define Z3_MAX_PIN E5_DIAG_PIN
|
||||
#elif Z3_USE_ENDSTOP == _E6DIAG_
|
||||
#define Z3_MAX_PIN E6_DIAG_PIN
|
||||
#elif Z3_USE_ENDSTOP == _E7DIAG_
|
||||
#define Z3_MAX_PIN E7_DIAG_PIN
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Z3_MIN_ENDSTOP_INVERTING
|
||||
#define Z3_MIN_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#else
|
||||
#ifndef Z3_MIN_ENDSTOP_INVERTING
|
||||
#if Z3_USE_ENDSTOP == _XMIN_
|
||||
@@ -1323,56 +1076,14 @@
|
||||
#define Z3_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
|
||||
#elif Z3_USE_ENDSTOP == _ZMAX_
|
||||
#define Z3_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
|
||||
#else
|
||||
#define Z3_MIN_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Z3_MIN_PIN
|
||||
#if Z3_USE_ENDSTOP == _XMIN_
|
||||
#define Z3_MIN_PIN X_MIN_PIN
|
||||
#elif Z3_USE_ENDSTOP == _XMAX_
|
||||
#define Z3_MIN_PIN X_MAX_PIN
|
||||
#elif Z3_USE_ENDSTOP == _XSTOP_
|
||||
#define Z3_MIN_PIN X_STOP_PIN
|
||||
#elif Z3_USE_ENDSTOP == _YMIN_
|
||||
#define Z3_MIN_PIN Y_MIN_PIN
|
||||
#elif Z3_USE_ENDSTOP == _YMAX_
|
||||
#define Z3_MIN_PIN Y_MAX_PIN
|
||||
#elif Z3_USE_ENDSTOP == _YSTOP_
|
||||
#define Z3_MIN_PIN Y_STOP_PIN
|
||||
#elif Z3_USE_ENDSTOP == _ZMIN_
|
||||
#define Z3_MIN_PIN Z_MIN_PIN
|
||||
#elif Z3_USE_ENDSTOP == _ZMAX_
|
||||
#define Z3_MIN_PIN Z_MAX_PIN
|
||||
#elif Z3_USE_ENDSTOP == _ZSTOP_
|
||||
#define Z3_MIN_PIN Z_STOP_PIN
|
||||
#elif Z3_USE_ENDSTOP == _XDIAG_
|
||||
#define Z3_MIN_PIN X_DIAG_PIN
|
||||
#elif Z3_USE_ENDSTOP == _YDIAG_
|
||||
#define Z3_MIN_PIN Y_DIAG_PIN
|
||||
#elif Z3_USE_ENDSTOP == _ZDIAG_
|
||||
#define Z3_MIN_PIN Z_DIAG_PIN
|
||||
#elif Z3_USE_ENDSTOP == _E0DIAG_
|
||||
#define Z3_MIN_PIN E0_DIAG_PIN
|
||||
#elif Z3_USE_ENDSTOP == _E1DIAG_
|
||||
#define Z3_MIN_PIN E1_DIAG_PIN
|
||||
#elif Z3_USE_ENDSTOP == _E2DIAG_
|
||||
#define Z3_MIN_PIN E2_DIAG_PIN
|
||||
#elif Z3_USE_ENDSTOP == _E3DIAG_
|
||||
#define Z3_MIN_PIN E3_DIAG_PIN
|
||||
#elif Z3_USE_ENDSTOP == _E4DIAG_
|
||||
#define Z3_MIN_PIN E4_DIAG_PIN
|
||||
#elif Z3_USE_ENDSTOP == _E5DIAG_
|
||||
#define Z3_MIN_PIN E5_DIAG_PIN
|
||||
#elif Z3_USE_ENDSTOP == _E6DIAG_
|
||||
#define Z3_MIN_PIN E6_DIAG_PIN
|
||||
#elif Z3_USE_ENDSTOP == _E7DIAG_
|
||||
#define Z3_MIN_PIN E7_DIAG_PIN
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Z3_MAX_ENDSTOP_INVERTING
|
||||
#define Z3_MAX_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Z3_MAX_ENDSTOP_INVERTING
|
||||
#define Z3_MAX_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#ifndef Z3_MIN_ENDSTOP_INVERTING
|
||||
#define Z3_MIN_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1391,56 +1102,8 @@
|
||||
#define Z4_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
|
||||
#elif Z4_USE_ENDSTOP == _ZMAX_
|
||||
#define Z4_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
|
||||
#else
|
||||
#define Z4_MAX_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Z4_MAX_PIN
|
||||
#if Z4_USE_ENDSTOP == _XMIN_
|
||||
#define Z4_MAX_PIN X_MIN_PIN
|
||||
#elif Z4_USE_ENDSTOP == _XMAX_
|
||||
#define Z4_MAX_PIN X_MAX_PIN
|
||||
#elif Z4_USE_ENDSTOP == _XSTOP_
|
||||
#define Z4_MAX_PIN X_STOP_PIN
|
||||
#elif Z4_USE_ENDSTOP == _YMIN_
|
||||
#define Z4_MAX_PIN Y_MIN_PIN
|
||||
#elif Z4_USE_ENDSTOP == _YMAX_
|
||||
#define Z4_MAX_PIN Y_MAX_PIN
|
||||
#elif Z4_USE_ENDSTOP == _YSTOP_
|
||||
#define Z4_MAX_PIN Y_STOP_PIN
|
||||
#elif Z4_USE_ENDSTOP == _ZMIN_
|
||||
#define Z4_MAX_PIN Z_MIN_PIN
|
||||
#elif Z4_USE_ENDSTOP == _ZMAX_
|
||||
#define Z4_MAX_PIN Z_MAX_PIN
|
||||
#elif Z4_USE_ENDSTOP == _ZSTOP_
|
||||
#define Z4_MAX_PIN Z_STOP_PIN
|
||||
#elif Z4_USE_ENDSTOP == _XDIAG_
|
||||
#define Z4_MAX_PIN X_DIAG_PIN
|
||||
#elif Z4_USE_ENDSTOP == _YDIAG_
|
||||
#define Z4_MAX_PIN Y_DIAG_PIN
|
||||
#elif Z4_USE_ENDSTOP == _ZDIAG_
|
||||
#define Z4_MAX_PIN Z_DIAG_PIN
|
||||
#elif Z4_USE_ENDSTOP == _E0DIAG_
|
||||
#define Z4_MAX_PIN E0_DIAG_PIN
|
||||
#elif Z4_USE_ENDSTOP == _E1DIAG_
|
||||
#define Z4_MAX_PIN E1_DIAG_PIN
|
||||
#elif Z4_USE_ENDSTOP == _E2DIAG_
|
||||
#define Z4_MAX_PIN E2_DIAG_PIN
|
||||
#elif Z4_USE_ENDSTOP == _E3DIAG_
|
||||
#define Z4_MAX_PIN E3_DIAG_PIN
|
||||
#elif Z4_USE_ENDSTOP == _E4DIAG_
|
||||
#define Z4_MAX_PIN E4_DIAG_PIN
|
||||
#elif Z4_USE_ENDSTOP == _E5DIAG_
|
||||
#define Z4_MAX_PIN E5_DIAG_PIN
|
||||
#elif Z4_USE_ENDSTOP == _E6DIAG_
|
||||
#define Z4_MAX_PIN E6_DIAG_PIN
|
||||
#elif Z4_USE_ENDSTOP == _E7DIAG_
|
||||
#define Z4_MAX_PIN E7_DIAG_PIN
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Z4_MIN_ENDSTOP_INVERTING
|
||||
#define Z4_MIN_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#else
|
||||
#ifndef Z4_MIN_ENDSTOP_INVERTING
|
||||
#if Z4_USE_ENDSTOP == _XMIN_
|
||||
@@ -1455,56 +1118,14 @@
|
||||
#define Z4_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
|
||||
#elif Z4_USE_ENDSTOP == _ZMAX_
|
||||
#define Z4_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
|
||||
#else
|
||||
#define Z4_MIN_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Z4_MIN_PIN
|
||||
#if Z4_USE_ENDSTOP == _XMIN_
|
||||
#define Z4_MIN_PIN X_MIN_PIN
|
||||
#elif Z4_USE_ENDSTOP == _XMAX_
|
||||
#define Z4_MIN_PIN X_MAX_PIN
|
||||
#elif Z4_USE_ENDSTOP == _XSTOP_
|
||||
#define Z4_MIN_PIN X_STOP_PIN
|
||||
#elif Z4_USE_ENDSTOP == _YMIN_
|
||||
#define Z4_MIN_PIN Y_MIN_PIN
|
||||
#elif Z4_USE_ENDSTOP == _YMAX_
|
||||
#define Z4_MIN_PIN Y_MAX_PIN
|
||||
#elif Z4_USE_ENDSTOP == _YSTOP_
|
||||
#define Z4_MIN_PIN Y_STOP_PIN
|
||||
#elif Z4_USE_ENDSTOP == _ZMIN_
|
||||
#define Z4_MIN_PIN Z_MIN_PIN
|
||||
#elif Z4_USE_ENDSTOP == _ZMAX_
|
||||
#define Z4_MIN_PIN Z_MAX_PIN
|
||||
#elif Z4_USE_ENDSTOP == _ZSTOP_
|
||||
#define Z4_MIN_PIN Z_STOP_PIN
|
||||
#elif Z4_USE_ENDSTOP == _XDIAG_
|
||||
#define Z4_MIN_PIN X_DIAG_PIN
|
||||
#elif Z4_USE_ENDSTOP == _YDIAG_
|
||||
#define Z4_MIN_PIN Y_DIAG_PIN
|
||||
#elif Z4_USE_ENDSTOP == _ZDIAG_
|
||||
#define Z4_MIN_PIN Z_DIAG_PIN
|
||||
#elif Z4_USE_ENDSTOP == _E0DIAG_
|
||||
#define Z4_MIN_PIN E0_DIAG_PIN
|
||||
#elif Z4_USE_ENDSTOP == _E1DIAG_
|
||||
#define Z4_MIN_PIN E1_DIAG_PIN
|
||||
#elif Z4_USE_ENDSTOP == _E2DIAG_
|
||||
#define Z4_MIN_PIN E2_DIAG_PIN
|
||||
#elif Z4_USE_ENDSTOP == _E3DIAG_
|
||||
#define Z4_MIN_PIN E3_DIAG_PIN
|
||||
#elif Z4_USE_ENDSTOP == _E4DIAG_
|
||||
#define Z4_MIN_PIN E4_DIAG_PIN
|
||||
#elif Z4_USE_ENDSTOP == _E5DIAG_
|
||||
#define Z4_MIN_PIN E5_DIAG_PIN
|
||||
#elif Z4_USE_ENDSTOP == _E6DIAG_
|
||||
#define Z4_MIN_PIN E6_DIAG_PIN
|
||||
#elif Z4_USE_ENDSTOP == _E7DIAG_
|
||||
#define Z4_MIN_PIN E7_DIAG_PIN
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Z4_MAX_ENDSTOP_INVERTING
|
||||
#define Z4_MAX_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Z4_MAX_ENDSTOP_INVERTING
|
||||
#define Z4_MAX_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#ifndef Z4_MIN_ENDSTOP_INVERTING
|
||||
#define Z4_MIN_ENDSTOP_INVERTING false
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -2446,11 +2067,11 @@
|
||||
//
|
||||
|
||||
// Flag the indexed hardware serial ports in use
|
||||
#define SERIAL_IN_USE(N) ( (defined(SERIAL_PORT) && SERIAL_PORT == N) \
|
||||
|| (defined(SERIAL_PORT_2) && SERIAL_PORT_2 == N) \
|
||||
|| (defined(SERIAL_PORT_3) && SERIAL_PORT_3 == N) \
|
||||
|| (defined(MMU2_SERIAL_PORT) && MMU2_SERIAL_PORT == N) \
|
||||
|| (defined(LCD_SERIAL_PORT) && LCD_SERIAL_PORT == N) )
|
||||
#define SERIAL_IN_USE(N) ( (defined(SERIAL_PORT) && N == SERIAL_PORT) \
|
||||
|| (defined(SERIAL_PORT_2) && N == SERIAL_PORT_2) \
|
||||
|| (defined(SERIAL_PORT_3) && N == SERIAL_PORT_3) \
|
||||
|| (defined(MMU2_SERIAL_PORT) && N == MMU2_SERIAL_PORT) \
|
||||
|| (defined(LCD_SERIAL_PORT) && N == LCD_SERIAL_PORT) )
|
||||
|
||||
// Flag the named hardware serial ports in use
|
||||
#define TMC_UART_IS(A,N) (defined(A##_HARDWARE_SERIAL) && (CAT(HW_,A##_HARDWARE_SERIAL) == HW_Serial##N || CAT(HW_,A##_HARDWARE_SERIAL) == HW_MSerial##N))
|
||||
@@ -2543,6 +2164,21 @@
|
||||
#undef TMC_UART_IS
|
||||
#undef ANY_SERIAL_IS
|
||||
|
||||
// Clean up unused ESP_WIFI pins
|
||||
#ifdef ESP_WIFI_MODULE_COM
|
||||
#if !SERIAL_IN_USE(ESP_WIFI_MODULE_COM)
|
||||
#undef ESP_WIFI_MODULE_COM
|
||||
#undef ESP_WIFI_MODULE_BAUDRATE
|
||||
#undef ESP_WIFI_MODULE_RESET_PIN
|
||||
#undef ESP_WIFI_MODULE_ENABLE_PIN
|
||||
#undef ESP_WIFI_MODULE_TXD_PIN
|
||||
#undef ESP_WIFI_MODULE_RXD_PIN
|
||||
#undef ESP_WIFI_MODULE_GPIO0_PIN
|
||||
#undef ESP_WIFI_MODULE_GPIO2_PIN
|
||||
#undef ESP_WIFI_MODULE_GPIO4_PIN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// Endstops and bed probe
|
||||
//
|
||||
@@ -3611,7 +3247,7 @@
|
||||
#define LCD_TIMEOUT_TO_STATUS 15000
|
||||
#endif
|
||||
#if LCD_TIMEOUT_TO_STATUS
|
||||
#define SCREENS_CAN_TIME_OUT 1
|
||||
#define HAS_SCREEN_TIMEOUT 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -416,17 +416,17 @@
|
||||
#elif defined(CHDK)
|
||||
#error "CHDK is now CHDK_PIN."
|
||||
#elif ANY_PIN( \
|
||||
MAX6675_SS, MAX6675_SS2, MAX6675_CS, MAX6675_CS2, \
|
||||
MAX31855_SS, MAX31855_SS2, MAX31855_CS, MAX31855_CS2, \
|
||||
MAX31865_SS, MAX31865_SS2, MAX31865_CS, MAX31865_CS2)
|
||||
#warning "MAX*_SS_PIN, MAX*_SS2_PIN, MAX*_CS_PIN, and MAX*_CS2_PIN are deprecated and will be removed in a future version. Please use TEMP_0_CS_PIN/TEMP_1_CS_PIN instead."
|
||||
MAX6675_SS, MAX6675_SS2, MAX6675_SS3, MAX6675_CS, MAX6675_CS2, MAX6675_CS3,\
|
||||
MAX31855_SS, MAX31855_SS2, MAX31855_SS3, MAX31855_CS, MAX31855_CS2, MAX31855_CS3, \
|
||||
MAX31865_SS, MAX31865_SS2, MAX31865_SS3, MAX31865_CS, MAX31865_CS2, MAX31865_CS3)
|
||||
#warning "MAX*_SS_PIN, MAX*_SS2_PIN, MAX*_SS3_PIN, MAX*_CS_PIN, MAX*_CS2_PIN, and MAX*_CS3_PIN, are deprecated and will be removed in a future version. Please use TEMP_0_CS_PIN/TEMP_1_CS_PIN/TEMP_2_CS_PIN instead."
|
||||
#elif ANY_PIN(MAX6675_SCK, MAX31855_SCK, MAX31865_SCK)
|
||||
#warning "MAX*_SCK_PIN is deprecated and will be removed in a future version. Please use TEMP_0_SCK_PIN/TEMP_1_SCK_PIN instead."
|
||||
#warning "MAX*_SCK_PIN is deprecated and will be removed in a future version. Please use TEMP_0_SCK_PIN/TEMP_1_SCK_PIN/TEMP_2_SCK_PIN instead."
|
||||
#elif ANY_PIN(MAX6675_MISO, MAX6675_DO, MAX31855_MISO, MAX31855_DO, MAX31865_MISO, MAX31865_DO)
|
||||
#warning "MAX*_MISO_PIN and MAX*_DO_PIN are deprecated and will be removed in a future version. Please use TEMP_0_MISO_PIN/TEMP_1_MISO_PIN instead."
|
||||
#warning "MAX*_MISO_PIN and MAX*_DO_PIN are deprecated and will be removed in a future version. Please use TEMP_0_MISO_PIN/TEMP_1_MISO_PIN/TEMP_2_MISO_PIN instead."
|
||||
#elif PIN_EXISTS(MAX31865_MOSI)
|
||||
#warning "MAX31865_MOSI_PIN is deprecated and will be removed in a future version. Please use TEMP_0_MOSI_PIN/TEMP_1_MOSI_PIN instead."
|
||||
#elif ANY_PIN(THERMO_CS1_PIN, THERMO_CS2_PIN, THERMO_DO_PIN, THERMO_SCK_PIN)
|
||||
#warning "MAX31865_MOSI_PIN is deprecated and will be removed in a future version. Please use TEMP_0_MOSI_PIN/TEMP_1_MOSI_PIN/TEMP_2_MOSI_PIN instead."
|
||||
#elif ANY_PIN(THERMO_CS1_PIN, THERMO_CS2_PIN, THERMO_CS3_PIN, THERMO_DO_PIN, THERMO_SCK_PIN)
|
||||
#error "THERMO_*_PIN is now TEMP_n_CS_PIN, TEMP_n_SCK_PIN, TEMP_n_MOSI_PIN, TEMP_n_MISO_PIN."
|
||||
#elif defined(MAX31865_SENSOR_OHMS)
|
||||
#error "MAX31865_SENSOR_OHMS is now MAX31865_SENSOR_OHMS_0."
|
||||
@@ -654,6 +654,8 @@
|
||||
#error "SHOW_SD_PERCENT is now SHOW_PROGRESS_PERCENT."
|
||||
#elif defined(EXTRA_LIN_ADVANCE_K)
|
||||
#error "EXTRA_LIN_ADVANCE_K is now ADVANCE_K_EXTRA."
|
||||
#elif defined(POLAR_SEGMENTS_PER_SECOND) || defined(DELTA_SEGMENTS_PER_SECOND) || defined(SCARA_SEGMENTS_PER_SECOND) || defined(TPARA_SEGMENTS_PER_SECOND)
|
||||
#error "(POLAR|DELTA|SCARA|TPARA)_SEGMENTS_PER_SECOND is now DEFAULT_SEGMENTS_PER_SECOND."
|
||||
#endif
|
||||
|
||||
// L64xx stepper drivers have been removed
|
||||
@@ -679,6 +681,17 @@
|
||||
constexpr float arm[] = AXIS_RELATIVE_MODES;
|
||||
static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _LOGICAL_AXES_STR "elements.");
|
||||
|
||||
// Consolidate TMC26X, validate migration (#24373)
|
||||
#define _ISMAX_1(A) defined(A##_MAX_CURRENT)
|
||||
#define _ISSNS_1(A) defined(A##_SENSE_RESISTOR)
|
||||
#if DO(ISMAX,||,ALL_AXIS_NAMES)
|
||||
#error "*_MAX_CURRENT is now set with *_CURRENT."
|
||||
#elif DO(ISSNS,||,ALL_AXIS_NAMES)
|
||||
#error "*_SENSE_RESISTOR (in Milli-Ohms) is now set with *_RSENSE (in Ohms), so you must divide values by 1000."
|
||||
#endif
|
||||
#undef _ISMAX_1
|
||||
#undef _ISSNS_1
|
||||
|
||||
/**
|
||||
* Probe temp compensation requirements
|
||||
*/
|
||||
@@ -1340,7 +1353,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
#if DISTINCT_E > 1
|
||||
constexpr float lak[] = ADVANCE_K;
|
||||
static_assert(COUNT(lak) < DISTINCT_E, "The ADVANCE_K array has too many elements (i.e., more than " STRINGIFY(DISTINCT_E) ").");
|
||||
static_assert(COUNT(lak) <= DISTINCT_E, "The ADVANCE_K array has too many elements (i.e., more than " STRINGIFY(DISTINCT_E) ").");
|
||||
#define _LIN_ASSERT(N) static_assert(N >= COUNT(lak) || WITHIN(lak[N], 0, 10), "ADVANCE_K values must be from 0 to 10 (Changed in LIN_ADVANCE v1.5, Marlin 1.1.9).");
|
||||
REPEAT(DISTINCT_E, _LIN_ASSERT)
|
||||
#undef _LIN_ASSERT
|
||||
@@ -1513,6 +1526,11 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#error "To use BED_LIMIT_SWITCHING you must disable PIDTEMPBED."
|
||||
#endif
|
||||
|
||||
// Fan Kickstart
|
||||
#if FAN_KICKSTART_TIME && defined(FAN_KICKSTART_POWER) && !WITHIN(FAN_KICKSTART_POWER, 64, 255)
|
||||
#error "FAN_KICKSTART_POWER must be an integer from 64 to 255."
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Synchronous M106/M107 checks
|
||||
*/
|
||||
@@ -1639,8 +1657,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
* Delta requirements
|
||||
*/
|
||||
#if ENABLED(DELTA)
|
||||
#if NONE(USE_XMAX_PLUG, USE_YMAX_PLUG, USE_ZMAX_PLUG)
|
||||
#error "You probably want to use Max Endstops for DELTA!"
|
||||
#if ANY(X_HOME_TO_MIN, Y_HOME_TO_MIN, Z_HOME_TO_MIN)
|
||||
#error "DELTA kinematics require homing "XYZ" axes to MAX. Set [XYZ]_HOME_DIR to 1."
|
||||
#elif ENABLED(ENABLE_LEVELING_FADE_HEIGHT) && DISABLED(AUTO_BED_LEVELING_BILINEAR) && !UBL_SEGMENTED
|
||||
#error "ENABLE_LEVELING_FADE_HEIGHT on DELTA requires AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
|
||||
#elif ENABLED(DELTA_AUTO_CALIBRATION) && !(HAS_BED_PROBE || HAS_MARLINUI_MENU)
|
||||
@@ -2312,8 +2330,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#endif
|
||||
#if MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED < 5
|
||||
#error "Thermistor 66 requires MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED ≥ 5."
|
||||
#elif MILLISECONDS_PREHEAT_TIME < 30000
|
||||
#error "Thermistor 66 requires MILLISECONDS_PREHEAT_TIME ≥ 30000."
|
||||
#elif MILLISECONDS_PREHEAT_TIME < 15000
|
||||
#error "Thermistor 66 requires MILLISECONDS_PREHEAT_TIME ≥ 15000, but 30000 or higher is recommended."
|
||||
#endif
|
||||
#undef _BAD_MINTEMP
|
||||
#endif
|
||||
@@ -2335,6 +2353,13 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#error "MAX31865_SENSOR_OHMS_1 and MAX31865_CALIBRATION_OHMS_1 must be set if TEMP_SENSOR_1/TEMP_SENSOR_REDUNDANT is MAX31865."
|
||||
#endif
|
||||
#endif
|
||||
#if TEMP_SENSOR_2_IS_MAX31865 || (TEMP_SENSOR_REDUNDANT_IS_MAX31865 && REDUNDANT_TEMP_MATCH(SOURCE, E2))
|
||||
#if !defined(MAX31865_SENSOR_WIRES_2) || !WITHIN(MAX31865_SENSOR_WIRES_2, 2, 4)
|
||||
#error "MAX31865_SENSOR_WIRES_2 must be defined as an integer between 2 and 4."
|
||||
#elif !defined(MAX31865_SENSOR_OHMS_2) || !defined(MAX31865_CALIBRATION_OHMS_2)
|
||||
#error "MAX31865_SENSOR_OHMS_2 and MAX31865_CALIBRATION_OHMS_2 must be set if TEMP_SENSOR_2/TEMP_SENSOR_REDUNDANT is MAX31865."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Redundant temperature sensor config
|
||||
@@ -3106,7 +3131,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
* Display Sleep is not supported by these common displays
|
||||
*/
|
||||
#if HAS_DISPLAY_SLEEP
|
||||
#if ANY(IS_U8GLIB_LM6059_AF, IS_U8GLIB_ST7565_64128, REPRAPWORLD_GRAPHICAL_LCD, FYSETC_MINI, CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY, MINIPANEL)
|
||||
#if ANY(IS_U8GLIB_LM6059_AF, IS_U8GLIB_ST7565_64128, REPRAPWORLD_GRAPHICAL_LCD, FYSETC_MINI_12864, CR10_STOCKDISPLAY, MINIPANEL)
|
||||
#error "DISPLAY_SLEEP_MINUTES is not supported by your display."
|
||||
#elif !WITHIN(DISPLAY_SLEEP_MINUTES, 0, 255)
|
||||
#error "DISPLAY_SLEEP_MINUTES must be between 0 and 255."
|
||||
@@ -4233,11 +4258,6 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Misc. Cleanup
|
||||
#undef _TEST_PWM
|
||||
#undef _NUM_AXES_STR
|
||||
#undef _LOGICAL_AXES_STR
|
||||
|
||||
// JTAG support in the HAL
|
||||
#if ENABLED(DISABLE_DEBUG) && !defined(JTAGSWD_DISABLE)
|
||||
#error "DISABLE_DEBUG is not supported for the selected MCU/Board."
|
||||
@@ -4249,3 +4269,29 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
|
||||
#if ENABLED(XFER_BUILD) && !BOTH(BINARY_FILE_TRANSFER, CUSTOM_FIRMWARE_UPLOAD)
|
||||
#error "BINARY_FILE_TRANSFER and CUSTOM_FIRMWARE_UPLOAD are required for custom upload."
|
||||
#endif
|
||||
|
||||
// Check requirements for Input Shaping
|
||||
#if HAS_SHAPING && defined(__AVR__)
|
||||
#if ENABLED(INPUT_SHAPING_X)
|
||||
#if F_CPU > 16000000
|
||||
static_assert((SHAPING_FREQ_X) * 2 * 0x10000 >= (STEPPER_TIMER_RATE), "SHAPING_FREQ_X is below the minimum (20) for AVR 20MHz.");
|
||||
#else
|
||||
static_assert((SHAPING_FREQ_X) * 2 * 0x10000 >= (STEPPER_TIMER_RATE), "SHAPING_FREQ_X is below the minimum (16) for AVR 16MHz.");
|
||||
#endif
|
||||
#elif ENABLED(INPUT_SHAPING_Y)
|
||||
#if F_CPU > 16000000
|
||||
static_assert((SHAPING_FREQ_Y) * 2 * 0x10000 >= (STEPPER_TIMER_RATE), "SHAPING_FREQ_Y is below the minimum (20) for AVR 20MHz.");
|
||||
#else
|
||||
static_assert((SHAPING_FREQ_Y) * 2 * 0x10000 >= (STEPPER_TIMER_RATE), "SHAPING_FREQ_Y is below the minimum (16) for AVR 16MHz.");
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if BOTH(HAS_SHAPING, DIRECT_STEPPING)
|
||||
#error "INPUT_SHAPING_[XY] cannot currently be used with DIRECT_STEPPING."
|
||||
#endif
|
||||
|
||||
// Misc. Cleanup
|
||||
#undef _TEST_PWM
|
||||
#undef _NUM_AXES_STR
|
||||
#undef _LOGICAL_AXES_STR
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
* version was tagged.
|
||||
*/
|
||||
#ifndef STRING_DISTRIBUTION_DATE
|
||||
#define STRING_DISTRIBUTION_DATE "2022-10-18"
|
||||
#define STRING_DISTRIBUTION_DATE "2022-11-29"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -56,9 +56,9 @@ typedef struct _hd44780_charmap_t {
|
||||
} hd44780_charmap_t;
|
||||
|
||||
#ifdef __AVR__
|
||||
#define IV(a) U##a
|
||||
#define IV(a) lchar_t(U##a)
|
||||
#else
|
||||
#define IV(a) L##a
|
||||
#define IV(a) lchar_t(L##a)
|
||||
#endif
|
||||
|
||||
static const hd44780_charmap_t g_hd44780_charmap_device[] PROGMEM = {
|
||||
|
||||
@@ -58,6 +58,10 @@
|
||||
#include "../../feature/bedlevel/bedlevel.h"
|
||||
#endif
|
||||
|
||||
#if HAS_CUTTER
|
||||
#include "../../feature/spindle_laser.h"
|
||||
#endif
|
||||
|
||||
//
|
||||
// Create LCD instance and chipset-specific information
|
||||
//
|
||||
@@ -406,7 +410,7 @@ void MarlinUI::clear_lcd() { lcd.clear(); }
|
||||
void lcd_erase_line(const lcd_uint_t line) {
|
||||
lcd_moveto(0, line);
|
||||
for (uint8_t i = LCD_WIDTH + 1; --i;)
|
||||
lcd_put_lchar(' ');
|
||||
lcd_put_u8str(F(" "));
|
||||
}
|
||||
|
||||
// Scroll the PSTR 'text' in a 'len' wide field for 'time' milliseconds at position col,line
|
||||
@@ -414,7 +418,7 @@ void MarlinUI::clear_lcd() { lcd.clear(); }
|
||||
uint8_t slen = utf8_strlen(ftxt);
|
||||
if (slen < len) {
|
||||
lcd_put_u8str_max(col, line, ftxt, len);
|
||||
for (; slen < len; ++slen) lcd_put_lchar(' ');
|
||||
for (; slen < len; ++slen) lcd_put_u8str(F(" "));
|
||||
safe_delay(time);
|
||||
}
|
||||
else {
|
||||
@@ -426,7 +430,7 @@ void MarlinUI::clear_lcd() { lcd.clear(); }
|
||||
lcd_put_u8str_max_P(col, line, p, len);
|
||||
|
||||
// Fill with spaces
|
||||
for (uint8_t ix = slen - i; ix < len; ++ix) lcd_put_lchar(' ');
|
||||
for (uint8_t ix = slen - i; ix < len; ++ix) lcd_put_u8str(F(" "));
|
||||
|
||||
// Delay
|
||||
safe_delay(dly);
|
||||
@@ -440,9 +444,9 @@ void MarlinUI::clear_lcd() { lcd.clear(); }
|
||||
|
||||
static void logo_lines(FSTR_P const extra) {
|
||||
int16_t indent = (LCD_WIDTH - 8 - utf8_strlen(extra)) / 2;
|
||||
lcd_put_lchar(indent, 0, '\x00'); lcd_put_u8str(F( "------" )); lcd_put_lchar('\x01');
|
||||
lcd_put_lchar(indent, 0, '\x00'); lcd_put_u8str(F( "------" )); lcd_put_u8str(F("\x01"));
|
||||
lcd_put_u8str(indent, 1, F("|Marlin|")); lcd_put_u8str(extra);
|
||||
lcd_put_lchar(indent, 2, '\x02'); lcd_put_u8str(F( "------" )); lcd_put_lchar('\x03');
|
||||
lcd_put_lchar(indent, 2, '\x02'); lcd_put_u8str(F( "------" )); lcd_put_u8str(F("\x03"));
|
||||
}
|
||||
|
||||
void MarlinUI::show_bootscreen() {
|
||||
@@ -522,7 +526,15 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
|
||||
lcd_put_u8str(value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Draw current and target for a heater/cooler
|
||||
* @details Print at the current LCD position the current/target for a single heater,
|
||||
* blinking the target temperature of an idle heater has timed out.
|
||||
*
|
||||
* @param heater_id The heater ID, such as 0, 1, ..., H_BED, H_CHAMBER, etc.
|
||||
* @param prefix A char to draw in front (e.g., a thermometer or icon)
|
||||
* @param blink Flag to show the blink state instead of the regular state
|
||||
*/
|
||||
FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char prefix, const bool blink) {
|
||||
#if HAS_HEATED_BED
|
||||
const bool isBed = TERN(HAS_HEATED_CHAMBER, heater_id == H_BED, heater_id < 0);
|
||||
@@ -535,75 +547,74 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char pr
|
||||
if (prefix >= 0) lcd_put_lchar(prefix);
|
||||
|
||||
lcd_put_u8str(t1 < 0 ? "err" : i16tostr3rj(t1));
|
||||
lcd_put_lchar('/');
|
||||
lcd_put_u8str(F("/"));
|
||||
|
||||
#if !HEATER_IDLE_HANDLER
|
||||
UNUSED(blink);
|
||||
#else
|
||||
if (!blink && thermalManager.heater_idle[thermalManager.idle_index_for_id(heater_id)].timed_out) {
|
||||
lcd_put_lchar(' ');
|
||||
if (t2 >= 10) lcd_put_lchar(' ');
|
||||
if (t2 >= 100) lcd_put_lchar(' ');
|
||||
}
|
||||
if (!blink && thermalManager.heater_idle[thermalManager.idle_index_for_id(heater_id)].timed_out)
|
||||
lcd_put_u8str(F(" "));
|
||||
else
|
||||
#endif
|
||||
lcd_put_u8str(i16tostr3left(t2));
|
||||
|
||||
if (prefix >= 0) {
|
||||
lcd_put_lchar(LCD_STR_DEGREE[0]);
|
||||
lcd_put_lchar(' ');
|
||||
if (t2 < 10) lcd_put_lchar(' ');
|
||||
lcd_put_u8str(F(" "));
|
||||
if (t2 < 10) lcd_put_u8str(F(" "));
|
||||
}
|
||||
}
|
||||
|
||||
#if HAS_COOLER
|
||||
FORCE_INLINE void _draw_cooler_status(const char prefix, const bool blink) {
|
||||
const celsius_t t2 = thermalManager.degTargetCooler();
|
||||
|
||||
if (prefix >= 0) lcd_put_lchar(prefix);
|
||||
FORCE_INLINE void _draw_cooler_status(const char prefix, const bool blink) {
|
||||
const celsius_t t2 = thermalManager.degTargetCooler();
|
||||
|
||||
lcd_put_u8str(i16tostr3rj(thermalManager.wholeDegCooler()));
|
||||
lcd_put_lchar('/');
|
||||
if (prefix >= 0) lcd_put_lchar(prefix);
|
||||
|
||||
#if !HEATER_IDLE_HANDLER
|
||||
UNUSED(blink);
|
||||
#else
|
||||
if (!blink && thermalManager.heater_idle[thermalManager.idle_index_for_id(heater_id)].timed_out) {
|
||||
lcd_put_lchar(' ');
|
||||
if (t2 >= 10) lcd_put_lchar(' ');
|
||||
if (t2 >= 100) lcd_put_lchar(' ');
|
||||
lcd_put_u8str(i16tostr3rj(thermalManager.wholeDegCooler()));
|
||||
lcd_put_u8str(F("/"));
|
||||
|
||||
#if !HEATER_IDLE_HANDLER
|
||||
UNUSED(blink);
|
||||
#else
|
||||
if (!blink && thermalManager.heater_idle[thermalManager.idle_index_for_id(heater_id)].timed_out) {
|
||||
lcd_put_u8str(F(" "));
|
||||
if (t2 >= 10) lcd_put_u8str(F(" "));
|
||||
if (t2 >= 100) lcd_put_u8str(F(" "));
|
||||
}
|
||||
else
|
||||
#endif
|
||||
lcd_put_u8str(i16tostr3left(t2));
|
||||
|
||||
if (prefix >= 0) {
|
||||
lcd_put_lchar(LCD_STR_DEGREE[0]);
|
||||
lcd_put_u8str(F(" "));
|
||||
if (t2 < 10) lcd_put_u8str(F(" "));
|
||||
}
|
||||
else
|
||||
#endif
|
||||
lcd_put_u8str(i16tostr3left(t2));
|
||||
|
||||
if (prefix >= 0) {
|
||||
lcd_put_lchar(LCD_STR_DEGREE[0]);
|
||||
lcd_put_lchar(' ');
|
||||
if (t2 < 10) lcd_put_lchar(' ');
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // HAS_COOLER
|
||||
|
||||
#if ENABLED(LASER_COOLANT_FLOW_METER)
|
||||
FORCE_INLINE void _draw_flowmeter_status() {
|
||||
lcd_put_u8str("~");
|
||||
lcd_put_u8str(F("~"));
|
||||
lcd_put_u8str(ftostr11ns(cooler.flowrate));
|
||||
lcd_put_lchar('L');
|
||||
lcd_put_u8str(F("L"));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(I2C_AMMETER)
|
||||
FORCE_INLINE void _draw_ammeter_status() {
|
||||
lcd_put_u8str(" ");
|
||||
lcd_put_u8str(F(" "));
|
||||
ammeter.read();
|
||||
if (ammeter.current <= 0.999f) {
|
||||
lcd_put_u8str(ui16tostr3rj(uint16_t(ammeter.current * 1000 + 0.5f)));
|
||||
lcd_put_u8str("mA");
|
||||
lcd_put_u8str(F("mA"));
|
||||
}
|
||||
else {
|
||||
lcd_put_u8str(ftostr12ns(ammeter.current));
|
||||
lcd_put_lchar('A');
|
||||
lcd_put_u8str(F("A"));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -612,6 +623,36 @@ FORCE_INLINE void _draw_bed_status(const bool blink) {
|
||||
_draw_heater_status(H_BED, TERN0(HAS_LEVELING, blink && planner.leveling_active) ? '_' : LCD_STR_BEDTEMP[0], blink);
|
||||
}
|
||||
|
||||
#if HAS_CUTTER
|
||||
|
||||
FORCE_INLINE void _draw_cutter_status() {
|
||||
lcd_put_u8str(TERN(LASER_FEATURE, GET_TEXT_F(MSG_LASER), GET_TEXT_F(MSG_CUTTER)));
|
||||
lcd_put_u8str(F(": "));
|
||||
|
||||
#if CUTTER_UNIT_IS(RPM)
|
||||
lcd_put_u8str(ftostr61rj(float(cutter.unitPower) / 1000));
|
||||
lcd_put_u8str(F("K"));
|
||||
#else
|
||||
lcd_put_u8str(cutter_power2str(cutter.unitPower));
|
||||
#if CUTTER_UNIT_IS(PERCENT)
|
||||
lcd_put_u8str(F("%"));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
lcd_put_u8str(F(" "));
|
||||
lcd_put_u8str(cutter.enabled() ? GET_TEXT_F(MSG_LCD_ON) : GET_TEXT_F(MSG_LCD_OFF));
|
||||
lcd_put_u8str(F(" "));
|
||||
|
||||
switch (cutter.cutter_mode) {
|
||||
case CUTTER_MODE_STANDARD: lcd_put_u8str(F("S")); break;
|
||||
case CUTTER_MODE_CONTINUOUS: lcd_put_u8str(F("C")); break;
|
||||
case CUTTER_MODE_DYNAMIC: lcd_put_u8str(F("D")); break;
|
||||
case CUTTER_MODE_ERROR: lcd_put_u8str(F("!")); break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // HAS_CUTTER
|
||||
|
||||
#if ENABLED(LCD_PROGRESS_BAR)
|
||||
|
||||
void MarlinUI::draw_progress_bar(const uint8_t percent) {
|
||||
@@ -654,7 +695,7 @@ void MarlinUI::draw_status_message(const bool blink) {
|
||||
lcd_put_u8str(ftostr12ns(filwidth.measured_mm));
|
||||
lcd_put_u8str(F(" V"));
|
||||
lcd_put_u8str(i16tostr3rj(planner.volumetric_percent(parser.volumetric_enabled)));
|
||||
lcd_put_lchar('%');
|
||||
lcd_put_u8str(F("%"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -673,7 +714,7 @@ void MarlinUI::draw_status_message(const bool blink) {
|
||||
lcd_put_u8str(status_message);
|
||||
|
||||
// Fill the rest with spaces
|
||||
while (slen < LCD_WIDTH) { lcd_put_lchar(' '); ++slen; }
|
||||
while (slen < LCD_WIDTH) { lcd_put_u8str(F(" ")); ++slen; }
|
||||
}
|
||||
else {
|
||||
// String is larger than the available space in screen.
|
||||
@@ -687,11 +728,11 @@ void MarlinUI::draw_status_message(const bool blink) {
|
||||
// If the remaining string doesn't completely fill the screen
|
||||
if (rlen < LCD_WIDTH) {
|
||||
uint8_t chars = LCD_WIDTH - rlen; // Amount of space left in characters
|
||||
lcd_put_lchar(' '); // Always at 1+ spaces left, draw a space
|
||||
lcd_put_u8str(F(" ")); // Always at 1+ spaces left, draw a space
|
||||
if (--chars) { // Draw a second space if there's room
|
||||
lcd_put_lchar(' ');
|
||||
lcd_put_u8str(F(" "));
|
||||
if (--chars) { // Draw a third space if there's room
|
||||
lcd_put_lchar(' ');
|
||||
lcd_put_u8str(F(" "));
|
||||
if (--chars)
|
||||
lcd_put_u8str_max(status_message, chars); // Print a second copy of the message
|
||||
}
|
||||
@@ -712,10 +753,7 @@ void MarlinUI::draw_status_message(const bool blink) {
|
||||
lcd_put_u8str_max(status_message, LCD_WIDTH);
|
||||
|
||||
// Fill the rest with spaces if there are missing spaces
|
||||
while (slen < LCD_WIDTH) {
|
||||
lcd_put_lchar(' ');
|
||||
++slen;
|
||||
}
|
||||
for (; slen < LCD_WIDTH; ++slen) lcd_put_u8str(F(" "));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -732,7 +770,7 @@ void MarlinUI::draw_status_message(const bool blink) {
|
||||
lcd_moveto(pc, pr);
|
||||
lcd_put_u8str(F(TERN(IS_SD_PRINTING, "SD", "P:")));
|
||||
lcd_put_u8str(TERN(PRINT_PROGRESS_SHOW_DECIMALS, permyriadtostr4(ui.get_progress_permyriad()), ui8tostr3rj(progress)));
|
||||
lcd_put_lchar('%');
|
||||
lcd_put_u8str(F("%"));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -828,6 +866,15 @@ void MarlinUI::draw_status_screen() {
|
||||
lcd_moveto(8, 0);
|
||||
_draw_bed_status(blink);
|
||||
#endif
|
||||
|
||||
#elif HAS_CUTTER
|
||||
|
||||
//
|
||||
// Cutter Status
|
||||
//
|
||||
lcd_moveto(0, 0);
|
||||
_draw_cutter_status();
|
||||
|
||||
#endif
|
||||
|
||||
#else // LCD_WIDTH >= 20
|
||||
@@ -848,6 +895,15 @@ void MarlinUI::draw_status_screen() {
|
||||
lcd_moveto(10, 0);
|
||||
_draw_bed_status(blink);
|
||||
#endif
|
||||
|
||||
#elif HAS_CUTTER
|
||||
|
||||
//
|
||||
// Cutter Status
|
||||
//
|
||||
lcd_moveto(0, 0);
|
||||
_draw_cutter_status();
|
||||
|
||||
#endif
|
||||
|
||||
TERN_(HAS_COOLER, _draw_cooler_status('*', blink));
|
||||
@@ -920,7 +976,7 @@ void MarlinUI::draw_status_screen() {
|
||||
else {
|
||||
const xy_pos_t lpos = current_position.asLogical();
|
||||
_draw_axis_value(X_AXIS, ftostr4sign(lpos.x), blink);
|
||||
lcd_put_lchar(' ');
|
||||
lcd_put_u8str(F(" "));
|
||||
_draw_axis_value(Y_AXIS, ftostr4sign(lpos.y), blink);
|
||||
}
|
||||
|
||||
@@ -945,7 +1001,7 @@ void MarlinUI::draw_status_screen() {
|
||||
|
||||
lcd_put_lchar(0, 2, LCD_STR_FEEDRATE[0]);
|
||||
lcd_put_u8str(i16tostr3rj(feedrate_percentage));
|
||||
lcd_put_lchar('%');
|
||||
lcd_put_u8str(F("%"));
|
||||
|
||||
#if LCD_WIDTH >= 20
|
||||
|
||||
@@ -978,7 +1034,7 @@ void MarlinUI::draw_status_screen() {
|
||||
}
|
||||
lcd_put_lchar(c);
|
||||
lcd_put_u8str(i16tostr3rj(per));
|
||||
lcd_put_lchar('%');
|
||||
lcd_put_u8str(F("%"));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1017,7 +1073,7 @@ void MarlinUI::draw_status_screen() {
|
||||
|
||||
lcd_put_lchar(LCD_WIDTH - 9, 1, LCD_STR_FEEDRATE[0]);
|
||||
lcd_put_u8str(i16tostr3rj(feedrate_percentage));
|
||||
lcd_put_lchar('%');
|
||||
lcd_put_u8str(F("%"));
|
||||
|
||||
// ========== Line 3 ==========
|
||||
|
||||
@@ -1075,18 +1131,18 @@ void MarlinUI::draw_status_screen() {
|
||||
vlen = vstr ? utf8_strlen(vstr) : 0;
|
||||
if (style & SS_CENTER) {
|
||||
int8_t pad = (LCD_WIDTH - plen - vlen) / 2;
|
||||
while (--pad >= 0) { lcd_put_lchar(' '); n--; }
|
||||
while (--pad >= 0) { lcd_put_u8str(F(" ")); n--; }
|
||||
}
|
||||
if (plen) n = lcd_put_u8str(fstr, itemIndex, itemStringC, itemStringF, n);
|
||||
if (vlen) n -= lcd_put_u8str_max(vstr, n);
|
||||
for (; n > 0; --n) lcd_put_lchar(' ');
|
||||
for (; n > 0; --n) lcd_put_u8str(F(" "));
|
||||
}
|
||||
|
||||
// Draw a generic menu item with pre_char (if selected) and post_char
|
||||
void MenuItemBase::_draw(const bool sel, const uint8_t row, FSTR_P const ftpl, const char pre_char, const char post_char) {
|
||||
lcd_put_lchar(0, row, sel ? pre_char : ' ');
|
||||
uint8_t n = lcd_put_u8str(ftpl, itemIndex, itemStringC, itemStringF, LCD_WIDTH - 2);
|
||||
for (; n; --n) lcd_put_lchar(' ');
|
||||
for (; n; --n) lcd_put_u8str(F(" "));
|
||||
lcd_put_lchar(post_char);
|
||||
}
|
||||
|
||||
@@ -1096,8 +1152,8 @@ void MarlinUI::draw_status_screen() {
|
||||
lcd_put_lchar(0, row, sel ? LCD_STR_ARROW_RIGHT[0] : ' ');
|
||||
uint8_t n = lcd_put_u8str(ftpl, itemIndex, itemStringC, itemStringF, LCD_WIDTH - 2 - vlen);
|
||||
if (vlen) {
|
||||
lcd_put_lchar(':');
|
||||
for (; n; --n) lcd_put_lchar(' ');
|
||||
lcd_put_u8str(F(":"));
|
||||
for (; n; --n) lcd_put_u8str(F(" "));
|
||||
if (pgm) lcd_put_u8str_P(inStr); else lcd_put_u8str(inStr);
|
||||
}
|
||||
}
|
||||
@@ -1107,7 +1163,7 @@ void MarlinUI::draw_status_screen() {
|
||||
ui.encoder_direction_normal();
|
||||
uint8_t n = lcd_put_u8str(0, 1, ftpl, itemIndex, itemStringC, itemStringF, LCD_WIDTH - 1);
|
||||
if (value) {
|
||||
lcd_put_lchar(':'); n--;
|
||||
lcd_put_u8str(F(":")); n--;
|
||||
const uint8_t len = utf8_strlen(value) + 1; // Plus one for a leading space
|
||||
const lcd_uint_t valrow = n < len ? 2 : 1; // Value on the next row if it won't fit
|
||||
lcd_put_lchar(LCD_WIDTH - len, valrow, ' '); // Right-justified, padded, leading space
|
||||
@@ -1134,7 +1190,7 @@ void MarlinUI::draw_status_screen() {
|
||||
lcd_put_lchar(0, row, sel ? LCD_STR_ARROW_RIGHT[0] : ' ');
|
||||
constexpr uint8_t maxlen = LCD_WIDTH - 2;
|
||||
uint8_t n = maxlen - lcd_put_u8str_max(ui.scrolled_filename(theCard, maxlen, row, sel), maxlen);
|
||||
for (; n; --n) lcd_put_lchar(' ');
|
||||
for (; n; --n) lcd_put_u8str(F(" "));
|
||||
lcd_put_lchar(isDir ? LCD_STR_FOLDER[0] : ' ');
|
||||
}
|
||||
|
||||
@@ -1466,9 +1522,9 @@ void MarlinUI::draw_status_screen() {
|
||||
*/
|
||||
lcd_put_lchar(_LCD_W_POS, 0, '(');
|
||||
lcd_put_u8str(ui8tostr3rj(x_plot));
|
||||
lcd_put_lchar(',');
|
||||
lcd_put_u8str(F(","));
|
||||
lcd_put_u8str(ui8tostr3rj(y_plot));
|
||||
lcd_put_lchar(')');
|
||||
lcd_put_u8str(F(")"));
|
||||
|
||||
#if LCD_HEIGHT <= 3 // 16x2 or 20x2 display
|
||||
|
||||
|
||||
@@ -523,17 +523,14 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
|
||||
#if !HEATER_IDLE_HANDLER
|
||||
UNUSED(blink);
|
||||
#else
|
||||
if (!blink && thermalManager.heater_idle[thermalManager.idle_index_for_id(heater_id)].timed_out) {
|
||||
lcd_put_lchar(' ');
|
||||
if (t2 >= 10) lcd_put_lchar(' ');
|
||||
if (t2 >= 100) lcd_put_lchar(' ');
|
||||
}
|
||||
if (!blink && thermalManager.heater_idle[thermalManager.idle_index_for_id(heater_id)].timed_out)
|
||||
lcd_put_u8str(F(" "));
|
||||
else
|
||||
#endif
|
||||
lcd_put_u8str(i16tostr3left(t2));
|
||||
|
||||
lcd_put_lchar(' ');
|
||||
if (t2 < 10) lcd_put_lchar(' ');
|
||||
lcd_put_u8str(F(" "));
|
||||
if (t2 < 10) lcd_put_u8str(F(" "));
|
||||
|
||||
if (t2) picBits |= ICON_TEMP1;
|
||||
else picBits &= ~ICON_TEMP1;
|
||||
@@ -545,7 +542,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
|
||||
|
||||
FORCE_INLINE void _draw_flowmeter_status() {
|
||||
lcd_moveto(5, 5); lcd_put_u8str(F("FLOW"));
|
||||
lcd_moveto(7, 6); lcd_put_lchar('L');
|
||||
lcd_moveto(7, 6); lcd_put_u8str(F("L"));
|
||||
lcd_moveto(6, 7); lcd_put_u8str(ftostr11ns(cooler.flowrate));
|
||||
|
||||
if (cooler.flowrate) picBits |= ICON_FAN;
|
||||
@@ -564,7 +561,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
|
||||
{
|
||||
lcd_put_u8str("mA");
|
||||
lcd_moveto(10, 7);
|
||||
lcd_put_lchar(' '); lcd_put_u8str(ui16tostr3rj(uint16_t(ammeter.current * 1000 + 0.5f)));
|
||||
lcd_put_u8str(F(" ")); lcd_put_u8str(ui16tostr3rj(uint16_t(ammeter.current * 1000 + 0.5f)));
|
||||
}
|
||||
else {
|
||||
lcd_put_u8str(" A");
|
||||
@@ -585,9 +582,9 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
|
||||
#if CUTTER_UNIT_IS(RPM)
|
||||
lcd_moveto(16, 6); lcd_put_u8str(F("RPM"));
|
||||
lcd_moveto(15, 7); lcd_put_u8str(ftostr31ns(float(cutter.unitPower) / 1000));
|
||||
lcd_put_lchar('K');
|
||||
lcd_put_u8str(F("K"));
|
||||
#elif CUTTER_UNIT_IS(PERCENT)
|
||||
lcd_moveto(17, 6); lcd_put_lchar('%');
|
||||
lcd_moveto(17, 6); lcd_put_u8str(F("%"));
|
||||
lcd_moveto(18, 7); lcd_put_u8str(cutter_power2str(cutter.unitPower));
|
||||
#else
|
||||
lcd_moveto(17, 7); lcd_put_u8str(cutter_power2str(cutter.unitPower));
|
||||
|
||||
@@ -38,13 +38,6 @@
|
||||
#define HAS_SLOW_BUTTONS 1
|
||||
#endif
|
||||
|
||||
#if HAS_ENCODER_WHEEL
|
||||
#define ENCODER_PHASE_0 0
|
||||
#define ENCODER_PHASE_1 2
|
||||
#define ENCODER_PHASE_2 3
|
||||
#define ENCODER_PHASE_3 1
|
||||
#endif
|
||||
|
||||
#if EITHER(HAS_DIGITAL_BUTTONS, HAS_DWIN_E3V2)
|
||||
// Wheel spin pins where BA is 00, 10, 11, 01 (1 bit always changes)
|
||||
#define BLEN_A 0
|
||||
@@ -191,19 +184,19 @@
|
||||
#define _BUTTON_PRESSED_UP false
|
||||
#endif
|
||||
#if BUTTON_EXISTS(DOWN)
|
||||
#define _BUTTON_PRESSED_DWN _BUTTON_PRESSED(DOWN)
|
||||
#define _BUTTON_PRESSED_DOWN _BUTTON_PRESSED(DOWN)
|
||||
#else
|
||||
#define _BUTTON_PRESSED_DWN false
|
||||
#define _BUTTON_PRESSED_DOWN false
|
||||
#endif
|
||||
#if BUTTON_EXISTS(LEFT)
|
||||
#define _BUTTON_PRESSED_LFT _BUTTON_PRESSED(LEFT)
|
||||
#define _BUTTON_PRESSED_LEFT _BUTTON_PRESSED(LEFT)
|
||||
#else
|
||||
#define _BUTTON_PRESSED_LFT false
|
||||
#define _BUTTON_PRESSED_LEFT false
|
||||
#endif
|
||||
#if BUTTON_EXISTS(RIGHT)
|
||||
#define _BUTTON_PRESSED_RT _BUTTON_PRESSED(RIGHT)
|
||||
#define _BUTTON_PRESSED_RIGHT _BUTTON_PRESSED(RIGHT)
|
||||
#else
|
||||
#define _BUTTON_PRESSED_RT false
|
||||
#define _BUTTON_PRESSED_RIGHT false
|
||||
#endif
|
||||
#if BUTTON_EXISTS(BACK)
|
||||
#define _BUTTON_PRESSED_BACK _BUTTON_PRESSED(BACK)
|
||||
|
||||
@@ -34,7 +34,7 @@ int lcd_put_lchar_max(const lchar_t &c, const pixel_len_t max_length) {
|
||||
return u8g_GetFontBBXWidth(u8g.getU8g());
|
||||
}
|
||||
u8g_uint_t x = u8g.getPrintCol(), y = u8g.getPrintRow(),
|
||||
ret = uxg_DrawWchar(u8g.getU8g(), x, y, c, max_length);
|
||||
ret = uxg_DrawLchar(u8g.getU8g(), x, y, c, max_length);
|
||||
u8g.setPrintPos(x + ret, y);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -372,9 +372,9 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
|
||||
|
||||
lcd_put_lchar(LCD_PIXEL_WIDTH - 11 * (MENU_FONT_WIDTH), y2, 'E');
|
||||
lcd_put_lchar((char)('1' + extruder));
|
||||
lcd_put_lchar(' ');
|
||||
lcd_put_u8str(F(" "));
|
||||
lcd_put_u8str(i16tostr3rj(thermalManager.wholeDegHotend(extruder)));
|
||||
lcd_put_lchar('/');
|
||||
lcd_put_u8str(F("/"));
|
||||
|
||||
if (get_blink() || !thermalManager.heater_idle[extruder].timed_out)
|
||||
lcd_put_u8str(i16tostr3rj(thermalManager.degTargetHotend(extruder)));
|
||||
@@ -420,12 +420,12 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
|
||||
vlen = vstr ? utf8_strlen(vstr) : 0;
|
||||
if (style & SS_CENTER) {
|
||||
int pad = (LCD_PIXEL_WIDTH - plen - vlen * MENU_FONT_WIDTH) / MENU_FONT_WIDTH / 2;
|
||||
while (--pad >= 0) n -= lcd_put_lchar(' ');
|
||||
while (--pad >= 0) n -= lcd_put_u8str(F(" "));
|
||||
}
|
||||
|
||||
if (plen) n = lcd_put_u8str(ftpl, itemIndex, itemStringC, itemStringF, n / (MENU_FONT_WIDTH)) * (MENU_FONT_WIDTH);
|
||||
if (vlen) n -= lcd_put_u8str_max(vstr, n);
|
||||
while (n > MENU_FONT_WIDTH) n -= lcd_put_lchar(' ');
|
||||
while (n > MENU_FONT_WIDTH) n -= lcd_put_u8str(F(" "));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -433,9 +433,9 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
|
||||
void MenuItemBase::_draw(const bool sel, const uint8_t row, FSTR_P const ftpl, const char, const char post_char) {
|
||||
if (mark_as_selected(row, sel)) {
|
||||
pixel_len_t n = lcd_put_u8str(ftpl, itemIndex, itemStringC, itemStringF, LCD_WIDTH - 1) * (MENU_FONT_WIDTH);
|
||||
while (n > MENU_FONT_WIDTH) n -= lcd_put_lchar(' ');
|
||||
while (n > MENU_FONT_WIDTH) n -= lcd_put_u8str(F(" "));
|
||||
lcd_put_lchar(LCD_PIXEL_WIDTH - (MENU_FONT_WIDTH), row_y2, post_char);
|
||||
lcd_put_lchar(' ');
|
||||
lcd_put_u8str(F(" "));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -448,8 +448,8 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
|
||||
|
||||
pixel_len_t n = lcd_put_u8str(ftpl, itemIndex, itemStringC, itemStringF, LCD_WIDTH - 2 - vallen * prop) * (MENU_FONT_WIDTH);
|
||||
if (vallen) {
|
||||
lcd_put_lchar(':');
|
||||
while (n > MENU_FONT_WIDTH) n -= lcd_put_lchar(' ');
|
||||
lcd_put_u8str(F(":"));
|
||||
while (n > MENU_FONT_WIDTH) n -= lcd_put_u8str(F(" "));
|
||||
lcd_moveto(LCD_PIXEL_WIDTH - _MAX((MENU_FONT_WIDTH) * vallen, pixelwidth + 2), row_y2);
|
||||
if (pgm) lcd_put_u8str_P(inStr); else lcd_put_u8str(inStr);
|
||||
}
|
||||
@@ -493,7 +493,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
|
||||
|
||||
// If a value is included, print a colon, then print the value right-justified
|
||||
if (value) {
|
||||
lcd_put_lchar(':');
|
||||
lcd_put_u8str(F(":"));
|
||||
if (extra_row) {
|
||||
// Assume that value is numeric (with no descender)
|
||||
baseline += EDIT_FONT_ASCENT + 2;
|
||||
@@ -535,7 +535,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
|
||||
if (isDir) lcd_put_lchar(LCD_STR_FOLDER[0]);
|
||||
const pixel_len_t pixw = maxlen * (MENU_FONT_WIDTH);
|
||||
pixel_len_t n = pixw - lcd_put_u8str_max(ui.scrolled_filename(theCard, maxlen, row, sel), pixw);
|
||||
while (n > MENU_FONT_WIDTH) n -= lcd_put_lchar(' ');
|
||||
while (n > MENU_FONT_WIDTH) n -= lcd_put_u8str(F(" "));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -612,9 +612,9 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
|
||||
if (PAGE_CONTAINS(LCD_PIXEL_HEIGHT - (INFO_FONT_HEIGHT - 1), LCD_PIXEL_HEIGHT)) {
|
||||
lcd_put_lchar(5, LCD_PIXEL_HEIGHT, '(');
|
||||
u8g.print(x_plot);
|
||||
lcd_put_lchar(',');
|
||||
lcd_put_u8str(F(","));
|
||||
u8g.print(y_plot);
|
||||
lcd_put_lchar(')');
|
||||
lcd_put_u8str(F(")"));
|
||||
|
||||
// Show the location value
|
||||
lcd_put_u8str_P(74, LCD_PIXEL_HEIGHT, Z_LBL);
|
||||
|
||||
@@ -455,7 +455,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
|
||||
void MarlinUI::drawPercent() {
|
||||
if (progress_string[0]) {
|
||||
lcd_put_u8str(progress_x_pos, EXTRAS_BASELINE, progress_string);
|
||||
lcd_put_lchar('%');
|
||||
lcd_put_u8str(F("%"));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -705,7 +705,7 @@ void MarlinUI::draw_status_screen() {
|
||||
lcd_put_u8str(STATUS_CUTTER_TEXT_X, STATUS_CUTTER_TEXT_Y, cutter_power2str(cutter.unitPower));
|
||||
#elif CUTTER_UNIT_IS(RPM)
|
||||
lcd_put_u8str(STATUS_CUTTER_TEXT_X - 2, STATUS_CUTTER_TEXT_Y, ftostr61rj(float(cutter.unitPower) / 1000));
|
||||
lcd_put_lchar('K');
|
||||
lcd_put_u8str(F("K"));
|
||||
#else
|
||||
lcd_put_u8str(STATUS_CUTTER_TEXT_X, STATUS_CUTTER_TEXT_Y, cutter_power2str(cutter.unitPower));
|
||||
#endif
|
||||
@@ -892,7 +892,7 @@ void MarlinUI::draw_status_screen() {
|
||||
|
||||
set_font(FONT_STATUSMENU);
|
||||
lcd_put_u8str(12, EXTRAS_2_BASELINE, i16tostr3rj(feedrate_percentage));
|
||||
lcd_put_lchar('%');
|
||||
lcd_put_u8str(F("%"));
|
||||
|
||||
//
|
||||
// Filament sensor display if SD is disabled
|
||||
@@ -900,7 +900,7 @@ void MarlinUI::draw_status_screen() {
|
||||
#if ENABLED(FILAMENT_LCD_DISPLAY) && DISABLED(SDSUPPORT)
|
||||
lcd_put_u8str(56, EXTRAS_2_BASELINE, wstring);
|
||||
lcd_put_u8str(102, EXTRAS_2_BASELINE, mstring);
|
||||
lcd_put_lchar('%');
|
||||
lcd_put_u8str(F("%"));
|
||||
set_font(FONT_MENU);
|
||||
lcd_put_lchar(47, EXTRAS_2_BASELINE, LCD_STR_FILAM_DIA[0]); // lcd_put_u8str(F(LCD_STR_FILAM_DIA));
|
||||
lcd_put_lchar(93, EXTRAS_2_BASELINE, LCD_STR_FILAM_MUL[0]);
|
||||
@@ -917,12 +917,12 @@ void MarlinUI::draw_status_screen() {
|
||||
// Alternate Status message and Filament display
|
||||
if (ELAPSED(millis(), next_filament_display)) {
|
||||
lcd_put_u8str(F(LCD_STR_FILAM_DIA));
|
||||
lcd_put_lchar(':');
|
||||
lcd_put_u8str(F(":"));
|
||||
lcd_put_u8str(wstring);
|
||||
lcd_put_u8str(F(" " LCD_STR_FILAM_MUL));
|
||||
lcd_put_lchar(':');
|
||||
lcd_put_u8str(F(":"));
|
||||
lcd_put_u8str(mstring);
|
||||
lcd_put_lchar('%');
|
||||
lcd_put_u8str(F("%"));
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -955,7 +955,7 @@ void MarlinUI::draw_status_message(const bool blink) {
|
||||
if (slen <= lcd_width) {
|
||||
// The string fits within the line. Print with no scrolling
|
||||
lcd_put_u8str(status_message);
|
||||
while (slen < lcd_width) { lcd_put_lchar(' '); ++slen; }
|
||||
while (slen < lcd_width) { lcd_put_u8str(F(" ")); ++slen; }
|
||||
}
|
||||
else {
|
||||
// String is longer than the available space
|
||||
@@ -973,14 +973,14 @@ void MarlinUI::draw_status_message(const bool blink) {
|
||||
// If the remaining string doesn't completely fill the screen
|
||||
if (rlen < lcd_width) {
|
||||
uint8_t chars = lcd_width - rlen; // Amount of space left in characters
|
||||
lcd_put_lchar(' '); // Always at 1+ spaces left, draw a space
|
||||
lcd_put_u8str(F(" ")); // Always at 1+ spaces left, draw a space
|
||||
if (--chars) { // Draw a second space if there's room
|
||||
lcd_put_lchar(' ');
|
||||
lcd_put_u8str(F(" "));
|
||||
if (--chars) { // Draw a third space if there's room
|
||||
lcd_put_lchar(' ');
|
||||
lcd_put_u8str(F(" "));
|
||||
if (--chars) { // Print a second copy of the message
|
||||
lcd_put_u8str_max(status_message, pixel_width - (rlen + 2) * (MENU_FONT_WIDTH));
|
||||
lcd_put_lchar(' ');
|
||||
lcd_put_u8str(F(" "));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -995,7 +995,7 @@ void MarlinUI::draw_status_message(const bool blink) {
|
||||
lcd_put_u8str_max(status_message, pixel_width);
|
||||
|
||||
// Fill the rest with spaces
|
||||
for (; slen < lcd_width; ++slen) lcd_put_lchar(' ');
|
||||
for (; slen < lcd_width; ++slen) lcd_put_u8str(F(" "));
|
||||
|
||||
#endif // !STATUS_MESSAGE_SCROLLING
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ static int fontgroup_cb_draw_u8g(void *userdata, const font_t *fnt_current, cons
|
||||
*
|
||||
* Draw a UTF-8 string at the specified position
|
||||
*/
|
||||
unsigned int uxg_DrawWchar(u8g_t *pu8g, unsigned int x, unsigned int y, const lchar_t &wc, pixel_len_t max_width) {
|
||||
unsigned int uxg_DrawLchar(u8g_t *pu8g, unsigned int x, unsigned int y, const lchar_t &wc, pixel_len_t max_width) {
|
||||
struct _uxg_drawu8_data_t data;
|
||||
font_group_t *group = &g_fontgroup_root;
|
||||
const font_t *fnt_default = uxg_GetFont(pu8g);
|
||||
|
||||
@@ -26,7 +26,7 @@ typedef struct _uxg_fontinfo_t {
|
||||
|
||||
int uxg_SetUtf8Fonts(const uxg_fontinfo_t * fntinfo, int number); // fntinfo is type of PROGMEM
|
||||
|
||||
unsigned int uxg_DrawWchar(u8g_t *pu8g, unsigned int x, unsigned int y, const lchar_t &ch, const pixel_len_t max_length);
|
||||
unsigned int uxg_DrawLchar(u8g_t *pu8g, unsigned int x, unsigned int y, const lchar_t &ch, const pixel_len_t max_length);
|
||||
|
||||
unsigned int uxg_DrawUtf8Str(u8g_t *pu8g, unsigned int x, unsigned int y, const char *utf8_msg, const pixel_len_t max_length);
|
||||
unsigned int uxg_DrawUtf8StrP(u8g_t *pu8g, unsigned int x, unsigned int y, PGM_P utf8_msg, const pixel_len_t max_length);
|
||||
|
||||
@@ -96,21 +96,21 @@ EncoderState Encoder_ReceiveAnalyze() {
|
||||
}
|
||||
if (newbutton != lastEncoderBits) {
|
||||
switch (newbutton) {
|
||||
case ENCODER_PHASE_0:
|
||||
if (lastEncoderBits == ENCODER_PHASE_3) temp_diff++;
|
||||
else if (lastEncoderBits == ENCODER_PHASE_1) temp_diff--;
|
||||
case 0:
|
||||
if (lastEncoderBits == 1) temp_diff++;
|
||||
else if (lastEncoderBits == 2) temp_diff--;
|
||||
break;
|
||||
case ENCODER_PHASE_1:
|
||||
if (lastEncoderBits == ENCODER_PHASE_0) temp_diff++;
|
||||
else if (lastEncoderBits == ENCODER_PHASE_2) temp_diff--;
|
||||
case 2:
|
||||
if (lastEncoderBits == 0) temp_diff++;
|
||||
else if (lastEncoderBits == 3) temp_diff--;
|
||||
break;
|
||||
case ENCODER_PHASE_2:
|
||||
if (lastEncoderBits == ENCODER_PHASE_1) temp_diff++;
|
||||
else if (lastEncoderBits == ENCODER_PHASE_3) temp_diff--;
|
||||
case 3:
|
||||
if (lastEncoderBits == 2) temp_diff++;
|
||||
else if (lastEncoderBits == 1) temp_diff--;
|
||||
break;
|
||||
case ENCODER_PHASE_3:
|
||||
if (lastEncoderBits == ENCODER_PHASE_2) temp_diff++;
|
||||
else if (lastEncoderBits == ENCODER_PHASE_0) temp_diff--;
|
||||
case 1:
|
||||
if (lastEncoderBits == 3) temp_diff++;
|
||||
else if (lastEncoderBits == 0) temp_diff--;
|
||||
break;
|
||||
}
|
||||
lastEncoderBits = newbutton;
|
||||
|
||||
@@ -3395,11 +3395,11 @@ void Draw_Max_Accel_Menu() {
|
||||
|
||||
Draw_Back_First();
|
||||
LOOP_L_N(i, 3 + ENABLED(HAS_HOTEND)) Draw_Menu_Line(i + 1, ICON_MaxSpeedJerkX + i);
|
||||
Draw_Edit_Float3(1, planner.max_jerk[X_AXIS] * MINUNITMULT);
|
||||
Draw_Edit_Float3(2, planner.max_jerk[Y_AXIS] * MINUNITMULT);
|
||||
Draw_Edit_Float3(3, planner.max_jerk[Z_AXIS] * MINUNITMULT);
|
||||
Draw_Edit_Float3(1, planner.max_jerk.x * MINUNITMULT);
|
||||
Draw_Edit_Float3(2, planner.max_jerk.y * MINUNITMULT);
|
||||
Draw_Edit_Float3(3, planner.max_jerk.z * MINUNITMULT);
|
||||
#if HAS_HOTEND
|
||||
Draw_Edit_Float3(4, planner.max_jerk[E_AXIS] * MINUNITMULT);
|
||||
Draw_Edit_Float3(4, planner.max_jerk.e * MINUNITMULT);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2465,35 +2465,35 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
||||
case JERK_X:
|
||||
if (draw) {
|
||||
Draw_Menu_Item(row, ICON_MaxSpeedJerkX, F("X Axis"));
|
||||
Draw_Float(planner.max_jerk[X_AXIS], row, false, 10);
|
||||
Draw_Float(planner.max_jerk.x, row, false, 10);
|
||||
}
|
||||
else
|
||||
Modify_Value(planner.max_jerk[X_AXIS], 0, default_max_jerk[X_AXIS] * 2, 10);
|
||||
Modify_Value(planner.max_jerk.x, 0, default_max_jerk[X_AXIS] * 2, 10);
|
||||
break;
|
||||
case JERK_Y:
|
||||
if (draw) {
|
||||
Draw_Menu_Item(row, ICON_MaxSpeedJerkY, F("Y Axis"));
|
||||
Draw_Float(planner.max_jerk[Y_AXIS], row, false, 10);
|
||||
Draw_Float(planner.max_jerk.y, row, false, 10);
|
||||
}
|
||||
else
|
||||
Modify_Value(planner.max_jerk[Y_AXIS], 0, default_max_jerk[Y_AXIS] * 2, 10);
|
||||
Modify_Value(planner.max_jerk.y, 0, default_max_jerk[Y_AXIS] * 2, 10);
|
||||
break;
|
||||
case JERK_Z:
|
||||
if (draw) {
|
||||
Draw_Menu_Item(row, ICON_MaxSpeedJerkZ, F("Z Axis"));
|
||||
Draw_Float(planner.max_jerk[Z_AXIS], row, false, 10);
|
||||
Draw_Float(planner.max_jerk.z, row, false, 10);
|
||||
}
|
||||
else
|
||||
Modify_Value(planner.max_jerk[Z_AXIS], 0, default_max_jerk[Z_AXIS] * 2, 10);
|
||||
Modify_Value(planner.max_jerk.z, 0, default_max_jerk[Z_AXIS] * 2, 10);
|
||||
break;
|
||||
#if HAS_HOTEND
|
||||
case JERK_E:
|
||||
if (draw) {
|
||||
Draw_Menu_Item(row, ICON_MaxSpeedJerkE, F("Extruder"));
|
||||
Draw_Float(planner.max_jerk[E_AXIS], row, false, 10);
|
||||
Draw_Float(planner.max_jerk.e, row, false, 10);
|
||||
}
|
||||
else
|
||||
Modify_Value(planner.max_jerk[E_AXIS], 0, default_max_jerk[E_AXIS] * 2, 10);
|
||||
Modify_Value(planner.max_jerk.e, 0, default_max_jerk[E_AXIS] * 2, 10);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ void MarlinUI::draw_status_message(const bool blink) {
|
||||
lcd_put_u8str(status_message);
|
||||
|
||||
// Fill the rest with spaces
|
||||
while (slen < max_status_chars) { lcd_put_lchar(' '); ++slen; }
|
||||
while (slen < max_status_chars) { lcd_put_u8str(F(" ")); ++slen; }
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -227,10 +227,10 @@ void MarlinUI::draw_status_message(const bool blink) {
|
||||
|
||||
// If the string doesn't completely fill the line...
|
||||
if (rlen < max_status_chars) {
|
||||
lcd_put_lchar('.'); // Always at 1+ spaces left, draw a dot
|
||||
lcd_put_u8str(F(".")); // Always at 1+ spaces left, draw a dot
|
||||
uint8_t chars = max_status_chars - rlen; // Amount of space left in characters
|
||||
if (--chars) { // Draw a second dot if there's space
|
||||
lcd_put_lchar('.');
|
||||
lcd_put_u8str(F("."));
|
||||
if (--chars)
|
||||
lcd_put_u8str_max(status_message, chars); // Print a second copy of the message
|
||||
}
|
||||
@@ -254,7 +254,7 @@ void MarlinUI::draw_status_message(const bool blink) {
|
||||
lcd_put_u8str_max(status_message, max_status_chars);
|
||||
|
||||
// Fill the rest with spaces if there are missing spaces
|
||||
while (slen < max_status_chars) { lcd_put_lchar(' '); ++slen; }
|
||||
while (slen < max_status_chars) { lcd_put_u8str(F(" ")); ++slen; }
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2654,11 +2654,11 @@ void SetMaxAccelZ() { HMI_value.axis = Z_AXIS, SetIntOnClick(MIN_MAXACCELERATION
|
||||
|
||||
#if HAS_CLASSIC_JERK
|
||||
void ApplyMaxJerk() { planner.set_max_jerk(HMI_value.axis, MenuData.Value / MINUNITMULT); }
|
||||
void SetMaxJerkX() { HMI_value.axis = X_AXIS, SetFloatOnClick(MIN_MAXJERK, max_jerk_edit_values[X_AXIS], UNITFDIGITS, planner.max_jerk[X_AXIS], ApplyMaxJerk); }
|
||||
void SetMaxJerkY() { HMI_value.axis = Y_AXIS, SetFloatOnClick(MIN_MAXJERK, max_jerk_edit_values[Y_AXIS], UNITFDIGITS, planner.max_jerk[Y_AXIS], ApplyMaxJerk); }
|
||||
void SetMaxJerkZ() { HMI_value.axis = Z_AXIS, SetFloatOnClick(MIN_MAXJERK, max_jerk_edit_values[Z_AXIS], UNITFDIGITS, planner.max_jerk[Z_AXIS], ApplyMaxJerk); }
|
||||
void SetMaxJerkX() { HMI_value.axis = X_AXIS, SetFloatOnClick(MIN_MAXJERK, max_jerk_edit_values[X_AXIS], UNITFDIGITS, planner.max_jerk.x, ApplyMaxJerk); }
|
||||
void SetMaxJerkY() { HMI_value.axis = Y_AXIS, SetFloatOnClick(MIN_MAXJERK, max_jerk_edit_values[Y_AXIS], UNITFDIGITS, planner.max_jerk.y, ApplyMaxJerk); }
|
||||
void SetMaxJerkZ() { HMI_value.axis = Z_AXIS, SetFloatOnClick(MIN_MAXJERK, max_jerk_edit_values[Z_AXIS], UNITFDIGITS, planner.max_jerk.z, ApplyMaxJerk); }
|
||||
#if HAS_HOTEND
|
||||
void SetMaxJerkE() { HMI_value.axis = E_AXIS; SetFloatOnClick(MIN_MAXJERK, max_jerk_edit_values[E_AXIS], UNITFDIGITS, planner.max_jerk[E_AXIS], ApplyMaxJerk); }
|
||||
void SetMaxJerkE() { HMI_value.axis = E_AXIS; SetFloatOnClick(MIN_MAXJERK, max_jerk_edit_values[E_AXIS], UNITFDIGITS, planner.max_jerk.e, ApplyMaxJerk); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -3641,11 +3641,11 @@ void Draw_MaxAccel_Menu() {
|
||||
SetMenuTitle({1, 16, 28, 13}, GET_TEXT_F(MSG_JERK));
|
||||
MenuItemsPrepare(5);
|
||||
BACK_ITEM(Draw_Motion_Menu);
|
||||
EDIT_ITEM_F(ICON_MaxSpeedJerkX, MSG_VA_JERK, onDrawMaxJerkX, SetMaxJerkX, &planner.max_jerk[X_AXIS]);
|
||||
EDIT_ITEM_F(ICON_MaxSpeedJerkY, MSG_VB_JERK, onDrawMaxJerkY, SetMaxJerkY, &planner.max_jerk[Y_AXIS]);
|
||||
EDIT_ITEM_F(ICON_MaxSpeedJerkZ, MSG_VC_JERK, onDrawMaxJerkZ, SetMaxJerkZ, &planner.max_jerk[Z_AXIS]);
|
||||
EDIT_ITEM_F(ICON_MaxSpeedJerkX, MSG_VA_JERK, onDrawMaxJerkX, SetMaxJerkX, &planner.max_jerk.x);
|
||||
EDIT_ITEM_F(ICON_MaxSpeedJerkY, MSG_VB_JERK, onDrawMaxJerkY, SetMaxJerkY, &planner.max_jerk.y);
|
||||
EDIT_ITEM_F(ICON_MaxSpeedJerkZ, MSG_VC_JERK, onDrawMaxJerkZ, SetMaxJerkZ, &planner.max_jerk.z);
|
||||
#if HAS_HOTEND
|
||||
EDIT_ITEM_F(ICON_MaxSpeedJerkE, MSG_VE_JERK, onDrawMaxJerkE, SetMaxJerkE, &planner.max_jerk[E_AXIS]);
|
||||
EDIT_ITEM_F(ICON_MaxSpeedJerkE, MSG_VE_JERK, onDrawMaxJerkE, SetMaxJerkE, &planner.max_jerk.e);
|
||||
#endif
|
||||
}
|
||||
CurrentMenu->draw();
|
||||
|
||||
@@ -72,17 +72,6 @@ void ChironTFT::Startup() {
|
||||
live_Zoffset = 0.0;
|
||||
file_menu = AC_menu_file;
|
||||
|
||||
// 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
|
||||
|
||||
// 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
|
||||
TFTSer.begin(115200);
|
||||
|
||||
// Wait for the TFT panel to initialize and finish the animation
|
||||
|
||||
@@ -45,7 +45,7 @@ bool BaseScreen::buttonStyleCallback(CommandProcessor &cmd, uint8_t tag, uint8_t
|
||||
return false;
|
||||
}
|
||||
|
||||
#if SCREENS_CAN_TIME_OUT
|
||||
#if HAS_SCREEN_TIMEOUT
|
||||
if (EventLoop::get_pressed_tag() != 0) {
|
||||
#if ENABLED(TOUCH_UI_DEBUG)
|
||||
SERIAL_ECHO_MSG("buttonStyleCallback, resetting timeout");
|
||||
@@ -66,7 +66,7 @@ bool BaseScreen::buttonStyleCallback(CommandProcessor &cmd, uint8_t tag, uint8_t
|
||||
}
|
||||
|
||||
void BaseScreen::onIdle() {
|
||||
#if SCREENS_CAN_TIME_OUT
|
||||
#if HAS_SCREEN_TIMEOUT
|
||||
if (EventLoop::get_pressed_tag() != 0)
|
||||
reset_menu_timeout();
|
||||
|
||||
@@ -81,10 +81,10 @@ void BaseScreen::onIdle() {
|
||||
}
|
||||
|
||||
void BaseScreen::reset_menu_timeout() {
|
||||
TERN_(SCREENS_CAN_TIME_OUT, last_interaction = millis());
|
||||
TERN_(HAS_SCREEN_TIMEOUT, last_interaction = millis());
|
||||
}
|
||||
|
||||
#if SCREENS_CAN_TIME_OUT
|
||||
#if HAS_SCREEN_TIMEOUT
|
||||
uint32_t BaseScreen::last_interaction;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
class BaseScreen : public UIScreen {
|
||||
protected:
|
||||
#if SCREENS_CAN_TIME_OUT
|
||||
#if HAS_SCREEN_TIMEOUT
|
||||
static uint32_t last_interaction;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ bool BaseMoveAxisScreen::onTouchHeld(uint8_t tag) {
|
||||
|
||||
void BaseMoveAxisScreen::raiseZtoTop() {
|
||||
constexpr xyze_feedrate_t homing_feedrate = HOMING_FEEDRATE_MM_M;
|
||||
setAxisPosition_mm(Z_MAX_POS - 5, Z, homing_feedrate[Z_AXIS]);
|
||||
setAxisPosition_mm(Z_MAX_POS - 5, Z, homing_feedrate.z);
|
||||
}
|
||||
|
||||
float BaseMoveAxisScreen::getManualFeedrate(uint8_t axis, float increment_mm) {
|
||||
|
||||
@@ -74,16 +74,16 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
|
||||
void lv_draw_jerk_settings() {
|
||||
scr = lv_screen_create(JERK_UI, machine_menu.JerkConfTitle);
|
||||
|
||||
dtostrf(planner.max_jerk[X_AXIS], 1, 1, public_buf_l);
|
||||
dtostrf(planner.max_jerk.x, 1, 1, public_buf_l);
|
||||
lv_screen_menu_item_1_edit(scr, machine_menu.X_Jerk, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_JERK_X, 0, public_buf_l);
|
||||
|
||||
dtostrf(planner.max_jerk[Y_AXIS], 1, 1, public_buf_l);
|
||||
dtostrf(planner.max_jerk.y, 1, 1, public_buf_l);
|
||||
lv_screen_menu_item_1_edit(scr, machine_menu.Y_Jerk, PARA_UI_POS_X, PARA_UI_POS_Y * 2, event_handler, ID_JERK_Y, 1, public_buf_l);
|
||||
|
||||
dtostrf(planner.max_jerk[Z_AXIS], 1, 1, public_buf_l);
|
||||
dtostrf(planner.max_jerk.z, 1, 1, public_buf_l);
|
||||
lv_screen_menu_item_1_edit(scr, machine_menu.Z_Jerk, PARA_UI_POS_X, PARA_UI_POS_Y * 3, event_handler, ID_JERK_Z, 2, public_buf_l);
|
||||
|
||||
dtostrf(planner.max_jerk[E_AXIS], 1, 1, public_buf_l);
|
||||
dtostrf(planner.max_jerk.e, 1, 1, public_buf_l);
|
||||
lv_screen_menu_item_1_edit(scr, machine_menu.E_Jerk, PARA_UI_POS_X, PARA_UI_POS_Y * 4, event_handler, ID_JERK_E, 3, public_buf_l);
|
||||
|
||||
lv_big_button_create(scr, "F:/bmp_back70x40.bin", common_menu.text_back, PARA_UI_BACK_POS_X, PARA_UI_BACK_POS_Y, event_handler, ID_JERK_RETURN, true);
|
||||
|
||||
@@ -119,22 +119,22 @@ static void disp_key_value() {
|
||||
|
||||
case XJerk:
|
||||
#if HAS_CLASSIC_JERK
|
||||
dtostrf(planner.max_jerk[X_AXIS], 1, 1, public_buf_m);
|
||||
dtostrf(planner.max_jerk.x, 1, 1, public_buf_m);
|
||||
#endif
|
||||
break;
|
||||
case YJerk:
|
||||
#if HAS_CLASSIC_JERK
|
||||
dtostrf(planner.max_jerk[Y_AXIS], 1, 1, public_buf_m);
|
||||
dtostrf(planner.max_jerk.y, 1, 1, public_buf_m);
|
||||
#endif
|
||||
break;
|
||||
case ZJerk:
|
||||
#if HAS_CLASSIC_JERK
|
||||
dtostrf(planner.max_jerk[Z_AXIS], 1, 1, public_buf_m);
|
||||
dtostrf(planner.max_jerk.z, 1, 1, public_buf_m);
|
||||
#endif
|
||||
break;
|
||||
case EJerk:
|
||||
#if HAS_CLASSIC_JERK
|
||||
dtostrf(planner.max_jerk[E_AXIS], 1, 1, public_buf_m);
|
||||
dtostrf(planner.max_jerk.e, 1, 1, public_buf_m);
|
||||
#endif
|
||||
break;
|
||||
|
||||
@@ -307,10 +307,10 @@ static void set_value_confirm() {
|
||||
case ZMaxFeedRate: planner.settings.max_feedrate_mm_s[Z_AXIS] = atof(key_value); break;
|
||||
case E0MaxFeedRate: planner.settings.max_feedrate_mm_s[E_AXIS] = atof(key_value); break;
|
||||
case E1MaxFeedRate: planner.settings.max_feedrate_mm_s[E_AXIS_N(1)] = atof(key_value); break;
|
||||
case XJerk: TERN_(HAS_CLASSIC_JERK, planner.max_jerk[X_AXIS] = atof(key_value)); break;
|
||||
case YJerk: TERN_(HAS_CLASSIC_JERK, planner.max_jerk[Y_AXIS] = atof(key_value)); break;
|
||||
case ZJerk: TERN_(HAS_CLASSIC_JERK, planner.max_jerk[Z_AXIS] = atof(key_value)); break;
|
||||
case EJerk: TERN_(HAS_CLASSIC_JERK, planner.max_jerk[E_AXIS] = atof(key_value)); break;
|
||||
case XJerk: TERN_(HAS_CLASSIC_JERK, planner.max_jerk.x = atof(key_value)); break;
|
||||
case YJerk: TERN_(HAS_CLASSIC_JERK, planner.max_jerk.y = atof(key_value)); break;
|
||||
case ZJerk: TERN_(HAS_CLASSIC_JERK, planner.max_jerk.z = atof(key_value)); break;
|
||||
case EJerk: TERN_(HAS_CLASSIC_JERK, planner.max_jerk.e = atof(key_value)); break;
|
||||
case Xstep: planner.settings.axis_steps_per_mm[X_AXIS] = atof(key_value); planner.refresh_positioning(); break;
|
||||
case Ystep: planner.settings.axis_steps_per_mm[Y_AXIS] = atof(key_value); planner.refresh_positioning(); break;
|
||||
case Zstep: planner.settings.axis_steps_per_mm[Z_AXIS] = atof(key_value); planner.refresh_positioning(); break;
|
||||
|
||||
@@ -375,9 +375,9 @@ namespace ExtUI {
|
||||
bool canMove(const axis_t axis) {
|
||||
switch (axis) {
|
||||
#if IS_KINEMATIC || ENABLED(NO_MOTION_BEFORE_HOMING)
|
||||
case X: return axis_should_home(X_AXIS);
|
||||
OPTCODE(HAS_Y_AXIS, case Y: return axis_should_home(Y_AXIS))
|
||||
OPTCODE(HAS_Z_AXIS, case Z: return axis_should_home(Z_AXIS))
|
||||
case X: return !axis_should_home(X_AXIS);
|
||||
OPTCODE(HAS_Y_AXIS, case Y: return !axis_should_home(Y_AXIS))
|
||||
OPTCODE(HAS_Z_AXIS, case Z: return !axis_should_home(Z_AXIS))
|
||||
#else
|
||||
case X: case Y: case Z: return true;
|
||||
#endif
|
||||
|
||||
@@ -90,6 +90,7 @@ namespace Language_an {
|
||||
LSTR MSG_MOVE_01MM = _UxGT("Mover 0.1mm");
|
||||
LSTR MSG_MOVE_1MM = _UxGT("Mover 1mm");
|
||||
LSTR MSG_MOVE_10MM = _UxGT("Mover 10mm");
|
||||
LSTR MSG_MOVE_50MM = _UxGT("Mover 50mm");
|
||||
LSTR MSG_MOVE_100MM = _UxGT("Mover 100mm");
|
||||
LSTR MSG_SPEED = _UxGT("Velocidat");
|
||||
LSTR MSG_BED_Z = _UxGT("Base Z");
|
||||
|
||||
@@ -79,6 +79,7 @@ namespace Language_bg {
|
||||
LSTR MSG_MOVE_01MM = _UxGT("Премести с 0.1mm");
|
||||
LSTR MSG_MOVE_1MM = _UxGT("Премести с 1mm");
|
||||
LSTR MSG_MOVE_10MM = _UxGT("Премести с 10mm");
|
||||
LSTR MSG_MOVE_50MM = _UxGT("Премести с 50mm");
|
||||
LSTR MSG_MOVE_100MM = _UxGT("Премести с 100mm");
|
||||
LSTR MSG_SPEED = _UxGT("Скорост");
|
||||
LSTR MSG_BED_Z = _UxGT("Bed Z");
|
||||
|
||||
@@ -90,6 +90,7 @@ namespace Language_ca {
|
||||
LSTR MSG_MOVE_01MM = _UxGT("Mou 0.1mm");
|
||||
LSTR MSG_MOVE_1MM = _UxGT("Mou 1mm");
|
||||
LSTR MSG_MOVE_10MM = _UxGT("Mou 10mm");
|
||||
LSTR MSG_MOVE_50MM = _UxGT("Mou 50mm");
|
||||
LSTR MSG_MOVE_100MM = _UxGT("Mou 100mm");
|
||||
LSTR MSG_SPEED = _UxGT("Velocitat");
|
||||
LSTR MSG_BED_Z = _UxGT("Llit Z");
|
||||
|
||||
@@ -240,6 +240,7 @@ namespace Language_cz {
|
||||
LSTR MSG_MOVE_01MM = _UxGT("Posunout o 0,1mm");
|
||||
LSTR MSG_MOVE_1MM = _UxGT("Posunout o 1mm");
|
||||
LSTR MSG_MOVE_10MM = _UxGT("Posunout o 10mm");
|
||||
LSTR MSG_MOVE_50MM = _UxGT("Posunout o 50mm");
|
||||
LSTR MSG_MOVE_100MM = _UxGT("Posunout o 100mm");
|
||||
LSTR MSG_SPEED = _UxGT("Rychlost");
|
||||
LSTR MSG_BED_Z = _UxGT("Výška podl.");
|
||||
|
||||
@@ -81,6 +81,7 @@ namespace Language_da {
|
||||
LSTR MSG_MOVE_01MM = _UxGT("Flyt 0.1mm");
|
||||
LSTR MSG_MOVE_1MM = _UxGT("Flyt 1mm");
|
||||
LSTR MSG_MOVE_10MM = _UxGT("Flyt 10mm");
|
||||
LSTR MSG_MOVE_50MM = _UxGT("Flyt 50mm");
|
||||
LSTR MSG_MOVE_100MM = _UxGT("Flyt 100mm");
|
||||
LSTR MSG_SPEED = _UxGT("Hastighed");
|
||||
LSTR MSG_BED_Z = _UxGT("Plade Z");
|
||||
|
||||
@@ -301,6 +301,7 @@ namespace Language_de {
|
||||
LSTR MSG_MOVE_01MM = _UxGT(" 0,1 mm");
|
||||
LSTR MSG_MOVE_1MM = _UxGT(" 1,0 mm");
|
||||
LSTR MSG_MOVE_10MM = _UxGT(" 10,0 mm");
|
||||
LSTR MSG_MOVE_50MM = _UxGT(" 50,0 mm");
|
||||
LSTR MSG_MOVE_100MM = _UxGT("100,0 mm");
|
||||
LSTR MSG_MOVE_0001IN = _UxGT("0.001 in");
|
||||
LSTR MSG_MOVE_001IN = _UxGT("0.010 in");
|
||||
|
||||
@@ -99,6 +99,7 @@ namespace Language_el {
|
||||
LSTR MSG_MOVE_01MM = _UxGT("Μετακίνηση 0,1 μμ");
|
||||
LSTR MSG_MOVE_1MM = _UxGT("Μετακίνηση 1 μμ");
|
||||
LSTR MSG_MOVE_10MM = _UxGT("Μετακίνηση 10 μμ");
|
||||
LSTR MSG_MOVE_50MM = _UxGT("Μετακίνηση 50 μμ");
|
||||
LSTR MSG_MOVE_100MM = _UxGT("Μετακίνηση 100 μμ");
|
||||
LSTR MSG_SPEED = _UxGT("Ταχύτητα");
|
||||
LSTR MSG_BED_Z = _UxGT("Επ. Εκτύπωσης Z");
|
||||
|
||||
@@ -88,6 +88,7 @@ namespace Language_el_gr {
|
||||
LSTR MSG_MOVE_01MM = _UxGT("Μετακίνηση 0,1 μμ");
|
||||
LSTR MSG_MOVE_1MM = _UxGT("Μετακίνηση 1 μμ");
|
||||
LSTR MSG_MOVE_10MM = _UxGT("Μετακίνηση 10 μμ");
|
||||
LSTR MSG_MOVE_50MM = _UxGT("Μετακίνηση 50 μμ");
|
||||
LSTR MSG_MOVE_100MM = _UxGT("Μετακίνηση 100 μμ");
|
||||
LSTR MSG_SPEED = _UxGT("Ταχύτητα");
|
||||
LSTR MSG_BED_Z = _UxGT("Κλίνη Z");
|
||||
|
||||
@@ -316,10 +316,12 @@ namespace Language_en {
|
||||
LSTR MSG_MOVE_01MM = _UxGT("Move 0.1mm");
|
||||
LSTR MSG_MOVE_1MM = _UxGT("Move 1mm");
|
||||
LSTR MSG_MOVE_10MM = _UxGT("Move 10mm");
|
||||
LSTR MSG_MOVE_50MM = _UxGT("Move 50mm");
|
||||
LSTR MSG_MOVE_100MM = _UxGT("Move 100mm");
|
||||
LSTR MSG_MOVE_0001IN = _UxGT("Move 0.001in");
|
||||
LSTR MSG_MOVE_001IN = _UxGT("Move 0.01in");
|
||||
LSTR MSG_MOVE_01IN = _UxGT("Move 0.1in");
|
||||
LSTR MSG_MOVE_05IN = _UxGT("Move 0.5in");
|
||||
LSTR MSG_MOVE_1IN = _UxGT("Move 1.0in");
|
||||
LSTR MSG_SPEED = _UxGT("Speed");
|
||||
LSTR MSG_BED_Z = _UxGT("Bed Z");
|
||||
@@ -332,6 +334,7 @@ namespace Language_en {
|
||||
LSTR MSG_COOLER = _UxGT("Laser Coolant");
|
||||
LSTR MSG_COOLER_TOGGLE = _UxGT("Toggle Cooler");
|
||||
LSTR MSG_FLOWMETER_SAFETY = _UxGT("Flow Safety");
|
||||
LSTR MSG_CUTTER = _UxGT("Cutter");
|
||||
LSTR MSG_LASER = _UxGT("Laser");
|
||||
LSTR MSG_FAN_SPEED = _UxGT("Fan Speed");
|
||||
LSTR MSG_FAN_SPEED_N = _UxGT("Fan Speed ~");
|
||||
@@ -399,6 +402,11 @@ namespace Language_en {
|
||||
LSTR MSG_AMAX_EN = _UxGT("Max * Accel");
|
||||
LSTR MSG_A_RETRACT = _UxGT("Retract Accel");
|
||||
LSTR MSG_A_TRAVEL = _UxGT("Travel Accel");
|
||||
LSTR MSG_INPUT_SHAPING = _UxGT("Input Shaping");
|
||||
LSTR MSG_SHAPING_ENABLE = _UxGT("Enable @ shaping");
|
||||
LSTR MSG_SHAPING_DISABLE = _UxGT("Disable @ shaping");
|
||||
LSTR MSG_SHAPING_FREQ = _UxGT("@ frequency");
|
||||
LSTR MSG_SHAPING_ZETA = _UxGT("@ damping");
|
||||
LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("XY Freq Limit");
|
||||
LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Min FR Factor");
|
||||
LSTR MSG_STEPS_PER_MM = _UxGT("Steps/mm");
|
||||
|
||||
@@ -234,6 +234,7 @@ namespace Language_es {
|
||||
LSTR MSG_MOVE_01MM = _UxGT("Mover 0.1mm");
|
||||
LSTR MSG_MOVE_1MM = _UxGT("Mover 1mm");
|
||||
LSTR MSG_MOVE_10MM = _UxGT("Mover 10mm");
|
||||
LSTR MSG_MOVE_50MM = _UxGT("Mover 50mm");
|
||||
LSTR MSG_MOVE_100MM = _UxGT("Mover 100mm");
|
||||
LSTR MSG_SPEED = _UxGT("Velocidad");
|
||||
LSTR MSG_BED_Z = _UxGT("Cama Z");
|
||||
|
||||
@@ -143,6 +143,7 @@ namespace Language_eu {
|
||||
LSTR MSG_MOVE_01MM = _UxGT("Mugitu 0.1mm");
|
||||
LSTR MSG_MOVE_1MM = _UxGT("Mugitu 1mm");
|
||||
LSTR MSG_MOVE_10MM = _UxGT("Mugitu 10mm");
|
||||
LSTR MSG_MOVE_50MM = _UxGT("Mugitu 50mm");
|
||||
LSTR MSG_MOVE_100MM = _UxGT("Mugitu 100mm");
|
||||
LSTR MSG_SPEED = _UxGT("Abiadura");
|
||||
LSTR MSG_BED_Z = _UxGT("Z Ohea");
|
||||
|
||||
@@ -76,6 +76,7 @@ namespace Language_fi {
|
||||
LSTR MSG_MOVE_01MM = _UxGT("Liikuta 0.1mm");
|
||||
LSTR MSG_MOVE_1MM = _UxGT("Liikuta 1mm");
|
||||
LSTR MSG_MOVE_10MM = _UxGT("Liikuta 10mm");
|
||||
LSTR MSG_MOVE_50MM = _UxGT("Liikuta 50mm");
|
||||
LSTR MSG_MOVE_100MM = _UxGT("Liikuta 100mm");
|
||||
LSTR MSG_SPEED = _UxGT("Nopeus");
|
||||
LSTR MSG_NOZZLE = _UxGT("Suutin");
|
||||
|
||||
@@ -238,10 +238,12 @@ namespace Language_fr {
|
||||
LSTR MSG_MOVE_01MM = _UxGT("Déplacer 0.1mm");
|
||||
LSTR MSG_MOVE_1MM = _UxGT("Déplacer 1mm");
|
||||
LSTR MSG_MOVE_10MM = _UxGT("Déplacer 10mm");
|
||||
LSTR MSG_MOVE_50MM = _UxGT("Déplacer 50mm");
|
||||
LSTR MSG_MOVE_100MM = _UxGT("Déplacer 100mm");
|
||||
LSTR MSG_MOVE_0001IN = _UxGT("Déplacer 0.001\"");
|
||||
LSTR MSG_MOVE_001IN = _UxGT("Déplacer 0.01\"");
|
||||
LSTR MSG_MOVE_01IN = _UxGT("Déplacer 0.1\"");
|
||||
LSTR MSG_MOVE_05IN = _UxGT("Déplacer 0.5\"");
|
||||
LSTR MSG_MOVE_1IN = _UxGT("Déplacer 1\"");
|
||||
LSTR MSG_SPEED = _UxGT("Vitesse");
|
||||
LSTR MSG_BED_Z = _UxGT("Lit Z");
|
||||
|
||||
@@ -231,6 +231,7 @@ namespace Language_gl {
|
||||
LSTR MSG_MOVE_01MM = _UxGT("Mover 0.1mm");
|
||||
LSTR MSG_MOVE_1MM = _UxGT("Mover 1mm");
|
||||
LSTR MSG_MOVE_10MM = _UxGT("Mover 10mm");
|
||||
LSTR MSG_MOVE_50MM = _UxGT("Mover 50mm");
|
||||
LSTR MSG_MOVE_100MM = _UxGT("Mover 100mm");
|
||||
LSTR MSG_SPEED = _UxGT("Velocidade");
|
||||
LSTR MSG_BED_Z = _UxGT("Cama Z");
|
||||
|
||||
@@ -86,6 +86,7 @@ namespace Language_hr {
|
||||
LSTR MSG_MOVE_01MM = _UxGT("Miči 0.1mm");
|
||||
LSTR MSG_MOVE_1MM = _UxGT("Miči 1mm");
|
||||
LSTR MSG_MOVE_10MM = _UxGT("Miči 10mm");
|
||||
LSTR MSG_MOVE_50MM = _UxGT("Miči 50mm");
|
||||
LSTR MSG_MOVE_100MM = _UxGT("Miči 100mm");
|
||||
LSTR MSG_SPEED = _UxGT("Brzina");
|
||||
LSTR MSG_BED_Z = _UxGT("Bed Z");
|
||||
|
||||
@@ -264,10 +264,12 @@ namespace Language_hu {
|
||||
LSTR MSG_MOVE_01MM = _UxGT("Mozgás 0.1mm");
|
||||
LSTR MSG_MOVE_1MM = _UxGT("Mozgás 1mm");
|
||||
LSTR MSG_MOVE_10MM = _UxGT("Mozgás 10mm");
|
||||
LSTR MSG_MOVE_50MM = _UxGT("Mozgás 50mm");
|
||||
LSTR MSG_MOVE_100MM = _UxGT("Mozgás 100mm");
|
||||
LSTR MSG_MOVE_0001IN = _UxGT("Mozgás 0.025mm");
|
||||
LSTR MSG_MOVE_001IN = _UxGT("Mozgás 0.254mm");
|
||||
LSTR MSG_MOVE_01IN = _UxGT("Mozgás 2.54mm");
|
||||
LSTR MSG_MOVE_05IN = _UxGT("Mozgás 12.7mm");
|
||||
LSTR MSG_MOVE_1IN = _UxGT("Mozgáá 25.4mm");
|
||||
LSTR MSG_SPEED = _UxGT("Sebesség");
|
||||
LSTR MSG_BED_Z = _UxGT("Z ágy");
|
||||
|
||||
@@ -178,7 +178,7 @@ namespace Language_it {
|
||||
LSTR MSG_MESH_AMAX = _UxGT("Massimizza area");
|
||||
LSTR MSG_MESH_CENTER = _UxGT("Area centrale");
|
||||
LSTR MSG_MESH_EDIT_Z = _UxGT("Valore di Z");
|
||||
LSTR MSG_MESH_CANCEL = _UxGT("Mesh cancellato");
|
||||
LSTR MSG_MESH_CANCEL = _UxGT("Mesh cancellata");
|
||||
LSTR MSG_CUSTOM_COMMANDS = _UxGT("Comandi personaliz.");
|
||||
LSTR MSG_M48_TEST = _UxGT("Test sonda M48");
|
||||
LSTR MSG_M48_POINT = _UxGT("Punto M48");
|
||||
@@ -251,6 +251,7 @@ namespace Language_it {
|
||||
LSTR MSG_UBL_SMART_FILLIN = _UxGT("Riempimento Smart");
|
||||
LSTR MSG_UBL_FILLIN_MESH = _UxGT("Riempimento Mesh");
|
||||
LSTR MSG_UBL_MESH_FILLED = _UxGT("Pts mancanti riempiti");
|
||||
LSTR MSG_UBL_MESH_INVALID = _UxGT("Mesh non valida");
|
||||
LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Invalida Tutto");
|
||||
LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Invalid.Punto Vicino");
|
||||
LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Ritocca Tutto");
|
||||
@@ -312,10 +313,12 @@ namespace Language_it {
|
||||
LSTR MSG_MOVE_01MM = _UxGT("Muovi di 0.1mm");
|
||||
LSTR MSG_MOVE_1MM = _UxGT("Muovi di 1mm");
|
||||
LSTR MSG_MOVE_10MM = _UxGT("Muovi di 10mm");
|
||||
LSTR MSG_MOVE_50MM = _UxGT("Muovi di 50mm");
|
||||
LSTR MSG_MOVE_100MM = _UxGT("Muovi di 100mm");
|
||||
LSTR MSG_MOVE_0001IN = _UxGT("Muovi di 0.001\"");
|
||||
LSTR MSG_MOVE_001IN = _UxGT("Muovi di 0.01\"");
|
||||
LSTR MSG_MOVE_01IN = _UxGT("Muovi di 0.1\"");
|
||||
LSTR MSG_MOVE_05IN = _UxGT("Muovi di 0.5\"");
|
||||
LSTR MSG_MOVE_1IN = _UxGT("Muovi di 1\"");
|
||||
LSTR MSG_SPEED = _UxGT("Velocità");
|
||||
LSTR MSG_BED_Z = _UxGT("Piatto Z");
|
||||
@@ -395,6 +398,11 @@ namespace Language_it {
|
||||
LSTR MSG_AMAX_EN = _UxGT("Acc.Massima *");
|
||||
LSTR MSG_A_RETRACT = _UxGT("A-Ritrazione");
|
||||
LSTR MSG_A_TRAVEL = _UxGT("A-Spostamento");
|
||||
LSTR MSG_INPUT_SHAPING = _UxGT("Input Shaping");
|
||||
LSTR MSG_SHAPING_X_FREQ = _UxGT("Frequenza ") STR_X;
|
||||
LSTR MSG_SHAPING_Y_FREQ = _UxGT("Frequenza ") STR_Y;
|
||||
LSTR MSG_SHAPING_X_ZETA = _UxGT("Smorzamento ") STR_X;
|
||||
LSTR MSG_SHAPING_Y_ZETA = _UxGT("Smorzamento ") STR_Y;
|
||||
LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("Frequenza max");
|
||||
LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Feed min");
|
||||
LSTR MSG_STEPS_PER_MM = _UxGT("Passi/mm");
|
||||
@@ -414,6 +422,12 @@ namespace Language_it {
|
||||
LSTR MSG_FILAMENT_DIAM_E = _UxGT("Diam. filo *");
|
||||
LSTR MSG_FILAMENT_UNLOAD = _UxGT("Rimuovi mm");
|
||||
LSTR MSG_FILAMENT_LOAD = _UxGT("Carica mm");
|
||||
LSTR MSG_SEGMENTS_PER_SECOND = _UxGT("Segmenti/Sec");
|
||||
LSTR MSG_DRAW_MIN_X = _UxGT("Min X area disegno");
|
||||
LSTR MSG_DRAW_MAX_X = _UxGT("Max X area disegno");
|
||||
LSTR MSG_DRAW_MIN_Y = _UxGT("Min Y area disegno");
|
||||
LSTR MSG_DRAW_MAX_Y = _UxGT("Max Y area disegno");
|
||||
LSTR MSG_MAX_BELT_LEN = _UxGT("Lungh.max cinghia");
|
||||
LSTR MSG_ADVANCE_K = _UxGT("K Avanzamento");
|
||||
LSTR MSG_ADVANCE_K_E = _UxGT("K Avanzamento *");
|
||||
LSTR MSG_CONTRAST = _UxGT("Contrasto LCD");
|
||||
@@ -506,9 +520,10 @@ namespace Language_it {
|
||||
LSTR MSG_TOOL_CHANGE = _UxGT("Cambio utensile");
|
||||
LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Risalita Z");
|
||||
LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Velocità innesco");
|
||||
LSTR MSG_SINGLENOZZLE_WIPE_RETRACT = _UxGT("Ritrazione pulizia");
|
||||
LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Velocità ritrazione");
|
||||
LSTR MSG_FILAMENT_PARK_ENABLED = _UxGT("Parcheggia testa");
|
||||
LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Recover Speed");
|
||||
LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Veloc. di recupero");
|
||||
LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Velocità ventola");
|
||||
LSTR MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Tempo ventola");
|
||||
LSTR MSG_TOOL_MIGRATION_ON = _UxGT("Auto ON");
|
||||
|
||||
@@ -99,6 +99,7 @@ namespace Language_jp_kana {
|
||||
LSTR MSG_MOVE_01MM = _UxGT("0.1mm イドウ"); // "Move 0.1mm"
|
||||
LSTR MSG_MOVE_1MM = _UxGT(" 1mm イドウ"); // "Move 1mm"
|
||||
LSTR MSG_MOVE_10MM = _UxGT(" 10mm イドウ"); // "Move 10mm"
|
||||
LSTR MSG_MOVE_50MM = _UxGT(" 50mm イドウ"); // "Move 50mm"
|
||||
LSTR MSG_MOVE_100MM = _UxGT(" 100mm イドウ"); // "Move 100mm"
|
||||
LSTR MSG_SPEED = _UxGT("ソクド"); // "Speed"
|
||||
LSTR MSG_BED_Z = _UxGT("Zオフセット"); // "Bed Z"
|
||||
|
||||
@@ -226,6 +226,7 @@ namespace Language_zh_TW {
|
||||
LSTR MSG_MOVE_01MM = _UxGT("移動 0.1 mm"); // "Move 0.1mm"
|
||||
LSTR MSG_MOVE_1MM = _UxGT("移動 1 mm"); // "Move 1mm"
|
||||
LSTR MSG_MOVE_10MM = _UxGT("移動 10 mm"); // "Move 10mm"
|
||||
LSTR MSG_MOVE_50MM = _UxGT("移動 50 mm"); // "Move 50mm"
|
||||
LSTR MSG_MOVE_100MM = _UxGT("移動 100 mm"); // "Move 100mm"
|
||||
LSTR MSG_SPEED = _UxGT("速率"); // "Speed"
|
||||
LSTR MSG_BED_Z = _UxGT("熱床Z"); // "Bed Z"
|
||||
|
||||
@@ -52,7 +52,7 @@ lcd_uint_t lcd_put_u8str_P(PGM_P const ptpl, const int8_t ind, const char *cstr/
|
||||
if (!wc) break;
|
||||
if (wc == '=' || wc == '~' || wc == '*') {
|
||||
if (ind >= 0) {
|
||||
if (wc == '*') { lcd_put_lchar('E'); n--; }
|
||||
if (wc == '*') { lcd_put_u8str(F("E")); n--; }
|
||||
if (n) {
|
||||
int8_t inum = ind + ((wc == '=') ? 0 : LCD_FIRST_TOOL);
|
||||
if (inum >= 10) {
|
||||
|
||||
+23
-15
@@ -196,12 +196,15 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
|
||||
|
||||
uint8_t MarlinUI::sleep_timeout_minutes; // Initialized by settings.load()
|
||||
millis_t MarlinUI::screen_timeout_millis = 0;
|
||||
#if DISABLED(TFT_COLOR_UI)
|
||||
void MarlinUI::refresh_screen_timeout() {
|
||||
screen_timeout_millis = sleep_timeout_minutes ? millis() + sleep_timeout_minutes * 60UL * 1000UL : 0;
|
||||
sleep_display(false);
|
||||
}
|
||||
void MarlinUI::refresh_screen_timeout() {
|
||||
screen_timeout_millis = sleep_timeout_minutes ? millis() + sleep_timeout_minutes * 60UL * 1000UL : 0;
|
||||
sleep_display(false);
|
||||
}
|
||||
|
||||
#if !HAS_TOUCH_SLEEP && !HAS_MARLINUI_U8GLIB // without DOGM (COLOR_UI)
|
||||
void MarlinUI::sleep_display(const bool sleep) {} // if unimplemented
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
void MarlinUI::init() {
|
||||
@@ -316,7 +319,7 @@ void MarlinUI::init() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if SCREENS_CAN_TIME_OUT
|
||||
#if HAS_SCREEN_TIMEOUT
|
||||
bool MarlinUI::defer_return_to_status;
|
||||
millis_t MarlinUI::return_to_status_ms = 0;
|
||||
#endif
|
||||
@@ -731,6 +734,11 @@ void MarlinUI::init() {
|
||||
void MarlinUI::wakeup_screen() {
|
||||
TERN(HAS_TOUCH_BUTTONS, touchBt.wakeUp(), touch.wakeUp());
|
||||
}
|
||||
#if HAS_DISPLAY_SLEEP && !HAS_MARLINUI_U8GLIB // without DOGM (COLOR_UI)
|
||||
void MarlinUI::sleep_display(const bool sleep) {
|
||||
if (!sleep) wakeup_screen(); // relay extra wake up events
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) {
|
||||
@@ -1071,7 +1079,7 @@ void MarlinUI::init() {
|
||||
|
||||
#if LCD_BACKLIGHT_TIMEOUT_MINS
|
||||
refresh_backlight_timeout();
|
||||
#elif HAS_DISPLAY_SLEEP && DISABLED(TFT_COLOR_UI)
|
||||
#elif HAS_DISPLAY_SLEEP
|
||||
refresh_screen_timeout();
|
||||
#endif
|
||||
|
||||
@@ -1171,7 +1179,7 @@ void MarlinUI::init() {
|
||||
NOLESS(max_display_update_time, millis() - ms);
|
||||
}
|
||||
|
||||
#if SCREENS_CAN_TIME_OUT
|
||||
#if HAS_SCREEN_TIMEOUT
|
||||
// Return to Status Screen after a timeout
|
||||
if (on_status_screen() || defer_return_to_status)
|
||||
reset_status_timeout(ms);
|
||||
@@ -1184,9 +1192,9 @@ void MarlinUI::init() {
|
||||
WRITE(LCD_BACKLIGHT_PIN, LOW); // Backlight off
|
||||
backlight_off_ms = 0;
|
||||
}
|
||||
#elif HAS_DISPLAY_SLEEP && DISABLED(TFT_COLOR_UI)
|
||||
#elif HAS_DISPLAY_SLEEP
|
||||
if (screen_timeout_millis && ELAPSED(ms, screen_timeout_millis))
|
||||
sleep_display(true);
|
||||
sleep_display();
|
||||
#endif
|
||||
|
||||
// Change state of drawing flag between screen updates
|
||||
@@ -1382,10 +1390,10 @@ void MarlinUI::init() {
|
||||
if (buttons & EN_B) enc |= B10;
|
||||
if (enc != lastEncoderBits) {
|
||||
switch (enc) {
|
||||
case ENCODER_PHASE_0: ENCODER_SPIN(ENCODER_PHASE_3, ENCODER_PHASE_1); break;
|
||||
case ENCODER_PHASE_1: ENCODER_SPIN(ENCODER_PHASE_0, ENCODER_PHASE_2); break;
|
||||
case ENCODER_PHASE_2: ENCODER_SPIN(ENCODER_PHASE_1, ENCODER_PHASE_3); break;
|
||||
case ENCODER_PHASE_3: ENCODER_SPIN(ENCODER_PHASE_2, ENCODER_PHASE_0); break;
|
||||
case 0: ENCODER_SPIN(1, 2); break;
|
||||
case 2: ENCODER_SPIN(0, 3); break;
|
||||
case 3: ENCODER_SPIN(2, 1); break;
|
||||
case 1: ENCODER_SPIN(3, 0); break;
|
||||
}
|
||||
#if BOTH(HAS_MARLINUI_MENU, AUTO_BED_LEVELING_UBL)
|
||||
external_encoder();
|
||||
@@ -1630,7 +1638,7 @@ void MarlinUI::init() {
|
||||
#ifdef ACTION_ON_CANCEL
|
||||
hostui.cancel();
|
||||
#endif
|
||||
IF_DISABLED(SDSUPPORT, print_job_timer.stop());
|
||||
print_job_timer.stop();
|
||||
TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_open(PROMPT_INFO, F("UI Aborted"), FPSTR(DISMISS_STR)));
|
||||
LCD_MESSAGE(MSG_PRINT_ABORTED);
|
||||
TERN_(HAS_MARLINUI_MENU, return_to_status());
|
||||
|
||||
@@ -545,7 +545,7 @@ public:
|
||||
#endif
|
||||
|
||||
static void reset_status_timeout(const millis_t ms) {
|
||||
TERN(SCREENS_CAN_TIME_OUT, return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS, UNUSED(ms));
|
||||
TERN(HAS_SCREEN_TIMEOUT, return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS, UNUSED(ms));
|
||||
}
|
||||
|
||||
#if HAS_MARLINUI_MENU
|
||||
@@ -596,11 +596,11 @@ public:
|
||||
#endif
|
||||
|
||||
FORCE_INLINE static bool screen_is_sticky() {
|
||||
return TERN1(SCREENS_CAN_TIME_OUT, defer_return_to_status);
|
||||
return TERN1(HAS_SCREEN_TIMEOUT, defer_return_to_status);
|
||||
}
|
||||
|
||||
FORCE_INLINE static void defer_status_screen(const bool defer=true) {
|
||||
TERN(SCREENS_CAN_TIME_OUT, defer_return_to_status = defer, UNUSED(defer));
|
||||
TERN(HAS_SCREEN_TIMEOUT, defer_return_to_status = defer, UNUSED(defer));
|
||||
}
|
||||
|
||||
static void goto_previous_screen_no_defer() {
|
||||
@@ -778,7 +778,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
#if SCREENS_CAN_TIME_OUT
|
||||
#if HAS_SCREEN_TIMEOUT
|
||||
static millis_t return_to_status_ms;
|
||||
static bool defer_return_to_status;
|
||||
#else
|
||||
|
||||
@@ -61,7 +61,7 @@ typedef struct {
|
||||
screenFunc_t menu_function; // The screen's function
|
||||
uint32_t encoder_position; // The position of the encoder
|
||||
int8_t top_line, items; // The amount of scroll, and the number of items
|
||||
#if SCREENS_CAN_TIME_OUT
|
||||
#if HAS_SCREEN_TIMEOUT
|
||||
bool sticky; // The screen is sticky
|
||||
#endif
|
||||
} menuPosition;
|
||||
@@ -89,7 +89,7 @@ void MarlinUI::return_to_status() { goto_screen(status_screen); }
|
||||
|
||||
void MarlinUI::push_current_screen() {
|
||||
if (screen_history_depth < COUNT(screen_history))
|
||||
screen_history[screen_history_depth++] = { currentScreen, encoderPosition, encoderTopLine, screen_items OPTARG(SCREENS_CAN_TIME_OUT, screen_is_sticky()) };
|
||||
screen_history[screen_history_depth++] = { currentScreen, encoderPosition, encoderTopLine, screen_items OPTARG(HAS_SCREEN_TIMEOUT, screen_is_sticky()) };
|
||||
}
|
||||
|
||||
void MarlinUI::_goto_previous_screen(TERN_(TURBO_BACK_MENU_ITEM, const bool is_back/*=false*/)) {
|
||||
@@ -102,7 +102,7 @@ void MarlinUI::_goto_previous_screen(TERN_(TURBO_BACK_MENU_ITEM, const bool is_b
|
||||
is_back ? 0 : sh.top_line,
|
||||
sh.items
|
||||
);
|
||||
defer_status_screen(TERN_(SCREENS_CAN_TIME_OUT, sh.sticky));
|
||||
defer_status_screen(TERN_(HAS_SCREEN_TIMEOUT, sh.sticky));
|
||||
}
|
||||
else
|
||||
return_to_status();
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "menu_item.h"
|
||||
#include "../../MarlinCore.h"
|
||||
#include "../../module/planner.h"
|
||||
#include "../../module/stepper.h"
|
||||
|
||||
#if DISABLED(NO_VOLUMETRICS)
|
||||
#include "../../gcode/parser.h"
|
||||
@@ -80,8 +81,6 @@ void menu_backlash();
|
||||
|
||||
#if HAS_MOTOR_CURRENT_PWM
|
||||
|
||||
#include "../../module/stepper.h"
|
||||
|
||||
void menu_pwm() {
|
||||
START_MENU();
|
||||
BACK_ITEM(MSG_ADVANCED_SETTINGS);
|
||||
@@ -538,6 +537,43 @@ void menu_backlash();
|
||||
END_MENU();
|
||||
}
|
||||
|
||||
#if ENABLED(SHAPING_MENU)
|
||||
|
||||
void menu_advanced_input_shaping() {
|
||||
constexpr float min_frequency = TERN(__AVR__, float(STEPPER_TIMER_RATE) / 2 / 0x10000, 1.0f);
|
||||
|
||||
START_MENU();
|
||||
BACK_ITEM(MSG_ADVANCED_SETTINGS);
|
||||
|
||||
// M593 F Frequency and D Damping ratio
|
||||
#if ENABLED(INPUT_SHAPING_X)
|
||||
editable.decimal = stepper.get_shaping_frequency(X_AXIS);
|
||||
if (editable.decimal) {
|
||||
ACTION_ITEM_N(X_AXIS, MSG_SHAPING_DISABLE, []{ stepper.set_shaping_frequency(X_AXIS, 0.0f); });
|
||||
EDIT_ITEM_FAST_N(float61, X_AXIS, MSG_SHAPING_FREQ, &editable.decimal, min_frequency, 200.0f, []{ stepper.set_shaping_frequency(X_AXIS, editable.decimal); });
|
||||
editable.decimal = stepper.get_shaping_damping_ratio(X_AXIS);
|
||||
EDIT_ITEM_FAST_N(float42_52, X_AXIS, MSG_SHAPING_ZETA, &editable.decimal, 0.0f, 1.0f, []{ stepper.set_shaping_damping_ratio(X_AXIS, editable.decimal); });
|
||||
}
|
||||
else
|
||||
ACTION_ITEM_N(X_AXIS, MSG_SHAPING_ENABLE, []{ stepper.set_shaping_frequency(X_AXIS, SHAPING_FREQ_X); });
|
||||
#endif
|
||||
#if ENABLED(INPUT_SHAPING_Y)
|
||||
editable.decimal = stepper.get_shaping_frequency(Y_AXIS);
|
||||
if (editable.decimal) {
|
||||
ACTION_ITEM_N(Y_AXIS, MSG_SHAPING_DISABLE, []{ stepper.set_shaping_frequency(Y_AXIS, 0.0f); });
|
||||
EDIT_ITEM_FAST_N(float61, Y_AXIS, MSG_SHAPING_FREQ, &editable.decimal, min_frequency, 200.0f, []{ stepper.set_shaping_frequency(Y_AXIS, editable.decimal); });
|
||||
editable.decimal = stepper.get_shaping_damping_ratio(Y_AXIS);
|
||||
EDIT_ITEM_FAST_N(float42_52, Y_AXIS, MSG_SHAPING_ZETA, &editable.decimal, 0.0f, 1.0f, []{ stepper.set_shaping_damping_ratio(Y_AXIS, editable.decimal); });
|
||||
}
|
||||
else
|
||||
ACTION_ITEM_N(Y_AXIS, MSG_SHAPING_ENABLE, []{ stepper.set_shaping_frequency(Y_AXIS, SHAPING_FREQ_Y); });
|
||||
#endif
|
||||
|
||||
END_MENU();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if HAS_CLASSIC_JERK
|
||||
|
||||
void menu_advanced_jerk() {
|
||||
@@ -657,6 +693,11 @@ void menu_advanced_settings() {
|
||||
// M201 - Acceleration items
|
||||
SUBMENU(MSG_ACCELERATION, menu_advanced_acceleration);
|
||||
|
||||
// M593 - Acceleration items
|
||||
#if ENABLED(SHAPING_MENU)
|
||||
SUBMENU(MSG_INPUT_SHAPING, menu_advanced_input_shaping);
|
||||
#endif
|
||||
|
||||
#if HAS_CLASSIC_JERK
|
||||
// M205 - Max Jerk
|
||||
SUBMENU(MSG_JERK, menu_advanced_jerk);
|
||||
|
||||
@@ -178,7 +178,7 @@ static void _lcd_level_bed_corners_get_next_position() {
|
||||
lcd_put_u8str(GET_TEXT_F(MSG_BED_TRAMMING_GOOD_POINTS));
|
||||
IF_ENABLED(TFT_COLOR_UI, lcd_moveto(12, cy));
|
||||
lcd_put_u8str(GOOD_POINTS_TO_STR(good_points));
|
||||
lcd_put_lchar('/');
|
||||
lcd_put_u8str(F("/"));
|
||||
lcd_put_u8str(GOOD_POINTS_TO_STR(nr_edge_points));
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ void menu_advanced_settings();
|
||||
LIMIT(bar_percent, 0, 100);
|
||||
ui.encoderPosition = 0;
|
||||
MenuItem_static::draw(0, GET_TEXT_F(MSG_PROGRESS_BAR_TEST), SS_DEFAULT|SS_INVERT);
|
||||
lcd_put_int((LCD_WIDTH) / 2 - 2, LCD_HEIGHT - 2, bar_percent); lcd_put_lchar('%');
|
||||
lcd_put_int((LCD_WIDTH) / 2 - 2, LCD_HEIGHT - 2, bar_percent); lcd_put_u8str(F("%"));
|
||||
lcd_moveto(0, LCD_HEIGHT - 1); ui.draw_progress_bar(bar_percent);
|
||||
}
|
||||
|
||||
@@ -550,7 +550,7 @@ void menu_configuration() {
|
||||
//
|
||||
#if LCD_BACKLIGHT_TIMEOUT_MINS
|
||||
EDIT_ITEM(uint8, MSG_SCREEN_TIMEOUT, &ui.backlight_timeout_minutes, ui.backlight_timeout_min, ui.backlight_timeout_max, ui.refresh_backlight_timeout);
|
||||
#elif HAS_DISPLAY_SLEEP && DISABLED(TFT_COLOR_UI)
|
||||
#elif HAS_DISPLAY_SLEEP
|
||||
EDIT_ITEM(uint8, MSG_SCREEN_TIMEOUT, &ui.sleep_timeout_minutes, ui.sleep_timeout_min, ui.sleep_timeout_max, ui.refresh_screen_timeout);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -28,7 +28,13 @@
|
||||
|
||||
#if HAS_MARLINUI_MENU
|
||||
|
||||
#define LARGE_AREA_TEST ((X_BED_SIZE) >= 1000 || TERN0(HAS_Y_AXIS, (Y_BED_SIZE) >= 1000) || TERN0(HAS_Z_AXIS, (Z_MAX_POS) >= 1000))
|
||||
#if ENABLED(TRULY_LARGE_AREA)
|
||||
#define LARGE_AREA_TEST true
|
||||
#elif ENABLED(SLIM_LCD_MENUS)
|
||||
#define LARGE_AREA_TEST false
|
||||
#else
|
||||
#define LARGE_AREA_TEST ((X_BED_SIZE) >= 1000 || TERN0(HAS_Y_AXIS, (Y_BED_SIZE) >= 1000) || TERN0(HAS_Z_AXIS, (Z_MAX_POS) >= 1000))
|
||||
#endif
|
||||
|
||||
#include "menu_item.h"
|
||||
#include "menu_addon.h"
|
||||
@@ -150,13 +156,19 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int
|
||||
|
||||
BACK_ITEM(MSG_MOVE_AXIS);
|
||||
if (parser.using_inch_units()) {
|
||||
if (LARGE_AREA_TEST) SUBMENU(MSG_MOVE_1IN, []{ _goto_manual_move(IN_TO_MM(1.000f)); });
|
||||
if (LARGE_AREA_TEST) {
|
||||
SUBMENU(MSG_MOVE_1IN, []{ _goto_manual_move(IN_TO_MM(1.000f)); });
|
||||
SUBMENU(MSG_MOVE_05IN, []{ _goto_manual_move(IN_TO_MM(0.500f)); });
|
||||
}
|
||||
SUBMENU(MSG_MOVE_01IN, []{ _goto_manual_move(IN_TO_MM(0.100f)); });
|
||||
SUBMENU(MSG_MOVE_001IN, []{ _goto_manual_move(IN_TO_MM(0.010f)); });
|
||||
SUBMENU(MSG_MOVE_0001IN, []{ _goto_manual_move(IN_TO_MM(0.001f)); });
|
||||
}
|
||||
else {
|
||||
if (LARGE_AREA_TEST) SUBMENU(MSG_MOVE_100MM, []{ _goto_manual_move(100); });
|
||||
if (LARGE_AREA_TEST) {
|
||||
SUBMENU(MSG_MOVE_100MM, []{ _goto_manual_move(100); });
|
||||
SUBMENU(MSG_MOVE_50MM, []{ _goto_manual_move(50); });
|
||||
}
|
||||
SUBMENU(MSG_MOVE_10MM, []{ _goto_manual_move(10); });
|
||||
SUBMENU(MSG_MOVE_1MM, []{ _goto_manual_move( 1); });
|
||||
SUBMENU(MSG_MOVE_01MM, []{ _goto_manual_move( 0.1f); });
|
||||
@@ -356,6 +368,13 @@ void menu_motion() {
|
||||
GCODES_ITEM(MSG_MANUAL_STOW, F("M402"));
|
||||
#endif
|
||||
|
||||
//
|
||||
// Probe Offset Wizard
|
||||
//
|
||||
#if ENABLED(PROBE_OFFSET_WIZARD)
|
||||
SUBMENU(MSG_PROBE_WIZARD, goto_probe_offset_wizard);
|
||||
#endif
|
||||
|
||||
//
|
||||
// Assisted Bed Tramming
|
||||
//
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user