Merge branch 'bugfix-2.1.x' into EBAB_EBAP

This commit is contained in:
InsanityAutomation
2024-05-16 08:51:35 -04:00
81 changed files with 343 additions and 391 deletions
+2 -2
View File
@@ -672,7 +672,7 @@
* MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune)
*/
//#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
#define MPCTEMP // See https://marlinfw.org/docs/features/model_predictive_control.html
#define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
@@ -2218,7 +2218,7 @@
#if ENABLED(LCD_BED_TRAMMING)
#define BED_TRAMMING_INSET_LFRB { 30, 30, 30, 30 } // (mm) Left, Front, Right, Back insets
#define BED_TRAMMING_HEIGHT 0.0 // (mm) Z height of nozzle at tramming points
#define BED_TRAMMING_Z_HOP 4.0 // (mm) Z height of nozzle between tramming points
#define BED_TRAMMING_Z_HOP 4.0 // (mm) Z raise between tramming points
//#define BED_TRAMMING_INCLUDE_CENTER // Move to the center after the last corner
//#define BED_TRAMMING_USE_PROBE
#if ENABLED(BED_TRAMMING_USE_PROBE)
+1 -1
View File
@@ -41,7 +41,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
//#define STRING_DISTRIBUTION_DATE "2024-05-10"
//#define STRING_DISTRIBUTION_DATE "2024-05-16"
/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
+1 -1
View File
@@ -61,7 +61,7 @@
#else
#define G2_PWM_Z 0
#endif
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
#if HAS_MOTOR_CURRENT_PWM_E
#define G2_PWM_E 1
#else
#define G2_PWM_E 0
+1 -1
View File
@@ -142,7 +142,7 @@
// ADC
//
#define HAL_ADC_VREF_MV 3300
#define HAL_ADC_RESOLUTION 10
#define HAL_ADC_RESOLUTION 12
#define GET_PIN_MAP_PIN(index) index
#define GET_PIN_MAP_INDEX(pin) pin
+3 -1
View File
@@ -232,7 +232,9 @@ int MarlinHAL::freeMemory() {
return &top - _sbrk(0);
}
void MarlinHAL::adc_init() {}
void MarlinHAL::adc_init() {
analogReadResolution(HAL_ADC_RESOLUTION);
}
void MarlinHAL::adc_enable(const pin_t pin) {
#if TEMP_SENSOR_SOC
+7 -2
View File
@@ -64,7 +64,12 @@
// redirect printf to host serial
#define REDIRECT_PRINTF_TO_SERIAL 1
// FIXME override F_CPU to PCLK1, as marlin freaks out otherwise
#define F_CPU (SYSTEM_CLOCK_FREQUENCIES.pclk1)
// F_CPU must be known at compile time, but on HC32F460 it's not.
// Thus we assume HCLK to be 200MHz, as that's what is configured in
// 'core_hook_sysclock_init' in 'sysclock.cpp'.
// If you face issues with this assumption, please double-check with the values
// printed by 'MarlinHAL::HAL_clock_frequencies_dump'.
// see also: HAL_TIMER_RATE in timers.h
#define F_CPU 200000000 // 200MHz HCLK
#endif // _HC32_APP_CONFIG_H_
+24 -9
View File
@@ -96,29 +96,44 @@ void core_hook_sysclock_init() {
#endif
#endif
// Setup clock divisors for sysclk = 200 MHz:
// sysclk is now configured according to F_CPU (i.e., 200MHz PLL output)
constexpr uint32_t sysclock = F_CPU;
// Setup clock divisors for sysclk = 200 MHz
// Note: PCLK1 is used for step+temp timers, and need to be kept at 50 MHz (until there is a better solution)
stc_clk_sysclk_cfg_t sysClkConf = {
constexpr stc_clk_sysclk_cfg_t sysClkConf = {
.enHclkDiv = ClkSysclkDiv1, // HCLK = 200 MHz (CPU)
.enExclkDiv = ClkSysclkDiv2, // EXCLK = 100 MHz (SDIO)
.enPclk0Div = ClkSysclkDiv1, // PCLK0 = 200 MHz (Timer6 (not used))
.enPclk0Div = ClkSysclkDiv2, // PCLK0 = 100 MHz (Timer6 (not used))
.enPclk1Div = ClkSysclkDiv4, // PCLK1 = 50 MHz (USART, SPI, I2S, Timer0 (step+temp), TimerA (Servo))
.enPclk2Div = ClkSysclkDiv4, // PCLK2 = 50 MHz (ADC)
.enPclk3Div = ClkSysclkDiv4, // PCLK3 = 50 MHz (I2C, WDT)
.enPclk2Div = ClkSysclkDiv8, // PCLK2 = 25 MHz (ADC)
.enPclk3Div = ClkSysclkDiv8, // PCLK3 = 25 MHz (I2C, WDT)
.enPclk4Div = ClkSysclkDiv2, // PCLK4 = 100 MHz (ADC ctl)
};
#if ARDUINO_CORE_VERSION_INT >= GET_VERSION_INT(1, 2, 0)
assert_system_clocks_valid<
sysclock,
sysClkConf.enHclkDiv,
sysClkConf.enPclk0Div,
sysClkConf.enPclk1Div,
sysClkConf.enPclk2Div,
sysClkConf.enPclk3Div,
sysClkConf.enPclk4Div,
sysClkConf.enExclkDiv
>();
#endif
sysclock_set_clock_dividers(&sysClkConf);
// Set power mode
#define POWER_MODE_SYSTEM_CLOCK 200000000 // 200 MHz
power_mode_update_pre(POWER_MODE_SYSTEM_CLOCK);
power_mode_update_pre(sysclock);
// Switch to MPLL as sysclk source
CLK_SetSysClkSource(CLKSysSrcMPLL);
// Set power mode
power_mode_update_post(POWER_MODE_SYSTEM_CLOCK);
#undef POWER_MODE_SYSTEM_CLOCK
power_mode_update_post(sysclock);
}
#endif // ARDUINO_ARCH_HC32
+31 -27
View File
@@ -38,44 +38,48 @@ extern Timer0 step_timer;
// Timer Configurations
//
// TODO: some calculations (step irq min_step_rate) require the timer rate to be known at compile time
// this is not possible with the HC32F460, as the timer rate depends on PCLK1
// as a workaround, PCLK1 = 50MHz is assumed (check with clock dump in MarlinHAL::init())
#define HAL_TIMER_RATE 50000000 // 50MHz
// #define HAL_TIMER_RATE TIMER0_BASE_FREQUENCY
// TODO: CYCLES_PER_MICROSECOND seems to be used by Marlin to calculate the number of cycles per microsecond in the timer ISRs
// by default, it uses F_CPU, but since that is not known at compile time for HC32, we overwrite it here
#undef CYCLES_PER_MICROSECOND
#define CYCLES_PER_MICROSECOND (HAL_TIMER_RATE / 1000000UL)
/**
* HAL_TIMER_RATE must be known at compile time since it's used to calculate
* STEPPER_TIMER_RATE, which is used in 'constexpr' calculations.
* On the HC32F460 the timer rate depends on PCLK1, which is derived from the
* system clock configured at runtime. As a workaround, we use the existing
* assumption of a 200MHz clock, defining F_CPU as 200000000, then configure PCLK1
* as F_CPU with a divider of 4 in 'sysclock.cpp::core_hook_sysclock_init'.
*
* If you face issues with this assumption, please double-check with the values
* printed by 'MarlinHAL::HAL_clock_frequencies_dump'.
*
* TODO: If the 'constexpr' requirement is ever lifted, use TIMER0_BASE_FREQUENCY instead
*/
#define HAL_TIMER_RATE (F_CPU / 4) // i.e., 50MHz
//#define HAL_TIMER_RATE TIMER0_BASE_FREQUENCY
// Temperature timer
#define TEMP_TIMER_NUM (&temp_timer)
#define TEMP_TIMER_PRIORITY DDL_IRQ_PRIORITY_02
#define TEMP_TIMER_PRESCALE 16ul
#define TEMP_TIMER_RATE 1000 // 1kHz
#define TEMP_TIMER_FREQUENCY TEMP_TIMER_RATE // Alias for Marlin
#define TEMP_TIMER_NUM (&temp_timer)
#define TEMP_TIMER_PRIORITY DDL_IRQ_PRIORITY_02
#define TEMP_TIMER_PRESCALE 16UL // 12.5MHz
#define TEMP_TIMER_RATE 1000 // 1kHz
#define TEMP_TIMER_FREQUENCY TEMP_TIMER_RATE // 1kHz also
// Stepper timer
#define STEP_TIMER_NUM (&step_timer)
#define STEP_TIMER_PRIORITY DDL_IRQ_PRIORITY_01
#define STEPPER_TIMER_PRESCALE 16ul
#define STEP_TIMER_NUM (&step_timer)
#define STEP_TIMER_PRIORITY DDL_IRQ_PRIORITY_00 // Top priority, nothing else uses it
#define STEPPER_TIMER_PRESCALE 16UL // 12.5MHz
// TODO: STEPPER_TIMER_RATE seems to work fine like this, but requires further testing...
#define STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // 50MHz / 16 = 3.125MHz
#define STEPPER_TIMER_TICKS_PER_US (STEPPER_TIMER_RATE / 1000000)
#define STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // 50MHz / 16 = 3.125MHz
#define STEPPER_TIMER_TICKS_PER_US (STEPPER_TIMER_RATE / 1000000UL) // Integer 3
// Pulse timer (== stepper timer)
#define PULSE_TIMER_NUM STEP_TIMER_NUM
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
#define PULSE_TIMER_NUM STEP_TIMER_NUM
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
//
// Channel aliases
//
#define MF_TIMER_TEMP TEMP_TIMER_NUM
#define MF_TIMER_STEP STEP_TIMER_NUM
#define MF_TIMER_PULSE PULSE_TIMER_NUM
#define MF_TIMER_TEMP TEMP_TIMER_NUM
#define MF_TIMER_STEP STEP_TIMER_NUM
#define MF_TIMER_PULSE PULSE_TIMER_NUM
//
// HAL functions
+2 -1
View File
@@ -89,7 +89,8 @@
#define HYPOT2(x,y) (sq(x)+sq(y))
#define NORMSQ(x,y,z) (sq(x)+sq(y)+sq(z))
#define CIRCLE_AREA(R) (float(M_PI) * sq(float(R)))
#define FLOAT_SQ(I) sq(float(I))
#define CIRCLE_AREA(R) (float(M_PI) * FLOAT_SQ(R))
#define CIRCLE_CIRC(R) (2 * float(M_PI) * float(R))
#define SIGN(a) ({__typeof__(a) _a = (a); (_a>0)-(_a<0);})
+2 -2
View File
@@ -610,9 +610,9 @@ struct XYZval {
// If any element is true then it's true
FI constexpr operator bool() const { return 0 NUM_AXIS_GANG(|| x, || y, || z, || i, || j, || k, || u, || v, || w); }
// Smallest element
FI constexpr T small() const { return TERN(HAS_X_AXIS, _MIN(NUM_AXIS_LIST(x, y, z, i, j, k, u, v, w)), 0); }
FI constexpr T small() const { return TERN0(HAS_X_AXIS, _MIN(NUM_AXIS_LIST(x, y, z, i, j, k, u, v, w))); }
// Largest element
FI constexpr T large() const { return TERN(HAS_X_AXIS, _MAX(NUM_AXIS_LIST(x, y, z, i, j, k, u, v, w)), 0); }
FI constexpr T large() const { return TERN0(HAS_X_AXIS, _MAX(NUM_AXIS_LIST(x, y, z, i, j, k, u, v, w))); }
// Explicit copy and copies with conversion
FI constexpr XYZval<T> copy() const { XYZval<T> o = *this; return o; }
+2 -3
View File
@@ -137,7 +137,7 @@ void FWRetract::retract(const bool retracting E_OPTARG(bool swapping/*=false*/))
// Retract by moving from a faux E position back to the current E position
current_retract[active_extruder] = base_retract;
prepare_internal_move_to_destination( // set current from destination
settings.retract_feedrate_mm_s * TERN1(RETRACT_SYNC_MIXING, (MIXING_STEPPERS))
MUL_TERN(RETRACT_SYNC_MIXING, settings.retract_feedrate_mm_s, MIXING_STEPPERS)
);
// Is a Z hop set, and has the hop not yet been done?
@@ -165,8 +165,7 @@ void FWRetract::retract(const bool retracting E_OPTARG(bool swapping/*=false*/))
// Recover E, set_current_to_destination
prepare_internal_move_to_destination(
(swapping ? settings.swap_retract_recover_feedrate_mm_s : settings.retract_recover_feedrate_mm_s)
* TERN1(RETRACT_SYNC_MIXING, (MIXING_STEPPERS))
MUL_TERN(RETRACT_SYNC_MIXING, swapping ? settings.swap_retract_recover_feedrate_mm_s : settings.retract_recover_feedrate_mm_s, MIXING_STEPPERS)
);
}
+1 -1
View File
@@ -130,7 +130,7 @@ public:
}
// Accessors
static uint16_t pixels() { return adaneo1.numPixels() * TERN1(NEOPIXEL2_INSERIES, 2); }
static uint16_t pixels() { return MUL_TERN(NEOPIXEL2_INSERIES, adaneo1.numPixels(), 2); }
static uint32_t pixel_color(const uint16_t n) {
#if ENABLED(NEOPIXEL2_INSERIES)
@@ -68,7 +68,7 @@ void GcodeSuite::M907() {
#define HAS_X_Y_XY_I_J_K_U_V_W 1
#endif
#if HAS_X_Y_XY_I_J_K_U_V_W || ANY_PIN(MOTOR_CURRENT_PWM_E, MOTOR_CURRENT_PWM_Z)
#if HAS_X_Y_XY_I_J_K_U_V_W || HAS_MOTOR_CURRENT_PWM_E || PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
if (!parser.seen("S"
#if HAS_X_Y_XY_I_J_K_U_V_W
@@ -77,7 +77,7 @@ void GcodeSuite::M907() {
#if PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
"Z"
#endif
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
#if HAS_MOTOR_CURRENT_PWM_E
"E"
#endif
)) return M907_report();
@@ -94,7 +94,7 @@ void GcodeSuite::M907() {
#if PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
if (parser.seenval('Z')) stepper.set_digipot_current(1, parser.value_int());
#endif
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
#if HAS_MOTOR_CURRENT_PWM_E
if (parser.seenval('E')) stepper.set_digipot_current(2, parser.value_int());
#endif
@@ -133,7 +133,7 @@ void GcodeSuite::M907() {
SERIAL_ECHOLNPGM_P( // PWM-based has 3 values:
PSTR(" M907 X"), stepper.motor_current_setting[0] // X, Y, (I, J, K, U, V, W)
, SP_Z_STR, stepper.motor_current_setting[1] // Z
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
#if HAS_MOTOR_CURRENT_PWM_E
, SP_E_STR, stepper.motor_current_setting[2] // E
#endif
);
+1 -1
View File
@@ -49,7 +49,7 @@
*/
void GcodeSuite::M306() {
const uint8_t e = TERN(HAS_MULTI_EXTRUDER, parser.intval('E', active_extruder), 0);
const uint8_t e = TERN0(HAS_MULTI_EXTRUDER, parser.intval('E', active_extruder));
if (e >= (EXTRUDERS)) {
SERIAL_ECHOLNPGM("?(E)xtruder index out of range (0-", (EXTRUDERS) - 1, ").");
return;
+1 -1
View File
@@ -2814,7 +2814,7 @@
#if PIN_EXISTS(DIGIPOTSS)
#define HAS_MOTOR_CURRENT_SPI 1
#endif
#if HAS_EXTRUDERS && PIN_EXISTS(MOTOR_CURRENT_PWM_E)
#if ANY_PIN(MOTOR_CURRENT_PWM_E, MOTOR_CURRENT_PWM_E0, MOTOR_CURRENT_PWM_E1)
#define HAS_MOTOR_CURRENT_PWM_E 1
#endif
#if HAS_MOTOR_CURRENT_PWM_E || ANY_PIN(MOTOR_CURRENT_PWM_X, MOTOR_CURRENT_PWM_Y, MOTOR_CURRENT_PWM_XY, MOTOR_CURRENT_PWM_Z, MOTOR_CURRENT_PWM_I, MOTOR_CURRENT_PWM_J, MOTOR_CURRENT_PWM_K, MOTOR_CURRENT_PWM_U, MOTOR_CURRENT_PWM_V, MOTOR_CURRENT_PWM_W)
+3
View File
@@ -1545,6 +1545,9 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i
#error "BED_TRAMMING_USE_PROBE is incompatible with SENSORLESS_PROBING."
#endif
#endif
static_assert(BED_TRAMMING_Z_HOP >= 0, "BED_TRAMMING_Z_HOP must be >= 0.");
#elif ANY(DGUS_LCD_UI_RELOADED, DGUS_LCD_UI_E3S1PRO)
#error "LCD_BED_TRAMMING is required for the selected display."
#endif
/**
+1 -1
View File
@@ -42,7 +42,7 @@
* version was tagged.
*/
#ifndef STRING_DISTRIBUTION_DATE
#define STRING_DISTRIBUTION_DATE "2024-05-10"
#define STRING_DISTRIBUTION_DATE "2024-05-16"
#endif
/**
+7
View File
@@ -864,3 +864,10 @@
#if DISABLED(EDITABLE_STEPS_PER_UNIT)
#warning "EDITABLE_STEPS_PER_UNIT is required to enable G92 runtime configuration of steps-per-unit."
#endif
/**
* HC32 clock speed is hard-coded in Marlin
*/
#if defined(ARDUINO_ARCH_HC32) && F_CPU == 200000000
#warning "HC32 clock is assumed to be 200MHz. If this isn't the case for your board please submit a report so we can add support."
#endif
@@ -22,9 +22,6 @@
/**
* Bed Level Tools for Pro UI
* Extended by: Miguel A. Risco-Castillo (MRISCOC)
* Version: 3.2.0
* Date: 2023/05/03
*
* Based on the original work of: Henri-J-Norden
* https://github.com/Jyers/Marlin/pull/126
@@ -22,9 +22,6 @@
/**
* Bed Level Tools for Pro UI
* Extended by: Miguel A. Risco-Castillo (MRISCOC)
* Version: 3.2.0
* Date: 2023/05/03
*
* Based on the original work of: Henri-J-Norden
* https://github.com/Jyers/Marlin/pull/126
+2 -1
View File
@@ -22,7 +22,8 @@
/**
* DWIN Enhanced implementation for PRO UI
* Author: Miguel A. Risco-Castillo (MRISCOC)
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
* https://github.com/mriscoc/Ender3V2S1
* Version: 3.25.3
* Date: 2023/05/18
*/
+2 -1
View File
@@ -23,7 +23,8 @@
/**
* DWIN Enhanced implementation for PRO UI
* Author: Miguel A. Risco-Castillo (MRISCOC)
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
* https://github.com/mriscoc/Ender3V2S1
* Version: 3.25.3
* Date: 2023/05/18
*/
+2 -1
View File
@@ -23,7 +23,8 @@
/**
* DWIN general defines and data structs for PRO UI
* Author: Miguel A. Risco-Castillo (MRISCOC)
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
* https://github.com/mriscoc/Ender3V2S1
* Version: 3.12.2
* Date: 2022/08/08
*/
+2 -1
View File
@@ -22,7 +22,8 @@
/**
* DWIN Enhanced implementation for PRO UI
* Author: Miguel A. Risco-Castillo (MRISCOC)
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
* https://github.com/mriscoc/Ender3V2S1
* Version: 3.12.1
* Date: 2023/01/22
*/
+2 -1
View File
@@ -23,7 +23,8 @@
/**
* DWIN Enhanced implementation for PRO UI
* Author: Miguel A. Risco-Castillo (MRISCOC)
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
* https://github.com/mriscoc/Ender3V2S1
* Version: 3.12.1
* Date: 2023/01/22
*/
+2 -1
View File
@@ -22,7 +22,8 @@
/**
* DWIN Enhanced implementation for PRO UI
* Author: Miguel A. Risco-Castillo (MRISCOC)
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
* https://github.com/mriscoc/Ender3V2S1
* Version: 3.11.1
* Date: 2022/02/28
*/
+2 -1
View File
@@ -23,7 +23,8 @@
/**
* DWIN Enhanced implementation for PRO UI
* Author: Miguel A. Risco-Castillo (MRISCOC)
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
* https://github.com/mriscoc/Ender3V2S1
* Version: 3.11.1
* Date: 2022/02/28
*/
+2 -1
View File
@@ -22,7 +22,8 @@
/**
* DWIN Enhanced implementation for PRO UI
* Author: Miguel A. Risco-Castillo (MRISCOC)
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
* https://github.com/mriscoc/Ender3V2S1
* Version: 3.21.1
* Date: 2023/03/21
*/
+2 -1
View File
@@ -23,7 +23,8 @@
/**
* DWIN Enhanced implementation for PRO UI
* Author: Miguel A. Risco-Castillo (MRISCOC)
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
* https://github.com/mriscoc/Ender3V2S1
* Version: 3.21.1
* Date: 2023/03/21
*/
+2 -1
View File
@@ -22,7 +22,8 @@
/**
* DWIN Endstops diagnostic page for PRO UI
* Author: Miguel A. Risco-Castillo (MRISCOC)
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
* https://github.com/mriscoc/Ender3V2S1
* Version: 1.4.3
* Date: 2023/05/10
*/
+2 -1
View File
@@ -23,7 +23,8 @@
/**
* DWIN End Stops diagnostic page for PRO UI
* Author: Miguel A. Risco-Castillo (MRISCOC)
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
* https://github.com/mriscoc/Ender3V2S1
* Version: 1.4.3
* Date: 2023/05/10
*/
+2 -1
View File
@@ -22,7 +22,8 @@
/**
* Lock screen implementation for PRO UI
* Author: Miguel A. Risco-Castillo (MRISCOC)
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
* https://github.com/mriscoc/Ender3V2S1
* Version: 2.3.2
* Date: 2022/11/20
*/
+2 -1
View File
@@ -23,7 +23,8 @@
/**
* Lock screen implementation for PRO UI
* Author: Miguel A. Risco-Castillo (MRISCOC)
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
* https://github.com/mriscoc/Ender3V2S1
* Version: 2.3.2
* Date: 2022/11/20
*/
+2 -1
View File
@@ -22,7 +22,8 @@
/**
* Mesh Viewer for PRO UI
* Author: Miguel A. Risco-Castillo (MRISCOC)
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
* https://github.com/mriscoc/Ender3V2S1
* version: 4.2.1
* Date: 2023/05/05
*/
+2 -1
View File
@@ -23,7 +23,8 @@
/**
* Mesh Viewer for PRO UI
* Author: Miguel A. Risco-Castillo (MRISCOC)
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
* https://github.com/mriscoc/Ender3V2S1
* version: 4.2.1
* Date: 2023/05/05
*/
+2 -1
View File
@@ -22,7 +22,8 @@
/**
* Print Stats page for PRO UI
* Author: Miguel A. Risco-Castillo (MRISCOC)
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
* https://github.com/mriscoc/Ender3V2S1
* Version: 1.4.0
* Date: 2022/12/03
*/
+2 -1
View File
@@ -23,7 +23,8 @@
/**
* Print Stats page for PRO UI
* Author: Miguel A. Risco-Castillo (MRISCOC)
* Based on the original work of: Miguel Risco-Castillo (MRISCOC)
* https://github.com/mriscoc/Ender3V2S1
* Version: 1.4.0
* Date: 2022/12/03
*/
@@ -780,11 +780,11 @@ void ChironTFT::panelProcess(uint8_t req) {
DEBUG_ECHOLNPGM("Moving to mesh point at x: ", pos.x, " y: ", pos.y, " z: ", pos_z);
#endif
// Go up before moving
setAxisPosition_mm(3.0,Z);
setAxisPosition_mm(3.0f, Z);
setAxisPosition_mm(17 + (93 * pos.x), X);
setAxisPosition_mm(20 + (93 * pos.y), Y);
setAxisPosition_mm(0.0, Z);
setAxisPosition_mm(17.0f + (93.0f * pos.x), X);
setAxisPosition_mm(20.0f + (93.0f * pos.y), Y);
setAxisPosition_mm(0.0f, Z);
#if ACDEBUG(AC_INFO)
DEBUG_ECHOLNPGM("Current Z: ", getAxisPosition_mm(Z));
#endif
@@ -401,15 +401,14 @@ static void _gotoTrammingPoint(unsigned char point) {
switch (point) {
default: return;
case 1: x = X_CENTER; y = Y_CENTER; break;
case 2: x = X_MIN_POS + lfrb[0]; y = Y_MIN_POS + lfrb[1]; break;
case 3: x = X_MAX_POS - lfrb[2]; y = Y_MIN_POS + lfrb[1]; break;
case 4: x = X_MAX_POS - lfrb[2]; y = Y_MAX_POS - lfrb[3]; break;
case 5: x = X_MIN_POS + lfrb[0]; y = Y_MAX_POS - lfrb[3]; break;
case 2: x = X_MIN_BED + lfrb[0]; y = Y_MIN_BED + lfrb[1]; break;
case 3: x = X_MAX_BED - lfrb[2]; y = Y_MIN_BED + lfrb[1]; break;
case 4: x = X_MAX_BED - lfrb[2]; y = Y_MAX_BED - lfrb[3]; break;
case 5: x = X_MIN_BED + lfrb[0]; y = Y_MAX_BED - lfrb[3]; break;
}
if (ExtUI::getAxisPosition_mm(ExtUI::Z) < (Z_MIN_POS) + (BED_TRAMMING_Z_HOP))
ExtUI::setAxisPosition_mm((Z_MIN_POS) + (BED_TRAMMING_Z_HOP), ExtUI::Z);
if (BED_TRAMMING_Z_HOP)
ExtUI::setAxisPosition_mm(ExtUI::getAxisPosition_mm(ExtUI::Z) + (BED_TRAMMING_Z_HOP), ExtUI::Z);
ExtUI::setAxisPosition_mm(x, ExtUI::X);
ExtUI::setAxisPosition_mm(y, ExtUI::Y);
ExtUI::setAxisPosition_mm((Z_MIN_POS) + (BED_TRAMMING_HEIGHT), ExtUI::Z);
@@ -45,13 +45,3 @@
#ifndef DGUS_STATUS_EXPIRATION_MS
#define DGUS_STATUS_EXPIRATION_MS 30000
#endif
#ifndef BED_TRAMMING_Z_HOP
#define BED_TRAMMING_Z_HOP 4.0
#endif
#ifndef BED_TRAMMING_HEIGHT
#define BED_TRAMMING_HEIGHT 0.0
#endif
static_assert(BED_TRAMMING_Z_HOP >= 0, "BED_TRAMMING_Z_HOP must be >= 0. Please update your configuration.");
@@ -474,29 +474,28 @@ void DGUSRxHandler::moveToPoint(DGUS_VP &vp, void *data_ptr) {
y = DGUS_LEVEL_CENTER_Y;
break;
case 2:
x = X_MIN_POS + lfrb[0];
y = Y_MIN_POS + lfrb[1];
x = X_MIN_BED + lfrb[0];
y = Y_MIN_BED + lfrb[1];
break;
case 3:
x = X_MAX_POS - lfrb[2];
y = Y_MIN_POS + lfrb[1];
x = X_MAX_BED - lfrb[2];
y = Y_MIN_BED + lfrb[1];
break;
case 4:
x = X_MAX_POS - lfrb[2];
y = Y_MAX_POS - lfrb[3];
x = X_MAX_BED - lfrb[2];
y = Y_MAX_BED - lfrb[3];
break;
case 5:
x = X_MIN_POS + lfrb[0];
y = Y_MAX_POS - lfrb[3];
x = X_MIN_BED + lfrb[0];
y = Y_MAX_BED - lfrb[3];
break;
}
if (ExtUI::getAxisPosition_mm(ExtUI::Z) < Z_MIN_POS + BED_TRAMMING_Z_HOP) {
ExtUI::setAxisPosition_mm(Z_MIN_POS + BED_TRAMMING_Z_HOP, ExtUI::Z);
}
if (BED_TRAMMING_Z_HOP)
ExtUI::setAxisPosition_mm(ExtUI::getAxisPosition_mm(ExtUI::Z) + (BED_TRAMMING_Z_HOP), ExtUI::Z);
ExtUI::setAxisPosition_mm(x, ExtUI::X);
ExtUI::setAxisPosition_mm(y, ExtUI::Y);
ExtUI::setAxisPosition_mm(Z_MIN_POS + BED_TRAMMING_HEIGHT, ExtUI::Z);
ExtUI::setAxisPosition_mm((Z_MIN_POS) + (BED_TRAMMING_HEIGHT), ExtUI::Z);
}
void DGUSRxHandler::probe(DGUS_VP &vp, void *data_ptr) {
@@ -73,16 +73,6 @@
#define DGUS_DEFAULT_FILAMENT_LEN 10
#endif
#ifndef BED_TRAMMING_Z_HOP
#define BED_TRAMMING_Z_HOP 4.0
#endif
#ifndef BED_TRAMMING_HEIGHT
#define BED_TRAMMING_HEIGHT 0.0
#endif
static_assert(BED_TRAMMING_Z_HOP >= 0, "BED_TRAMMING_Z_HOP must be >= 0. Please update your configuration.");
#ifndef DGUS_LEVEL_CENTER_X
#define DGUS_LEVEL_CENTER_X ((X_BED_SIZE) / 2)
#endif
@@ -43,7 +43,7 @@ void ZOffsetScreen::onRedraw(draw_mode_t what) {
}
bool ZOffsetScreen::onTouchHeld(uint8_t tag) {
const int16_t steps = TERN(BABYSTEPPING, mmToWholeSteps(getIncrement(), Z), 0);
const int16_t steps = TERN0(BABYSTEPPING, mmToWholeSteps(getIncrement(), Z));
const float increment = TERN(BABYSTEPPING, mmFromWholeSteps(steps, Z), getIncrement());
switch (tag) {
case 2: ZOffsetWizard::runWizard(); break;
@@ -95,7 +95,7 @@ bool ZOffsetScreen::wizardRunning() {
}
bool ZOffsetScreen::onTouchHeld(uint8_t tag) {
const int16_t steps = TERN(BABYSTEPPING, mmToWholeSteps(getIncrement(), Z), 0);
const int16_t steps = TERN0(BABYSTEPPING, mmToWholeSteps(getIncrement(), Z));
const float increment = TERN(BABYSTEPPING, mmFromWholeSteps(steps, Z), getIncrement());
switch (tag) {
case 2: runWizard(); break;
@@ -1162,35 +1162,35 @@ void RTS::handleData() {
#if ENABLED(LCD_BED_TRAMMING)
case 6: // Bed Tramming, Centre 1
setAxisPosition_mm(BED_TRAMMING_Z_HOP, axis_t(Z));
if (BED_TRAMMING_Z_HOP) setAxisPosition_mm(current_position.z + (BED_TRAMMING_Z_HOP), axis_t(Z));
setAxisPosition_mm(X_CENTER, axis_t(X));
setAxisPosition_mm(Y_CENTER, axis_t(Y));
waitway = 6;
break;
case 7: // Bed Tramming, Front Left 2
setAxisPosition_mm(BED_TRAMMING_Z_HOP, axis_t(Z));
if (BED_TRAMMING_Z_HOP) setAxisPosition_mm(current_position.z + (BED_TRAMMING_Z_HOP), axis_t(Z));
setAxisPosition_mm(X_MIN_BED + lfrb[0], axis_t(X));
setAxisPosition_mm(Y_MIN_BED + lfrb[1], axis_t(Y));
waitway = 6;
break;
case 8: // Bed Tramming, Front Right 3
setAxisPosition_mm(BED_TRAMMING_Z_HOP, axis_t(Z));
if (BED_TRAMMING_Z_HOP) setAxisPosition_mm(current_position.z + (BED_TRAMMING_Z_HOP), axis_t(Z));
setAxisPosition_mm(X_MAX_BED - lfrb[2], axis_t(X));
setAxisPosition_mm(Y_MIN_BED + lfrb[1], axis_t(Y));
waitway = 6;
break;
case 9: // Bed Tramming, Back Right 4
setAxisPosition_mm(BED_TRAMMING_Z_HOP, axis_t(Z));
if (BED_TRAMMING_Z_HOP) setAxisPosition_mm(current_position.z + (BED_TRAMMING_Z_HOP), axis_t(Z));
setAxisPosition_mm(X_MAX_BED - lfrb[2], axis_t(X));
setAxisPosition_mm(Y_MAX_BED - lfrb[3], axis_t(Y));
waitway = 6;
break;
case 10: // Bed Tramming, Back Left 5
setAxisPosition_mm(BED_TRAMMING_Z_HOP, axis_t(Z));
if (BED_TRAMMING_Z_HOP) setAxisPosition_mm(current_position.z + (BED_TRAMMING_Z_HOP), axis_t(Z));
setAxisPosition_mm(X_MIN_BED + lfrb[0], axis_t(X));
setAxisPosition_mm(Y_MAX_BED - lfrb[3], axis_t(Y));
waitway = 6;
@@ -61,7 +61,7 @@ namespace ExtUI {
UNUSED(icon); UNUSED(fBtn);
}
void onUserConfirmRequired(const int icon, FSTR_P const fstr, FSTR_P const fBtn) {
onUserConfirmRequired(cstr);
onUserConfirmRequired(fstr);
UNUSED(icon); UNUSED(fBtn);
}
+1 -1
View File
@@ -343,7 +343,7 @@ namespace ExtUI {
// This assumes the center is 0,0
#if ENABLED(DELTA)
if (axis != Z) {
max = SQRT(sq(float(PRINTABLE_RADIUS)) - sq(current_position[Y - axis])); // (Y - axis) == the other axis
max = SQRT(FLOAT_SQ(PRINTABLE_RADIUS) - sq(current_position[Y - axis])); // (Y - axis) == the other axis
min = -max;
}
#endif
+1 -1
View File
@@ -91,7 +91,7 @@ void menu_backlash();
#if PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
EDIT_CURRENT_PWM(STR_C, 1);
#endif
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
#if HAS_MOTOR_CURRENT_PWM_E
EDIT_CURRENT_PWM(STR_E, 2);
#endif
END_MENU();
+4 -11
View File
@@ -36,13 +36,6 @@
#include "../../feature/bedlevel/bedlevel.h"
#endif
#ifndef BED_TRAMMING_Z_HOP
#define BED_TRAMMING_Z_HOP 4.0
#endif
#ifndef BED_TRAMMING_HEIGHT
#define BED_TRAMMING_HEIGHT 0.0
#endif
#if ALL(HAS_STOWABLE_PROBE, BED_TRAMMING_USE_PROBE) && DISABLED(BLTOUCH)
#define NEEDS_PROBE_DEPLOY 1
#endif
@@ -151,7 +144,7 @@ static void _lcd_goto_next_corner() {
}
}
float z = BED_TRAMMING_Z_HOP;
float z = current_position.z + (BED_TRAMMING_Z_HOP);
#if ALL(BED_TRAMMING_USE_PROBE, BLTOUCH)
z += bltouch.z_extra_clearance();
#endif
@@ -235,7 +228,7 @@ static void _lcd_goto_next_corner() {
}
bool _lcd_bed_tramming_probe(const bool verify=false) {
if (verify) line_to_z(BED_TRAMMING_Z_HOP); // do clearance if needed
if (verify) line_to_z(current_position.z + (BED_TRAMMING_Z_HOP)); // do clearance if needed
TERN_(BLTOUCH, if (!bltouch.high_speed_mode) bltouch.deploy()); // Deploy in LOW SPEED MODE on every probe action
do_blocking_move_to_z(last_z - BED_TRAMMING_PROBE_TOLERANCE, MMM_TO_MMS(Z_PROBE_FEEDRATE_SLOW)); // Move down to lower tolerance
if (TEST(endstops.trigger_state(), Z_MIN_PROBE)) { // check if probe triggered
@@ -253,7 +246,7 @@ static void _lcd_goto_next_corner() {
// Raise the probe after the last point to give clearance for stow
if (TERN0(NEEDS_PROBE_DEPLOY, good_points == nr_edge_points - 1))
line_to_z(BED_TRAMMING_Z_HOP);
do_z_clearance(BED_TRAMMING_Z_HOP);
return true; // probe triggered
}
@@ -281,7 +274,7 @@ static void _lcd_goto_next_corner() {
}
void _lcd_test_corners() {
bed_corner = TERN(BED_TRAMMING_INCLUDE_CENTER, center_index, 0);
bed_corner = TERN0(BED_TRAMMING_INCLUDE_CENTER, center_index);
last_z = BED_TRAMMING_HEIGHT;
endstops.enable_z_probe(true);
good_points = 0;
+1 -1
View File
@@ -63,7 +63,7 @@ void lcd_move_axis(const AxisEnum axis) {
// This assumes the center is 0,0
#if ENABLED(DELTA)
if (axis != Z_AXIS) {
max = SQRT(sq(float(PRINTABLE_RADIUS)) - sq(current_position[Y_AXIS - axis])); // (Y_AXIS - axis) == the other axis
max = SQRT(FLOAT_SQ(PRINTABLE_RADIUS) - sq(current_position[Y_AXIS - axis])); // (Y_AXIS - axis) == the other axis
min = -max;
}
#endif
+1 -1
View File
@@ -446,7 +446,7 @@ void ubl_map_screen() {
do {
// Now, keep the encoder position within range
if (int32_t(ui.encoderPosition) < 0) ui.encoderPosition = GRID_MAX_POINTS + TERN(TOUCH_SCREEN, ui.encoderPosition, -1);
if (int32_t(ui.encoderPosition) > GRID_MAX_POINTS - 1) ui.encoderPosition = TERN(TOUCH_SCREEN, ui.encoderPosition - GRID_MAX_POINTS, 0);
if (int32_t(ui.encoderPosition) > GRID_MAX_POINTS - 1) ui.encoderPosition = TERN0(TOUCH_SCREEN, ui.encoderPosition - GRID_MAX_POINTS);
// Draw the grid point based on the encoder
x = ui.encoderPosition % (GRID_MAX_POINTS_X);
+1 -1
View File
@@ -129,7 +129,7 @@ void moveAxis(const AxisEnum axis, const int8_t direction) {
// This assumes the center is 0,0
#if ENABLED(DELTA)
if (axis != Z_AXIS && TERN1(HAS_EXTRUDERS, axis != E_AXIS)) {
max = SQRT(sq(float(PRINTABLE_RADIUS)) - sq(current_position[Y_AXIS - axis])); // (Y_AXIS - axis) == the other axis
max = SQRT(FLOAT_SQ(PRINTABLE_RADIUS) - sq(current_position[Y_AXIS - axis])); // (Y_AXIS - axis) == the other axis
min = -max;
}
#endif
+16 -4
View File
@@ -328,7 +328,7 @@ void report_current_position_projected() {
can_reach = (
R2 <= sq(L1 + L2) - inset
#if MIDDLE_DEAD_ZONE_R > 0
&& R2 >= sq(float(MIDDLE_DEAD_ZONE_R))
&& R2 >= FLOAT_SQ(MIDDLE_DEAD_ZONE_R)
#endif
);
@@ -338,7 +338,7 @@ void report_current_position_projected() {
can_reach = (
R2 <= sq(L1 + L2) - inset
#if MIDDLE_DEAD_ZONE_R > 0
&& R2 >= sq(float(MIDDLE_DEAD_ZONE_R))
&& R2 >= FLOAT_SQ(MIDDLE_DEAD_ZONE_R)
#endif
);
@@ -714,6 +714,14 @@ void do_blocking_move_to(const xyze_pos_t &raw, const_feedRate_t fr_mm_s/*=0.0f*
fr_mm_s
);
}
/**
* Move Z to a particular height so the nozzle or deployed probe clears the bed.
* (Use do_z_clearance_by for clearance over the current position.)
* - For a probe, add clearance for the probe distance
* - Constrain to the Z max physical position
* - If lowering is not allowed then skip a downward move
* - Execute the move at the probing (or homing) feedrate
*/
void do_z_clearance(const_float_t zclear, const bool with_probe/*=true*/, const bool lower_allowed/*=false*/) {
UNUSED(with_probe);
float zdest = zclear;
@@ -727,9 +735,13 @@ void do_blocking_move_to(const xyze_pos_t &raw, const_feedRate_t fr_mm_s/*=0.0f*
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("do_z_clearance_by(", zclear, ")");
do_z_clearance(current_position.z + zclear, false);
}
/**
* Move Z to Z_POST_CLEARANCE,
* The axis is allowed to move down.
*/
void do_move_after_z_homing() {
DEBUG_SECTION(mzah, "do_move_after_z_homing", DEBUGGING(LEVELING));
#if defined(Z_AFTER_HOMING) || ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING)
#ifdef Z_POST_CLEARANCE
do_z_clearance(Z_POST_CLEARANCE, true, true);
#elif ENABLED(USE_PROBE_FOR_Z_HOMING)
probe.move_z_after_probing();
@@ -2174,7 +2186,7 @@ void prepare_line_to_destination() {
// Move away from the endstop by the axis HOMING_BUMP_MM
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Move Away: ", -bump, "mm");
do_homing_move(axis, -bump, TERN(HOMING_Z_WITH_PROBE, (axis == Z_AXIS ? z_probe_fast_mm_s : 0), 0), false);
do_homing_move(axis, -bump, TERN0(HOMING_Z_WITH_PROBE, (axis == Z_AXIS ? z_probe_fast_mm_s : 0)), false);
#if ENABLED(DETECT_BROKEN_ENDSTOP)
+53 -90
View File
@@ -784,7 +784,9 @@ block_t* Planner::get_current_block() {
/**
* Calculate trapezoid parameters, multiplying the entry- and exit-speeds
* by the provided factors.
* by the provided factors. Requires that initial_rate and final_rate are
* no less than sqrt(block->acceleration_steps_per_s2 / 2), which is ensured
* through minimum_planner_speed_sqr in _populate_block().
**
* ############ VERY IMPORTANT ############
* NOTE that the PRECONDITION to call this function is that the block is
@@ -816,10 +818,10 @@ void Planner::calculate_trapezoid_for_block(block_t * const block, const_float_t
if (accel != 0) {
inverse_accel = 1.0f / accel;
const float half_inverse_accel = 0.5f * inverse_accel,
nominal_rate_sq = sq(float(block->nominal_rate)),
nominal_rate_sq = FLOAT_SQ(block->nominal_rate),
// Steps required for acceleration, deceleration to/from nominal rate
decelerate_steps_float = half_inverse_accel * (nominal_rate_sq - sq(float(final_rate)));
float accelerate_steps_float = half_inverse_accel * (nominal_rate_sq - sq(float(initial_rate)));
decelerate_steps_float = half_inverse_accel * (nominal_rate_sq - FLOAT_SQ(final_rate));
float accelerate_steps_float = half_inverse_accel * (nominal_rate_sq - FLOAT_SQ(initial_rate));
accelerate_steps = CEIL(accelerate_steps_float);
decelerate_steps = FLOOR(decelerate_steps_float);
@@ -940,7 +942,7 @@ void Planner::calculate_trapezoid_for_block(block_t * const block, const_float_t
* neighboring blocks.
* b. A block entry speed cannot exceed one reverse-computed from its exit speed (next->entry_speed)
* with a maximum allowable deceleration over the block travel distance.
* c. The last (or newest appended) block is planned from a complete stop (an exit speed of zero).
* c. The last (or newest appended) block is planned from safe_exit_speed_sqr.
* 2. Go over every block in chronological (forward) order and dial down junction speed values if
* a. The exit speed exceeds the one forward-computed from its entry speed with the maximum allowable
* acceleration over the block travel distance.
@@ -996,29 +998,13 @@ void Planner::calculate_trapezoid_for_block(block_t * const block, const_float_t
// The kernel called by recalculate() when scanning the plan from last to first entry.
void Planner::reverse_pass_kernel(block_t * const current, const block_t * const next, const_float_t safe_exit_speed_sqr) {
if (current) {
// If entry speed is already at the maximum entry speed, and there was no change of speed
// in the next block, there is no need to recheck. Block is cruising and there is no need to
// compute anything for this block,
// If not, block entry speed needs to be recalculated to ensure maximum possible planned speed.
const float max_entry_speed_sqr = current->max_entry_speed_sqr;
// Compute maximum entry speed decelerating over the current block from its exit speed.
// If not at the maximum entry speed, or the previous block entry speed changed
if (current->entry_speed_sqr != max_entry_speed_sqr || (next && next->flag.recalculate)) {
// If nominal length true, max junction speed is guaranteed to be reached.
// If a block can de/ac-celerate from nominal speed to zero within the length of the block, then
// the current block and next block junction speeds are guaranteed to always be at their maximum
// junction speeds in deceleration and acceleration, respectively. This is due to how the current
// block nominal speed limits both the current and next maximum junction speeds. Hence, in both
// the reverse and forward planners, the corresponding block junction speed will always be at the
// the maximum junction speed and may always be ignored for any speed reduction checks.
const float next_entry_speed_sqr = next ? next->entry_speed_sqr : safe_exit_speed_sqr,
new_entry_speed_sqr = current->flag.nominal_length
? max_entry_speed_sqr
: _MIN(max_entry_speed_sqr, max_allowable_speed_sqr(-current->acceleration, next_entry_speed_sqr, current->millimeters));
// We need to recalculate only for the last block added or if next->entry_speed_sqr changed.
if (!next || next->flag.recalculate) {
// And only if we're not already at max entry speed.
if (current->entry_speed_sqr != current->max_entry_speed_sqr) {
const float next_entry_speed_sqr = next ? next->entry_speed_sqr : safe_exit_speed_sqr;
float new_entry_speed_sqr = max_allowable_speed_sqr(-current->acceleration, next_entry_speed_sqr, current->millimeters);
NOMORE(new_entry_speed_sqr, current->max_entry_speed_sqr);
if (current->entry_speed_sqr != new_entry_speed_sqr) {
// Need to recalculate the block speed - Mark it now, so the stepper
@@ -1094,41 +1080,26 @@ void Planner::reverse_pass(const_float_t safe_exit_speed_sqr) {
// The kernel called by recalculate() when scanning the plan from first to last entry.
void Planner::forward_pass_kernel(const block_t * const previous, block_t * const current, const uint8_t block_index) {
if (previous) {
// If the previous block is an acceleration block, too short to complete the full speed
// change, adjust the entry speed accordingly. Entry speeds have already been reset,
// maximized, and reverse-planned. If nominal length is set, max junction speed is
// guaranteed to be reached. No need to recheck.
if (!previous->flag.nominal_length && previous->entry_speed_sqr < current->entry_speed_sqr) {
// Check against previous speed only on current->entry_speed_sqr changes (or if first time).
if (current->flag.recalculate) {
// If the previous block is accelerating check if it's too short to complete the full speed
// change then adjust the entry speed accordingly. Entry speeds have already been maximized.
if (previous->entry_speed_sqr < current->entry_speed_sqr) {
float new_entry_speed_sqr = max_allowable_speed_sqr(-previous->acceleration, previous->entry_speed_sqr, previous->millimeters);
// Compute the maximum allowable speed
const float new_entry_speed_sqr = max_allowable_speed_sqr(-previous->acceleration, previous->entry_speed_sqr, previous->millimeters);
// If true, current block is full-acceleration and we can move the planned pointer forward.
// If true, previous block is full-acceleration and we can move the planned pointer forward.
if (new_entry_speed_sqr < current->entry_speed_sqr) {
// Current entry speed limited by full acceleration from previous entry speed.
// Make sure entry speed not lower than minimum_planner_speed_sqr.
NOLESS(new_entry_speed_sqr, current->min_entry_speed_sqr);
current->entry_speed_sqr = new_entry_speed_sqr;
// Mark we need to recompute the trapezoidal shape, and do it now,
// so the stepper ISR does not consume the block before being recalculated
current->flag.recalculate = true;
// But there is an inherent race condition here, as the block maybe
// became BUSY, just before it was marked as RECALCULATE, so check
// if that is the case!
if (stepper.is_block_busy(current)) {
// Block became busy. Clear the RECALCULATE flag (no point in
// recalculating BUSY blocks and don't set its speed, as it can't
// be updated at this time.
current->flag.recalculate = false;
}
else {
// Block is not BUSY, we won the race against the Stepper ISR:
// Always <= max_entry_speed_sqr. Backward pass sets this.
current->entry_speed_sqr = new_entry_speed_sqr; // Always <= max_entry_speed_sqr. Backward pass sets this.
// Set optimal plan pointer.
block_buffer_planned = block_index;
}
// Set optimal plan pointer.
block_buffer_planned = block_index;
}
else {
// Previous entry speed has been maximized.
block_buffer_planned = prev_block_index(block_index);
}
}
@@ -1170,7 +1141,7 @@ void Planner::forward_pass() {
// the previous block became BUSY, so assume the current block's
// entry speed can't be altered (since that would also require
// updating the exit speed of the previous block).
if (!previous || !stepper.is_block_busy(previous))
if (previous && !stepper.is_block_busy(previous))
forward_pass_kernel(previous, block, block_index);
previous = block;
}
@@ -1458,7 +1429,7 @@ void Planner::check_axes_activity() {
*/
void Planner::autotemp_update() {
_autotemp_update_from_hotend();
autotemp.factor = TERN(AUTOTEMP_PROPORTIONAL, AUTOTEMP_FACTOR_P, 0);
autotemp.factor = TERN0(AUTOTEMP_PROPORTIONAL, AUTOTEMP_FACTOR_P);
autotemp.enabled = autotemp.factor != 0;
}
@@ -1474,7 +1445,7 @@ void Planner::check_axes_activity() {
// When AUTOTEMP_PROPORTIONAL is enabled, F0 disables autotemp.
// Normally, leaving off F also disables autotemp.
autotemp.factor = parser.seen('F') ? parser.value_float() : TERN(AUTOTEMP_PROPORTIONAL, AUTOTEMP_FACTOR_P, 0);
autotemp.factor = parser.seen('F') ? parser.value_float() : TERN0(AUTOTEMP_PROPORTIONAL, AUTOTEMP_FACTOR_P);
autotemp.enabled = autotemp.factor != 0;
}
@@ -2392,14 +2363,12 @@ bool Planner::_populate_block(
#endif
const feedRate_t cs = ABS(current_speed.e),
max_fr = settings.max_feedrate_mm_s[E_AXIS_N(extruder)]
* TERN(HAS_MIXER_SYNC_CHANNEL, MIXING_STEPPERS, 1);
max_fr = MUL_TERN(HAS_MIXER_SYNC_CHANNEL, settings.max_feedrate_mm_s[E_AXIS_N(extruder)], MIXING_STEPPERS);
if (cs > max_fr) NOMORE(speed_factor, max_fr / cs); //respect max feedrate on any movement (doesn't matter if E axes only or not)
if (cs > max_fr) NOMORE(speed_factor, max_fr / cs); // Respect max feedrate on any move (travel and print)
#if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT)
const feedRate_t max_vfr = volumetric_extruder_feedrate_limit[extruder]
* TERN(HAS_MIXER_SYNC_CHANNEL, MIXING_STEPPERS, 1);
const feedRate_t max_vfr = MUL_TERN(HAS_MIXER_SYNC_CHANNEL, volumetric_extruder_feedrate_limit[extruder], MIXING_STEPPERS);
// TODO: Doesn't work properly for joined segments. Set MIN_STEPS_PER_SEGMENT 1 as workaround.
@@ -2568,9 +2537,13 @@ bool Planner::_populate_block(
}
#endif
// The minimum possible speed is the average speed for
// the first / last step at current acceleration limit
// Formula for the average speed over a 1 step worth of distance if starting from zero and
// accelerating at the current limit. Since we can only change the speed every step this is a
// good lower limit for the entry and exit speeds. Note that for calculate_trapezoid_for_block()
// to work correctly, this must be accurately set and propagated.
minimum_planner_speed_sqr = 0.5f * block->acceleration / steps_per_mm;
// Go straight to/from nominal speed if block->acceleration is too high for it.
NOMORE(minimum_planner_speed_sqr, sq(block->nominal_speed));
float vmax_junction_sqr; // Initial limit on the segment entry velocity (mm/s)^2
@@ -2766,8 +2739,7 @@ bool Planner::_populate_block(
// Get the lowest speed
vmax_junction_sqr = _MIN(vmax_junction_sqr, sq(block->nominal_speed), sq(previous_nominal_speed));
}
else // Init entry speed to zero. Assume it starts from rest. Planner will correct this later.
vmax_junction_sqr = 0;
else vmax_junction_sqr = minimum_planner_speed_sqr;
prev_unit_vec = unit_vec;
@@ -2809,8 +2781,7 @@ bool Planner::_populate_block(
xyze_float_t speed_diff = current_speed;
float vmax_junction;
const bool start_from_zero = !moves_queued || UNEAR_ZERO(previous_nominal_speed);
if (start_from_zero) {
if (!moves_queued || UNEAR_ZERO(previous_nominal_speed)) {
// Limited by a jerk to/from full halt.
vmax_junction = block->nominal_speed;
}
@@ -2840,28 +2811,20 @@ bool Planner::_populate_block(
}
vmax_junction_sqr = sq(vmax_junction * v_factor);
if (start_from_zero) minimum_planner_speed_sqr = vmax_junction_sqr;
#endif // CLASSIC_JERK
// High acceleration limits override low jerk/junction deviation limits (as fixing trapezoids
// or reducing acceleration introduces too much complexity and/or too much compute)
NOLESS(vmax_junction_sqr, minimum_planner_speed_sqr);
// Max entry speed of this block equals the max exit speed of the previous block.
block->max_entry_speed_sqr = vmax_junction_sqr;
// Initialize block entry speed. Compute based on deceleration to sqrt(minimum_planner_speed_sqr).
const float v_allowable_sqr = max_allowable_speed_sqr(-block->acceleration, minimum_planner_speed_sqr, block->millimeters);
// Start with the minimum allowed speed
// Set entry speed. The reverse and forward passes will optimize it later.
block->entry_speed_sqr = minimum_planner_speed_sqr;
// Set min entry speed. Rarely it could be higher than the previous nominal speed but that's ok.
block->min_entry_speed_sqr = minimum_planner_speed_sqr;
// Initialize planner efficiency flags
// Set flag if block will always reach maximum junction speed regardless of entry/exit speeds.
// If a block can de/ac-celerate from nominal speed to zero within the length of the block, then
// the current block and next block junction speeds are guaranteed to always be at their maximum
// junction speeds in deceleration and acceleration, respectively. This is due to how the current
// block nominal speed limits both the current and next maximum junction speeds. Hence, in both
// the reverse and forward planners, the corresponding block junction speed will always be at the
// the maximum junction speed and may always be ignored for any speed reduction checks.
block->flag.set_nominal(sq(block->nominal_speed) <= v_allowable_sqr);
block->flag.recalculate = true;
// Update previous path unit_vector and nominal speed
previous_speed = current_speed;
+3 -10
View File
@@ -111,11 +111,6 @@ enum BlockFlagBit {
// Recalculate trapezoids on entry junction. For optimization.
BLOCK_BIT_RECALCULATE,
// Nominal speed always reached.
// i.e., The segment is long enough, so the nominal speed is reachable if accelerating
// from a safe speed (in consideration of jerking from zero speed).
BLOCK_BIT_NOMINAL_LENGTH,
// The block is segment 2+ of a longer move
BLOCK_BIT_CONTINUED,
@@ -142,8 +137,6 @@ typedef struct {
struct {
bool recalculate:1;
bool nominal_length:1;
bool continued:1;
bool sync_position:1;
@@ -166,7 +159,6 @@ typedef struct {
void apply(const uint8_t f) volatile { bits |= f; }
void apply(const BlockFlagBit b) volatile { SBI(bits, b); }
void reset(const BlockFlagBit b) volatile { bits = _BV(b); }
void set_nominal(const bool n) volatile { recalculate = true; if (n) nominal_length = true; }
} block_flags_t;
@@ -224,6 +216,7 @@ typedef struct PlannerBlock {
// Fields used by the motion planner to manage acceleration
float nominal_speed, // The nominal speed for this block in (mm/sec)
entry_speed_sqr, // Entry speed at previous-current junction in (mm/sec)^2
min_entry_speed_sqr, // Minimum allowable junction entry speed in (mm/sec)^2
max_entry_speed_sqr, // Maximum allowable junction entry speed in (mm/sec)^2
millimeters, // The total travel of this block in mm
acceleration; // acceleration mm/sec^2
@@ -255,7 +248,7 @@ typedef struct PlannerBlock {
acceleration_time_inverse, // Inverse of acceleration and deceleration periods, expressed as integer. Scale depends on CPU being used
deceleration_time_inverse;
#else
uint32_t acceleration_rate; // The acceleration rate used for acceleration calculation
uint32_t acceleration_rate; // Acceleration rate in (2^24 steps)/timer_ticks*s
#endif
AxisBits direction_bits; // Direction bits set for this block, where 1 is negative motion
@@ -634,7 +627,7 @@ class Planner {
#if HAS_EXTRUDERS
FORCE_INLINE static void refresh_e_factor(const uint8_t e) {
e_factor[e] = flow_percentage[e] * 0.01f * TERN(NO_VOLUMETRICS, 1.0f, volumetric_multiplier[e]);
e_factor[e] = flow_percentage[e] * 0.01f IF_DISABLED(NO_VOLUMETRICS, * volumetric_multiplier[e]);
}
static void set_flow(const uint8_t e, const int16_t flow) {
+1 -1
View File
@@ -999,7 +999,7 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai
default: break;
case PROBE_PT_RAISE:
if (raise_after_is_relative)
do_z_clearance(current_position.z + z_clearance, false);
do_z_clearance_by(z_clearance);
else
do_z_clearance(z_clearance);
break;
+4 -4
View File
@@ -32,8 +32,8 @@ extern float segments_per_second;
#if ENABLED(AXEL_TPARA)
float constexpr L1 = TPARA_LINKAGE_1, L2 = TPARA_LINKAGE_2, // Float constants for Robot arm calculations
L1_2 = sq(float(L1)), L1_2_2 = 2.0 * L1_2,
L2_2 = sq(float(L2));
L1_2 = FLOAT_SQ(L1), L1_2_2 = 2.0 * L1_2,
L2_2 = FLOAT_SQ(L2);
void forward_kinematics(const_float_t a, const_float_t b, const_float_t c);
void home_TPARA();
@@ -41,8 +41,8 @@ extern float segments_per_second;
#else
float constexpr L1 = SCARA_LINKAGE_1, L2 = SCARA_LINKAGE_2, // Float constants for SCARA calculations
L1_2 = sq(float(L1)), L1_2_2 = 2.0 * L1_2,
L2_2 = sq(float(L2));
L1_2 = FLOAT_SQ(L1), L1_2_2 = 2.0 * L1_2,
L2_2 = FLOAT_SQ(L2);
void forward_kinematics(const_float_t a, const_float_t b);
+2 -2
View File
@@ -2681,7 +2681,7 @@ hal_timer_t Stepper::block_phase_isr() {
#if ENABLED(ADAPTIVE_STEP_SMOOTHING)
// Nonlinear Extrusion needs at least 2x oversampling to permit increase of E step rate
// Otherwise assume no axis smoothing (via oversampling)
oversampling_factor = TERN(NONLINEAR_EXTRUSION, 1, 0);
oversampling_factor = TERN0(NONLINEAR_EXTRUSION, 1);
// Decide if axis smoothing is possible
if (stepper.adaptive_step_smoothing_enabled) {
@@ -3906,7 +3906,7 @@ void Stepper::report_positions() {
#if PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
case 1:
#endif
#if ANY_PIN(MOTOR_CURRENT_PWM_E, MOTOR_CURRENT_PWM_E0, MOTOR_CURRENT_PWM_E1)
#if HAS_MOTOR_CURRENT_PWM_E
case 2:
#endif
set_digipot_current(i, motor_current_setting[i]);
+1 -1
View File
@@ -43,7 +43,7 @@
//#define ERR_INCLUDE_TEMP
#define HOTEND_INDEX TERN(HAS_MULTI_HOTEND, e, 0)
#define HOTEND_INDEX TERN0(HAS_MULTI_HOTEND, e)
#define E_NAME TERN_(HAS_MULTI_HOTEND, e)
#if HAS_FAN
+3 -9
View File
@@ -232,9 +232,7 @@
#elif ENABLED(ANET_FULL_GRAPHICS_LCD)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ANET_FULL_GRAPHICS_LCD requires wiring modifications. See 'pins_BTT_SKR_V1_3.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_V1_3", "ANET_FULL_GRAPHICS_LCD")
/**
* 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
@@ -268,9 +266,7 @@
#elif ENABLED(WYH_L12864)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! WYH_L12864 requires wiring modifications. See 'pins_BTT_SKR_V1_3.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_V1_3", "WYH_L12864")
/**
* 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
@@ -366,9 +362,7 @@
#elif ENABLED(MKS_TS35_V2_0)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! MKS_TS35_V2_0 requires wiring modifications. The SKR 1.3 EXP ports are rotated 180° from what the MKS_TS35_V2_0 expects. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this error.)"
#endif
CONTROLLER_WARNING("BTT_SKR_V1_3", "MKS_TS35_V2_0", " The SKR 1.3 EXP ports are rotated 180°.")
/** ------ ------
* BEEPER | 1 2 | BTN_ENC SPI1_MISO | 1 2 | SPI1_SCK
+3 -9
View File
@@ -296,9 +296,7 @@
#elif HAS_WIRED_LCD
#if ENABLED(CTC_A10S_A13)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! CTC_A10S_A13 requires wiring modifications. See 'pins_BTT_SKR_V1_4.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_V1_4", "CTC_A10S_A13")
/**
* 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
@@ -330,9 +328,7 @@
#define BEEPER_PIN EXP1_08_PIN
#elif ENABLED(ANET_FULL_GRAPHICS_LCD)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ANET_FULL_GRAPHICS_LCD requires wiring modifications. See 'pins_BTT_SKR_V1_4.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_V1_4", "ANET_FULL_GRAPHICS_LCD")
/**
* 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
@@ -450,9 +446,7 @@
#elif ENABLED(MKS_TS35_V2_0)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! MKS_TS35_V2_0 requires wiring modifications. The SKR 1.4 EXP ports are rotated 180° from what the MKS_TS35_V2_0 expects. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this error.)"
#endif
CONTROLLER_WARNING("BTT_SKR_V1_4", "MKS_TS35_V2_0", " The SKR 1.4 EXP ports are rotated 180°.")
/** ------ ------
* BEEPER | 1 2 | BTN_ENC SPI1_MISO | 1 2 | SPI1_SCK
+1 -3
View File
@@ -307,9 +307,7 @@
#elif ENABLED(ZONESTAR_LCD)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ZONESTAR_LCD on REARM requires wiring modifications. NB. ADCs are not 5V tolerant. See 'pins_RAMPS_RE_ARM.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("RAMPS_RE_ARM", "ZONESTAR_LCD", " ADCs are not 5V tolerant.")
#elif IS_TFTGLCD_PANEL
@@ -218,9 +218,8 @@
#define EXP1_08_PIN P0_18
#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! Ender-3 V2 display requires a custom cable with TX = P0_15, RX = P0_16. See 'pins_BTT_SKR_E3_TURBO.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_E3_TURBO", "Ender-3 V2 display", " Requires a custom cable with TX = P0_15, RX = P0_16.")
/**
* Ender-3 V2 display SKR E3 Turbo (EXP1) Ender-3 V2 display --> SKR E3 Turbo
@@ -254,9 +253,7 @@
#elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD!
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_SKR_E3_TURBO.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_E3_TURBO", "ZONESTAR_LCD")
#define LCD_PINS_RS EXP1_06_PIN
#define LCD_PINS_EN EXP1_02_PIN
+9
View File
@@ -123,6 +123,12 @@
#define NOT_TARGET NONE
#endif
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#define CONTROLLER_WARNING(PF,CN,V...) static_assert(false, "\n\nWARNING! " CN " requires wiring modification! See pins_" PF ".h for details." V "\n (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)\n\n");
#else
#define CONTROLLER_WARNING(...)
#endif
//
// RAMPS 1.3 / 1.4 / 1.6+ - ATmega1280, ATmega2560
//
@@ -1071,3 +1077,6 @@
// Post-process pins according to configured settings
//
#include "pins_postprocess.h"
// Cleanup
#undef CONTROLLER_WARNING
+40
View File
@@ -1736,3 +1736,43 @@
#define NEOPIXEL_PIN BOARD_NEOPIXEL_PIN
#endif
#endif
// Undefine motor PWM pins for nonexistent axes since the existence of a MOTOR_CURRENT_PWM_*_PIN implies its standard use.
// TODO: Allow remapping (e.g., E => Z2). Spec G-codes to use logical axis with index (e.g., to set Z2: Mxxx Z P1 Snnn).
#if !HAS_X_AXIS
#undef MOTOR_CURRENT_PWM_X_PIN
#endif
#if !HAS_Y_AXIS
#undef MOTOR_CURRENT_PWM_Y_PIN
#endif
#if !HAS_X_AXIS && !HAS_Y_AXIS
#undef MOTOR_CURRENT_PWM_XY_PIN
#endif
#if !HAS_Z_AXIS
#undef MOTOR_CURRENT_PWM_Z_PIN
#endif
#if !HAS_I_AXIS
#undef MOTOR_CURRENT_PWM_I_PIN
#endif
#if !HAS_J_AXIS
#undef MOTOR_CURRENT_PWM_J_PIN
#endif
#if !HAS_K_AXIS
#undef MOTOR_CURRENT_PWM_K_PIN
#endif
#if !HAS_U_AXIS
#undef MOTOR_CURRENT_PWM_U_PIN
#endif
#if !HAS_V_AXIS
#undef MOTOR_CURRENT_PWM_V_PIN
#endif
#if !HAS_W_AXIS
#undef MOTOR_CURRENT_PWM_W_PIN
#endif
#if !HAS_EXTRUDERS
#undef MOTOR_CURRENT_PWM_E_PIN
#undef MOTOR_CURRENT_PWM_E0_PIN // Archim 1.0
#undef MOTOR_CURRENT_PWM_E1_PIN // Kept in sync with E0
#elif !HAS_MULTI_EXTRUDER
#undef MOTOR_CURRENT_PWM_E1_PIN
#endif
+2 -6
View File
@@ -645,9 +645,7 @@
#elif ENABLED(ZONESTAR_LCD)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ZONESTAR_LCD on RAMPS requires wiring modifications. It plugs into AUX2 but GND and 5V need to be swapped. See 'pins_RAMPS.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("RAMPS", "ZONESTAR_LCD", " Plugs into AUX2 but GND and 5V must be swapped.")
#define LCD_PINS_RS AUX2_05
#define LCD_PINS_EN AUX2_07
@@ -936,9 +934,7 @@
#if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_RAMPS.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("RAMPS", "LCD_FYSETC_TFT81050")
/**
* FYSETC TFT-81050 display pinout
+2 -6
View File
@@ -465,9 +465,7 @@
#elif ENABLED(ZONESTAR_LCD)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ZONESTAR_LCD on RAMPS requires wiring modifications. It plugs into AUX2 but GND and 5V need to be swapped. See 'pins_RAMPS.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("RAMPS_144", "ZONESTAR_LCD", " Plugs into AUX2 but GND and 5V must be swapped.")
#define LCD_PINS_RS AUX2_05
#define LCD_PINS_EN AUX2_07
@@ -749,9 +747,7 @@
#if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_RAMPS.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("RAMPS_144", "LCD_FYSETC_TFT81050")
/**
* FYSETC TFT-81050 display pinout
@@ -212,9 +212,7 @@
#elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD!
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_DIP.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_E3_DIP", "ZONESTAR_LCD")
#define LCD_PINS_RS EXP1_06_PIN
#define LCD_PINS_EN EXP1_02_PIN
@@ -250,9 +248,8 @@
#elif ENABLED(FYSETC_MINI_12864_2_1)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! FYSETC_MINI_12864_2_1 and it's clones require wiring modifications. See 'pins_BTT_SKR_MINI_E3_DIP.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_E3_DIP", "FYSETC_MINI_12864_2_1 and clones")
#if SD_CONNECTION_IS(LCD)
#error "The LCD SD Card is not supported with this configuration."
#endif
@@ -318,9 +315,7 @@
#if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_BTT_SKR_E3_DIP.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_E3_DIP", "LCD_FYSETC_TFT81050")
/** FYSETC TFT TFT81050 display pinout
*
@@ -156,6 +156,9 @@
#define TFT_03 PA2
#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
CONTROLLER_WARNING("BTT_SKR_MINI_E3_common", "Ender-3 V2 display")
/**
* ------ ------ ------
* (ENT) | 1 2 | (BEEP) |10 9 | |10 9 |
@@ -169,10 +172,6 @@
* All pins are labeled as printed on DWIN PCB. Connect TX-TX, A-A and so on.
*/
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! Ender-3 V2 display requires a custom cable. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
#define BEEPER_PIN EXP1_02_PIN
#define BTN_EN1 EXP1_08_PIN
#define BTN_EN2 EXP1_07_PIN
@@ -194,9 +193,7 @@
#elif ENABLED(LCD_FOR_MELZI)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! LCD for Melzi v4 display requires a custom cable. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_MINI_E3_common", "LCD for Melzi v4", " Requires a custom cable.")
/**
* LCD for Melzi v4 needs a custom cable with reversed GND/5V pins; plugging in a standard cable may damage the board or LCD!
@@ -225,9 +222,7 @@
#elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD!
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_MINI_E3_common", "ZONESTAR_LCD")
#define LCD_PINS_RS EXP1_06_PIN
#define LCD_PINS_EN EXP1_02_PIN
@@ -255,9 +250,7 @@
#if ENABLED(TFTGLCD_PANEL_SPI)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! TFTGLCD_PANEL_SPI requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_MINI_E3_common", "TFTGLCD_PANEL_SPI")
/**
* TFTGLCD_PANEL_SPI display pinout
@@ -294,9 +287,7 @@
#elif ENABLED(FYSETC_MINI_12864_2_1)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 / BEEZ_MINI_12864 requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_MINI_E3_common", "FYSETC_MINI_12864_2_1 and clones")
/**
* FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 / BEEZ_MINI_12864 display pinout
@@ -364,9 +355,7 @@
#if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_MINI_E3_common", "LCD_FYSETC_TFT81050")
/**
* FYSETC TFT TFT81050 display pinout
+1 -3
View File
@@ -253,9 +253,7 @@
#elif ENABLED(FYSETC_MINI_12864_2_1)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! FYSETC_MINI_12864_2_1 and clones require wiring modifications. See 'pins_CREALITY_V4.h' for details. Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning."
#endif
CONTROLLER_WARNING("CREALITY_V4", "FYSETC_MINI_12864_2_1 and clones")
#if SD_CONNECTION_IS(LCD)
#error "The LCD SD Card is not connected with this configuration."
+1 -3
View File
@@ -181,9 +181,7 @@
#if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_PANDA_PI_V29.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("PANDA_PI_V29", "LCD_FYSETC_TFT81050")
/** FYSETC TFT TFT81050 display pinout
*
+4 -12
View File
@@ -223,9 +223,7 @@
#if ENABLED(LCD_FOR_MELZI)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! LCD_FOR_MELZI requires wiring modifications. See 'pins_BTT_E3_RRF.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_E3_RRF", "LCD_FOR_MELZI")
/** LCD_FOR_MELZI display pinout
*
@@ -259,9 +257,7 @@
#elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD!
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_E3_RRF.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_E3_RRF", "ZONESTAR_LCD")
#define LCD_PINS_RS EXP1_06_PIN
#define LCD_PINS_EN EXP1_02_PIN
@@ -289,9 +285,7 @@
#if ENABLED(TFTGLCD_PANEL_SPI)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! TFTGLCD_PANEL_SPI requires wiring modifications. See 'pins_BTT_E3_RRF.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_E3_RRF", "TFTGLCD_PANEL_SPI")
/**
* TFTGLCD_PANEL_SPI display pinout
@@ -345,9 +339,7 @@
#if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_BTT_E3_RRF.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_E3_RRF", "LCD_FYSETC_TFT81050")
/** FYSETC TFT TFT81050 display pinout
*
@@ -442,9 +442,7 @@
* orientation as the existing plug/DWIN to EXP1. TX/RX need to be connected to the TFT port, with TX->RX, RX->TX.
*/
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! Ender-3 V2 display requires a custom cable. See 'pins_BTT_OCTOPUS_V1_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_OCTOPUS_V1_common", "Ender-3 V2 display")
#define BEEPER_PIN EXP1_06_PIN
#define BTN_EN1 EXP1_08_PIN
@@ -218,9 +218,7 @@
#elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD!
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_MINI_E3_V3_0_1", "ZONESTAR_LCD")
#define LCD_PINS_RS EXP1_06_PIN
#define LCD_PINS_EN EXP1_02_PIN
@@ -248,9 +246,7 @@
#if ENABLED(TFTGLCD_PANEL_SPI)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! TFTGLCD_PANEL_SPI requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_MINI_E3_V3_0_1", "TFTGLCD_PANEL_SPI")
/**
* TFTGLCD_PANEL_SPI display pinout
@@ -293,9 +289,7 @@
#if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_MINI_E3_V3_0_1", "LCD_FYSETC_TFT81050")
/**
* FYSETC TFT TFT81050 display pinout
@@ -465,9 +465,7 @@
#elif ENABLED(WYH_L12864)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! WYH_L12864 requires wiring modifications. See 'pins_BTT_SKR_PRO_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_PRO_common", "WYH_L12864")
/**
* 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
+1 -3
View File
@@ -513,9 +513,7 @@
#elif ENABLED(WYH_L12864)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! WYH_L12864 requires wiring modifications. See 'pins_I3DBEEZ9.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("I3DBEEZ9", "WYH_L12864")
/**
* 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
@@ -262,9 +262,7 @@
* (EXP1-8) PA1 <-----------> A (DWIN-8)
* (EXP1-10) 5V <-----------> VCC (DWIN-10)
*/
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! Ender-3 V2 display requires a custom cable with TX = PA0, RX = PC2. See 'pins_BTT_MANTA_E3_EZ_V1_0.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_MANTA_E3_EZ_V1_0", "Ender-3 V2 display", " Requires a custom cable with TX = PA0, RX = PC2.")
#define BEEPER_PIN EXP1_01_PIN
#define BTN_EN1 EXP1_08_PIN
@@ -287,9 +285,7 @@
#elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD!
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_MANTA_E3_EZ_V1_0.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_MANTA_E3_EZ_V1_0", "ZONESTAR_LCD")
#define LCD_PINS_RS EXP1_06_PIN
#define LCD_PINS_EN EXP1_02_PIN
@@ -201,9 +201,7 @@
* All pins are labeled as printed on DWIN PCB. Connect TX-TX, A-A and so on.
*/
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! DWIN_CREALITY_LCD requires a custom cable, see diagram above this line. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_MINI_E3_V3_0", "DWIN_CREALITY_LCD", " Requires a custom cable.")
#define BEEPER_PIN EXP1_02_PIN
#define BTN_EN1 EXP1_08_PIN
@@ -268,9 +266,7 @@
#elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD!
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_MINI_E3_V3_0", "ZONESTAR_LCD")
#define LCD_PINS_RS EXP1_06_PIN
#define LCD_PINS_EN EXP1_02_PIN
@@ -298,9 +294,7 @@
#if ENABLED(TFTGLCD_PANEL_SPI)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! TFTGLCD_PANEL_SPI requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_MINI_E3_V3_0", "TFTGLCD_PANEL_SPI")
/**
* TFTGLCD_PANEL_SPI display pinout
@@ -337,9 +331,7 @@
#elif ENABLED(FYSETC_MINI_12864_2_1)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! FYSETC_MINI_12864_2_1 and clones require wiring modifications. See 'pins_BTT_SKR_MINI_E3_V3_0.h' for details. Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning."
#endif
CONTROLLER_WARNING("BTT_SKR_MINI_E3_V3_0", "FYSETC_MINI_12864_2_1 and clones")
/**
*
@@ -391,9 +383,7 @@
#if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_SKR_MINI_E3_V3_0", "LCD_FYSETC_TFT81050")
/**
* FYSETC TFT TFT81050 display pinout
@@ -478,9 +478,7 @@
* orientation as the existing plug/DWIN to EXP1. TX/RX need to be connected to the TFT port, with TX->RX, RX->TX.
*/
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! Ender-3 V2 display requires a custom cable. See 'pins_BTT_OCTOPUS_V1_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_KRAKEN_V1_0", "Ender-3 V2 display")
#define BEEPER_PIN EXP1_06_PIN
#define BTN_EN1 EXP1_08_PIN
@@ -447,9 +447,7 @@
* orientation as the existing plug/DWIN to EXP1. TX/RX need to be connected to the TFT port, with TX->RX, RX->TX.
*/
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! Ender-3 V2 display requires a custom cable. See 'pins_BTT_OCTOPUS_V1_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
CONTROLLER_WARNING("BTT_OCTOPUS_PRO_V1_common", "Ender-3 V2 display")
#define BEEPER_PIN EXP1_06_PIN
#define BTN_EN1 EXP1_08_PIN
@@ -14,7 +14,7 @@
"maximum_ram_size": 8192,
"maximum_size": 122880,
"require_upload_port": true,
"protocol": ""
"protocol": "teensy-gui"
},
"url": "https://github.com/MarlinFirmware/Marlin",
"vendor": "various"