mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2026-01-05 06:07:43 -07:00
Merge branch 'bugfix-2.1.x' into bugfix-2.1.x-September1
This commit is contained in:
commit
d7c923467f
129 changed files with 1918 additions and 1773 deletions
|
|
@ -1661,7 +1661,7 @@
|
|||
* Nozzle-to-Probe offsets { X, Y, Z }
|
||||
*
|
||||
* X and Y offset
|
||||
* Use a caliper or ruler to measure the distance from the tip of
|
||||
* Use a caliper or ruler to measure the distance (in mm) from the tip of
|
||||
* the Nozzle to the center-point of the Probe in the X and Y axes.
|
||||
*
|
||||
* Z offset
|
||||
|
|
@ -1697,7 +1697,7 @@
|
|||
* | [-] |
|
||||
* O-- FRONT --+
|
||||
*/
|
||||
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
|
||||
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 } // (mm) X, Y, Z distance from Nozzle tip to Probe trigger-point
|
||||
|
||||
// Enable and set to use a specific tool for probing. Disable to allow any tool.
|
||||
#define PROBING_TOOL 0
|
||||
|
|
|
|||
|
|
@ -1160,13 +1160,27 @@
|
|||
#if ENABLED(FT_MOTION)
|
||||
//#define FTM_IS_DEFAULT_MOTION // Use FT Motion as the factory default?
|
||||
//#define FT_MOTION_MENU // Provide a MarlinUI menu to set M493 and M494 parameters
|
||||
//#define FTM_HOME_AND_PROBE // Use FT Motion for homing / probing. Disable if FT Motion breaks these functions.
|
||||
|
||||
//#define NO_STANDARD_MOTION // Disable the standard motion system entirely to save Flash and RAM
|
||||
#if DISABLED(NO_STANDARD_MOTION)
|
||||
//#define FTM_HOME_AND_PROBE // Use FT Motion for homing / probing. Disable if FT Motion breaks these functions.
|
||||
#endif
|
||||
|
||||
//#define FTM_DYNAMIC_FREQ // Enable for linear adjustment of XY shaping frequency according to Z or E
|
||||
#if ENABLED(FTM_DYNAMIC_FREQ)
|
||||
#define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (DISABLED, Z_BASED, MASS_BASED)
|
||||
#endif
|
||||
|
||||
// Disable unused shapers if you need more free space
|
||||
#define FTM_SHAPER_ZV
|
||||
#define FTM_SHAPER_ZVD
|
||||
#define FTM_SHAPER_ZVDD
|
||||
#define FTM_SHAPER_ZVDDD
|
||||
#define FTM_SHAPER_EI
|
||||
#define FTM_SHAPER_2HEI
|
||||
#define FTM_SHAPER_3HEI
|
||||
#define FTM_SHAPER_MZV
|
||||
|
||||
#define FTM_DEFAULT_SHAPER_X ftMotionShaper_NONE // Default shaper mode on X axis (NONE, ZV, ZVD, ZVDD, ZVDDD, EI, 2HEI, 3HEI, MZV)
|
||||
#define FTM_SHAPING_DEFAULT_FREQ_X 37.0f // (Hz) Default peak frequency used by input shapers
|
||||
#define FTM_SHAPING_ZETA_X 0.1f // Zeta used by input shapers for X axis
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
//#define STRING_DISTRIBUTION_DATE "2025-12-07"
|
||||
//#define STRING_DISTRIBUTION_DATE "2025-12-14"
|
||||
|
||||
/**
|
||||
* The protocol for communication to the host. Protocol indicates communication
|
||||
|
|
|
|||
|
|
@ -50,10 +50,9 @@ typedef uint16_t hal_timer_t;
|
|||
|
||||
#define STEPPER_TIMER_RATE HAL_TIMER_RATE
|
||||
#define STEPPER_TIMER_PRESCALE 8
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000UL)
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000UL) // (MHz) Stepper Timer ticks per µs
|
||||
|
||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // (Hz) Frequency of Pulse Timer
|
||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
|
||||
#define ENABLE_STEPPER_DRIVER_INTERRUPT() SBI(TIMSK1, OCIE1A)
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@ typedef uint32_t hal_timer_t;
|
|||
#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / STEPPER_TIMER_TICKS_PER_US)
|
||||
|
||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // (Hz) Frequency of Pulse Timer
|
||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
|
||||
#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_STEP)
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ void MarlinHAL::adc_start(const pin_t pin) {
|
|||
uint32_t mv;
|
||||
esp_adc_cal_get_voltage((adc_channel_t)chan, &characteristics[attenuations[chan]], &mv);
|
||||
|
||||
adc_result = mv * isr_float_t(1023) / isr_float_t(ADC_REFERENCE_VOLTAGE) / isr_float_t(1000);
|
||||
adc_result = (mv * 1023) * (1000.f / (ADC_REFERENCE_VOLTAGE));
|
||||
|
||||
// Change the attenuation level based on the new reading
|
||||
adc_atten_t atten;
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@
|
|||
// Types
|
||||
// ------------------------
|
||||
|
||||
typedef double isr_float_t; // FPU ops are used for single-precision, so use double for ISRs.
|
||||
typedef int16_t pin_t;
|
||||
|
||||
typedef struct pwm_pin {
|
||||
|
|
|
|||
|
|
@ -156,38 +156,43 @@ void stepperTask(void *parameter) {
|
|||
|
||||
while (dma.rw_pos < DMA_SAMPLE_COUNT) {
|
||||
|
||||
#if ENABLED(FT_MOTION)
|
||||
if (using_ftMotion) {
|
||||
|
||||
if (using_ftMotion) {
|
||||
#if ENABLED(FT_MOTION)
|
||||
if (!nextMainISR) stepper.ftMotion_stepper();
|
||||
nextMainISR = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
|
||||
if (!using_ftMotion) {
|
||||
if (!nextMainISR) {
|
||||
stepper.pulse_phase_isr();
|
||||
nextMainISR = stepper.block_phase_isr();
|
||||
}
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
else if (!nextAdvanceISR) {
|
||||
stepper.advance_isr();
|
||||
nextAdvanceISR = stepper.la_interval;
|
||||
#if HAS_STANDARD_MOTION
|
||||
|
||||
if (!nextMainISR) {
|
||||
stepper.pulse_phase_isr();
|
||||
nextMainISR = stepper.block_phase_isr();
|
||||
}
|
||||
#endif
|
||||
else
|
||||
i2s_push_sample();
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
else if (!nextAdvanceISR) {
|
||||
stepper.advance_isr();
|
||||
nextAdvanceISR = stepper.la_interval;
|
||||
}
|
||||
#endif
|
||||
else
|
||||
i2s_push_sample();
|
||||
|
||||
nextMainISR--;
|
||||
nextMainISR--;
|
||||
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
if (nextAdvanceISR == stepper.LA_ADV_NEVER)
|
||||
nextAdvanceISR = stepper.la_interval;
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
if (nextAdvanceISR == stepper.LA_ADV_NEVER)
|
||||
nextAdvanceISR = stepper.la_interval;
|
||||
|
||||
if (nextAdvanceISR && nextAdvanceISR != stepper.LA_ADV_NEVER)
|
||||
nextAdvanceISR--;
|
||||
#endif
|
||||
|
||||
#endif // HAS_STANDARD_MOTION
|
||||
|
||||
if (nextAdvanceISR && nextAdvanceISR != stepper.LA_ADV_NEVER)
|
||||
nextAdvanceISR--;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ typedef uint64_t hal_timer_t;
|
|||
#define STEP_TIMER_MIN_INTERVAL 8 // minimum time in µs between stepper interrupts
|
||||
|
||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // (Hz) Frequency of Pulse Timer
|
||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
|
||||
#define TONE_TIMER_PRESCALE 1000 // Arbitrary value, no idea what i'm doing here
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@
|
|||
#define __bss_end __bss_end__
|
||||
|
||||
// Types
|
||||
typedef double isr_float_t; // FPU ops are used for single-precision, so use double for ISRs.
|
||||
typedef uint8_t pin_t; // Parity with mfl platform
|
||||
|
||||
// Servo
|
||||
|
|
|
|||
|
|
@ -121,9 +121,10 @@ void HAL_timer_start(const uint8_t timer_number, const uint32_t frequency) {
|
|||
|
||||
if (is_step) {
|
||||
timer.setPrescaler(STEPPER_TIMER_PRESCALE);
|
||||
timer.setRolloverValue(_MIN(static_cast<hal_timer_t>(HAL_TIMER_TYPE_MAX),
|
||||
(HAL_TIMER_RATE) / (STEPPER_TIMER_PRESCALE)),
|
||||
TimerFormat::TICK);
|
||||
timer.setRolloverValue(
|
||||
_MIN(HAL_TIMER_TYPE_MAX, hal_timer_t((HAL_TIMER_RATE) / (STEPPER_TIMER_PRESCALE))),
|
||||
TimerFormat::TICK
|
||||
);
|
||||
is_step_timer_initialized = true;
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@ extern uint32_t GetStepperTimerClkFreq();
|
|||
#define STEPPER_TIMER_PRESCALE (GetStepperTimerClkFreq() / STEPPER_TIMER_RATE) // Prescaler = 30
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000UL) // (MHz) Stepper Timer ticks per µs
|
||||
|
||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // (Hz) Frequency of Pulse Timer
|
||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||
// Pulse Timer (counter) calculations
|
||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // (Hz) Frequency of Pulse Timer
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
|
||||
// Timer interrupt priorities
|
||||
|
|
|
|||
|
|
@ -69,9 +69,9 @@ extern Timer0 step_timer;
|
|||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000UL) // Integer 3
|
||||
|
||||
// Pulse timer (== stepper timer)
|
||||
#define MF_TIMER_PULSE MF_TIMER_STEP
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||
#define MF_TIMER_PULSE MF_TIMER_STEP
|
||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // (Hz) Frequency of Pulse Timer
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
|
||||
//
|
||||
// HAL functions
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ typedef uint32_t hal_timer_t;
|
|||
#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / STEPPER_TIMER_TICKS_PER_US)
|
||||
|
||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // (Hz) Frequency of Pulse Timer
|
||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
|
||||
#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_STEP)
|
||||
|
|
|
|||
|
|
@ -77,12 +77,11 @@ typedef uint32_t hal_timer_t;
|
|||
#define TEMP_TIMER_RATE 1000000 // 1MHz
|
||||
#define TEMP_TIMER_FREQUENCY 1000 // (Hz) Temperature ISR frequency
|
||||
|
||||
#define STEPPER_TIMER_RATE HAL_TIMER_RATE // (Hz) Frequency of stepper timer (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE)
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000UL) // (MHz) Stepper Timer ticks per µs
|
||||
#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / STEPPER_TIMER_TICKS_PER_US)
|
||||
#define STEPPER_TIMER_RATE HAL_TIMER_RATE // (Hz) Frequency of stepper timer (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE)
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000UL) // (MHz) Stepper Timer ticks per µs
|
||||
#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / STEPPER_TIMER_TICKS_PER_US)
|
||||
|
||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // (Hz) Frequency of Pulse Timer
|
||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
|
||||
#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_STEP)
|
||||
|
|
|
|||
|
|
@ -55,12 +55,11 @@ typedef uint64_t hal_timer_t;
|
|||
#define TEMP_TIMER_RATE 1'000'000 // (Hz) Temperature Timer count rate
|
||||
#define TEMP_TIMER_FREQUENCY 1000 // (Hz) Temperature ISR call frequency
|
||||
|
||||
#define STEPPER_TIMER_RATE HAL_TIMER_RATE // (Hz) Frequency of Stepper Timer (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE)
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1'000'000) // (MHz) Stepper Timer ticks per µs
|
||||
#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / STEPPER_TIMER_TICKS_PER_US)
|
||||
#define STEPPER_TIMER_RATE HAL_TIMER_RATE // (Hz) Frequency of Stepper Timer (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE)
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1'000'000) // (MHz) Stepper Timer ticks per µs
|
||||
#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / STEPPER_TIMER_TICKS_PER_US)
|
||||
|
||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // (Hz) Frequency of Pulse Timer
|
||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
|
||||
#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_STEP)
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ typedef uint64_t hal_timer_t;
|
|||
#define STEPPER_TIMER_PRESCALE (10)
|
||||
|
||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // (Hz) Frequency of Pulse Timer
|
||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
|
||||
#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_STEP)
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ typedef uint32_t hal_timer_t;
|
|||
#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / STEPPER_TIMER_TICKS_PER_US)
|
||||
|
||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // (Hz) Frequency of Pulse Timer
|
||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
|
||||
#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_STEP)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@ typedef uint32_t hal_timer_t;
|
|||
#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / STEPPER_TIMER_TICKS_PER_US)
|
||||
|
||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // (Hz) Frequency of Pulse Timer
|
||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
|
||||
#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_STEP)
|
||||
|
|
|
|||
|
|
@ -63,8 +63,6 @@
|
|||
// Types
|
||||
// ------------------------
|
||||
|
||||
typedef double isr_float_t; // FPU ops are used for single-precision, so use double for ISRs.
|
||||
|
||||
typedef int32_t pin_t; // Parity with platform/ststm32
|
||||
|
||||
class libServo;
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
|
|||
*/
|
||||
|
||||
timer_instance[timer_num]->setPrescaleFactor(STEPPER_TIMER_PRESCALE); //the -1 is done internally
|
||||
timer_instance[timer_num]->setOverflow(_MIN(hal_timer_t(HAL_TIMER_TYPE_MAX), (HAL_TIMER_RATE) / (STEPPER_TIMER_PRESCALE) /* /frequency */), TICK_FORMAT);
|
||||
timer_instance[timer_num]->setOverflow(_MIN(HAL_TIMER_TYPE_MAX, hal_timer_t((HAL_TIMER_RATE) / (STEPPER_TIMER_PRESCALE) /* / frequency */)), TICK_FORMAT);
|
||||
break;
|
||||
case MF_TIMER_TEMP: // TEMP TIMER - any available 16bit timer
|
||||
timer_instance[timer_num] = new HardwareTimer(TEMP_TIMER_DEV);
|
||||
|
|
|
|||
|
|
@ -56,8 +56,8 @@ extern uint32_t GetStepperTimerClkFreq();
|
|||
#define STEPPER_TIMER_PRESCALE (GetStepperTimerClkFreq() / (STEPPER_TIMER_RATE))
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000UL) // (MHz) Stepper Timer ticks per µs
|
||||
|
||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // (Hz) Frequency of Pulse Timer
|
||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||
// Pulse Timer (counter) calculations
|
||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // (Hz) Frequency of Pulse Timer
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
|
||||
#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_STEP)
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
|
|||
timer_set_prescaler(STEP_TIMER_DEV, (uint16_t)(STEPPER_TIMER_PRESCALE - 1));
|
||||
timer_set_reload(STEP_TIMER_DEV, 0xFFFF);
|
||||
timer_oc_set_mode(STEP_TIMER_DEV, STEP_TIMER_CHAN, TIMER_OC_MODE_FROZEN, TIMER_OC_NO_PRELOAD); // no output pin change
|
||||
timer_set_compare(STEP_TIMER_DEV, STEP_TIMER_CHAN, _MIN(hal_timer_t(HAL_TIMER_TYPE_MAX), (STEPPER_TIMER_RATE) / frequency));
|
||||
timer_set_compare(STEP_TIMER_DEV, STEP_TIMER_CHAN, _MIN(HAL_TIMER_TYPE_MAX, hal_timer_t((STEPPER_TIMER_RATE) / frequency)));
|
||||
timer_no_ARR_preload_ARPE(STEP_TIMER_DEV); // Need to be sure no preload on ARR register
|
||||
timer_attach_interrupt(STEP_TIMER_DEV, STEP_TIMER_CHAN, stepTC_Handler);
|
||||
HAL_timer_set_interrupt_priority(MF_TIMER_STEP, STEP_TIMER_IRQ_PRIO);
|
||||
|
|
@ -97,7 +97,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
|
|||
timer_set_count(TEMP_TIMER_DEV, 0);
|
||||
timer_set_prescaler(TEMP_TIMER_DEV, (uint16_t)(TEMP_TIMER_PRESCALE - 1));
|
||||
timer_set_reload(TEMP_TIMER_DEV, 0xFFFF);
|
||||
timer_set_compare(TEMP_TIMER_DEV, TEMP_TIMER_CHAN, _MIN(hal_timer_t(HAL_TIMER_TYPE_MAX), (F_CPU) / (TEMP_TIMER_PRESCALE) / frequency));
|
||||
timer_set_compare(TEMP_TIMER_DEV, TEMP_TIMER_CHAN, _MIN(HAL_TIMER_TYPE_MAX, hal_timer_t((F_CPU) / (TEMP_TIMER_PRESCALE) / frequency)));
|
||||
timer_attach_interrupt(TEMP_TIMER_DEV, TEMP_TIMER_CHAN, tempTC_Handler);
|
||||
HAL_timer_set_interrupt_priority(MF_TIMER_TEMP, TEMP_TIMER_IRQ_PRIO);
|
||||
timer_generate_update(TEMP_TIMER_DEV);
|
||||
|
|
|
|||
|
|
@ -103,7 +103,6 @@ typedef uint16_t hal_timer_t;
|
|||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000UL) // (MHz) Stepper Timer ticks per µs
|
||||
|
||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // (Hz) Frequency of Pulse Timer
|
||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
|
||||
timer_dev* HAL_get_timer_dev(int number);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,5 @@ class libServo : public Servo {
|
|||
void move(const int value);
|
||||
private:
|
||||
typedef Servo super;
|
||||
uint16_t min_ticks;
|
||||
uint16_t max_ticks;
|
||||
uint8_t servoIndex; // index into the channel data for this servo
|
||||
};
|
||||
|
|
|
|||
|
|
@ -59,11 +59,10 @@ typedef uint32_t hal_timer_t;
|
|||
#define TEMP_TIMER_FREQUENCY 1000
|
||||
|
||||
#define STEPPER_TIMER_RATE HAL_TIMER_RATE
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000UL)
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000UL) // (MHz) Stepper Timer ticks per µs
|
||||
#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / STEPPER_TIMER_TICKS_PER_US)
|
||||
|
||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // (Hz) Frequency of Pulse Timer
|
||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
|
||||
#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_STEP)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,5 @@ class libServo : public Servo {
|
|||
void move(const int value);
|
||||
private:
|
||||
typedef Servo super;
|
||||
uint16_t min_ticks;
|
||||
uint16_t max_ticks;
|
||||
uint8_t servoIndex; // Index into the channel data for this servo
|
||||
};
|
||||
|
|
|
|||
|
|
@ -59,11 +59,10 @@ typedef uint32_t hal_timer_t;
|
|||
#define TEMP_TIMER_FREQUENCY 1000
|
||||
|
||||
#define STEPPER_TIMER_RATE HAL_TIMER_RATE
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000UL)
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000UL) // (MHz) Stepper Timer ticks per µs
|
||||
#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / STEPPER_TIMER_TICKS_PER_US)
|
||||
|
||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // (Hz) Frequency of Pulse Timer
|
||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
|
||||
#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_STEP)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,5 @@ class libServo : public PWMServo {
|
|||
private:
|
||||
typedef PWMServo super;
|
||||
uint8_t servoPin;
|
||||
uint16_t min_ticks;
|
||||
uint16_t max_ticks;
|
||||
uint8_t servoIndex; // Index into the channel data for this servo
|
||||
};
|
||||
|
|
|
|||
|
|
@ -57,13 +57,12 @@ typedef uint32_t hal_timer_t;
|
|||
#define TEMP_TIMER_RATE 1000000
|
||||
#define TEMP_TIMER_FREQUENCY 1000
|
||||
|
||||
#define HAL_TIMER_RATE GPT1_TIMER_RATE
|
||||
#define STEPPER_TIMER_RATE HAL_TIMER_RATE
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000UL)
|
||||
#define STEPPER_TIMER_PRESCALE (GPT_TIMER_RATE / STEPPER_TIMER_RATE)
|
||||
#define HAL_TIMER_RATE GPT1_TIMER_RATE
|
||||
#define STEPPER_TIMER_RATE HAL_TIMER_RATE
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000UL)
|
||||
#define STEPPER_TIMER_PRESCALE (GPT_TIMER_RATE / STEPPER_TIMER_RATE)
|
||||
|
||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // (Hz) Frequency of Pulse Timer
|
||||
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
|
||||
#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_STEP)
|
||||
|
|
|
|||
|
|
@ -74,11 +74,11 @@
|
|||
#endif
|
||||
|
||||
#if HAS_DWIN_E3V2
|
||||
#include "lcd/e3v2/common/encoder.h"
|
||||
#include "lcd/dwin/common/encoder.h"
|
||||
#if ENABLED(DWIN_CREALITY_LCD)
|
||||
#include "lcd/e3v2/creality/dwin.h"
|
||||
#include "lcd/dwin/creality/dwin.h"
|
||||
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
|
||||
#include "lcd/e3v2/jyersui/dwin.h"
|
||||
#include "lcd/dwin/jyersui/dwin.h"
|
||||
#elif ENABLED(SOVOL_SV06_RTS)
|
||||
#include "lcd/sovol_rts/sovol_rts.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -177,6 +177,7 @@ template <class L, class R> struct IF<true, L, R> { typedef L type; };
|
|||
#define CARTES_CODE(x,y,z,e) XYZ_CODE(x,y,z) CODE_ITEM_E(e)
|
||||
#define CARTES_GANG(x,y,z,e) XYZ_GANG(x,y,z) GANG_ITEM_E(e)
|
||||
#define CARTES_AXIS_NAMES CARTES_LIST(X,Y,Z,E)
|
||||
#define CARTES_AXIS_NAMES_LC CARTES_LIST(x,y,z,e)
|
||||
#define CARTES_MAP(F) MAP(F, CARTES_AXIS_NAMES)
|
||||
#if CARTES_COUNT
|
||||
#define CARTES_COMMA ,
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../../../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_CREALITY_LCD)
|
||||
#include "../../../lcd/e3v2/creality/dwin.h"
|
||||
#include "../../../lcd/dwin/creality/dwin.h"
|
||||
#elif ENABLED(SOVOL_SV06_RTS)
|
||||
#include "../../../lcd/sovol_rts/sovol_rts.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_CREALITY_LCD)
|
||||
#include "../../lcd/e3v2/creality/dwin.h"
|
||||
#include "../../lcd/dwin/creality/dwin.h"
|
||||
#elif ENABLED(SOVOL_SV06_RTS)
|
||||
#include "../../lcd/sovol_rts/sovol_rts.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -136,13 +136,18 @@ void GcodeSuite::M493_report(const bool forReplay/*=true*/) {
|
|||
#else
|
||||
#define F_REPORT(A)
|
||||
#endif
|
||||
#if HAS_FTM_EI_SHAPING
|
||||
#define Q_REPORT(A) , F(" Q"), c.vtol.A
|
||||
#else
|
||||
#define Q_REPORT(A)
|
||||
#endif
|
||||
#define _REPORT_M493_AXIS(A) \
|
||||
SERIAL_ECHOLN(F(" M493 "), C(AXIS_CHAR(_AXIS(A))) \
|
||||
, F(" C"), c.shaper.A \
|
||||
, F(" A"), c.baseFreq.A \
|
||||
F_REPORT(A) \
|
||||
, F(" I"), c.zeta.A \
|
||||
, F(" Q"), c.vtol.A \
|
||||
Q_REPORT(A) \
|
||||
);
|
||||
// Shaper type for each axis
|
||||
SHAPED_MAP(_REPORT_M493_AXIS);
|
||||
|
|
@ -151,7 +156,7 @@ void GcodeSuite::M493_report(const bool forReplay/*=true*/) {
|
|||
/**
|
||||
* M493: Set Fixed-time Motion Control parameters
|
||||
*
|
||||
* S<bool> Set Fixed-Time motion mode on or off.
|
||||
* S<bool> Set Fixed-Time motion mode on or off. Ignored with NO_STANDARD_MOTION.
|
||||
* 0: Fixed-Time Motion OFF (Standard Motion)
|
||||
* 1: Fixed-Time Motion ON
|
||||
*
|
||||
|
|
@ -210,15 +215,16 @@ void GcodeSuite::M493() {
|
|||
|
||||
ft_config_t &c = ftMotion.cfg;
|
||||
|
||||
// Parse 'S' mode parameter.
|
||||
if (parser.seen('S')) {
|
||||
const bool active = parser.value_bool();
|
||||
if (active != c.active) {
|
||||
stepper.ftMotion_syncPosition();
|
||||
c.active = active;
|
||||
flag.report = true;
|
||||
#if HAS_STANDARD_MOTION
|
||||
// Parse 'S' mode parameter.
|
||||
if (parser.seen('S')) {
|
||||
const bool active = parser.value_bool();
|
||||
if (active != c.active) {
|
||||
ftMotion.toggle();
|
||||
flag.report = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if NUM_AXES_SHAPED > 0
|
||||
|
||||
|
|
@ -256,21 +262,10 @@ void GcodeSuite::M493() {
|
|||
// Dynamic frequency mode parameter.
|
||||
if (parser.seenval('D')) {
|
||||
if (AXIS_IS_SHAPING(X) || AXIS_IS_SHAPING(Y) || AXIS_IS_SHAPING(Z) || AXIS_IS_SHAPING(E)) {
|
||||
const dynFreqMode_t val = dynFreqMode_t(parser.value_byte());
|
||||
switch (val) {
|
||||
#if HAS_DYNAMIC_FREQ_MM
|
||||
case dynFreqMode_Z_BASED:
|
||||
#endif
|
||||
#if HAS_DYNAMIC_FREQ_G
|
||||
case dynFreqMode_MASS_BASED:
|
||||
#endif
|
||||
case dynFreqMode_DISABLED:
|
||||
c.dynFreqMode = val;
|
||||
flag.report = true;
|
||||
break;
|
||||
default:
|
||||
SERIAL_ECHOLN(F("?Invalid "), F("(D)ynamic Frequency Mode value."));
|
||||
break;
|
||||
switch (c.setDynFreqMode(parser.value_byte())) {
|
||||
case 0: break; // Same value, no update
|
||||
case 1: flag.report = true; break; // New value, updated
|
||||
default: SERIAL_ECHOLN(F("?Invalid "), F("(D)ynamic Frequency Mode value.")); break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -303,12 +298,14 @@ void GcodeSuite::M493() {
|
|||
if (seenI && !goodZeta)
|
||||
SERIAL_ECHOLN(F("?Invalid "), F("(I) Zeta value. (0.01-1.0)")); // Zeta out of range
|
||||
|
||||
// Vibration Tolerance parameter
|
||||
const bool seenQ = parser.seenval('Q');
|
||||
const float vtolVal = seenQ ? parser.value_float() : 0.0f;
|
||||
const bool goodVtol = seenQ && c.goodVtol(vtolVal);
|
||||
if (seenQ && !goodVtol)
|
||||
SERIAL_ECHOLN(F("?Invalid "), F("(Q) Vibration Tolerance value. (0.0-1.0)")); // VTol out of range
|
||||
#if HAS_FTM_EI_SHAPING
|
||||
// Vibration Tolerance parameter
|
||||
const bool seenQ = parser.seenval('Q');
|
||||
const float vtolVal = seenQ ? parser.value_float() : 0.0f;
|
||||
const bool goodVtol = seenQ && c.goodVtol(vtolVal);
|
||||
if (seenQ && !goodVtol)
|
||||
SERIAL_ECHOLN(F("?Invalid "), F("(Q) Vibration Tolerance value. (0.0-1.0)")); // VTol out of range
|
||||
#endif
|
||||
|
||||
const bool apply_xy = !parser.seen("XYZE");
|
||||
|
||||
|
|
@ -349,17 +346,19 @@ void GcodeSuite::M493() {
|
|||
SERIAL_ECHOLNPGM("?Wrong mode for ", C(STEPPER_A_NAME), " (I) zeta parameter.");
|
||||
}
|
||||
|
||||
// Parse X vtol parameter
|
||||
if (seenQ) {
|
||||
if (AXIS_IS_EISHAPING(X)) {
|
||||
if (goodVtol) {
|
||||
c.vtol.x = vtolVal;
|
||||
flag.update = true;
|
||||
#if HAS_FTM_EI_SHAPING
|
||||
// Parse X vtol parameter
|
||||
if (seenQ) {
|
||||
if (AXIS_IS_EISHAPING(X)) {
|
||||
if (goodVtol) {
|
||||
c.vtol.x = vtolVal;
|
||||
flag.update = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
SERIAL_ECHOLNPGM("?Wrong mode for ", C(STEPPER_A_NAME), " (Q) vtol parameter.");
|
||||
}
|
||||
else
|
||||
SERIAL_ECHOLNPGM("?Wrong mode for ", C(STEPPER_A_NAME), " (Q) vtol parameter.");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // HAS_X_AXIS
|
||||
|
|
@ -401,16 +400,18 @@ void GcodeSuite::M493() {
|
|||
}
|
||||
|
||||
// Parse Y vtol parameter
|
||||
if (seenQ) {
|
||||
if (AXIS_IS_EISHAPING(Y)) {
|
||||
if (goodVtol) {
|
||||
c.vtol.y = vtolVal;
|
||||
flag.update = true;
|
||||
#if HAS_FTM_EI_SHAPING
|
||||
if (seenQ) {
|
||||
if (AXIS_IS_EISHAPING(Y)) {
|
||||
if (goodVtol) {
|
||||
c.vtol.y = vtolVal;
|
||||
flag.update = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
SERIAL_ECHOLNPGM("?Wrong mode for ", C(STEPPER_B_NAME), " (Q) vtol parameter.");
|
||||
}
|
||||
else
|
||||
SERIAL_ECHOLNPGM("?Wrong mode for ", C(STEPPER_B_NAME), " (Q) vtol parameter.");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // HAS_Y_AXIS
|
||||
|
|
@ -452,16 +453,18 @@ void GcodeSuite::M493() {
|
|||
}
|
||||
|
||||
// Parse Z vtol parameter
|
||||
if (seenQ) {
|
||||
if (AXIS_IS_EISHAPING(Z)) {
|
||||
if (goodVtol) {
|
||||
c.vtol.z = vtolVal;
|
||||
flag.update = true;
|
||||
#if HAS_FTM_EI_SHAPING
|
||||
if (seenQ) {
|
||||
if (AXIS_IS_EISHAPING(Z)) {
|
||||
if (goodVtol) {
|
||||
c.vtol.z = vtolVal;
|
||||
flag.update = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
SERIAL_ECHOLNPGM("?Wrong mode for ", C(STEPPER_C_NAME), " (Q) vtol parameter.");
|
||||
}
|
||||
else
|
||||
SERIAL_ECHOLNPGM("?Wrong mode for ", C(STEPPER_C_NAME), " (Q) vtol parameter.");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // FTM_SHAPER_Z
|
||||
|
|
@ -503,16 +506,18 @@ void GcodeSuite::M493() {
|
|||
}
|
||||
|
||||
// Parse E vtol parameter
|
||||
if (seenQ) {
|
||||
if (AXIS_IS_EISHAPING(E)) {
|
||||
if (goodVtol) {
|
||||
c.vtol.e = vtolVal;
|
||||
flag.update = true;
|
||||
#if HAS_FTM_EI_SHAPING
|
||||
if (seenQ) {
|
||||
if (AXIS_IS_EISHAPING(E)) {
|
||||
if (goodVtol) {
|
||||
c.vtol.e = vtolVal;
|
||||
flag.update = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
SERIAL_ECHOLNPGM("?Wrong mode for ", C('E'), " (Q) vtol parameter.");
|
||||
}
|
||||
else
|
||||
SERIAL_ECHOLNPGM("?Wrong mode for ", C('E'), " (Q) vtol parameter.");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // FTM_SHAPER_E
|
||||
|
|
|
|||
|
|
@ -29,13 +29,12 @@
|
|||
#include "../../../module/planner.h"
|
||||
|
||||
void say_ftm_settings() {
|
||||
#if ENABLED(FTM_POLYS)
|
||||
SERIAL_ECHOLN(F(" Trajectory: "), ftMotion.getTrajectoryName(), C('('), (uint8_t)ftMotion.getTrajectoryType(), C(')'));
|
||||
#if ANY(FTM_POLYS, FTM_SMOOTHING)
|
||||
const ft_config_t &c = ftMotion.cfg;
|
||||
#endif
|
||||
|
||||
const ft_config_t &c = ftMotion.cfg;
|
||||
|
||||
#if ENABLED(FTM_POLYS)
|
||||
SERIAL_ECHOLN(F(" Trajectory: "), ftMotion.getTrajectoryName(), C('('), (uint8_t)ftMotion.getTrajectoryType(), C(')'));
|
||||
if (ftMotion.getTrajectoryType() == TrajectoryType::POLY6)
|
||||
SERIAL_ECHOLNPGM(" Poly6 Overshoot: ", p_float_t(c.poly6_acceleration_overshoot, 3));
|
||||
#endif
|
||||
|
|
@ -89,12 +88,8 @@ void GcodeSuite::M494() {
|
|||
|
||||
// Parse trajectory type parameter.
|
||||
if (parser.seenval('T')) {
|
||||
const int val = parser.value_int();
|
||||
if (WITHIN(val, 0, 2)) {
|
||||
planner.synchronize();
|
||||
ftMotion.setTrajectoryType((TrajectoryType)val);
|
||||
if (ftMotion.updateTrajectoryType(TrajectoryType(parser.value_int())))
|
||||
report = true;
|
||||
}
|
||||
else
|
||||
SERIAL_ECHOLN(F("?Invalid "), F("(T)rajectory type value. Use 0=TRAPEZOIDAL, 1=POLY5, 2=POLY6"));
|
||||
}
|
||||
|
|
@ -116,11 +111,8 @@ void GcodeSuite::M494() {
|
|||
|
||||
#define SMOOTH_SET(A,N) \
|
||||
if (parser.seenval(CHARIFY(A))) { \
|
||||
const float val = parser.value_float(); \
|
||||
if (WITHIN(val, 0.0f, FTM_MAX_SMOOTHING_TIME)) { \
|
||||
ftMotion.set_smoothing_time(_AXIS(A), val); \
|
||||
if (ftMotion.set_smoothing_time(_AXIS(A), parser.value_float())) \
|
||||
report = true; \
|
||||
} \
|
||||
else \
|
||||
SERIAL_ECHOLNPGM("?Invalid ", C(N), " smoothing time (", C(CHARIFY(A)), ") value."); \
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,9 +36,9 @@
|
|||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../../../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_CREALITY_LCD)
|
||||
#include "../../../lcd/e3v2/creality/dwin.h"
|
||||
#include "../../../lcd/dwin/creality/dwin.h"
|
||||
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
|
||||
#include "../../../lcd/e3v2/jyersui/dwin.h" // Temporary fix until it can be better implemented
|
||||
#include "../../../lcd/dwin/jyersui/dwin.h" // Temporary fix until it can be better implemented
|
||||
#endif
|
||||
|
||||
#define DEBUG_OUT ENABLED(DEBUG_POWER_LOSS_RECOVERY)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#include "../../MarlinCore.h" // for startOrResumeJob
|
||||
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../../lcd/e3v2/proui/dwin.h"
|
||||
#include "../../lcd/dwin/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -570,7 +570,7 @@
|
|||
#define EXTENSIBLE_UI
|
||||
#endif
|
||||
|
||||
// E3V2 extras
|
||||
// DWIN extras
|
||||
#if ANY(HAS_DWIN_E3V2, IS_DWIN_MARLINUI, SOVOL_SV06_RTS)
|
||||
#define SERIAL_CATCHALL 0
|
||||
#define HAS_LCD_BRIGHTNESS 1
|
||||
|
|
|
|||
|
|
@ -336,6 +336,61 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
// Fixed-Time Motion
|
||||
#if ENABLED(FT_MOTION)
|
||||
#if HAS_X_AXIS
|
||||
#define HAS_FTM_SHAPING 1
|
||||
#define FTM_SHAPER_X
|
||||
#endif
|
||||
#if HAS_Y_AXIS
|
||||
#define FTM_SHAPER_Y
|
||||
#endif
|
||||
#if !HAS_Z_AXIS
|
||||
#undef FTM_SHAPER_Z
|
||||
#endif
|
||||
#if HAS_EXTRUDERS
|
||||
#define FTM_HAS_LIN_ADVANCE 1
|
||||
#else
|
||||
#undef FTM_SHAPER_E
|
||||
#endif
|
||||
#if ENABLED(NO_STANDARD_MOTION)
|
||||
#define FTM_HOME_AND_PROBE
|
||||
#endif
|
||||
#if ANY(FTM_SHAPER_EI, FTM_SHAPER_2HEI, FTM_SHAPER_3HEI)
|
||||
#define HAS_FTM_EI_SHAPING 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Standard Motion
|
||||
#if DISABLED(NO_STANDARD_MOTION)
|
||||
#define HAS_STANDARD_MOTION 1
|
||||
#else
|
||||
#undef LIN_ADVANCE
|
||||
#undef SMOOTH_LIN_ADVANCE
|
||||
#undef S_CURVE_ACCELERATION
|
||||
#undef ADAPTIVE_STEP_SMOOTHING
|
||||
#undef INPUT_SHAPING_X
|
||||
#undef INPUT_SHAPING_Y
|
||||
#undef INPUT_SHAPING_Z
|
||||
#undef INPUT_SHAPING_E_SYNC
|
||||
#undef MULTISTEPPING_LIMIT
|
||||
#define MULTISTEPPING_LIMIT 1
|
||||
#endif
|
||||
|
||||
// Linear advance uses Jerk since E is an isolated axis
|
||||
#if ANY(FTM_HAS_LIN_ADVANCE, LIN_ADVANCE)
|
||||
#define HAS_LIN_ADVANCE_K 1
|
||||
#endif
|
||||
// Linear Advance without smoothing
|
||||
#if ENABLED(LIN_ADVANCE) && DISABLED(SMOOTH_LIN_ADVANCE)
|
||||
#define HAS_ROUGH_LIN_ADVANCE 1
|
||||
#endif
|
||||
|
||||
// ZV Input Shaping for Standard Motion
|
||||
#if ANY(INPUT_SHAPING_X, INPUT_SHAPING_Y, INPUT_SHAPING_Z)
|
||||
#define HAS_ZV_SHAPING 1
|
||||
#endif
|
||||
|
||||
// Use Junction Deviation for motion if Jerk is disabled
|
||||
#if DISABLED(CLASSIC_JERK)
|
||||
#define HAS_JUNCTION_DEVIATION 1
|
||||
|
|
@ -345,20 +400,10 @@
|
|||
#if HAS_EXTRUDERS && (ENABLED(CLASSIC_JERK) || (IS_KINEMATIC && DISABLED(LIN_ADVANCE)))
|
||||
#define HAS_CLASSIC_E_JERK 1
|
||||
#endif
|
||||
|
||||
// Linear advance uses Jerk since E is an isolated axis
|
||||
#if ALL(FT_MOTION, HAS_EXTRUDERS)
|
||||
#define FTM_HAS_LIN_ADVANCE 1
|
||||
#endif
|
||||
#if ANY(FTM_HAS_LIN_ADVANCE, LIN_ADVANCE)
|
||||
#define HAS_LIN_ADVANCE_K 1
|
||||
#endif
|
||||
#if HAS_JUNCTION_DEVIATION && ENABLED(LIN_ADVANCE)
|
||||
// E jerk is derived from JD factors
|
||||
#if ALL(HAS_JUNCTION_DEVIATION, LIN_ADVANCE)
|
||||
#define HAS_LINEAR_E_JERK 1
|
||||
#endif
|
||||
#if ENABLED(LIN_ADVANCE) && DISABLED(SMOOTH_LIN_ADVANCE)
|
||||
#define HAS_ROUGH_LIN_ADVANCE 1
|
||||
#endif
|
||||
|
||||
// Some displays can toggle Adaptive Step Smoothing.
|
||||
// The state is saved to EEPROM.
|
||||
|
|
@ -1521,28 +1566,6 @@
|
|||
#define CANNOT_EMBED_CONFIGURATION defined(__AVR__)
|
||||
#endif
|
||||
|
||||
// Input shaping
|
||||
#if ANY(INPUT_SHAPING_X, INPUT_SHAPING_Y, INPUT_SHAPING_Z)
|
||||
#define HAS_ZV_SHAPING 1
|
||||
#endif
|
||||
|
||||
// FT Motion: Shapers
|
||||
#if ENABLED(FT_MOTION)
|
||||
#if HAS_X_AXIS
|
||||
#define HAS_FTM_SHAPING 1
|
||||
#define FTM_SHAPER_X
|
||||
#endif
|
||||
#if HAS_Y_AXIS
|
||||
#define FTM_SHAPER_Y
|
||||
#endif
|
||||
#if !HAS_Z_AXIS
|
||||
#undef FTM_SHAPER_Z
|
||||
#endif
|
||||
#if !HAS_EXTRUDERS
|
||||
#undef FTM_SHAPER_E
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Multi-Stepping Limit
|
||||
#ifndef MULTISTEPPING_LIMIT
|
||||
#define MULTISTEPPING_LIMIT 128
|
||||
|
|
|
|||
|
|
@ -3690,13 +3690,16 @@
|
|||
#define FTM_TS (1.0f / FTM_FS) // (s) Time step for trajectory generation. (Reciprocal of FTM_FS)
|
||||
#define FTM_RATIO (FTM_FS / FTM_MIN_SHAPE_FREQ) // Factor for use in FTM_ZMAX. DON'T CHANGE.
|
||||
#define FTM_SMOOTH_MAX_I uint32_t(TERN0(FTM_SMOOTHING, CEIL(FTM_FS * FTM_MAX_SMOOTHING_TIME))) // Max delays for smoothing
|
||||
#define FTM_ZMAX (FTM_RATIO * 2 + FTM_SMOOTH_MAX_I) // Maximum delays for shaping functions (even numbers only!)
|
||||
// Calculate as:
|
||||
// ZV : FTM_RATIO / 2
|
||||
// ZVD, MZV : FTM_RATIO
|
||||
// 2HEI : FTM_RATIO * 3 / 2
|
||||
// 3HEI : FTM_RATIO * 2
|
||||
#define FTM_SMOOTHING_ORDER 5 // 3 to 5 is closest to gaussian
|
||||
|
||||
// Maximum delays for shaping functions (even numbers only!)
|
||||
#define FTM_ZMAX (TERN(HAS_FTM_EI_SHAPING, 2, 1) * FTM_RATIO + FTM_SMOOTH_MAX_I)
|
||||
|
||||
#define FTM_SMOOTHING_ORDER 5 // 3 to 5 is closest to Gaussian
|
||||
// Calculate as:
|
||||
// ZV : FTM_RATIO / 2
|
||||
// ZVD, MZV : FTM_RATIO
|
||||
// 2HEI : FTM_RATIO * 3 / 2
|
||||
// 3HEI : FTM_RATIO * 2
|
||||
#ifndef FTM_BUFFER_SIZE
|
||||
#define FTM_BUFFER_SIZE 128
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4483,7 +4483,7 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive."
|
|||
#error "FT_MOTION does not currently support MIXING_EXTRUDER."
|
||||
#endif
|
||||
#if !HAS_X_AXIS
|
||||
static_assert(FTM_DEFAULT_SHAPER_X != ftMotionShaper_NONE, "Without any linear axes FTM_DEFAULT_SHAPER_X must be ftMotionShaper_NONE.");
|
||||
static_assert(FTM_DEFAULT_SHAPER_X == ftMotionShaper_NONE, "Without any linear axes FTM_DEFAULT_SHAPER_X must be ftMotionShaper_NONE.");
|
||||
#endif
|
||||
#if HAS_DYNAMIC_FREQ_MM
|
||||
static_assert(FTM_DEFAULT_DYNFREQ_MODE != dynFreqMode_Z_BASED, "dynFreqMode_Z_BASED requires a Z axis.");
|
||||
|
|
@ -4500,7 +4500,29 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive."
|
|||
#if ENABLED(FTM_RESONANCE_TEST) && DISABLED(EMERGENCY_PARSER)
|
||||
#error "EMERGENCY_PARSER is required with FTM_RESONANCE_TEST (to cancel the test)."
|
||||
#endif
|
||||
#endif
|
||||
#if !HAS_STANDARD_MOTION
|
||||
#if ENABLED(NONLINEAR_EXTRUSION)
|
||||
#error "NONLINEAR_EXTRUSION is not yet available in FT_MOTION. Disable NO_STANDARD_MOTION if you require it."
|
||||
#elif ENABLED(SMOOTH_LIN_ADVANCE)
|
||||
#error "SMOOTH_LIN_ADVANCE is not yet available in FT_MOTION. Disable NO_STANDARD_MOTION if you require it."
|
||||
#elif ENABLED(MIXING_EXTRUDER)
|
||||
#error "MIXING_EXTRUDER is not yet available in FT_MOTION. Disable NO_STANDARD_MOTION if you require it."
|
||||
#elif ENABLED(FREEZE_FEATURE)
|
||||
#error "FREEZE_FEATURE is not yet available in FT_MOTION. Disable NO_STANDARD_MOTION if you require it."
|
||||
#elif ENABLED(DIRECT_STEPPING)
|
||||
#error "DIRECT_STEPPING is not yet available in FT_MOTION. Disable NO_STANDARD_MOTION if you require it."
|
||||
#elif ENABLED(DIFFERENTIAL_EXTRUDER)
|
||||
#error "DIFFERENTIAL_EXTRUDER is not yet available in FT_MOTION. Disable NO_STANDARD_MOTION if you require it."
|
||||
#elif ENABLED(LASER_FEATURE)
|
||||
#error "LASER_FEATURE is not yet available in FT_MOTION. Disable NO_STANDARD_MOTION if you require it."
|
||||
#elif ENABLED(Z_LATE_ENABLE)
|
||||
#error "Z_LATE_ENABLE is not yet available in FT_MOTION. Disable NO_STANDARD_MOTION if you require it."
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_FTM_SHAPING && NONE(FTM_SHAPER_ZV, FTM_SHAPER_ZVD, FTM_SHAPER_ZVDD, FTM_SHAPER_ZVDDD, FTM_SHAPER_EI, FTM_SHAPER_2HEI, FTM_SHAPER_3HEI, FTM_SHAPER_MZV)
|
||||
#error "For FT_MOTION at least one FTM_SHAPER_* type must be enabled."
|
||||
#endif
|
||||
#endif // FT_MOTION
|
||||
|
||||
// Multi-Stepping Limit
|
||||
static_assert(WITHIN(MULTISTEPPING_LIMIT, 1, 128) && IS_POWER_OF_2(MULTISTEPPING_LIMIT), "MULTISTEPPING_LIMIT must be 1, 2, 4, 8, 16, 32, 64, or 128.");
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
* version was tagged.
|
||||
*/
|
||||
#ifndef STRING_DISTRIBUTION_DATE
|
||||
#define STRING_DISTRIBUTION_DATE "2025-12-07"
|
||||
#define STRING_DISTRIBUTION_DATE "2025-12-14"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@
|
|||
#include "../../../inc/MarlinConfig.h"
|
||||
|
||||
//
|
||||
// e3v2/common/dwin_api.h
|
||||
// dwin/common/dwin_api.h
|
||||
//
|
||||
// Included by: e3v2/*/dwin_lcd.h
|
||||
// Included by: dwin/*/dwin_lcd.h
|
||||
//
|
||||
|
||||
#if ENABLED(DWIN_MARLINUI_LANDSCAPE)
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
* @file lcd/e3v2/common/encoder.cpp
|
||||
* @file lcd/dwin/common/encoder.cpp
|
||||
* @brief Rotary encoder functions
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
#pragma once
|
||||
|
||||
/*****************************************************************************
|
||||
* @file lcd/e3v2/common/encoder.h
|
||||
* @file lcd/dwin/common/encoder.h
|
||||
* @brief Rotary encoder functions
|
||||
****************************************************************************/
|
||||
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
#pragma once
|
||||
|
||||
/*****************************************************************************
|
||||
* @file lcd/e3v2/common/limits.h
|
||||
* @file lcd/dwin/common/limits.h
|
||||
* @brief Limits for UI values
|
||||
****************************************************************************/
|
||||
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
*/
|
||||
|
||||
/********************************************************************************
|
||||
* @file lcd/e3v2/creality/dwin_lcd.cpp
|
||||
* @file lcd/dwin/creality/dwin_lcd.cpp
|
||||
* @author LEO / Creality3D
|
||||
* @date 2019/07/18
|
||||
* @version 2.0.1
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* lcd/e3v2/jyersui/dwin.cpp
|
||||
* lcd/dwin/jyersui/dwin.cpp
|
||||
*/
|
||||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
#pragma once
|
||||
|
||||
/**
|
||||
* lcd/e3v2/jyersui/dwin.h
|
||||
* lcd/dwin/jyersui/dwin.h
|
||||
*/
|
||||
|
||||
#include "dwin_lcd.h"
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
*/
|
||||
|
||||
/********************************************************************************
|
||||
* @file lcd/e3v2/jyersui/dwin_lcd.cpp
|
||||
* @file lcd/dwin/jyersui/dwin_lcd.cpp
|
||||
* @brief DWIN screen control functions
|
||||
********************************************************************************/
|
||||
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
#pragma once
|
||||
|
||||
/********************************************************************************
|
||||
* @file lcd/e3v2/jyersui/dwin_lcd.h
|
||||
* @file lcd/dwin/jyersui/dwin_lcd.h
|
||||
* @brief DWIN screen control functions
|
||||
********************************************************************************/
|
||||
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
*/
|
||||
|
||||
/********************************************************************************
|
||||
* @file lcd/e3v2/marlinui/dwin_lcd.cpp
|
||||
* @file lcd/dwin/marlinui/dwin_lcd.cpp
|
||||
* @brief DWIN screen control functions
|
||||
********************************************************************************/
|
||||
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
#pragma once
|
||||
|
||||
/********************************************************************************
|
||||
* @file lcd/e3v2/marlinui/dwin_lcd.h
|
||||
* @file lcd/dwin/marlinui/dwin_lcd.h
|
||||
* @brief DWIN screen control functions
|
||||
********************************************************************************/
|
||||
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
// Enable performance counters (draw call count, frame timing) for debugging
|
||||
//#define GAME_PERFORMANCE_COUNTERS
|
||||
|
||||
#include "../../menu/game/types.h" // includes e3v2/marlinui/game.h
|
||||
#include "../../menu/game/types.h" // includes dwin/marlinui/game.h
|
||||
#include "../../lcdprint.h"
|
||||
#include "lcdprint_dwin.h"
|
||||
#include "marlinui_dwin.h"
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* lcd/e3v2/marlinui/lcdprint_dwin.cpp
|
||||
* lcd/dwin/marlinui/lcdprint_dwin.cpp
|
||||
*
|
||||
* Due to DWIN hardware limitations simplified characters are used
|
||||
*/
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
#pragma once
|
||||
|
||||
/**
|
||||
* lcd/e3v2/marlinui/lcdprint_dwin.h
|
||||
* lcd/dwin/marlinui/lcdprint_dwin.h
|
||||
*/
|
||||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
|
@ -947,6 +947,7 @@ namespace LanguageNarrow_en {
|
|||
LSTR MSG_FTM_VTOL_N = _UxGT("@ Vib. Level");
|
||||
LSTR MSG_FTM_SMOOTH_TIME_N = _UxGT("@ Smoothing Time");
|
||||
LSTR MSG_FTM_POLY6_OVERSHOOT = _UxGT("@ Poly6 Overshoot");
|
||||
LSTR MSG_FTM_CONFIGURE_AXIS_N = _UxGT("Configure @ Axis");
|
||||
|
||||
LSTR MSG_FTM_RESONANCE_TEST = _UxGT("Resonance Test");
|
||||
LSTR MSG_FTM_RT_RUNNING = _UxGT("Res. Test Running...");
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
#if IS_DWIN_MARLINUI
|
||||
|
||||
#include "e3v2/marlinui/marlinui_dwin.h"
|
||||
#include "dwin/marlinui/marlinui_dwin.h"
|
||||
|
||||
// The DWIN lcd_moveto function uses row / column, not pixels
|
||||
#define LCD_COL_X(col) (col)
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue