Merge branch 'bugfix-2.1.x' into CrealityDwin2.0_Bleeding

This commit is contained in:
InsanityAutomation
2022-11-28 15:01:14 -05:00
130 changed files with 3000 additions and 2341 deletions
+16 -16
View File
@@ -1761,7 +1761,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
@@ -1773,28 +1773,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
@@ -1839,7 +1839,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)
@@ -1875,18 +1875,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
+76 -201
View File
@@ -1107,12 +1107,14 @@
*
* Zero Vibration (ZV) Input Shaping for X and/or Y movements.
*
* This option uses a lot of SRAM for the step buffer, which is proportional
* to the largest step rate possible for any axis. If the build fails due to
* 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. Runtime editing
* of max feedrate (M203) or resonant frequency (M593) may result feedrate
* being capped to prevent buffer overruns.
* 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>:
*
@@ -1122,13 +1124,18 @@
* 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
#if ENABLED(INPUT_SHAPING)
#define SHAPING_FREQ_X 40 // (Hz) The dominant resonant frequency of the X axis.
#define SHAPING_FREQ_Y 40 // (Hz) The dominant resonant frequency of the Y axis.
#define SHAPING_ZETA_X 0.3f // Damping ratio of the X axis (range: 0.0 = no damping to 1.0 = critical damping).
#define SHAPING_ZETA_Y 0.3f // Damping ratio of the Y axis (range: 0.0 = no damping to 1.0 = critical damping).
//#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters.
//#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 }
@@ -2827,167 +2834,33 @@
#endif
#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
@@ -2997,17 +2870,17 @@
*/
#define INTERPOLATE true
#if AXIS_IS_TMC(X)
#if AXIS_IS_TMC_CONFIG(X)
#define X_CURRENT 730 // (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.11
#define X_RSENSE 0.11 // 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
@@ -3017,7 +2890,7 @@
//#define X2_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(Y)
#if AXIS_IS_TMC_CONFIG(Y)
#define Y_CURRENT 730
#define Y_CURRENT_HOME Y_CURRENT
#define Y_MICROSTEPS 16
@@ -3027,7 +2900,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
@@ -3037,7 +2910,7 @@
//#define Y2_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(Z)
#if AXIS_IS_TMC_CONFIG(Z)
#define Z_CURRENT 850
#define Z_CURRENT_HOME Z_CURRENT
#define Z_MICROSTEPS 16
@@ -3047,7 +2920,7 @@
//#define Z_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(Z2)
#if AXIS_IS_TMC_CONFIG(Z2)
#define Z2_CURRENT 850
#define Z2_CURRENT_HOME Z2_CURRENT
#define Z2_MICROSTEPS Z_MICROSTEPS
@@ -3057,7 +2930,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
@@ -3067,7 +2940,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
@@ -3077,7 +2950,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
@@ -3087,7 +2960,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
@@ -3097,7 +2970,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
@@ -3107,7 +2980,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
@@ -3117,7 +2990,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
@@ -3127,7 +3000,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
@@ -3137,7 +3010,7 @@
//#define W_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(E0)
#if AXIS_IS_TMC_CONFIG(E0)
#define E0_CURRENT 730
#define E0_MICROSTEPS 16
#define E0_RSENSE 0.11
@@ -3146,16 +3019,16 @@
//#define E0_HOLD_MULTIPLIER 0.5
#endif
#if AXIS_IS_TMC(E1)
#if AXIS_IS_TMC_CONFIG(E1)
#define E1_CURRENT 730
#define E1_MICROSTEPS 16
#define E1_MICROSTEPS E0_MICROSTEPS
#define E1_RSENSE 0.11
#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
@@ -3164,7 +3037,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
@@ -3173,7 +3046,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
@@ -3182,7 +3055,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
@@ -3191,7 +3064,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
@@ -3200,7 +3073,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
@@ -3311,15 +3184,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
@@ -3506,7 +3381,7 @@
*/
#define TMC_ADV() { }
#endif // HAS_TRINAMIC_CONFIG
#endif // HAS_TRINAMIC_CONFIG || HAS_TMC26X
// @section i2cbus
+9 -7
View File
@@ -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
View File
@@ -131,7 +131,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
#define STRING_DISTRIBUTION_DATE "2022-10-25"
#define STRING_DISTRIBUTION_DATE "2022-11-28"
/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
+5 -5
View File
@@ -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
+7 -2
View 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 __SAMD51__
#include "../../inc/MarlinConfig.h"
+7 -2
View 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
@@ -20,6 +21,10 @@
*/
#pragma once
/**
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*/
#define CPU_32_BIT
#include "../shared/Marduino.h"
+7 -2
View 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
@@ -19,6 +20,10 @@
*
*/
/**
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*/
/**
* Hardware and software SPI implementations are included in this file.
*
+7 -2
View 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
/**
+7 -2
View 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
@@ -20,6 +21,10 @@
*/
#pragma once
/**
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*/
#include "../../core/serial_hook.h"
typedef Serial1Class<Uart> UartT;
+7 -2
View 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
@@ -20,6 +21,10 @@
*/
#pragma once
/**
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*/
#define SYNC(sc) while (sc) { \
asm(""); \
}
+7 -2
View 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
@@ -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
*/
+7 -2
View 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
@@ -20,6 +21,10 @@
*/
#pragma once
/**
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*/
#define _useTimer1
#define _useTimer2
+7 -2
View 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 __SAMD51__
#include "../../inc/MarlinConfig.h"
+7 -2
View 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 __SAMD51__
#include "../../inc/MarlinConfig.h"
+7 -2
View 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 __SAMD51__
#include "../../inc/MarlinConfig.h"
+7 -2
View 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
@@ -20,6 +21,10 @@
*/
#pragma once
/**
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*/
/**
* Endstop interrupts for ATMEL SAMD51 based targets.
*
+7 -2
View 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
@@ -20,6 +21,10 @@
*/
#pragma once
/**
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*/
/**
* Fast IO functions for SAMD51
*/
+8 -2
View 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,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.
+7 -2
View 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
@@ -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)
+7 -2
View 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
@@ -20,6 +21,10 @@
*/
#pragma once
/**
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*/
#ifdef ADAFRUIT_GRAND_CENTRAL_M4
/*
+7 -2
View 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 __SAMD51__
// --------------------------------------------------------------------------
+7 -2
View 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
@@ -20,6 +21,10 @@
*/
#pragma once
/**
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*/
#include <stdint.h>
// --------------------------------------------------------------------------
+3 -2
View File
@@ -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
+8 -7
View File
@@ -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
+2
View File
@@ -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) \
+2
View File
@@ -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)
+1
View File
@@ -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());
@@ -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
-12
View File
@@ -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
+20 -6
View File
@@ -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
+3 -3
View File
@@ -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
+3
View File
@@ -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);
+1 -1
View File
@@ -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, ")");
}
+9 -2
View File
@@ -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) {
+11 -10
View File
@@ -22,21 +22,21 @@
#include "../../../inc/MarlinConfig.h"
#if ENABLED(INPUT_SHAPING)
#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 HAS_SHAPING_X
#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 HAS_SHAPING_Y
TERN_(HAS_SHAPING_X, report_echo_start(forReplay));
#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)
@@ -55,10 +55,10 @@ void GcodeSuite::M593_report(const bool forReplay/*=true*/) {
void GcodeSuite::M593() {
if (!parser.seen_any()) return M593_report();
const bool seen_X = TERN0(HAS_SHAPING_X, parser.seen_test('X')),
seen_Y = TERN0(HAS_SHAPING_Y, parser.seen_test('Y')),
for_X = seen_X || TERN0(HAS_SHAPING_X, (!seen_X && !seen_Y)),
for_Y = seen_Y || TERN0(HAS_SHAPING_Y, (!seen_X && !seen_Y));
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();
@@ -72,12 +72,13 @@ void GcodeSuite::M593() {
if (parser.seen('F')) {
const float freq = parser.value_float();
if (freq > 0) {
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_ECHO_MSG("?Frequency (F) must be greater than 0");
SERIAL_ECHOLNPGM("?Frequency (F) must be greater than ", max_freq, " or 0 to disable");
}
}
+1 -1
View File
@@ -934,7 +934,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
case 591: M591(); break; // M591 Configure filament runout detection
#endif
#if ENABLED(INPUT_SHAPING)
#if HAS_SHAPING
case 593: M593(); break; // M593: Set Input Shaping parameters
#endif
+2 -2
View File
@@ -259,7 +259,7 @@
* 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)
* M591 - Configure Filament Runout Detection. (Requires FILAMENT_RUNOUT_SENSOR)
* M593 - Get or set input shaping parameters. (Requires INPUT_SHAPING)
* 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)
@@ -1082,7 +1082,7 @@ private:
static void M575();
#endif
#if ENABLED(INPUT_SHAPING)
#if HAS_SHAPING
static void M593();
static void M593_report(const bool forReplay=true);
#endif
+4 -3
View File
@@ -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;
}
+7 -1
View File
@@ -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);
+5 -2
View File
@@ -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)
+10 -13
View File
@@ -995,8 +995,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
@@ -1006,6 +1006,7 @@
#undef CNC_WORKSPACE_PLANES
#if NUM_AXES < 2
#undef STEALTHCHOP_Y
#undef QUICK_HOME
#endif
#endif
#endif
@@ -1078,7 +1079,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
@@ -1120,15 +1121,11 @@
#endif
// Input shaping
#if ENABLED(INPUT_SHAPING)
#if !HAS_Y_AXIS
#undef SHAPING_FREQ_Y
#undef SHAPING_BUFFER_Y
#endif
#ifdef SHAPING_FREQ_X
#define HAS_SHAPING_X 1
#endif
#ifdef SHAPING_FREQ_Y
#define HAS_SHAPING_Y 1
#endif
#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
+34 -482
View File
@@ -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
/**
@@ -926,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_
@@ -990,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
@@ -1061,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_
@@ -1125,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
@@ -1197,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_
@@ -1261,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
@@ -1328,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_
@@ -1392,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
@@ -1460,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_
@@ -1524,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
+24 -15
View File
@@ -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
*/
@@ -1399,7 +1412,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
@@ -1703,8 +1716,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)
@@ -2376,8 +2389,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
@@ -3177,7 +3190,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."
@@ -4317,14 +4330,14 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
#endif
// Check requirements for Input Shaping
#if ENABLED(INPUT_SHAPING) && defined(__AVR__)
#if HAS_SHAPING_X
#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 HAS_SHAPING_Y
#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
@@ -4333,12 +4346,8 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
#endif
#endif
#if ENABLED(INPUT_SHAPING)
#if ENABLED(DIRECT_STEPPING)
#error "INPUT_SHAPING cannot currently be used with DIRECT_STEPPING."
#elif ENABLED(LASER_FEATURE)
#error "INPUT_SHAPING cannot currently be used with LASER_FEATURE."
#endif
#if BOTH(HAS_SHAPING, DIRECT_STEPPING)
#error "INPUT_SHAPING_[XY] cannot currently be used with DIRECT_STEPPING."
#endif
// Misc. Cleanup
+1 -1
View File
@@ -42,7 +42,7 @@
* version was tagged.
*/
#ifndef STRING_DISTRIBUTION_DATE
#define STRING_DISTRIBUTION_DATE "2022-10-25"
#define STRING_DISTRIBUTION_DATE "2022-11-28"
#endif
/**
+2 -2
View File
@@ -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 = {
+120 -64
View File
@@ -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
+8 -11
View File
@@ -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));
+6 -13
View File
@@ -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)
+1 -1
View File
@@ -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;
}
+12 -12
View File
@@ -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);
+13 -13
View File
@@ -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
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+12 -12
View File
@@ -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;
+4 -4
View File
@@ -3399,11 +3399,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
+8 -8
View File
@@ -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
}
+4 -4
View File
@@ -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
+8 -8
View File
@@ -2652,11 +2652,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
@@ -3639,11 +3639,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,14 +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
TFTSer.begin(115200);
// Wait for the TFT panel to initialize and finish the animation
@@ -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;
+3 -3
View File
@@ -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
+1
View File
@@ -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");
+1
View File
@@ -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");
+1
View File
@@ -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");
+1
View File
@@ -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.");
+1
View File
@@ -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");
+1
View File
@@ -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");
+1
View File
@@ -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");
+1
View File
@@ -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");
+7 -4
View File
@@ -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 ~");
@@ -400,10 +403,10 @@ namespace Language_en {
LSTR MSG_A_RETRACT = _UxGT("Retract Accel");
LSTR MSG_A_TRAVEL = _UxGT("Travel Accel");
LSTR MSG_INPUT_SHAPING = _UxGT("Input Shaping");
LSTR MSG_SHAPING_X_FREQ = STR_X _UxGT(" frequency");
LSTR MSG_SHAPING_Y_FREQ = STR_Y _UxGT(" frequency");
LSTR MSG_SHAPING_X_ZETA = STR_X _UxGT(" damping");
LSTR MSG_SHAPING_Y_ZETA = STR_Y _UxGT(" damping");
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");
+1
View File
@@ -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");
+1
View File
@@ -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");
+1
View File
@@ -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");
+2
View File
@@ -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");
+1
View File
@@ -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");
+1
View File
@@ -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");
+2
View File
@@ -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");
+17 -2
View File
@@ -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"
+1
View File
@@ -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"
+1 -1
View File
@@ -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) {
+20 -12
View File
@@ -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() {
@@ -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*/) {
@@ -1073,7 +1081,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
@@ -1186,9 +1194,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
@@ -1384,10 +1392,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();
+19 -15
View File
@@ -590,24 +590,28 @@ void menu_backlash();
START_MENU();
BACK_ITEM(MSG_ADVANCED_SETTINGS);
// M593 F Frequency
#if HAS_SHAPING_X
// M593 F Frequency and D Damping ratio
#if ENABLED(INPUT_SHAPING_X)
editable.decimal = stepper.get_shaping_frequency(X_AXIS);
EDIT_ITEM_FAST(float61, MSG_SHAPING_X_FREQ, &editable.decimal, min_frequency, 200.0f, []{ stepper.set_shaping_frequency(X_AXIS, editable.decimal); });
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 HAS_SHAPING_Y
#if ENABLED(INPUT_SHAPING_Y)
editable.decimal = stepper.get_shaping_frequency(Y_AXIS);
EDIT_ITEM_FAST(float61, MSG_SHAPING_Y_FREQ, &editable.decimal, min_frequency, 200.0f, []{ stepper.set_shaping_frequency(Y_AXIS, editable.decimal); });
#endif
// M593 D Damping ratio
#if HAS_SHAPING_X
editable.decimal = stepper.get_shaping_damping_ratio(X_AXIS);
EDIT_ITEM_FAST(float42_52, MSG_SHAPING_X_ZETA, &editable.decimal, 0.0f, 1.0f, []{ stepper.set_shaping_damping_ratio(X_AXIS, editable.decimal); });
#endif
#if HAS_SHAPING_Y
editable.decimal = stepper.get_shaping_damping_ratio(Y_AXIS);
EDIT_ITEM_FAST(float42_52, MSG_SHAPING_Y_ZETA, &editable.decimal, 0.0f, 1.0f, []{ stepper.set_shaping_damping_ratio(Y_AXIS, editable.decimal); });
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();
+1 -1
View File
@@ -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));
}
+2 -2
View File
@@ -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
+22 -3
View File
@@ -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
//
+2 -2
View File
@@ -61,10 +61,10 @@ void Password::menu_password_entry() {
FSTR_P const label = GET_TEXT_F(MSG_ENTER_DIGIT);
EDIT_ITEM_F(uint8, label, &editable.uint8, 0, 9, digit_entered);
MENU_ITEM_ADDON_START(utf8_strlen(label) + 1);
lcd_put_lchar(' ');
lcd_put_u8str(F(" "));
lcd_put_lchar('1' + digit_no);
SETCURSOR_X(LCD_WIDTH - 2);
lcd_put_lchar('>');
lcd_put_u8str(F(">"));
MENU_ITEM_ADDON_END();
ACTION_ITEM(MSG_START_OVER, start_over);
+1 -1
View File
@@ -79,7 +79,7 @@
EDIT_ITEM_FAST(CUTTER_MENU_PULSE_TYPE, MSG_LASER_PULSE_MS, &cutter.testPulse, LASER_TEST_PULSE_MIN, LASER_TEST_PULSE_MAX);
ACTION_ITEM(MSG_LASER_FIRE_PULSE, cutter.test_fire_pulse);
#if ENABLED(HAL_CAN_SET_PWM_FREQ) && SPINDLE_LASER_FREQUENCY
EDIT_ITEM_FAST(CUTTER_MENU_FREQUENCY_TYPE, MSG_CUTTER_FREQUENCY, &cutter.frequency, 2000, 80000, cutter.refresh_frequency);
EDIT_ITEM_FAST(CUTTER_MENU_FREQUENCY_TYPE, MSG_CUTTER_FREQUENCY, &cutter.frequency, 2000, 65535, cutter.refresh_frequency);
#endif
#endif
END_MENU();
+2 -2
View File
@@ -76,12 +76,12 @@
#if ENABLED(TFT_COLOR_UI)
lcd_moveto(4, 3);
lcd_put_u8str(GET_TEXT_F(MSG_BABYSTEP_TOTAL));
lcd_put_lchar(':');
lcd_put_u8str(F(":"));
lcd_moveto(10, 3);
#else
lcd_moveto(0, TERN(HAS_MARLINUI_U8GLIB, LCD_PIXEL_HEIGHT - MENU_FONT_DESCENT, LCD_HEIGHT - 1));
lcd_put_u8str(GET_TEXT_F(MSG_BABYSTEP_TOTAL));
lcd_put_lchar(':');
lcd_put_u8str(F(":"));
#endif
lcd_put_u8str(BABYSTEP_TO_STR(mps * babystep.axis_total[BS_TOTAL_IND(axis)]));
}
+3
View File
@@ -35,6 +35,9 @@
#include "../../module/planner.h"
#include "../../module/settings.h"
#include "../../feature/bedlevel/bedlevel.h"
#if HAS_HOTEND
#include "../../module/temperature.h"
#endif
static int16_t ubl_storage_slot = 0,
custom_hotend_temp = 150,
+12 -10
View File
@@ -43,7 +43,7 @@ int16_t Touch::x, Touch::y;
touch_control_t Touch::controls[];
touch_control_t *Touch::current_control;
uint16_t Touch::controls_count;
millis_t Touch::last_touch_ms = 0,
millis_t Touch::next_touch_ms = 0,
Touch::time_to_hold,
Touch::repeat_delay,
Touch::touch_time;
@@ -83,8 +83,8 @@ void Touch::idle() {
// Return if Touch::idle is called within the same millisecond
const millis_t now = millis();
if (last_touch_ms == now) return;
last_touch_ms = now;
if (now <= next_touch_ms) return;
next_touch_ms = now;
if (get_point(&_x, &_y)) {
#if HAS_RESUME_CONTINUE
@@ -97,18 +97,18 @@ void Touch::idle() {
}
#endif
ui.reset_status_timeout(last_touch_ms);
ui.reset_status_timeout(now);
if (touch_time) {
#if ENABLED(TOUCH_SCREEN_CALIBRATION)
if (touch_control_type == NONE && ELAPSED(last_touch_ms, touch_time + TOUCH_SCREEN_HOLD_TO_CALIBRATE_MS) && ui.on_status_screen())
if (touch_control_type == NONE && ELAPSED(now, touch_time + TOUCH_SCREEN_HOLD_TO_CALIBRATE_MS) && ui.on_status_screen())
ui.goto_screen(touch_screen_calibration);
#endif
return;
}
if (time_to_hold == 0) time_to_hold = last_touch_ms + MINIMUM_HOLD_TIME;
if (PENDING(last_touch_ms, time_to_hold)) return;
if (time_to_hold == 0) time_to_hold = now + MINIMUM_HOLD_TIME;
if (PENDING(now, time_to_hold)) return;
if (x != 0 && y != 0) {
if (current_control) {
@@ -133,7 +133,7 @@ void Touch::idle() {
}
if (!current_control)
touch_time = last_touch_ms;
touch_time = now;
}
x = _x;
y = _y;
@@ -252,8 +252,8 @@ void Touch::touch(touch_control_t *control) {
void Touch::hold(touch_control_t *control, millis_t delay) {
current_control = control;
if (delay) {
repeat_delay = delay > MIN_REPEAT_DELAY ? delay : MIN_REPEAT_DELAY;
time_to_hold = last_touch_ms + repeat_delay;
repeat_delay = _MAX(delay, MIN_REPEAT_DELAY);
time_to_hold = next_touch_ms + repeat_delay;
}
ui.refresh();
}
@@ -301,6 +301,8 @@ bool Touch::get_point(int16_t *x, int16_t *y) {
#elif PIN_EXISTS(TFT_BACKLIGHT)
WRITE(TFT_BACKLIGHT_PIN, HIGH);
#endif
next_touch_ms = millis() + 100;
safe_delay(20);
}
next_sleep_ms = millis() + SEC_TO_MS(ui.sleep_timeout_minutes * 60);
}
+1 -1
View File
@@ -103,7 +103,7 @@ class Touch {
static touch_control_t *current_control;
static uint16_t controls_count;
static millis_t last_touch_ms, time_to_hold, repeat_delay, touch_time;
static millis_t next_touch_ms, time_to_hold, repeat_delay, touch_time;
static TouchControlType touch_control_type;
static bool get_point(int16_t *x, int16_t *y);
+8 -9
View File
@@ -1724,6 +1724,13 @@ float Planner::triggered_position_mm(const AxisEnum axis) {
return result * mm_per_step[axis];
}
bool Planner::busy() {
return (has_blocks_queued() || cleaning_buffer_counter
|| TERN0(EXTERNAL_CLOSED_LOOP_CONTROLLER, CLOSED_LOOP_WAITING())
|| TERN0(HAS_SHAPING, stepper.input_shaping_busy())
);
}
void Planner::finish_and_disable() {
while (has_blocks_queued() || cleaning_buffer_counter) idle();
stepper.disable_all_steppers();
@@ -2167,7 +2174,7 @@ bool Planner::_populate_block(
sq(steps_dist_mm.x), + sq(steps_dist_mm.y), + sq(steps_dist_mm.z),
+ sq(steps_dist_mm.i), + sq(steps_dist_mm.j), + sq(steps_dist_mm.k),
+ sq(steps_dist_mm.u), + sq(steps_dist_mm.v), + sq(steps_dist_mm.w)
);
)
#elif ENABLED(FOAMCUTTER_XYUV)
#if HAS_J_AXIS
// Special 5 axis kinematics. Return the largest distance move from either X/Y or I/J plane
@@ -2483,14 +2490,6 @@ bool Planner::_populate_block(
#endif // XY_FREQUENCY_LIMIT
#if ENABLED(INPUT_SHAPING)
const float top_freq = _MIN(float(0x7FFFFFFFL)
OPTARG(HAS_SHAPING_X, stepper.get_shaping_frequency(X_AXIS))
OPTARG(HAS_SHAPING_Y, stepper.get_shaping_frequency(Y_AXIS))),
max_factor = (top_freq * float(shaping_dividends - 3) * 2.0f) / block->nominal_rate;
NOMORE(speed_factor, max_factor);
#endif
// Correct the speed
if (speed_factor < 1.0f) {
current_speed *= speed_factor;
+2 -6
View File
@@ -930,11 +930,7 @@ class Planner {
static float triggered_position_mm(const AxisEnum axis);
// Blocks are queued, or we're running out moves, or the closed loop controller is waiting
static bool busy() {
return (has_blocks_queued() || cleaning_buffer_counter
|| TERN0(EXTERNAL_CLOSED_LOOP_CONTROLLER, CLOSED_LOOP_WAITING())
);
}
static bool busy();
// Block until all buffered steps are executed / cleaned
static void synchronize();
@@ -988,7 +984,7 @@ class Planner {
FORCE_INLINE static void recalculate_max_e_jerk() {
const float prop = junction_deviation_mm * SQRT(0.5) / (1.0f - SQRT(0.5));
EXTRUDER_LOOP()
max_e_jerk[E_INDEX_N(e)] = SQRT(prop * settings.max_acceleration_mm_per_s2[E_INDEX_N(e)]);
max_e_jerk[E_INDEX_N(e)] = SQRT(prop * settings.max_acceleration_mm_per_s2[E_AXIS_N(e)]);
}
#endif
+3 -3
View File
@@ -314,13 +314,13 @@ void PrintCounter::reset() {
void PrintCounter::resetServiceInterval(const int index) {
switch (index) {
#if SERVICE_INTERVAL_1 > 0
case 1: data.nextService1 = SERVICE_INTERVAL_SEC_1;
case 1: data.nextService1 = SERVICE_INTERVAL_SEC_1; break;
#endif
#if SERVICE_INTERVAL_2 > 0
case 2: data.nextService2 = SERVICE_INTERVAL_SEC_2;
case 2: data.nextService2 = SERVICE_INTERVAL_SEC_2; break;
#endif
#if SERVICE_INTERVAL_3 > 0
case 3: data.nextService3 = SERVICE_INTERVAL_SEC_3;
case 3: data.nextService3 = SERVICE_INTERVAL_SEC_3; break;
#endif
}
saveStats();
+1 -1
View File
@@ -37,7 +37,7 @@
#include "../MarlinCore.h"
#endif
float segments_per_second = TERN(AXEL_TPARA, TPARA_SEGMENTS_PER_SECOND, SCARA_SEGMENTS_PER_SECOND);
float segments_per_second = DEFAULT_SEGMENTS_PER_SECOND;
#if EITHER(MORGAN_SCARA, MP_SCARA)

Some files were not shown because too many files have changed in this diff Show More