mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-12-29 10:50:36 -07:00
Merge branch 'bugfix-2.1.x' into bugfix-2.1.x-February2
This commit is contained in:
commit
00b8fc76a9
74 changed files with 627 additions and 518 deletions
0
.gitignore
vendored
Executable file → Normal file
0
.gitignore
vendored
Executable file → Normal file
4
Makefile
4
Makefile
|
|
@ -7,7 +7,7 @@ UNIT_TEST_CONFIG ?= default
|
|||
# Find a Python 3 interpreter
|
||||
ifeq ($(OS),Windows_NT)
|
||||
# Windows: use `where` – fall back through the three common names
|
||||
PYTHON := $(shell where python 2>nul || where python3 2>nul || where py 2>nul)
|
||||
PYTHON := $(shell which python 2>nul || which python3 2>nul || which py 2>nul)
|
||||
# Windows: Use cmd tools to find pins files
|
||||
PINS_RAW := $(shell cmd //c "dir /s /b Marlin\src\pins\*.h 2>nul | findstr /r ".*Marlin\\\\src\\\\pins\\\\.*\\\\pins_.*\.h"")
|
||||
PINS := $(subst \,/,$(PINS_RAW))
|
||||
|
|
@ -67,7 +67,7 @@ marlin:
|
|||
.PHONY: marlin
|
||||
|
||||
clean:
|
||||
rm -r .pio/build
|
||||
rm -rf .pio/build*
|
||||
|
||||
tests-single-ci:
|
||||
export GIT_RESET_HARD=true
|
||||
|
|
|
|||
|
|
@ -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-10-24"
|
||||
//#define STRING_DISTRIBUTION_DATE "2025-10-29"
|
||||
|
||||
/**
|
||||
* The protocol for communication to the host. Protocol indicates communication
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@
|
|||
/**
|
||||
* The Trinamic library includes SoftwareSerial.h, leading to a compile error.
|
||||
*/
|
||||
#if ALL(HAS_TRINAMIC_CONFIG, ENDSTOP_INTERRUPTS_FEATURE)
|
||||
#if ALL(HAS_TMC_SW_SERIAL, ENDSTOP_INTERRUPTS_FEATURE)
|
||||
#error "TMCStepper includes SoftwareSerial.h which is incompatible with ENDSTOP_INTERRUPTS_FEATURE. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -93,15 +93,15 @@ namespace AVRHelpers {
|
|||
typedef T type;
|
||||
};
|
||||
template <typename T>
|
||||
struct voltype <T, 1u> {
|
||||
struct voltype <T, 1U> {
|
||||
typedef uint8_t type;
|
||||
};
|
||||
template <typename T>
|
||||
struct voltype <T, 2u> {
|
||||
struct voltype <T, 2U> {
|
||||
typedef uint16_t type;
|
||||
};
|
||||
template <typename T>
|
||||
struct voltype <T, 4u> {
|
||||
struct voltype <T, 4U> {
|
||||
typedef uint32_t type;
|
||||
};
|
||||
|
||||
|
|
@ -2007,7 +2007,7 @@ inline void _ATmega_resetperipherals() {
|
|||
|
||||
#if defined(__AVR_TRM01__) || defined(__AVR_TRM02__) || defined(__AVR_TRM03__) || defined(__AVR_TRM05__)
|
||||
_EEAR._EEAR = 0;
|
||||
dwrite(_EEDR, (uint8_t)0u);
|
||||
dwrite(_EEDR, (uint8_t)0U);
|
||||
#endif
|
||||
|
||||
#if defined(__AVR_TRM01__) || defined(__AVR_TRM02__) || defined(__AVR_TRM03__) || defined(__AVR_TRM04__) || defined(__AVR_TRM05__)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
// ------------------------
|
||||
|
||||
typedef uint16_t hal_timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFF
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFU
|
||||
|
||||
// ------------------------
|
||||
// Defines
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
||||
|
||||
typedef uint32_t hal_timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFFUL
|
||||
|
||||
#define HAL_TIMER_PRESCALER 2
|
||||
#define HAL_TIMER_RATE ((F_CPU) / (HAL_TIMER_PRESCALER)) // frequency of timers peripherals
|
||||
|
|
|
|||
|
|
@ -64,10 +64,10 @@
|
|||
#define CRITICAL_SECTION_END() portEXIT_CRITICAL(&hal.spinlock)
|
||||
|
||||
#define HAL_CAN_SET_PWM_FREQ // This HAL supports PWM Frequency adjustment
|
||||
#define PWM_FREQUENCY 1000u // Default PWM frequency when set_pwm_duty() is called without set_pwm_frequency()
|
||||
#define PWM_RESOLUTION 10u // Default PWM bit resolution
|
||||
#define CHANNEL_MAX_NUM 15u // max PWM channel # to allocate (7 to only use low speed, 15 to use low & high)
|
||||
#define MAX_PWM_IOPIN 33u // hardware pwm pins < 34
|
||||
#define PWM_FREQUENCY 1000U // Default PWM frequency when set_pwm_duty() is called without set_pwm_frequency()
|
||||
#define PWM_RESOLUTION 10U // Default PWM bit resolution
|
||||
#define CHANNEL_MAX_NUM 15U // max PWM channel # to allocate (7 to only use low speed, 15 to use low & high)
|
||||
#define MAX_PWM_IOPIN 33U // hardware pwm pins < 34
|
||||
#ifndef MAX_EXPANDER_BITS
|
||||
#define MAX_EXPANDER_BITS 32 // I2S expander bit width (max 32)
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ Servo::Servo() {}
|
|||
|
||||
int8_t Servo::attach(const int inPin) {
|
||||
if (inPin > 0) pin = inPin;
|
||||
channel = get_pwm_channel(pin, 50u, 16u);
|
||||
channel = get_pwm_channel(pin, 50U, 16U);
|
||||
return channel; // -1 if no PWM avail.
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
||||
|
||||
typedef uint64_t hal_timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFFFFFFFFFFULL
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFF'FFFF'FFFF'FFFFULL
|
||||
|
||||
#ifndef MF_TIMER_STEP
|
||||
#define MF_TIMER_STEP 0 // Timer Index for Stepper
|
||||
|
|
@ -52,12 +52,12 @@ typedef uint64_t hal_timer_t;
|
|||
|
||||
#if ENABLED(I2S_STEPPER_STREAM)
|
||||
#define STEPPER_TIMER_PRESCALE 1
|
||||
#define STEPPER_TIMER_RATE 250000 // 250khz, 4µs pulses of i2s word clock
|
||||
#define STEPPER_TIMER_RATE 250'000 // 250khz, 4µs pulses of i2s word clock
|
||||
#else
|
||||
#define STEPPER_TIMER_PRESCALE 40
|
||||
#define STEPPER_TIMER_RATE ((HAL_TIMER_RATE) / (STEPPER_TIMER_PRESCALE)) // frequency of stepper timer, 2MHz
|
||||
#endif
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1'000'000) // stepper timer ticks per µs
|
||||
|
||||
#define STEP_TIMER_MIN_INTERVAL 8 // minimum time in µs between stepper interrupts
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
//
|
||||
typedef Timer0 *timer_channel_t;
|
||||
typedef uint16_t hal_timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFF
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFU
|
||||
|
||||
//
|
||||
// Timer instances
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
||||
|
||||
typedef uint32_t hal_timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFFUL
|
||||
|
||||
#define HAL_TIMER_RATE ((SystemCoreClock) / 4) // frequency of timers peripherals
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
#define _HAL_TIMER_ISR(T) __HAL_TIMER_ISR(T)
|
||||
|
||||
typedef uint32_t hal_timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFFUL
|
||||
|
||||
#define HAL_TIMER_RATE ((F_CPU) / 4) // frequency of timers peripherals
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
||||
|
||||
typedef uint64_t hal_timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFFFFFFFFFF
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFF'FFFF'FFFF'FFFFULL
|
||||
|
||||
#define HAL_TIMER_RATE ((SystemCoreClock) / 4) // frequency of timers peripherals
|
||||
|
||||
|
|
@ -52,11 +52,11 @@ typedef uint64_t hal_timer_t;
|
|||
#endif
|
||||
#define SYSTICK_TIMER_FREQUENCY 1000
|
||||
|
||||
#define TEMP_TIMER_RATE 1000000
|
||||
#define TEMP_TIMER_FREQUENCY 1000 // temperature interrupt frequency
|
||||
#define TEMP_TIMER_RATE 1'000'000
|
||||
#define TEMP_TIMER_FREQUENCY 1000 // temperature interrupt frequency
|
||||
|
||||
#define STEPPER_TIMER_RATE HAL_TIMER_RATE // frequency of stepper timer (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE)
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1'000'000) // stepper timer ticks per µs
|
||||
#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / STEPPER_TIMER_TICKS_PER_US)
|
||||
|
||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer
|
||||
|
|
|
|||
|
|
@ -41,9 +41,9 @@
|
|||
#define _HAL_TIMER_ISR(T) __HAL_TIMER_ISR(T)
|
||||
|
||||
typedef uint64_t hal_timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFFFFFFFFFF
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFF'FFFF'FFFF'FFFFULL
|
||||
|
||||
#define HAL_TIMER_RATE (1000000ull) // fixed value as we use a microsecond timesource
|
||||
#define HAL_TIMER_RATE (1'000'000ULL) // fixed value as we use a microsecond timesource
|
||||
#ifndef MF_TIMER_STEP
|
||||
#define MF_TIMER_STEP 0 // Timer Index for Stepper
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
// --------------------------------------------------------------------------
|
||||
|
||||
typedef uint32_t hal_timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFFUL
|
||||
|
||||
#define HAL_TIMER_RATE F_CPU // frequency of timers peripherals
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
// --------------------------------------------------------------------------
|
||||
|
||||
typedef uint32_t hal_timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFFUL
|
||||
|
||||
#define HAL_TIMER_RATE F_CPU // frequency of timers peripherals
|
||||
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ void TFT_FSMC::abort() {
|
|||
}
|
||||
|
||||
void TFT_FSMC::transmitDMA(uint32_t memoryIncrease, uint16_t *data, uint16_t count) {
|
||||
if (DMAtx.Init.PeriphInc != memoryIncrease) {
|
||||
if (!__IS_DMA_CONFIGURED(&DMAtx) || DMAtx.Init.PeriphInc != memoryIncrease) {
|
||||
DMAtx.Init.PeriphInc = memoryIncrease;
|
||||
HAL_DMA_Init(&DMAtx);
|
||||
}
|
||||
|
|
@ -191,7 +191,7 @@ void TFT_FSMC::transmitDMA(uint32_t memoryIncrease, uint16_t *data, uint16_t cou
|
|||
}
|
||||
|
||||
void TFT_FSMC::transmit(uint32_t memoryIncrease, uint16_t *data, uint16_t count) {
|
||||
if (DMAtx.Init.PeriphInc != memoryIncrease) {
|
||||
if (!__IS_DMA_CONFIGURED(&DMAtx) || DMAtx.Init.PeriphInc != memoryIncrease) {
|
||||
DMAtx.Init.PeriphInc = memoryIncrease;
|
||||
HAL_DMA_Init(&DMAtx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
*/
|
||||
|
||||
typedef uint16_t hal_timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFF
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFU
|
||||
|
||||
#define HAL_TIMER_RATE uint32_t(F_CPU) // frequency of timers peripherals
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
||||
|
||||
typedef uint32_t hal_timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFFUL
|
||||
|
||||
#define FTM0_TIMER_PRESCALE 8
|
||||
#define FTM1_TIMER_PRESCALE 4
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
||||
|
||||
typedef uint32_t hal_timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFF
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFFUL
|
||||
|
||||
#define FTM0_TIMER_PRESCALE 8
|
||||
#define FTM1_TIMER_PRESCALE 4
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
||||
|
||||
typedef uint32_t hal_timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFE
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFFFFFEUL
|
||||
|
||||
#define GPT_TIMER_RATE (F_CPU / 4) // 150MHz (Can't use F_BUS_ACTUAL because it's extern volatile)
|
||||
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ struct SerialBase {
|
|||
// Handle negative numbers
|
||||
if (number < 0.0) {
|
||||
write('-');
|
||||
number = -number;
|
||||
number *= -1;
|
||||
}
|
||||
|
||||
// Round correctly so that print(1.999, 2) prints as "2.00"
|
||||
|
|
|
|||
|
|
@ -547,13 +547,18 @@ struct XYval {
|
|||
FI constexpr T large() const { return _MAX(x, y); }
|
||||
|
||||
// Explicit copy and copies with conversion
|
||||
FI constexpr XYval<T> copy() const { return *this; }
|
||||
FI constexpr XYval<T> ABS() const { return { T(_ABS(x)), T(_ABS(y)) }; }
|
||||
FI constexpr XYval<int16_t> asInt() const { return { int16_t(x), int16_t(y) }; }
|
||||
FI constexpr XYval<int32_t> asLong() const { return { int32_t(x), int32_t(y) }; }
|
||||
FI constexpr XYval<int32_t> ROUNDL() const { return { int32_t(LROUND(x)), int32_t(LROUND(y)) }; }
|
||||
FI constexpr XYval<float> asFloat() const { return { static_cast<float>(x), static_cast<float>(y) }; }
|
||||
FI constexpr XYval<float> reciprocal() const { return { _RECIP(x), _RECIP(y) }; }
|
||||
FI constexpr XYval<T> copy() const { return *this; }
|
||||
FI constexpr XYval<T> ABS() const { return { T(_ABS(x)), T(_ABS(y)) }; }
|
||||
FI constexpr XYval<int32_t> ROUNDL() const { return { int32_t(LROUND(x)), int32_t(LROUND(y)) }; }
|
||||
FI constexpr XYval<float> reciprocal() const { return { _RECIP(x), _RECIP(y) }; }
|
||||
|
||||
// Conversion to other types
|
||||
FI constexpr XYval<int16_t> asInt16() const { return { int16_t(x), int16_t(y) }; }
|
||||
FI constexpr XYval<int32_t> asInt32() const { return { int32_t(x), int32_t(y) }; }
|
||||
FI constexpr XYval<uint32_t> asUInt32() const { return { uint32_t(x), uint32_t(y) }; }
|
||||
FI constexpr XYval<int64_t> asInt64() const { return { int64_t(x), int64_t(y) }; }
|
||||
FI constexpr XYval<uint64_t> asUInt64() const { return { uint64_t(x), uint64_t(y) }; }
|
||||
FI constexpr XYval<float> asFloat() const { return { static_cast<float>(x), static_cast<float>(y) }; }
|
||||
|
||||
// Marlin workspace shifting is done with G92 and M206
|
||||
FI XYval<float> asLogical() const { XYval<float> o = asFloat(); toLogical(o); return o; }
|
||||
|
|
@ -625,6 +630,11 @@ struct XYval {
|
|||
FI bool operator!=(const XYval<T> &rs) const { return !operator==(rs); }
|
||||
FI bool operator!=(const XYZval<T> &rs) const { return !operator==(rs); }
|
||||
FI bool operator!=(const XYZEval<T> &rs) const { return !operator==(rs); }
|
||||
|
||||
// Exact comparison to a single value
|
||||
FI bool operator==(const T &p) const { return x == p && y == p; }
|
||||
FI bool operator!=(const T &p) const { return !operator==(p); }
|
||||
|
||||
};
|
||||
|
||||
//
|
||||
|
|
@ -701,12 +711,17 @@ struct XYZval {
|
|||
// Explicit copy and copies with conversion
|
||||
FI constexpr XYZval<T> copy() const { XYZval<T> o = *this; return o; }
|
||||
FI constexpr XYZval<T> ABS() const { return NUM_AXIS_ARRAY(T(_ABS(x)), T(_ABS(y)), T(_ABS(z)), T(_ABS(i)), T(_ABS(j)), T(_ABS(k)), T(_ABS(u)), T(_ABS(v)), T(_ABS(w))); }
|
||||
FI constexpr XYZval<int16_t> asInt() const { return NUM_AXIS_ARRAY(int16_t(x), int16_t(y), int16_t(z), int16_t(i), int16_t(j), int16_t(k), int16_t(u), int16_t(v), int16_t(w)); }
|
||||
FI constexpr XYZval<int32_t> asLong() const { return NUM_AXIS_ARRAY(int32_t(x), int32_t(y), int32_t(z), int32_t(i), int32_t(j), int32_t(k), int32_t(u), int32_t(v), int32_t(w)); }
|
||||
FI constexpr XYZval<int32_t> ROUNDL() const { return NUM_AXIS_ARRAY(int32_t(LROUND(x)), int32_t(LROUND(y)), int32_t(LROUND(z)), int32_t(LROUND(i)), int32_t(LROUND(j)), int32_t(LROUND(k)), int32_t(LROUND(u)), int32_t(LROUND(v)), int32_t(LROUND(w))); }
|
||||
FI constexpr XYZval<float> asFloat() const { return NUM_AXIS_ARRAY(static_cast<float>(x), static_cast<float>(y), static_cast<float>(z), static_cast<float>(i), static_cast<float>(j), static_cast<float>(k), static_cast<float>(u), static_cast<float>(v), static_cast<float>(w)); }
|
||||
FI constexpr XYZval<float> reciprocal() const { return NUM_AXIS_ARRAY(_RECIP(x), _RECIP(y), _RECIP(z), _RECIP(i), _RECIP(j), _RECIP(k), _RECIP(u), _RECIP(v), _RECIP(w)); }
|
||||
|
||||
// Conversion to other types
|
||||
FI constexpr XYZval<int16_t> asInt16() const { return NUM_AXIS_ARRAY(int16_t(x), int16_t(y), int16_t(z), int16_t(i), int16_t(j), int16_t(k), int16_t(u), int16_t(v), int16_t(w)); }
|
||||
FI constexpr XYZval<int32_t> asInt32() const { return NUM_AXIS_ARRAY(int32_t(x), int32_t(y), int32_t(z), int32_t(i), int32_t(j), int32_t(k), int32_t(u), int32_t(v), int32_t(w)); }
|
||||
FI constexpr XYZval<uint32_t> asUInt32() const { return NUM_AXIS_ARRAY(uint32_t(x), uint32_t(y), uint32_t(z), uint32_t(i), uint32_t(j), uint32_t(k), uint32_t(u), uint32_t(v), uint32_t(w)); }
|
||||
FI constexpr XYZval<int64_t> asInt64() const { return NUM_AXIS_ARRAY(int64_t(x), int64_t(y), int64_t(z), int64_t(i), int64_t(j), int64_t(k), int64_t(u), int64_t(v), int64_t(w)); }
|
||||
FI constexpr XYZval<uint64_t> asUInt64() const { return NUM_AXIS_ARRAY(uint64_t(x), uint64_t(y), uint64_t(z), uint64_t(i), uint64_t(j), uint64_t(k), uint64_t(u), uint64_t(v), uint64_t(w)); }
|
||||
FI constexpr XYZval<float> asFloat() const { return NUM_AXIS_ARRAY(static_cast<float>(x), static_cast<float>(y), static_cast<float>(z), static_cast<float>(i), static_cast<float>(j), static_cast<float>(k), static_cast<float>(u), static_cast<float>(v), static_cast<float>(w)); }
|
||||
|
||||
// Marlin workspace shifting is done with G92 and M206
|
||||
FI XYZval<float> asLogical() const { XYZval<float> o = asFloat(); toLogical(o); return o; }
|
||||
FI XYZval<float> asNative() const { XYZval<float> o = asFloat(); toNative(o); return o; }
|
||||
|
|
@ -772,8 +787,13 @@ struct XYZval {
|
|||
FI XYZval<T>& operator<<=(const int &p) { NUM_AXIS_CODE(_LSE(x), _LSE(y), _LSE(z), _LSE(i), _LSE(j), _LSE(k), _LSE(u), _LSE(v), _LSE(w)); return *this; }
|
||||
|
||||
// Exact comparisons. For floats a "NEAR" operation may be better.
|
||||
FI bool operator==(const XYZEval<T> &rs) const { return true NUM_AXIS_GANG(&& x == rs.x, && y == rs.y, && z == rs.z, && i == rs.i, && j == rs.j, && k == rs.k, && u == rs.u, && v == rs.v, && w == rs.w); }
|
||||
FI bool operator==(const XYZEval<T> &rs) const { return ENABLED(HAS_X_AXIS) NUM_AXIS_GANG(&& x == rs.x, && y == rs.y, && z == rs.z, && i == rs.i, && j == rs.j, && k == rs.k, && u == rs.u, && v == rs.v, && w == rs.w); }
|
||||
FI bool operator!=(const XYZEval<T> &rs) const { return !operator==(rs); }
|
||||
|
||||
// Exact comparison to a single value
|
||||
FI bool operator==(const T &p) const { return ENABLED(HAS_X_AXIS) NUM_AXIS_GANG(&& x == p, && y == p, && z == p, && i == p, && j == p, && k == p, && u == p, && v == p, && w == p); }
|
||||
FI bool operator!=(const T &p) const { return !operator==(p); }
|
||||
|
||||
};
|
||||
|
||||
//
|
||||
|
|
@ -849,13 +869,18 @@ struct XYZEval {
|
|||
FI constexpr T large() const { return _MAX(LOGICAL_AXIS_LIST(e, x, y, z, i, j, k, u, v, w)); }
|
||||
|
||||
// Explicit copy and copies with conversion
|
||||
FI constexpr XYZEval<T> copy() const { XYZEval<T> v = *this; return v; }
|
||||
FI constexpr XYZEval<T> ABS() const { return LOGICAL_AXIS_ARRAY(T(_ABS(e)), T(_ABS(x)), T(_ABS(y)), T(_ABS(z)), T(_ABS(i)), T(_ABS(j)), T(_ABS(k)), T(_ABS(u)), T(_ABS(v)), T(_ABS(w))); }
|
||||
FI constexpr XYZEval<int16_t> asInt() const { return LOGICAL_AXIS_ARRAY(int16_t(e), int16_t(x), int16_t(y), int16_t(z), int16_t(i), int16_t(j), int16_t(k), int16_t(u), int16_t(v), int16_t(w)); }
|
||||
FI constexpr XYZEval<int32_t> asLong() const { return LOGICAL_AXIS_ARRAY(int32_t(e), int32_t(x), int32_t(y), int32_t(z), int32_t(i), int32_t(j), int32_t(k), int32_t(u), int32_t(v), int32_t(w)); }
|
||||
FI constexpr XYZEval<int32_t> ROUNDL() const { return LOGICAL_AXIS_ARRAY(int32_t(LROUND(e)), int32_t(LROUND(x)), int32_t(LROUND(y)), int32_t(LROUND(z)), int32_t(LROUND(i)), int32_t(LROUND(j)), int32_t(LROUND(k)), int32_t(LROUND(u)), int32_t(LROUND(v)), int32_t(LROUND(w))); }
|
||||
FI constexpr XYZEval<float> asFloat() const { return LOGICAL_AXIS_ARRAY(static_cast<float>(e), static_cast<float>(x), static_cast<float>(y), static_cast<float>(z), static_cast<float>(i), static_cast<float>(j), static_cast<float>(k), static_cast<float>(u), static_cast<float>(v), static_cast<float>(w)); }
|
||||
FI constexpr XYZEval<float> reciprocal() const { return LOGICAL_AXIS_ARRAY(_RECIP(e), _RECIP(x), _RECIP(y), _RECIP(z), _RECIP(i), _RECIP(j), _RECIP(k), _RECIP(u), _RECIP(v), _RECIP(w)); }
|
||||
FI constexpr XYZEval<T> copy() const { XYZEval<T> v = *this; return v; }
|
||||
FI constexpr XYZEval<T> ABS() const { return LOGICAL_AXIS_ARRAY(T(_ABS(e)), T(_ABS(x)), T(_ABS(y)), T(_ABS(z)), T(_ABS(i)), T(_ABS(j)), T(_ABS(k)), T(_ABS(u)), T(_ABS(v)), T(_ABS(w))); }
|
||||
FI constexpr XYZEval<int32_t> ROUNDL() const { return LOGICAL_AXIS_ARRAY(int32_t(LROUND(e)), int32_t(LROUND(x)), int32_t(LROUND(y)), int32_t(LROUND(z)), int32_t(LROUND(i)), int32_t(LROUND(j)), int32_t(LROUND(k)), int32_t(LROUND(u)), int32_t(LROUND(v)), int32_t(LROUND(w))); }
|
||||
FI constexpr XYZEval<float> reciprocal() const { return LOGICAL_AXIS_ARRAY(_RECIP(e), _RECIP(x), _RECIP(y), _RECIP(z), _RECIP(i), _RECIP(j), _RECIP(k), _RECIP(u), _RECIP(v), _RECIP(w)); }
|
||||
|
||||
// Conversion to other types
|
||||
FI constexpr XYZEval<int16_t> asInt16() const { return LOGICAL_AXIS_ARRAY(int16_t(e), int16_t(x), int16_t(y), int16_t(z), int16_t(i), int16_t(j), int16_t(k), int16_t(u), int16_t(v), int16_t(w)); }
|
||||
FI constexpr XYZEval<int32_t> asInt32() const { return LOGICAL_AXIS_ARRAY(int32_t(e), int32_t(x), int32_t(y), int32_t(z), int32_t(i), int32_t(j), int32_t(k), int32_t(u), int32_t(v), int32_t(w)); }
|
||||
FI constexpr XYZEval<uint32_t> asUInt32() const { return LOGICAL_AXIS_ARRAY(uint32_t(e), uint32_t(x), uint32_t(y), uint32_t(z), uint32_t(i), uint32_t(j), uint32_t(k), uint32_t(u), uint32_t(v), uint32_t(w)); }
|
||||
FI constexpr XYZEval<int64_t> asInt64() const { return LOGICAL_AXIS_ARRAY(int64_t(e), int64_t(x), int64_t(y), int64_t(z), int64_t(i), int64_t(j), int64_t(k), int64_t(u), int64_t(v), int64_t(w)); }
|
||||
FI constexpr XYZEval<uint64_t> asUInt64() const { return LOGICAL_AXIS_ARRAY(uint64_t(e), uint64_t(x), uint64_t(y), uint64_t(z), uint64_t(i), uint64_t(j), uint64_t(k), uint64_t(u), uint64_t(v), uint64_t(w)); }
|
||||
FI constexpr XYZEval<float> asFloat() const { return LOGICAL_AXIS_ARRAY(static_cast<float>(e), static_cast<float>(x), static_cast<float>(y), static_cast<float>(z), static_cast<float>(i), static_cast<float>(j), static_cast<float>(k), static_cast<float>(u), static_cast<float>(v), static_cast<float>(w)); }
|
||||
|
||||
// Marlin workspace shifting is done with G92 and M206
|
||||
FI XYZEval<float> asLogical() const { XYZEval<float> o = asFloat(); toLogical(o); return o; }
|
||||
|
|
@ -889,7 +914,10 @@ struct XYZEval {
|
|||
FI constexpr XYZEval<T> operator- (const XYZEval<T> &rs) const { return LOGICAL_AXIS_ARRAY(T(e - rs.e), T(x - rs.x), T(y - rs.y), T(z - rs.z), T(i - rs.i), T(j - rs.j), T(k - rs.k), T(u - rs.u), T(v - rs.v), T(w - rs.w)); }
|
||||
FI constexpr XYZEval<T> operator* (const XYZEval<T> &rs) const { return LOGICAL_AXIS_ARRAY(T(e * rs.e), T(x * rs.x), T(y * rs.y), T(z * rs.z), T(i * rs.i), T(j * rs.j), T(k * rs.k), T(u * rs.u), T(v * rs.v), T(w * rs.w)); }
|
||||
FI constexpr XYZEval<T> operator/ (const XYZEval<T> &rs) const { return LOGICAL_AXIS_ARRAY(T(e / rs.e), T(x / rs.x), T(y / rs.y), T(z / rs.z), T(i / rs.i), T(j / rs.j), T(k / rs.k), T(u / rs.u), T(v / rs.v), T(w / rs.w)); }
|
||||
FI constexpr XYZEval<T> operator+ (const uint32_t &p) const { return LOGICAL_AXIS_ARRAY(T(e + p), T(x + p), T(y + p), T(z + p), T(i + p), T(j + p), T(k + p), T(u + p), T(v + p), T(w + p)); }
|
||||
FI constexpr XYZEval<T> operator* (const float &p) const { return LOGICAL_AXIS_ARRAY(T(e * p), T(x * p), T(y * p), T(z * p), T(i * p), T(j * p), T(k * p), T(u * p), T(v * p), T(w * p)); }
|
||||
FI constexpr XYZEval<T> operator* (const uint32_t &p) const { return LOGICAL_AXIS_ARRAY(T(e * p), T(x * p), T(y * p), T(z * p), T(i * p), T(j * p), T(k * p), T(u * p), T(v * p), T(w * p)); }
|
||||
FI constexpr XYZEval<T> operator& (const int64_t &p) const { return LOGICAL_AXIS_ARRAY(T(e & p), T(x & p), T(y & p), T(z & p), T(i & p), T(j & p), T(k & p), T(u & p), T(v & p), T(w & p)); }
|
||||
FI constexpr XYZEval<T> operator* (const int &p) const { return LOGICAL_AXIS_ARRAY(e * p, x * p, y * p, z * p, i * p, j * p, k * p, u * p, v * p, w * p); }
|
||||
FI constexpr XYZEval<T> operator/ (const float &p) const { return LOGICAL_AXIS_ARRAY(T(e / p), T(x / p), T(y / p), T(z / p), T(i / p), T(j / p), T(k / p), T(u / p), T(v / p), T(w / p)); }
|
||||
FI constexpr XYZEval<T> operator/ (const int &p) const { return LOGICAL_AXIS_ARRAY(e / p, x / p, y / p, z / p, i / p, j / p, k / p, u / p, v / p, w / p); }
|
||||
|
|
@ -920,14 +948,22 @@ struct XYZEval {
|
|||
FI XYZEval<T>& operator<<=(const int &p) { LOGICAL_AXIS_CODE(_LSE(e), _LSE(x), _LSE(y), _LSE(z), _LSE(i), _LSE(j), _LSE(k), _LSE(u), _LSE(v), _LSE(w)); return *this; }
|
||||
|
||||
// Exact comparisons. For floats a "NEAR" operation may be better.
|
||||
FI bool operator==(const XYZval<T> &rs) const { return true NUM_AXIS_GANG(&& x == rs.x, && y == rs.y, && z == rs.z, && i == rs.i, && j == rs.j, && k == rs.k, && u == rs.u, && v == rs.v, && w == rs.w); }
|
||||
FI bool operator==(const XYZEval<T> &rs) const { return true LOGICAL_AXIS_GANG(&& e == rs.e, && x == rs.x, && y == rs.y, && z == rs.z, && i == rs.i, && j == rs.j, && k == rs.k, && u == rs.u, && v == rs.v, && w == rs.w); }
|
||||
FI bool operator==(const XYZval<T> &rs) const { return ENABLED(HAS_X_AXIS) NUM_AXIS_GANG(&& x == rs.x, && y == rs.y, && z == rs.z, && i == rs.i, && j == rs.j, && k == rs.k, && u == rs.u, && v == rs.v, && w == rs.w); }
|
||||
FI bool operator==(const XYZEval<T> &rs) const { return ANY(HAS_X_AXIS, HAS_EXTRUDERS) LOGICAL_AXIS_GANG(&& e == rs.e, && x == rs.x, && y == rs.y, && z == rs.z, && i == rs.i, && j == rs.j, && k == rs.k, && u == rs.u, && v == rs.v, && w == rs.w); }
|
||||
FI bool operator!=(const XYZval<T> &rs) const { return !operator==(rs); }
|
||||
FI bool operator!=(const XYZEval<T> &rs) const { return !operator==(rs); }
|
||||
|
||||
// Exact comparison to a single value
|
||||
FI bool operator==(const T &p) const { return ENABLED(HAS_X_AXIS) LOGICAL_AXIS_GANG(&& e == p, && x == p, && y == p, && z == p, && i == p, && j == p, && k == p, && u == p, && v == p, && w == p); }
|
||||
FI bool operator!=(const T &p) const { return !operator==(p); }
|
||||
|
||||
};
|
||||
|
||||
#include <string.h> // for memset
|
||||
|
||||
//
|
||||
// Axis indexed arrays of type T (x[SIZE], y[SIZE], etc.)
|
||||
//
|
||||
template<typename T, int SIZE>
|
||||
struct XYZarray {
|
||||
typedef T el[SIZE];
|
||||
|
|
@ -1027,6 +1063,9 @@ struct XYZEarray {
|
|||
FI XYZEval<T> operator[](const int n) const { return XYZval<T>(LOGICAL_AXIS_ARRAY(e[n], x[n], y[n], z[n], i[n], j[n], k[n], u[n], v[n], w[n])); }
|
||||
};
|
||||
|
||||
//
|
||||
// Axes mapped to bits in a mask of minimum size, bits_t(NUM_AXIS_HEADS)
|
||||
//
|
||||
class AxisBits {
|
||||
public:
|
||||
typedef bits_t(NUM_AXIS_HEADS) el;
|
||||
|
|
|
|||
|
|
@ -867,7 +867,7 @@ namespace MMU3 {
|
|||
nozzle_timer.start();
|
||||
LogEchoEvent(F("Cooling Timeout started"));
|
||||
}
|
||||
else if (nozzle_timer.duration() > (PAUSE_PARK_NOZZLE_TIMEOUT * 1000ul)) { // mins->msec.
|
||||
else if (nozzle_timer.duration() > (PAUSE_PARK_NOZZLE_TIMEOUT * 1000UL)) { // mins->msec.
|
||||
mmu_print_saved &= ~(SavedState::CooldownPending);
|
||||
mmu_print_saved |= SavedState::Cooldown;
|
||||
thermal_setTargetHotend(0);
|
||||
|
|
|
|||
|
|
@ -707,7 +707,7 @@ namespace MMU3 {
|
|||
}
|
||||
|
||||
bool ProtocolLogic::Elapsed(uint32_t timeout) const {
|
||||
return _millis() >= (lastUARTActivityMs + timeout);
|
||||
return ELAPSED(_millis(), lastUARTActivityMs + timeout);
|
||||
}
|
||||
|
||||
void ProtocolLogic::RecordUARTActivity() {
|
||||
|
|
@ -716,7 +716,7 @@ namespace MMU3 {
|
|||
|
||||
void ProtocolLogic::RecordReceivedByte(uint8_t c) {
|
||||
lastReceivedBytes[lrb] = c;
|
||||
lrb = (lrb + 1) % lastReceivedBytes.size();
|
||||
lrb = (lrb + 1) % COUNT(lastReceivedBytes);
|
||||
}
|
||||
|
||||
constexpr char NibbleToChar(uint8_t c) {
|
||||
|
|
@ -728,13 +728,13 @@ namespace MMU3 {
|
|||
}
|
||||
|
||||
void ProtocolLogic::FormatLastReceivedBytes(char *dst) {
|
||||
for (uint8_t i = 0; i < lastReceivedBytes.size(); ++i) {
|
||||
uint8_t b = lastReceivedBytes[(lrb - i - 1) % lastReceivedBytes.size()];
|
||||
for (uint8_t i = 0; i < COUNT(lastReceivedBytes); ++i) {
|
||||
uint8_t b = lastReceivedBytes[(COUNT(lastReceivedBytes) - 1 + (lrb - i)) % COUNT(lastReceivedBytes)];
|
||||
dst[i * 3] = NibbleToChar(b >> 4);
|
||||
dst[i * 3 + 1] = NibbleToChar(b & 0xf);
|
||||
dst[i * 3 + 2] = ' ';
|
||||
}
|
||||
dst[(lastReceivedBytes.size() - 1) * 3 + 2] = 0; // terminate properly
|
||||
dst[(COUNT(lastReceivedBytes) - 1) * 3 + 2] = 0; // terminate properly
|
||||
}
|
||||
|
||||
void ProtocolLogic::FormatLastResponseMsgAndClearLRB(char *dst) {
|
||||
|
|
@ -777,18 +777,18 @@ namespace MMU3 {
|
|||
}
|
||||
|
||||
void ProtocolLogic::LogError(const char *reason_P) {
|
||||
char lrb[lastReceivedBytes.size() * 3];
|
||||
FormatLastReceivedBytes(lrb);
|
||||
char _lrb[COUNT(lastReceivedBytes) * 3];
|
||||
FormatLastReceivedBytes(_lrb);
|
||||
|
||||
MMU2_ERROR_MSGRPGM(reason_P);
|
||||
SERIAL_ECHOPGM(", last bytes: ");
|
||||
SERIAL_ECHOLN(lrb);
|
||||
SERIAL_ECHOLN(_lrb);
|
||||
}
|
||||
|
||||
void ProtocolLogic::LogResponse() {
|
||||
char lrb[lastReceivedBytes.size()];
|
||||
FormatLastResponseMsgAndClearLRB(lrb);
|
||||
MMU2_ECHO_MSGLN(lrb);
|
||||
char _lrb[COUNT(lastReceivedBytes)];
|
||||
FormatLastResponseMsgAndClearLRB(_lrb);
|
||||
MMU2_ECHO_MSGLN(_lrb);
|
||||
}
|
||||
|
||||
StepStatus ProtocolLogic::SuppressShortDropOuts(const char *msg_P, StepStatus ss) {
|
||||
|
|
|
|||
|
|
@ -36,24 +36,8 @@
|
|||
#include "mmu_hw/buttons.h"
|
||||
#include "mmu_hw/registers.h"
|
||||
#include "mmu3_protocol.h"
|
||||
|
||||
// #include <array> std array is not available on AVR ... we need to "fake" it
|
||||
namespace std {
|
||||
template <typename T, uint8_t N>
|
||||
class array {
|
||||
T data[N];
|
||||
public:
|
||||
array() = default;
|
||||
inline constexpr T *begin() const { return data; }
|
||||
inline constexpr T *end() const { return data + N; }
|
||||
static constexpr uint8_t size() { return N; }
|
||||
inline T &operator[](uint8_t i) { return data[i]; }
|
||||
};
|
||||
} // std
|
||||
|
||||
#else // !__AVR__
|
||||
|
||||
#include <array>
|
||||
#include "mmu_hw/error_codes.h"
|
||||
#include "mmu_hw/progress_codes.h"
|
||||
|
||||
|
|
@ -351,8 +335,7 @@ namespace MMU3 {
|
|||
|
||||
Protocol protocol; //!< protocol codec
|
||||
|
||||
std::array<uint8_t, 16> lastReceivedBytes; //!< remembers the last few bytes of incoming communication for diagnostic purposes
|
||||
uint8_t lrb;
|
||||
uint8_t lrb, lastReceivedBytes[16]; //!< keep the last few bytes of incoming communication for diagnostic purposes
|
||||
|
||||
ErrorCode errorCode; //!< last received error code from the MMU
|
||||
ProgressCode progressCode; //!< last received progress code from the MMU
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ void GcodeSuite::G34() {
|
|||
// Decreasing accuracy was detected so move was inverted.
|
||||
// Will match reversed Z steppers on dual steppers. Triple will need more work to map.
|
||||
if (adjustment_reverse) {
|
||||
z_align_move = -z_align_move;
|
||||
z_align_move *= -1;
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", zstepper + 1, " correction reversed to ", z_align_move);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -41,6 +41,9 @@
|
|||
* With ADVANCE_K_EXTRA:
|
||||
* S<0/1> Activate slot 0 or 1.
|
||||
* L<factor> Set secondary advance K factor (Slot 1).
|
||||
*
|
||||
* With SMOOTH_LIN_ADVANCE:
|
||||
* U<tau> Set a tau value for LA smoothing
|
||||
*/
|
||||
void GcodeSuite::M900() {
|
||||
|
||||
|
|
|
|||
|
|
@ -1867,6 +1867,8 @@
|
|||
#endif
|
||||
#if ANY_AXIS_HAS(SW_SERIAL)
|
||||
#define HAS_TMC_SW_SERIAL 1
|
||||
#elif HAS_TRINAMIC_CONFIG
|
||||
#define HAS_TMC_WITHOUT_SW_SERIAL 1
|
||||
#endif
|
||||
#ifndef SERIAL_FLOAT_PRECISION
|
||||
#define SERIAL_FLOAT_PRECISION 2
|
||||
|
|
@ -3063,13 +3065,17 @@
|
|||
#define HAS_MOTOR_CURRENT_PWM 1
|
||||
#endif
|
||||
|
||||
#if PINS_EXIST(MS1, MS2)
|
||||
#define HAS_SHARED_MICROSTEPPING_PINS 1
|
||||
#endif
|
||||
|
||||
#if ANY(HAS_Z_MS_PINS, HAS_Z2_MS_PINS, HAS_Z3_MS_PINS, HAS_Z4_MS_PINS)
|
||||
#define HAS_SOME_Z_MS_PINS 1
|
||||
#endif
|
||||
#if ANY(HAS_E0_MS_PINS, HAS_E1_MS_PINS, HAS_E2_MS_PINS, HAS_E3_MS_PINS, HAS_E4_MS_PINS, HAS_E5_MS_PINS, HAS_E6_MS_PINS, HAS_E7_MS_PINS)
|
||||
#define HAS_SOME_E_MS_PINS 1
|
||||
#endif
|
||||
#if ANY(HAS_X_MS_PINS, HAS_X2_MS_PINS, HAS_Y_MS_PINS, HAS_Y2_MS_PINS, HAS_SOME_Z_MS_PINS, HAS_I_MS_PINS, HAS_J_MS_PINS, HAS_K_MS_PINS, HAS_U_MS_PINS, HAS_V_MS_PINS, HAS_W_MS_PINS, HAS_SOME_E_MS_PINS)
|
||||
#if ANY(HAS_X_MS_PINS, HAS_X2_MS_PINS, HAS_Y_MS_PINS, HAS_Y2_MS_PINS, HAS_SOME_Z_MS_PINS, HAS_I_MS_PINS, HAS_J_MS_PINS, HAS_K_MS_PINS, HAS_U_MS_PINS, HAS_V_MS_PINS, HAS_W_MS_PINS, HAS_SOME_E_MS_PINS, HAS_SHARED_MICROSTEPPING_PINS)
|
||||
#define HAS_MICROSTEPS 1
|
||||
#else
|
||||
#undef MICROSTEP_MODES
|
||||
|
|
|
|||
|
|
@ -21,9 +21,22 @@
|
|||
*/
|
||||
#pragma once
|
||||
|
||||
//
|
||||
// Prefix header for all Marlin sources
|
||||
//
|
||||
/**
|
||||
* MarlinConfig.h
|
||||
*
|
||||
* Prefix header for all Marlin sources. Includes the following:
|
||||
*
|
||||
* Conditionals-6-type.h
|
||||
* MarlinConfigPre-6-type.h
|
||||
* Conditionals-5-post.h
|
||||
* MarlinConfigPre.h
|
||||
* ... (see the file) ...
|
||||
* HAL.h
|
||||
* pins.h
|
||||
* HAL/timers.h
|
||||
* HAL/spi_pins.h
|
||||
* types.h
|
||||
*/
|
||||
|
||||
#include "Conditionals-6-type.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -21,9 +21,28 @@
|
|||
*/
|
||||
#pragma once
|
||||
|
||||
//
|
||||
// Prefix header to acquire configurations
|
||||
//
|
||||
/**
|
||||
* MarlinConfigPre.h
|
||||
*
|
||||
* Prefix header to acquire Configurations. Includes the following:
|
||||
*
|
||||
* Conditionals-1-axes.h
|
||||
* MarlinConfigPre-1-axes.h
|
||||
* Config.h
|
||||
* macros.h
|
||||
* boards.h
|
||||
* Configuration.h (if not Config.h)
|
||||
* HAL/platforms.h
|
||||
* Version.h
|
||||
* Conditionals-2-LCD.h
|
||||
* Conditionals-3-etc.h
|
||||
* Conditionals-4-adv.h
|
||||
* MarlinConfigPre-4-adv.h
|
||||
* Conditionals-3-etc.h (as above)
|
||||
* drivers.h
|
||||
* Configuration_adv.h (if not Config.h)
|
||||
*/
|
||||
|
||||
#include "Conditionals-1-axes.h"
|
||||
#include "Conditionals-2-LCD.h"
|
||||
#include "Conditionals-3-etc.h"
|
||||
|
|
|
|||
|
|
@ -40,6 +40,9 @@
|
|||
#error "Marlin requires C++11 support (gcc >= 4.7, Arduino IDE >= 1.6.8). Please upgrade your toolchain."
|
||||
#endif
|
||||
|
||||
// Emit the GCC version
|
||||
//static_assert(false, "GCC version: " STRINGIFY(__GNUC__) "." STRINGIFY(__GNUC_MINOR__) "." STRINGIFY(__GNUC_PATCHLEVEL__));
|
||||
|
||||
// Strings for sanity check messages
|
||||
#define _NUM_AXES_STR NUM_AXIS_GANG("X ", "Y ", "Z ", "I ", "J ", "K ", "U ", "V ", "W ")
|
||||
#define _LOGICAL_AXES_STR LOGICAL_AXIS_GANG("E ", "X ", "Y ", "Z ", "I ", "J ", "K ", "U ", "V ", "W ")
|
||||
|
|
@ -4531,6 +4534,17 @@ static_assert(WITHIN(MULTISTEPPING_LIMIT, 1, 128) && IS_POWER_OF_2(MULTISTEPPING
|
|||
#error "CONFIGURABLE_MACHINE_NAME requires GCODE_QUOTED_STRINGS."
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Shared Microstepping Pins Sanity Check
|
||||
*/
|
||||
#if HAS_SHARED_MICROSTEPPING_PINS
|
||||
static constexpr uint8_t _microstep_modes[] = MICROSTEP_MODES, mm0 = _microstep_modes[0];
|
||||
static_assert(
|
||||
_microstep_modes[1] == mm0 && _microstep_modes[2] == mm0 && _microstep_modes[3] == mm0 && _microstep_modes[4] == mm0 && _microstep_modes[5] == mm0,
|
||||
"When using shared microstepping pins (MS1_PIN and MS2_PIN), all MICROSTEP_MODES values must be identical."
|
||||
);
|
||||
#endif
|
||||
|
||||
// Misc. Cleanup
|
||||
#undef _TEST_PWM
|
||||
#undef _NUM_AXES_STR
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
* version was tagged.
|
||||
*/
|
||||
#ifndef STRING_DISTRIBUTION_DATE
|
||||
#define STRING_DISTRIBUTION_DATE "2025-10-24"
|
||||
#define STRING_DISTRIBUTION_DATE "2025-10-29"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -932,6 +932,12 @@
|
|||
#if ENABLED(FTM_HOME_AND_PROBE) && DELAY_BEFORE_PROBING <= 25
|
||||
#warning "A longer DELAY_BEFORE_PROBING is recommended when using a probe with FT_MOTION."
|
||||
#endif
|
||||
#if ENABLED(NONLINEAR_EXTRUSION)
|
||||
#warning "NONLINEAR_EXTRUSION does not (currently) operate when FT_MOTION is the active motion system."
|
||||
#endif
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
#warning "Be aware that FT_MOTION K factor (M493 K) is a separate setting from LIN_ADVANCE K factor (M900 K)."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@
|
|||
static const uint8_t u8g_dev_ssd13xx_HAL_sleep_on[] PROGMEM = {
|
||||
U8G_ESC_ADR(0), // Instruction mode
|
||||
U8G_ESC_CS(1), // Enable chip
|
||||
SH1106_ON(0) // Display off
|
||||
SH1106_ON(0), // Display off
|
||||
U8G_ESC_CS(0), // Disable chip
|
||||
U8G_ESC_END // End of sequence
|
||||
};
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ void DGUSScreenHandler::handleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
|||
const uint16_t backup_speed = MMS_TO_MMM(feedrate_mm_s);
|
||||
char sign[] = "\0";
|
||||
int16_t value = movevalue / 100;
|
||||
if (movevalue < 0) { value = -value; sign[0] = '-'; }
|
||||
if (movevalue < 0) { value *= -1; sign[0] = '-'; }
|
||||
int16_t fraction = ABS(movevalue) % 100;
|
||||
snprintf_P(buf, 32, PSTR("G0 %c%s%d.%02d F%d"), axiscode, sign, value, fraction, speed);
|
||||
queue.enqueue_one_now(buf);
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ void DGUSScreenHandler::handleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
|||
const uint16_t backup_speed = MMS_TO_MMM(feedrate_mm_s);
|
||||
char sign[] = "\0";
|
||||
int16_t value = movevalue / 100;
|
||||
if (movevalue < 0) { value = -value; sign[0] = '-'; }
|
||||
if (movevalue < 0) { value *= -1; sign[0] = '-'; }
|
||||
int16_t fraction = ABS(movevalue) % 100;
|
||||
snprintf_P(buf, 32, PSTR("G0 %c%s%d.%02d F%d"), axiscode, sign, value, fraction, speed);
|
||||
queue.enqueue_one_now(buf);
|
||||
|
|
|
|||
|
|
@ -778,7 +778,7 @@ void DGUSScreenHandler::handleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
|||
char buf[32]; // G1 X9999.99 F12345
|
||||
char sign[] = "\0";
|
||||
int16_t value = movevalue / 100;
|
||||
if (movevalue < 0) { value = -value; sign[0] = '-'; }
|
||||
if (movevalue < 0) { value *= -1; sign[0] = '-'; }
|
||||
const int16_t fraction = ABS(movevalue) % 100;
|
||||
snprintf_P(buf, 32, PSTR("G0 %c%s%d.%02d F%d"), axiscode, sign, value, fraction, speed);
|
||||
queue.enqueue_one_now(buf);
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ void DGUSScreenHandler::handleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
|||
const uint16_t backup_speed = MMS_TO_MMM(feedrate_mm_s);
|
||||
char sign[] = "\0";
|
||||
int16_t value = movevalue / 100;
|
||||
if (movevalue < 0) { value = -value; sign[0] = '-'; }
|
||||
if (movevalue < 0) { value *= -1; sign[0] = '-'; }
|
||||
int16_t fraction = ABS(movevalue) % 100;
|
||||
snprintf_P(buf, 32, PSTR("G0 %c%s%d.%02d F%d"), axiscode, sign, value, fraction, speed);
|
||||
queue.enqueue_one_now(buf);
|
||||
|
|
|
|||
|
|
@ -676,11 +676,11 @@ void DGUSRxHandler::moveStep(DGUS_VP &vp, void *data_ptr) {
|
|||
|
||||
switch (direction) {
|
||||
default: return;
|
||||
case DGUS_Data::MoveDirection::XM: offset = -offset;
|
||||
case DGUS_Data::MoveDirection::XM: offset *= -1;
|
||||
case DGUS_Data::MoveDirection::XP: axis = ExtUI::X; break;
|
||||
case DGUS_Data::MoveDirection::YM: offset = -offset;
|
||||
case DGUS_Data::MoveDirection::YM: offset *= -1;
|
||||
case DGUS_Data::MoveDirection::YP: axis = ExtUI::Y; break;
|
||||
case DGUS_Data::MoveDirection::ZM: offset = -offset;
|
||||
case DGUS_Data::MoveDirection::ZM: offset *= -1;
|
||||
case DGUS_Data::MoveDirection::ZP: axis = ExtUI::Z; break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ void reset_ball() {
|
|||
bdat.ballv = FTOF(1.3f);
|
||||
bdat.ballh = -FTOF(1.25f);
|
||||
uint8_t bx = bdat.paddle_x + (PADDLE_W) / 2 + ball_dist;
|
||||
if (bx >= GAME_WIDTH - 10) { bx -= ball_dist * 2; bdat.ballh = -bdat.ballh; }
|
||||
if (bx >= GAME_WIDTH - 10) { bx -= ball_dist * 2; bdat.ballh *= -1; }
|
||||
bdat.ballx = BTOF(bx);
|
||||
bdat.hit_dir = -1;
|
||||
}
|
||||
|
|
@ -71,10 +71,10 @@ void BrickoutGame::game_screen() {
|
|||
// Provisionally update the ball position
|
||||
const fixed_t newx = bdat.ballx + bdat.ballh, newy = bdat.bally + bdat.ballv; // current next position
|
||||
if (!WITHIN(newx, 0, BTOF(GAME_WIDTH - 1))) { // out in x?
|
||||
bdat.ballh = -bdat.ballh; _BUZZ(5, 220); // bounce x
|
||||
bdat.ballh *= -1; _BUZZ(5, 220); // bounce x
|
||||
}
|
||||
if (newy < 0) { // out in y?
|
||||
bdat.ballv = -bdat.ballv; _BUZZ(5, 280); // bounce v
|
||||
bdat.ballv *= -1; _BUZZ(5, 280); // bounce v
|
||||
bdat.hit_dir = 1;
|
||||
}
|
||||
// Did the ball go below the bottom?
|
||||
|
|
@ -96,8 +96,8 @@ void BrickoutGame::game_screen() {
|
|||
// If bricks are gone, go to reset state
|
||||
if (!--bdat.brick_count) game_state = 2;
|
||||
// Bounce the ball cleverly
|
||||
if ((bdat.ballv < 0) == (bdat.hit_dir < 0)) { bdat.ballv = -bdat.ballv; bdat.ballh += fixed_t(random(-16, 16)); _BUZZ(5, 880); }
|
||||
else { bdat.ballh = -bdat.ballh; bdat.ballv += fixed_t(random(-16, 16)); _BUZZ(5, 640); }
|
||||
if ((bdat.ballv < 0) == (bdat.hit_dir < 0)) { bdat.ballv *= -1; bdat.ballh += fixed_t(random(-16, 16)); _BUZZ(5, 880); }
|
||||
else { bdat.ballh *= -1; bdat.ballv += fixed_t(random(-16, 16)); _BUZZ(5, 640); }
|
||||
}
|
||||
}
|
||||
// Is the ball moving down and in paddle range?
|
||||
|
|
@ -107,13 +107,13 @@ void BrickoutGame::game_screen() {
|
|||
if (WITHIN(diff, 0, PADDLE_W - 1)) {
|
||||
|
||||
// Reverse Y direction
|
||||
bdat.ballv = -bdat.ballv; _BUZZ(3, 880);
|
||||
bdat.ballv *= -1; _BUZZ(3, 880);
|
||||
bdat.hit_dir = -1;
|
||||
|
||||
// Near edges affects X velocity
|
||||
const bool is_left_edge = (diff <= 1);
|
||||
if (is_left_edge || diff >= PADDLE_W-1 - 1) {
|
||||
if ((bdat.ballh > 0) == is_left_edge) bdat.ballh = -bdat.ballh;
|
||||
if ((bdat.ballh > 0) == is_left_edge) bdat.ballh *= -1;
|
||||
}
|
||||
else if (diff <= 3) {
|
||||
bdat.ballh += fixed_t(random(-64, 0));
|
||||
|
|
|
|||
|
|
@ -2415,9 +2415,10 @@ bool Planner::_populate_block(
|
|||
* Check the appropriate K value for Standard or Fixed-Time Motion.
|
||||
*/
|
||||
if (esteps && dm.e) {
|
||||
const bool ftm_active = TERN0(FTM_HAS_LIN_ADVANCE, ftMotion.cfg.active);
|
||||
const bool ftm_active = TERN0(FTM_HAS_LIN_ADVANCE, ftMotion.cfg.active),
|
||||
ftm_la_active = TERN0(FTM_HAS_LIN_ADVANCE, ftm_active && ftMotion.cfg.linearAdvEna);
|
||||
const float advK = ftm_active
|
||||
? TERN0(FTM_HAS_LIN_ADVANCE, ftMotion.cfg.linearAdvK)
|
||||
? (ftm_la_active ? TERN0(FTM_HAS_LIN_ADVANCE, ftMotion.cfg.linearAdvK) : 0)
|
||||
: TERN0(HAS_ROUGH_LIN_ADVANCE, extruder_advance_K[E_INDEX_N(extruder)]);
|
||||
if (advK) {
|
||||
float e_D_ratio = (target_float.e - position_float.e) /
|
||||
|
|
@ -2437,7 +2438,7 @@ bool Planner::_populate_block(
|
|||
const uint32_t max_accel_steps_per_s2 = (MAX_E_JERK(extruder) / (advK * e_D_ratio)) * steps_per_mm;
|
||||
if (accel > max_accel_steps_per_s2) {
|
||||
accel = max_accel_steps_per_s2;
|
||||
if (TERN0(LA_DEBUG, DEBUGGING(INFO))) SERIAL_ECHOLNPGM("Acceleration limited.");
|
||||
if (TERN0(LA_DEBUG, DEBUGGING(INFO))) SERIAL_ECHOLNPGM("Acceleration limited to max_accel_steps_per_s2 (", max_accel_steps_per_s2, ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -209,12 +209,12 @@ typedef struct PlannerBlock {
|
|||
|
||||
volatile block_flags_t flag; // Block flags
|
||||
|
||||
bool is_sync_pos() { return flag.sync_position; }
|
||||
bool is_sync_fan() { return TERN0(LASER_SYNCHRONOUS_M106_M107, flag.sync_fans); }
|
||||
bool is_sync_pwr() { return TERN0(LASER_POWER_SYNC, flag.sync_laser_pwr); }
|
||||
bool is_sync() { return is_sync_pos() || is_sync_fan() || is_sync_pwr(); }
|
||||
bool is_page() { return TERN0(DIRECT_STEPPING, flag.page); }
|
||||
bool is_move() { return !(is_sync() || is_page()); }
|
||||
bool is_sync_pos() const { return flag.sync_position; }
|
||||
bool is_sync_fan() const { return TERN0(LASER_SYNCHRONOUS_M106_M107, flag.sync_fans); }
|
||||
bool is_sync_pwr() const { return TERN0(LASER_POWER_SYNC, flag.sync_laser_pwr); }
|
||||
bool is_sync() const { return is_sync_pos() || is_sync_fan() || is_sync_pwr(); }
|
||||
bool is_page() const { return TERN0(DIRECT_STEPPING, flag.page); }
|
||||
bool is_move() const { return !(is_sync() || is_page()); }
|
||||
|
||||
// Fields used by the motion planner to manage acceleration
|
||||
float nominal_speed, // The nominal speed for this block in (mm/sec)
|
||||
|
|
|
|||
|
|
@ -2438,6 +2438,7 @@ hal_timer_t Stepper::block_phase_isr() {
|
|||
acceleration_time += interval;
|
||||
deceleration_time = 0; // Reset since we're doing acceleration first.
|
||||
|
||||
// Apply Nonlinear Extrusion, if enabled
|
||||
calc_nonlinear_e(acc_step_rate << oversampling_factor);
|
||||
|
||||
#if HAS_ROUGH_LIN_ADVANCE
|
||||
|
|
@ -2502,6 +2503,7 @@ hal_timer_t Stepper::block_phase_isr() {
|
|||
interval = calc_multistep_timer_interval(step_rate << oversampling_factor);
|
||||
deceleration_time += interval;
|
||||
|
||||
// Apply Nonlinear Extrusion, if enabled
|
||||
calc_nonlinear_e(step_rate << oversampling_factor);
|
||||
|
||||
#if HAS_ROUGH_LIN_ADVANCE
|
||||
|
|
@ -2513,7 +2515,7 @@ hal_timer_t Stepper::block_phase_isr() {
|
|||
|
||||
if (forward_e != motor_direction(E_AXIS)) {
|
||||
last_direction_bits.toggle(E_AXIS);
|
||||
count_direction.e = -count_direction.e;
|
||||
count_direction.e *= -1;
|
||||
|
||||
DIR_WAIT_BEFORE();
|
||||
|
||||
|
|
@ -2555,6 +2557,7 @@ hal_timer_t Stepper::block_phase_isr() {
|
|||
TERN_(SMOOTH_LIN_ADVANCE, curr_step_rate = current_block->nominal_rate;)
|
||||
deceleration_time = ticks_nominal / 2;
|
||||
|
||||
// Apply Nonlinear Extrusion, if enabled
|
||||
calc_nonlinear_e(current_block->nominal_rate << oversampling_factor);
|
||||
|
||||
#if HAS_ROUGH_LIN_ADVANCE
|
||||
|
|
@ -2696,7 +2699,7 @@ hal_timer_t Stepper::block_phase_isr() {
|
|||
TERN_(HAS_ROUGH_LIN_ADVANCE, la_delta_error = delta_error);
|
||||
|
||||
// Calculate Bresenham dividends and divisors
|
||||
advance_dividend = (current_block->steps << 1).asLong();
|
||||
advance_dividend = (current_block->steps << 1).asInt32();
|
||||
advance_divisor = step_event_count << 1;
|
||||
|
||||
#if ENABLED(INPUT_SHAPING_X)
|
||||
|
|
@ -2826,6 +2829,7 @@ hal_timer_t Stepper::block_phase_isr() {
|
|||
// Initialize ac/deceleration time as if half the time passed.
|
||||
acceleration_time = deceleration_time = interval / 2;
|
||||
|
||||
// Apply Nonlinear Extrusion, if enabled
|
||||
calc_nonlinear_e(current_block->initial_rate << oversampling_factor);
|
||||
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
|
|
@ -2872,7 +2876,7 @@ hal_timer_t Stepper::block_phase_isr() {
|
|||
la_interval = calc_timer_interval(uint32_t(ABS(step_rate)));
|
||||
if (forward_e != motor_direction(E_AXIS)) {
|
||||
last_direction_bits.toggle(E_AXIS);
|
||||
count_direction.e = -count_direction.e;
|
||||
count_direction.e *= -1;
|
||||
DIR_WAIT_BEFORE();
|
||||
E_APPLY_DIR(forward_e, false);
|
||||
TERN_(FT_MOTION, last_set_direction = last_direction_bits);
|
||||
|
|
|
|||
|
|
@ -361,252 +361,268 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_SHARED_MICROSTEPPING_PINS
|
||||
SET_OUTPUT(MS1_PIN); SET_OUTPUT(MS2_PIN);
|
||||
#endif
|
||||
|
||||
static const uint8_t microstep_modes[] = MICROSTEP_MODES;
|
||||
for (uint16_t i = 0; i < COUNT(microstep_modes); i++)
|
||||
microstep_mode(i, microstep_modes[i]);
|
||||
#if HAS_SHARED_MICROSTEPPING_PINS
|
||||
// When using shared microstepping pins, set microstepping once for all drivers
|
||||
microstep_mode(0, microstep_modes[0]);
|
||||
#else
|
||||
for (uint16_t i = 0; i < COUNT(microstep_modes); i++)
|
||||
microstep_mode(i, microstep_modes[i]);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Stepper::microstep_ms(const uint8_t driver, const int8_t ms1, const int8_t ms2, const int8_t ms3) {
|
||||
if (ms1 >= 0) switch (driver) {
|
||||
#if HAS_X_MS_PINS || HAS_X2_MS_PINS
|
||||
case X_AXIS:
|
||||
#if HAS_X_MS_PINS
|
||||
WRITE(X_MS1_PIN, ms1);
|
||||
#endif
|
||||
#if HAS_X2_MS_PINS
|
||||
WRITE(X2_MS1_PIN, ms1);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
#if HAS_Y_MS_PINS || HAS_Y2_MS_PINS
|
||||
case Y_AXIS:
|
||||
#if HAS_Y_MS_PINS
|
||||
WRITE(Y_MS1_PIN, ms1);
|
||||
#endif
|
||||
#if HAS_Y2_MS_PINS
|
||||
WRITE(Y2_MS1_PIN, ms1);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
#if HAS_SOME_Z_MS_PINS
|
||||
case Z_AXIS:
|
||||
#if HAS_Z_MS_PINS
|
||||
WRITE(Z_MS1_PIN, ms1);
|
||||
#endif
|
||||
#if HAS_Z2_MS_PINS
|
||||
WRITE(Z2_MS1_PIN, ms1);
|
||||
#endif
|
||||
#if HAS_Z3_MS_PINS
|
||||
WRITE(Z3_MS1_PIN, ms1);
|
||||
#endif
|
||||
#if HAS_Z4_MS_PINS
|
||||
WRITE(Z4_MS1_PIN, ms1);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
#if HAS_I_MS_PINS
|
||||
case I_AXIS: WRITE(I_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_J_MS_PINS
|
||||
case J_AXIS: WRITE(J_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_K_MS_PINS
|
||||
case K_AXIS: WRITE(K_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_U_MS_PINS
|
||||
case U_AXIS: WRITE(U_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_V_MS_PINS
|
||||
case V_AXIS: WRITE(V_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_W_MS_PINS
|
||||
case W_AXIS: WRITE(W_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_E0_MS_PINS
|
||||
case E_AXIS: WRITE(E0_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_E1_MS_PINS
|
||||
case (E_AXIS + 1): WRITE(E1_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_E2_MS_PINS
|
||||
case (E_AXIS + 2): WRITE(E2_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_E3_MS_PINS
|
||||
case (E_AXIS + 3): WRITE(E3_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_E4_MS_PINS
|
||||
case (E_AXIS + 4): WRITE(E4_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_E5_MS_PINS
|
||||
case (E_AXIS + 5): WRITE(E5_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_E6_MS_PINS
|
||||
case (E_AXIS + 6): WRITE(E6_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_E7_MS_PINS
|
||||
case (E_AXIS + 7): WRITE(E7_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
}
|
||||
if (ms2 >= 0) switch (driver) {
|
||||
#if HAS_X_MS_PINS || HAS_X2_MS_PINS
|
||||
case X_AXIS:
|
||||
#if HAS_X_MS_PINS
|
||||
WRITE(X_MS2_PIN, ms2);
|
||||
#endif
|
||||
#if HAS_X2_MS_PINS
|
||||
WRITE(X2_MS2_PIN, ms2);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
#if HAS_Y_MS_PINS || HAS_Y2_MS_PINS
|
||||
case Y_AXIS:
|
||||
#if HAS_Y_MS_PINS
|
||||
WRITE(Y_MS2_PIN, ms2);
|
||||
#endif
|
||||
#if HAS_Y2_MS_PINS
|
||||
WRITE(Y2_MS2_PIN, ms2);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
#if HAS_SOME_Z_MS_PINS
|
||||
case Z_AXIS:
|
||||
#if HAS_Z_MS_PINS
|
||||
WRITE(Z_MS2_PIN, ms2);
|
||||
#endif
|
||||
#if HAS_Z2_MS_PINS
|
||||
WRITE(Z2_MS2_PIN, ms2);
|
||||
#endif
|
||||
#if HAS_Z3_MS_PINS
|
||||
WRITE(Z3_MS2_PIN, ms2);
|
||||
#endif
|
||||
#if HAS_Z4_MS_PINS
|
||||
WRITE(Z4_MS2_PIN, ms2);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
#if HAS_I_MS_PINS
|
||||
case I_AXIS: WRITE(I_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_J_MS_PINS
|
||||
case J_AXIS: WRITE(J_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_K_MS_PINS
|
||||
case K_AXIS: WRITE(K_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_U_MS_PINS
|
||||
case U_AXIS: WRITE(U_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_V_MS_PINS
|
||||
case V_AXIS: WRITE(V_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_W_MS_PINS
|
||||
case W_AXIS: WRITE(W_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_E0_MS_PINS
|
||||
case E_AXIS: WRITE(E0_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_E1_MS_PINS
|
||||
case (E_AXIS + 1): WRITE(E1_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_E2_MS_PINS
|
||||
case (E_AXIS + 2): WRITE(E2_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_E3_MS_PINS
|
||||
case (E_AXIS + 3): WRITE(E3_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_E4_MS_PINS
|
||||
case (E_AXIS + 4): WRITE(E4_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_E5_MS_PINS
|
||||
case (E_AXIS + 5): WRITE(E5_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_E6_MS_PINS
|
||||
case (E_AXIS + 6): WRITE(E6_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_E7_MS_PINS
|
||||
case (E_AXIS + 7): WRITE(E7_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
}
|
||||
if (ms3 >= 0) switch (driver) {
|
||||
#if HAS_X_MS_PINS || HAS_X2_MS_PINS
|
||||
case X_AXIS:
|
||||
#if HAS_X_MS_PINS && PIN_EXISTS(X_MS3)
|
||||
WRITE(X_MS3_PIN, ms3);
|
||||
#endif
|
||||
#if HAS_X2_MS_PINS && PIN_EXISTS(X2_MS3)
|
||||
WRITE(X2_MS3_PIN, ms3);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
#if HAS_Y_MS_PINS || HAS_Y2_MS_PINS
|
||||
case Y_AXIS:
|
||||
#if HAS_Y_MS_PINS && PIN_EXISTS(Y_MS3)
|
||||
WRITE(Y_MS3_PIN, ms3);
|
||||
#endif
|
||||
#if HAS_Y2_MS_PINS && PIN_EXISTS(Y2_MS3)
|
||||
WRITE(Y2_MS3_PIN, ms3);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
#if HAS_SOME_Z_MS_PINS
|
||||
case Z_AXIS:
|
||||
#if HAS_Z_MS_PINS && PIN_EXISTS(Z_MS3)
|
||||
WRITE(Z_MS3_PIN, ms3);
|
||||
#endif
|
||||
#if HAS_Z2_MS_PINS && PIN_EXISTS(Z2_MS3)
|
||||
WRITE(Z2_MS3_PIN, ms3);
|
||||
#endif
|
||||
#if HAS_Z3_MS_PINS && PIN_EXISTS(Z3_MS3)
|
||||
WRITE(Z3_MS3_PIN, ms3);
|
||||
#endif
|
||||
#if HAS_Z4_MS_PINS && PIN_EXISTS(Z4_MS3)
|
||||
WRITE(Z4_MS3_PIN, ms3);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
#if HAS_I_MS_PINS && PIN_EXISTS(I_MS3)
|
||||
case I_AXIS: WRITE(I_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_J_MS_PINS && PIN_EXISTS(J_MS3)
|
||||
case J_AXIS: WRITE(J_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_K_MS_PINS && PIN_EXISTS(K_MS3)
|
||||
case K_AXIS: WRITE(K_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_U_MS_PINS && PIN_EXISTS(U_MS3)
|
||||
case U_AXIS: WRITE(U_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_V_MS_PINS && PIN_EXISTS(V_MS3)
|
||||
case V_AXIS: WRITE(V_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_W_MS_PINS && PIN_EXISTS(W_MS3)
|
||||
case W_AXIS: WRITE(W_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_E0_MS_PINS && PIN_EXISTS(E0_MS3)
|
||||
case E_AXIS: WRITE(E0_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_E1_MS_PINS && PIN_EXISTS(E1_MS3)
|
||||
case (E_AXIS + 1): WRITE(E1_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_E2_MS_PINS && PIN_EXISTS(E2_MS3)
|
||||
case (E_AXIS + 2): WRITE(E2_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_E3_MS_PINS && PIN_EXISTS(E3_MS3)
|
||||
case (E_AXIS + 3): WRITE(E3_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_E4_MS_PINS && PIN_EXISTS(E4_MS3)
|
||||
case (E_AXIS + 4): WRITE(E4_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_E5_MS_PINS && PIN_EXISTS(E5_MS3)
|
||||
case (E_AXIS + 5): WRITE(E5_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_E6_MS_PINS && PIN_EXISTS(E6_MS3)
|
||||
case (E_AXIS + 6): WRITE(E6_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_E7_MS_PINS && PIN_EXISTS(E7_MS3)
|
||||
case (E_AXIS + 7): WRITE(E7_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
}
|
||||
#if HAS_SHARED_MICROSTEPPING_PINS
|
||||
// Use shared microstepping pins for all drivers
|
||||
if (ms1 >= 0) WRITE(MS1_PIN, ms1);
|
||||
if (ms2 >= 0) WRITE(MS2_PIN, ms2);
|
||||
// MS3 is not shared, handled per-driver below
|
||||
#else // !HAS_SHARED_MICROSTEPPING_PINS
|
||||
if (ms1 >= 0) switch (driver) {
|
||||
#if HAS_X_MS_PINS || HAS_X2_MS_PINS
|
||||
case X_AXIS:
|
||||
#if HAS_X_MS_PINS
|
||||
WRITE(X_MS1_PIN, ms1);
|
||||
#endif
|
||||
#if HAS_X2_MS_PINS
|
||||
WRITE(X2_MS1_PIN, ms1);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
#if HAS_Y_MS_PINS || HAS_Y2_MS_PINS
|
||||
case Y_AXIS:
|
||||
#if HAS_Y_MS_PINS
|
||||
WRITE(Y_MS1_PIN, ms1);
|
||||
#endif
|
||||
#if HAS_Y2_MS_PINS
|
||||
WRITE(Y2_MS1_PIN, ms1);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
#if HAS_SOME_Z_MS_PINS
|
||||
case Z_AXIS:
|
||||
#if HAS_Z_MS_PINS
|
||||
WRITE(Z_MS1_PIN, ms1);
|
||||
#endif
|
||||
#if HAS_Z2_MS_PINS
|
||||
WRITE(Z2_MS1_PIN, ms1);
|
||||
#endif
|
||||
#if HAS_Z3_MS_PINS
|
||||
WRITE(Z3_MS1_PIN, ms1);
|
||||
#endif
|
||||
#if HAS_Z4_MS_PINS
|
||||
WRITE(Z4_MS1_PIN, ms1);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
#if HAS_I_MS_PINS
|
||||
case I_AXIS: WRITE(I_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_J_MS_PINS
|
||||
case J_AXIS: WRITE(J_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_K_MS_PINS
|
||||
case K_AXIS: WRITE(K_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_U_MS_PINS
|
||||
case U_AXIS: WRITE(U_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_V_MS_PINS
|
||||
case V_AXIS: WRITE(V_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_W_MS_PINS
|
||||
case W_AXIS: WRITE(W_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_E0_MS_PINS
|
||||
case E_AXIS: WRITE(E0_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_E1_MS_PINS
|
||||
case (E_AXIS + 1): WRITE(E1_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_E2_MS_PINS
|
||||
case (E_AXIS + 2): WRITE(E2_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_E3_MS_PINS
|
||||
case (E_AXIS + 3): WRITE(E3_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_E4_MS_PINS
|
||||
case (E_AXIS + 4): WRITE(E4_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_E5_MS_PINS
|
||||
case (E_AXIS + 5): WRITE(E5_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_E6_MS_PINS
|
||||
case (E_AXIS + 6): WRITE(E6_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
#if HAS_E7_MS_PINS
|
||||
case (E_AXIS + 7): WRITE(E7_MS1_PIN, ms1); break;
|
||||
#endif
|
||||
}
|
||||
if (ms2 >= 0) switch (driver) {
|
||||
#if HAS_X_MS_PINS || HAS_X2_MS_PINS
|
||||
case X_AXIS:
|
||||
#if HAS_X_MS_PINS
|
||||
WRITE(X_MS2_PIN, ms2);
|
||||
#endif
|
||||
#if HAS_X2_MS_PINS
|
||||
WRITE(X2_MS2_PIN, ms2);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
#if HAS_Y_MS_PINS || HAS_Y2_MS_PINS
|
||||
case Y_AXIS:
|
||||
#if HAS_Y_MS_PINS
|
||||
WRITE(Y_MS2_PIN, ms2);
|
||||
#endif
|
||||
#if HAS_Y2_MS_PINS
|
||||
WRITE(Y2_MS2_PIN, ms2);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
#if HAS_SOME_Z_MS_PINS
|
||||
case Z_AXIS:
|
||||
#if HAS_Z_MS_PINS
|
||||
WRITE(Z_MS2_PIN, ms2);
|
||||
#endif
|
||||
#if HAS_Z2_MS_PINS
|
||||
WRITE(Z2_MS2_PIN, ms2);
|
||||
#endif
|
||||
#if HAS_Z3_MS_PINS
|
||||
WRITE(Z3_MS2_PIN, ms2);
|
||||
#endif
|
||||
#if HAS_Z4_MS_PINS
|
||||
WRITE(Z4_MS2_PIN, ms2);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
#if HAS_I_MS_PINS
|
||||
case I_AXIS: WRITE(I_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_J_MS_PINS
|
||||
case J_AXIS: WRITE(J_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_K_MS_PINS
|
||||
case K_AXIS: WRITE(K_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_U_MS_PINS
|
||||
case U_AXIS: WRITE(U_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_V_MS_PINS
|
||||
case V_AXIS: WRITE(V_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_W_MS_PINS
|
||||
case W_AXIS: WRITE(W_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_E0_MS_PINS
|
||||
case E_AXIS: WRITE(E0_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_E1_MS_PINS
|
||||
case (E_AXIS + 1): WRITE(E1_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_E2_MS_PINS
|
||||
case (E_AXIS + 2): WRITE(E2_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_E3_MS_PINS
|
||||
case (E_AXIS + 3): WRITE(E3_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_E4_MS_PINS
|
||||
case (E_AXIS + 4): WRITE(E4_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_E5_MS_PINS
|
||||
case (E_AXIS + 5): WRITE(E5_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_E6_MS_PINS
|
||||
case (E_AXIS + 6): WRITE(E6_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
#if HAS_E7_MS_PINS
|
||||
case (E_AXIS + 7): WRITE(E7_MS2_PIN, ms2); break;
|
||||
#endif
|
||||
}
|
||||
if (ms3 >= 0) switch (driver) {
|
||||
#if HAS_X_MS_PINS || HAS_X2_MS_PINS
|
||||
case X_AXIS:
|
||||
#if HAS_X_MS_PINS && PIN_EXISTS(X_MS3)
|
||||
WRITE(X_MS3_PIN, ms3);
|
||||
#endif
|
||||
#if HAS_X2_MS_PINS && PIN_EXISTS(X2_MS3)
|
||||
WRITE(X2_MS3_PIN, ms3);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
#if HAS_Y_MS_PINS || HAS_Y2_MS_PINS
|
||||
case Y_AXIS:
|
||||
#if HAS_Y_MS_PINS && PIN_EXISTS(Y_MS3)
|
||||
WRITE(Y_MS3_PIN, ms3);
|
||||
#endif
|
||||
#if HAS_Y2_MS_PINS && PIN_EXISTS(Y2_MS3)
|
||||
WRITE(Y2_MS3_PIN, ms3);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
#if HAS_SOME_Z_MS_PINS
|
||||
case Z_AXIS:
|
||||
#if HAS_Z_MS_PINS && PIN_EXISTS(Z_MS3)
|
||||
WRITE(Z_MS3_PIN, ms3);
|
||||
#endif
|
||||
#if HAS_Z2_MS_PINS && PIN_EXISTS(Z2_MS3)
|
||||
WRITE(Z2_MS3_PIN, ms3);
|
||||
#endif
|
||||
#if HAS_Z3_MS_PINS && PIN_EXISTS(Z3_MS3)
|
||||
WRITE(Z3_MS3_PIN, ms3);
|
||||
#endif
|
||||
#if HAS_Z4_MS_PINS && PIN_EXISTS(Z4_MS3)
|
||||
WRITE(Z4_MS3_PIN, ms3);
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
#if HAS_I_MS_PINS && PIN_EXISTS(I_MS3)
|
||||
case I_AXIS: WRITE(I_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_J_MS_PINS && PIN_EXISTS(J_MS3)
|
||||
case J_AXIS: WRITE(J_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_K_MS_PINS && PIN_EXISTS(K_MS3)
|
||||
case K_AXIS: WRITE(K_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_U_MS_PINS && PIN_EXISTS(U_MS3)
|
||||
case U_AXIS: WRITE(U_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_V_MS_PINS && PIN_EXISTS(V_MS3)
|
||||
case V_AXIS: WRITE(V_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_W_MS_PINS && PIN_EXISTS(W_MS3)
|
||||
case W_AXIS: WRITE(W_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_E0_MS_PINS && PIN_EXISTS(E0_MS3)
|
||||
case E_AXIS: WRITE(E0_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_E1_MS_PINS && PIN_EXISTS(E1_MS3)
|
||||
case (E_AXIS + 1): WRITE(E1_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_E2_MS_PINS && PIN_EXISTS(E2_MS3)
|
||||
case (E_AXIS + 2): WRITE(E2_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_E3_MS_PINS && PIN_EXISTS(E3_MS3)
|
||||
case (E_AXIS + 3): WRITE(E3_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_E4_MS_PINS && PIN_EXISTS(E4_MS3)
|
||||
case (E_AXIS + 4): WRITE(E4_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_E5_MS_PINS && PIN_EXISTS(E5_MS3)
|
||||
case (E_AXIS + 5): WRITE(E5_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_E6_MS_PINS && PIN_EXISTS(E6_MS3)
|
||||
case (E_AXIS + 6): WRITE(E6_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
#if HAS_E7_MS_PINS && PIN_EXISTS(E7_MS3)
|
||||
case (E_AXIS + 7): WRITE(E7_MS3_PIN, ms3); break;
|
||||
#endif
|
||||
}
|
||||
#endif // !HAS_SHARED_MICROSTEPPING_PINS
|
||||
}
|
||||
|
||||
// MS1 MS2 MS3 Stepper Driver Microstepping mode table
|
||||
|
|
|
|||
0
Marlin/src/pins/rambo/pins_RAMBO_THINKERV2.h
Executable file → Normal file
0
Marlin/src/pins/rambo/pins_RAMBO_THINKERV2.h
Executable file → Normal file
0
Marlin/src/pins/ramps/pins_PANOWIN_CUTLASS.h
Executable file → Normal file
0
Marlin/src/pins/ramps/pins_PANOWIN_CUTLASS.h
Executable file → Normal file
0
Marlin/src/pins/stm32f1/pins_CHITU3D_V9.h
Executable file → Normal file
0
Marlin/src/pins/stm32f1/pins_CHITU3D_V9.h
Executable file → Normal file
|
|
@ -42,22 +42,22 @@
|
|||
|
||||
#if DISABLED(SD_NO_DEFAULT_TIMEOUT)
|
||||
#ifndef SD_INIT_TIMEOUT
|
||||
#define SD_INIT_TIMEOUT 2000u // (ms) Init timeout
|
||||
#define SD_INIT_TIMEOUT 2000U // (ms) Init timeout
|
||||
#elif SD_INIT_TIMEOUT < 0
|
||||
#error "SD_INIT_TIMEOUT must be greater than or equal to 0."
|
||||
#endif
|
||||
#ifndef SD_ERASE_TIMEOUT
|
||||
#define SD_ERASE_TIMEOUT 10000u // (ms) Erase timeout
|
||||
#define SD_ERASE_TIMEOUT 10000U // (ms) Erase timeout
|
||||
#elif SD_ERASE_TIMEOUT < 0
|
||||
#error "SD_ERASE_TIMEOUT must be greater than or equal to 0."
|
||||
#endif
|
||||
#ifndef SD_READ_TIMEOUT
|
||||
#define SD_READ_TIMEOUT 300u // (ms) Read timeout
|
||||
#define SD_READ_TIMEOUT 300U // (ms) Read timeout
|
||||
#elif SD_READ_TIMEOUT < 0
|
||||
#error "SD_READ_TIMEOUT must be greater than or equal to 0."
|
||||
#endif
|
||||
#ifndef SD_WRITE_TIMEOUT
|
||||
#define SD_WRITE_TIMEOUT 600u // (ms) Write timeout
|
||||
#define SD_WRITE_TIMEOUT 600U // (ms) Write timeout
|
||||
#elif SD_WRITE_TIMEOUT < 0
|
||||
#error "SD_WRITE_TIMEOUT must be greater than or equal to 0."
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -251,14 +251,14 @@ MARLIN_TEST(macros_numeric, NOLESS_int) {
|
|||
|
||||
MARLIN_TEST(macros_numeric, NOLESS_uint) {
|
||||
// Scenario 1: Input was already acceptable
|
||||
unsigned int b = 8u;
|
||||
NOLESS(b, 5u);
|
||||
TEST_ASSERT_EQUAL(8u, b);
|
||||
unsigned int b = 8U;
|
||||
NOLESS(b, 5U);
|
||||
TEST_ASSERT_EQUAL(8U, b);
|
||||
|
||||
// Original scenario: Input was less than the limit
|
||||
b = 5u;
|
||||
NOLESS(b, 10u);
|
||||
TEST_ASSERT_EQUAL(10u, b);
|
||||
b = 5U;
|
||||
NOLESS(b, 10U);
|
||||
TEST_ASSERT_EQUAL(10U, b);
|
||||
}
|
||||
|
||||
MARLIN_TEST(macros_numeric, NOLESS_float) {
|
||||
|
|
@ -310,14 +310,14 @@ MARLIN_TEST(macros_numeric, NOMORE_int) {
|
|||
|
||||
MARLIN_TEST(macros_numeric, NOMORE_uint) {
|
||||
// Scenario 1: Input was already acceptable
|
||||
unsigned int b = 8u;
|
||||
NOMORE(b, 10u);
|
||||
TEST_ASSERT_EQUAL(8u, b);
|
||||
unsigned int b = 8U;
|
||||
NOMORE(b, 10U);
|
||||
TEST_ASSERT_EQUAL(8U, b);
|
||||
|
||||
// Original scenario: Input was more than the limit
|
||||
b = 15u;
|
||||
NOMORE(b, 10u);
|
||||
TEST_ASSERT_EQUAL(10u, b);
|
||||
b = 15U;
|
||||
NOMORE(b, 10U);
|
||||
TEST_ASSERT_EQUAL(10U, b);
|
||||
}
|
||||
|
||||
MARLIN_TEST(macros_numeric, NOMORE_float) {
|
||||
|
|
@ -383,17 +383,17 @@ MARLIN_TEST(macros_numeric, LIMIT_int) {
|
|||
}
|
||||
|
||||
MARLIN_TEST(macros_numeric, LIMIT_uint) {
|
||||
unsigned int b = 15u;
|
||||
LIMIT(b, 10u, 20u);
|
||||
TEST_ASSERT_EQUAL(15u, b);
|
||||
unsigned int b = 15U;
|
||||
LIMIT(b, 10U, 20U);
|
||||
TEST_ASSERT_EQUAL(15U, b);
|
||||
|
||||
b = 5u;
|
||||
LIMIT(b, 10u, 20u);
|
||||
TEST_ASSERT_EQUAL(10u, b);
|
||||
b = 5U;
|
||||
LIMIT(b, 10U, 20U);
|
||||
TEST_ASSERT_EQUAL(10U, b);
|
||||
|
||||
b = 25u;
|
||||
LIMIT(b, 10u, 20u);
|
||||
TEST_ASSERT_EQUAL(20u, b);
|
||||
b = 25U;
|
||||
LIMIT(b, 10U, 20U);
|
||||
TEST_ASSERT_EQUAL(20U, b);
|
||||
}
|
||||
|
||||
MARLIN_TEST(macros_numeric, LIMIT_float) {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
MARLIN_TEST(runout, poll_runout_states) {
|
||||
FilamentSensorBase sensor;
|
||||
// Expected default value is one bit set for each extruder
|
||||
uint8_t expected = static_cast<uint8_t>(~(~0u << NUM_RUNOUT_SENSORS));
|
||||
uint8_t expected = static_cast<uint8_t>(~(~0U << NUM_RUNOUT_SENSORS));
|
||||
TEST_ASSERT_EQUAL(expected, sensor.poll_runout_states());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ set -e
|
|||
FN="platformio.ini"
|
||||
|
||||
if [[ $1 == "-n" ]]; then
|
||||
awk '/default_src_filter/ { sub("default_src_filter", "org_src_filter"); print "default_src_filter = +<src/*>"; } 1' $FN > $FN~ && mv $FN~ $FN
|
||||
if ! grep -q "org_src_filter" "$FN"; then
|
||||
awk '/default_src_filter/ { sub("default_src_filter", "org_src_filter"); print "default_src_filter = +<src/*>"; } 1' $FN > $FN~ && mv $FN~ $FN
|
||||
fi
|
||||
else
|
||||
git checkout $FN 2>/dev/null
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -3,31 +3,34 @@
|
|||
import os, sys, subprocess
|
||||
|
||||
files_to_remove = [
|
||||
"Marlin/_Bootscreen.h",
|
||||
"Marlin/_Statusscreen.h",
|
||||
"marlin_config.json",
|
||||
".pio/build/mc.zip"
|
||||
"Marlin/_Bootscreen.h",
|
||||
"Marlin/_Statusscreen.h",
|
||||
"marlin_config.json",
|
||||
".pio/build/mc.zip"
|
||||
]
|
||||
|
||||
for file in files_to_remove:
|
||||
if os.path.exists(file):
|
||||
os.remove(file)
|
||||
if os.path.exists(file):
|
||||
os.remove(file)
|
||||
|
||||
def use_example_configs():
|
||||
try:
|
||||
subprocess.run(['use_example_configs'], check=True)
|
||||
except FileNotFoundError:
|
||||
print("use_example_configs not found, skipping.")
|
||||
pass
|
||||
try:
|
||||
subprocess.run(['use_example_configs'], check=True)
|
||||
except FileNotFoundError:
|
||||
try:
|
||||
subprocess.run(['./buildroot/bin/use_example_configs'], check=True)
|
||||
except FileNotFoundError:
|
||||
print("use_example_configs not found, skipping.")
|
||||
pass
|
||||
|
||||
if len(sys.argv) > 1 and sys.argv[1] in ['-d', '--default']:
|
||||
use_example_configs()
|
||||
use_example_configs()
|
||||
else:
|
||||
files_to_checkout = [
|
||||
"Marlin/Configuration.h",
|
||||
"Marlin/Configuration_adv.h",
|
||||
"Marlin/config.ini",
|
||||
"Marlin/src/pins/*/pins_*.h"
|
||||
]
|
||||
for file in files_to_checkout:
|
||||
subprocess.run(["git", "checkout", file], stderr=subprocess.DEVNULL)
|
||||
files_to_checkout = [
|
||||
"Marlin/Configuration.h",
|
||||
"Marlin/Configuration_adv.h",
|
||||
"Marlin/config.ini",
|
||||
"Marlin/src/pins/*/pins_*.h"
|
||||
]
|
||||
for file in files_to_checkout:
|
||||
subprocess.run(["git", "checkout", file], stderr=subprocess.DEVNULL)
|
||||
|
|
|
|||
|
|
@ -21,115 +21,118 @@ DEBUGGING = False
|
|||
CONFIG_FILES = ("Configuration.h", "Configuration_adv.h", "_Bootscreen.h", "_Statusscreen.h")
|
||||
|
||||
def debug_print(s):
|
||||
if DEBUGGING: print(s)
|
||||
if DEBUGGING: print(s)
|
||||
|
||||
def get_current_branch():
|
||||
try:
|
||||
result = subprocess.run(['git', 'branch'], capture_output=True, text=True, check=True)
|
||||
for line in result.stdout.splitlines():
|
||||
if line.startswith('*'):
|
||||
return line[2:]
|
||||
except subprocess.CalledProcessError:
|
||||
return None
|
||||
try:
|
||||
result = subprocess.run(['git', 'branch'], capture_output=True, text=True, check=True)
|
||||
for line in result.stdout.splitlines():
|
||||
if line.startswith('*'):
|
||||
return line[2:]
|
||||
except subprocess.CalledProcessError:
|
||||
return None
|
||||
|
||||
def sparse_checkout(branch, config_path, repo_url="https://github.com/MarlinFirmware/Configurations.git"):
|
||||
configs_dir = Path("ConfigurationsRepo")
|
||||
config_subdir = f"config/{config_path}"
|
||||
configs_dir = Path("ConfigurationsRepo")
|
||||
config_subdir = f"config/{config_path}"
|
||||
|
||||
if not configs_dir.exists():
|
||||
# Step 1: Clone with no checkout
|
||||
subprocess.run([
|
||||
"git", "clone", "--depth", "1", "--filter=blob:none", "--sparse",
|
||||
"--branch", branch, repo_url, str(configs_dir)
|
||||
], check=True)
|
||||
if not configs_dir.exists():
|
||||
# Step 1: Clone with no checkout
|
||||
subprocess.run([
|
||||
"git", "clone", "--depth", "1", "--filter=blob:none", "--sparse",
|
||||
"--branch", branch, repo_url, str(configs_dir)
|
||||
], check=True)
|
||||
|
||||
# Step 2: Enable sparse checkout and set the folder
|
||||
subprocess.run(["git", "sparse-checkout", "set", config_subdir], cwd=str(configs_dir), check=True)
|
||||
# Step 3: Pull the latest for that branch/folder
|
||||
subprocess.run(["git", "pull"], cwd=str(configs_dir), check=True)
|
||||
# Step 2: Enable sparse checkout and set the folder
|
||||
subprocess.run(["git", "sparse-checkout", "set", config_subdir], cwd=str(configs_dir), check=True)
|
||||
# Step 3: Pull the latest for that branch/folder
|
||||
subprocess.run(["git", "pull"], cwd=str(configs_dir), check=True)
|
||||
|
||||
def copy_config_files(branch, config_path, dest_dir):
|
||||
sparse_checkout(branch, config_path)
|
||||
sparse_checkout(branch, config_path)
|
||||
|
||||
src_dir = Path("ConfigurationsRepo") / "config" / config_path
|
||||
for fname in CONFIG_FILES:
|
||||
src_file = src_dir / fname
|
||||
if src_file.exists():
|
||||
dest_file = dest_dir / fname
|
||||
debug_print(f"Copying {src_file} to {dest_file}")
|
||||
dest_file.write_bytes(src_file.read_bytes())
|
||||
else:
|
||||
debug_print(f"{fname} not found in {src_dir}")
|
||||
src_dir = Path("ConfigurationsRepo") / "config" / config_path
|
||||
for fname in CONFIG_FILES:
|
||||
src_file = src_dir / fname
|
||||
if src_file.exists():
|
||||
dest_file = dest_dir / fname
|
||||
debug_print(f"Copying {src_file} to {dest_file}")
|
||||
dest_file.write_bytes(src_file.read_bytes())
|
||||
else:
|
||||
debug_print(f"{fname} not found in {src_dir}")
|
||||
|
||||
def fetch_config_files(branch, config_path, dest_dir):
|
||||
config_path_url = config_path.replace(' ', '%20')
|
||||
base_url = f"https://raw.githubusercontent.com/MarlinFirmware/Configurations/{branch}/config/{config_path_url}"
|
||||
config_path_url = config_path.replace(' ', '%20')
|
||||
base_url = f"https://raw.githubusercontent.com/MarlinFirmware/Configurations/{branch}/config/{config_path_url}"
|
||||
|
||||
for file in CONFIG_FILES:
|
||||
url = f"{base_url}/{file}"
|
||||
dest_file = dest_dir / file
|
||||
if os.getenv('DEBUG', '0') == '1':
|
||||
debug_print(f"Fetching {file} from {url} to {dest_file}")
|
||||
|
||||
try:
|
||||
urllib.request.urlretrieve(url, dest_file)
|
||||
except urllib.error.HTTPError as e:
|
||||
if e.code == 404:
|
||||
for file in CONFIG_FILES:
|
||||
url = f"{base_url}/{file}"
|
||||
dest_file = dest_dir / file
|
||||
if os.getenv('DEBUG', '0') == '1':
|
||||
print(f"File {file} not found (404), skipping.")
|
||||
else:
|
||||
raise
|
||||
debug_print(f"Fetching {file} from {url} to {dest_file}")
|
||||
|
||||
try:
|
||||
urllib.request.urlretrieve(url, dest_file)
|
||||
except urllib.error.HTTPError as e:
|
||||
if e.code == 404:
|
||||
if os.getenv('DEBUG', '0') == '1':
|
||||
print(f"File {file} not found (404), skipping.")
|
||||
else:
|
||||
raise
|
||||
|
||||
def fetch_configs(branch, config_path):
|
||||
print(f"Fetching {config_path} configurations from {branch}...")
|
||||
print(f"Fetching {config_path} configurations from {branch}...")
|
||||
|
||||
marlin_dir = Path("Marlin")
|
||||
if not marlin_dir.exists():
|
||||
print(f"Directory 'Marlin' not found at the current location.")
|
||||
sys.exit(1)
|
||||
marlin_dir = Path("Marlin")
|
||||
if not marlin_dir.exists():
|
||||
print(f"Directory 'Marlin' not found at the current location.")
|
||||
sys.exit(1)
|
||||
|
||||
if os.environ.get('GITHUB_ACTIONS'): # Running on GitHub ?
|
||||
copy_config_files(branch, config_path, marlin_dir)
|
||||
else:
|
||||
fetch_config_files(branch, config_path, marlin_dir)
|
||||
if os.environ.get('GITHUB_ACTIONS'): # Running on GitHub ?
|
||||
copy_config_files(branch, config_path, marlin_dir)
|
||||
else:
|
||||
fetch_config_files(branch, config_path, marlin_dir)
|
||||
|
||||
def main():
|
||||
branch = get_current_branch()
|
||||
if not branch:
|
||||
print("Not a git repository or no branch found.")
|
||||
sys.exit(1)
|
||||
branch = get_current_branch()
|
||||
if not branch:
|
||||
print("Not a git repository or no branch found.")
|
||||
sys.exit(1)
|
||||
|
||||
if branch.startswith("bugfix-2."):
|
||||
branch = branch
|
||||
elif branch.endswith("-2.1.x") or branch == "2.1.x":
|
||||
branch = "latest-2.1.x"
|
||||
elif branch.endswith("-2.0.x") or branch == "2.0.x":
|
||||
branch = "latest-2.0.x"
|
||||
elif branch.endswith("-1.1.x") or branch == "1.1.x":
|
||||
branch = "latest-1.1.x"
|
||||
elif branch.endswith("-1.0.x") or branch == "1.0.x":
|
||||
branch = "latest-1.0.x"
|
||||
else:
|
||||
branch = "bugfix-2.1.x"
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
arg = sys.argv[1]
|
||||
if ':' in arg:
|
||||
part1, part2 = arg.split(':', 1)
|
||||
config_path = part2
|
||||
branch = part1
|
||||
if branch.startswith("bugfix-2."):
|
||||
branch = branch
|
||||
elif branch.endswith("-2.1.x") or branch == "2.1.x":
|
||||
branch = "latest-2.1.x"
|
||||
elif branch.endswith("-2.0.x") or branch == "2.0.x":
|
||||
branch = "latest-2.0.x"
|
||||
elif branch.endswith("-1.1.x") or branch == "1.1.x":
|
||||
branch = "latest-1.1.x"
|
||||
elif branch.endswith("-1.0.x") or branch == "1.0.x":
|
||||
branch = "latest-1.0.x"
|
||||
else:
|
||||
config_path = arg
|
||||
config_path = 'examples/'+config_path
|
||||
else:
|
||||
config_path = "default"
|
||||
branch = "bugfix-2.1.x"
|
||||
|
||||
try:
|
||||
subprocess.run(['restore_configs'], check=True)
|
||||
except FileNotFoundError:
|
||||
print("restore_configs not found, skipping.")
|
||||
if len(sys.argv) > 1:
|
||||
arg = sys.argv[1]
|
||||
if ':' in arg:
|
||||
part1, part2 = arg.split(':', 1)
|
||||
config_path = part2
|
||||
branch = part1
|
||||
else:
|
||||
config_path = arg
|
||||
config_path = 'examples/'+config_path
|
||||
else:
|
||||
config_path = "default"
|
||||
|
||||
fetch_configs(branch, config_path)
|
||||
try:
|
||||
subprocess.run(['restore_configs'], check=True)
|
||||
except FileNotFoundError:
|
||||
try:
|
||||
subprocess.run(['./buildroot/bin/restore_configs'], check=True)
|
||||
except FileNotFoundError:
|
||||
print("restore_configs not found, skipping.")
|
||||
|
||||
fetch_configs(branch, config_path)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
main()
|
||||
|
|
|
|||
0
buildroot/share/PlatformIO/ldscripts/mks_robin_mini.ld
Executable file → Normal file
0
buildroot/share/PlatformIO/ldscripts/mks_robin_mini.ld
Executable file → Normal file
0
buildroot/share/PlatformIO/ldscripts/mks_robin_nano.ld
Executable file → Normal file
0
buildroot/share/PlatformIO/ldscripts/mks_robin_nano.ld
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/hal_conf_extra.h
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/hal_conf_extra.h
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/common.inc
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/common.inc
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/extra_libs.inc
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/extra_libs.inc
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/stm32f103z_dfu.ld
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/stm32f103z_dfu.ld
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/stm32f103zc.ld
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/stm32f103zc.ld
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/stm32f103zd.ld
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/stm32f103zd.ld
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/stm32f103ze.ld
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/stm32f103ze.ld
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/vector_symbols.inc
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/vector_symbols.inc
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/wirish/start.S
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/wirish/start.S
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/wirish/start_c.c
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/wirish/start_c.c
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/wirish/syscalls.c
Executable file → Normal file
0
buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/wirish/syscalls.c
Executable file → Normal file
0
buildroot/share/git/README.md
Executable file → Normal file
0
buildroot/share/git/README.md
Executable file → Normal file
0
buildroot/web-ui/data/www/chart.min.js
vendored
Executable file → Normal file
0
buildroot/web-ui/data/www/chart.min.js
vendored
Executable file → Normal file
|
|
@ -16,10 +16,11 @@
|
|||
# - RADDS
|
||||
#
|
||||
[env:DUE]
|
||||
platform = atmelsam
|
||||
board = due
|
||||
build_src_filter = ${common.default_src_filter} +<src/HAL/DUE> +<src/HAL/shared/backtrace>
|
||||
build_flags = -DWATCHDOG_PIO_RESET
|
||||
platform = atmelsam
|
||||
#platform_packages = toolchain-gccarmnoneeabi@1.120301.0 # Otherwise it's GCC 7.2.1
|
||||
board = due
|
||||
build_src_filter = ${common.default_src_filter} +<src/HAL/DUE> +<src/HAL/shared/backtrace>
|
||||
build_flags = -DWATCHDOG_PIO_RESET
|
||||
|
||||
[env:DUE_USB]
|
||||
extends = env:DUE
|
||||
|
|
|
|||
|
|
@ -20,8 +20,9 @@ MARLIN_TEST_BUILD = build_src_filter=+<src/tests>
|
|||
POSTMORTEM_DEBUGGING = build_src_filter=+<src/HAL/shared/cpu_exception> +<src/HAL/shared/backtrace>
|
||||
build_flags=-funwind-tables
|
||||
MKS_WIFI_MODULE = QRCode=https://github.com/makerbase-mks/QRCode/archive/261c5a696a.zip
|
||||
HAS_TRINAMIC_CONFIG = TMCStepper=https://github.com/MarlinFirmware/TMCStepper/archive/v0.8.8.zip
|
||||
HAS_TRINAMIC_CONFIG = TMCStepper=https://github.com/MarlinFirmware/TMCStepper/archive/v0.8.9.zip
|
||||
build_src_filter=+<src/module/stepper/trinamic.cpp> +<src/gcode/feature/trinamic/M122.cpp> +<src/gcode/feature/trinamic/M906.cpp> +<src/gcode/feature/trinamic/M911-M914.cpp> +<src/gcode/feature/trinamic/M919.cpp>
|
||||
HAS_TMC_WITHOUT_SW_SERIAL = build_flags=-DTMCSTEPPER_SW_SERIAL=false
|
||||
HAS_STEPPER_CONTROL = build_src_filter=+<src/module/stepper/control.cpp>
|
||||
HAS_T(RINAMIC_CONFIG|MC_SPI) = build_src_filter=+<src/feature/tmc_util.cpp>
|
||||
EDITABLE_HOMING_CURRENT = build_src_filter=+<src/gcode/feature/trinamic/M920.cpp>
|
||||
|
|
|
|||
|
|
@ -10,14 +10,15 @@
|
|||
####################################
|
||||
|
||||
[common_stm32]
|
||||
platform = ststm32@~12.1
|
||||
board_build.core = stm32
|
||||
build_flags = ${common.build_flags} -std=gnu++14
|
||||
platform = ststm32@~12.1
|
||||
#platform_packages = toolchain-gccarmnoneeabi@1.100301.220327 # Otherwise it's GCC 9.2.1
|
||||
board_build.core = stm32
|
||||
build_flags = ${common.build_flags} -std=gnu++14
|
||||
-DHAL_STM32 -DPLATFORM_M997_SUPPORT
|
||||
-DUSBCON -DUSBD_USE_CDC -DTIM_IRQ_PRIO=13 -DADC_RESOLUTION=12
|
||||
build_unflags = -std=gnu++11
|
||||
build_src_filter = ${common.default_src_filter} +<src/HAL/STM32> -<src/HAL/STM32/tft> +<src/HAL/shared/backtrace>
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
build_unflags = -std=gnu++11
|
||||
build_src_filter = ${common.default_src_filter} +<src/HAL/STM32> -<src/HAL/STM32/tft> +<src/HAL/shared/backtrace>
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py
|
||||
custom_marlin.HAS_LTDC_TFT = build_src_filter=+<src/HAL/STM32/tft/tft_ltdc.cpp>
|
||||
custom_marlin.HAS_FSMC_TFT = build_src_filter=+<src/HAL/STM32/tft/tft_fsmc.cpp>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ lib_ignore = SPI, FreeRTOS701, FreeRTOS821
|
|||
lib_deps = ${common.lib_deps}
|
||||
SoftwareSerialM
|
||||
platform_packages = tool-stm32duino
|
||||
toolchain-gccarmnoneeabi@1.100301.220327
|
||||
toolchain-gccarmnoneeabi@1.120301.0 # Otherwise it's GCC 7.2.1
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/fix_framework_weakness.py
|
||||
pre:buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py
|
||||
|
|
@ -65,7 +65,8 @@ monitor_speed = 115200
|
|||
[env:STM32F103RC_meeb_maple]
|
||||
extends = env:STM32F103RC_maple
|
||||
board = marlin_maple_MEEB_3DP
|
||||
platform_packages = platformio/tool-dfuutil@~1.11.0
|
||||
platform_packages = ${env:STM32F103RC_maple.platform_packages}
|
||||
platformio/tool-dfuutil@~1.11.0
|
||||
build_flags = ${env:STM32F103RC_maple.build_flags}
|
||||
-DDEBUG_LEVEL=0
|
||||
-DSS_TIMER=4
|
||||
|
|
@ -93,7 +94,6 @@ extends = env:STM32F103RC_maple
|
|||
extra_scripts = ${env:STM32F103RC_maple.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
|
||||
build_flags = ${env:STM32F103RC_maple.build_flags} -DDEBUG_LEVEL=0
|
||||
platform_packages = toolchain-gccarmnoneeabi@1.90301.200702
|
||||
lib_ldf_mode = chain
|
||||
debug_tool = stlink
|
||||
upload_protocol = serial
|
||||
|
|
@ -109,7 +109,6 @@ extends = env:STM32F103RC_maple
|
|||
board_build.address = 0x08007000
|
||||
board_build.ldscript = STM32F103RC_SKR_MINI_256K.ld
|
||||
build_flags = ${env:STM32F103RC_maple.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
|
||||
platform_packages = toolchain-gccarmnoneeabi@1.90301.200702
|
||||
monitor_speed = 115200
|
||||
|
||||
[env:STM32F103RC_btt_USB_maple]
|
||||
|
|
@ -136,7 +135,6 @@ upload_protocol = jlink
|
|||
[env:STM32F103RC_creality_maple]
|
||||
extends = env:STM32F103RC_maple
|
||||
build_flags = ${env:STM32F103RC_maple.build_flags} -DTEMP_TIMER_CHAN=4
|
||||
platform_packages = toolchain-gccarmnoneeabi@1.90301.200702
|
||||
board_build.address = 0x08007000
|
||||
board_build.ldscript = creality256k.ld
|
||||
board_build.rename = firmware-{date}-{time}.bin
|
||||
|
|
@ -160,7 +158,6 @@ board_build.ldscript = crealityPro.ld
|
|||
[env:GD32F103RC_voxelab_maple]
|
||||
extends = env:STM32F103RC_maple
|
||||
build_flags = ${env:STM32F103RC_maple.build_flags} -DTEMP_TIMER_CHAN=4
|
||||
platform_packages = toolchain-gccarmnoneeabi@1.90301.200702
|
||||
board_build.address = 0x08007000
|
||||
board_build.ldscript = creality256k.ld
|
||||
debug_tool = jlink
|
||||
|
|
@ -170,7 +167,6 @@ upload_protocol = jlink
|
|||
extends = env:STM32F103RE_maple
|
||||
build_flags = ${env:STM32F103RE_maple.build_flags} -DTEMP_TIMER_CHAN=4
|
||||
-DVOXELAB_N32 -DSDCARD_FLASH_LIMIT_256K
|
||||
platform_packages = toolchain-gccarmnoneeabi@1.90301.200702
|
||||
board_build.address = 0x08007000
|
||||
board_build.ldscript = creality.ld
|
||||
debug_tool = jlink
|
||||
|
|
@ -393,13 +389,11 @@ lib_ignore = Adafruit NeoPixel, SPI, SailfishLCD, SailfishRGB_LED
|
|||
|
||||
[env:STM32F103RC_ZM3E2_USB_maple]
|
||||
extends = ZONESTAR_ZM3E_maple
|
||||
platform_packages = toolchain-gccarmnoneeabi@1.90301.200702
|
||||
board = genericSTM32F103RC
|
||||
board_build.ldscript = ZONESTAR_ZM3E_256K.ld
|
||||
|
||||
[env:STM32F103VC_ZM3E4_USB_maple]
|
||||
extends = ZONESTAR_ZM3E_maple
|
||||
platform_packages = toolchain-gccarmnoneeabi@1.90301.200702
|
||||
board = genericSTM32F103VC
|
||||
board_build.ldscript = ZONESTAR_ZM3E_256K.ld
|
||||
build_flags = ${ZONESTAR_ZM3E_maple.build_flags} -DTONE_TIMER=1 -DTONE_CHANNEL=2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue