Skip to content

Commit e280755

Browse files
⛙ Merge w/Marlin
2 parents 8fa9216 + 8dee0c1 commit e280755

110 files changed

Lines changed: 1271 additions & 178 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/devcontainer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@
4949
}
5050

5151
// Use 'forwardPorts' to make a list of ports inside the container available locally.
52-
// "forwardPorts": [],
52+
// , "forwardPorts": []
5353

5454
// Use 'postCreateCommand' to run commands after the container is created.
55-
// "postCreateCommand": "pip3 install --user -r requirements.txt",
55+
// , "postCreateCommand": "pip3 install --user -r requirements.txt"
5656

57-
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
58-
// "remoteUser": "vscode"
57+
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
58+
// , "remoteUser": "vscode"
5959
}

Marlin/Configuration.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,18 @@
312312

313313
#endif
314314

315+
/**
316+
* Differential Extruder
317+
*
318+
* The X and E steppers work together to create a differential drive system.
319+
* Simple : E steps = X + E ; X steps = X (E drives a loop, X stays the same)
320+
* Balanced: E steps = X + E/2 ; X steps = X - E/2 (Dual loop system)
321+
*/
322+
//#define DIFFERENTIAL_EXTRUDER
323+
#if ENABLED(DIFFERENTIAL_EXTRUDER)
324+
//#define BALANCED_DIFFERENTIAL_EXTRUDER
325+
#endif
326+
315327
/**
316328
* Switching Toolhead
317329
*

Marlin/Configuration_adv.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4135,22 +4135,27 @@
41354135
#define MAIN_MENU_ITEM_1_DESC "Home & UBL Info"
41364136
#define MAIN_MENU_ITEM_1_GCODE "G28\nG29 W"
41374137
//#define MAIN_MENU_ITEM_1_CONFIRM // Show a confirmation dialog before this action
4138+
//#define MAIN_MENU_ITEM_1_IMMEDIATE // Skip the queue and execute immediately. Rarely needed.
41384139

41394140
#define MAIN_MENU_ITEM_2_DESC "Preheat for " PREHEAT_1_LABEL
41404141
#define MAIN_MENU_ITEM_2_GCODE "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
41414142
//#define MAIN_MENU_ITEM_2_CONFIRM
4143+
//#define MAIN_MENU_ITEM_2_IMMEDIATE
41424144

41434145
//#define MAIN_MENU_ITEM_3_DESC "Preheat for " PREHEAT_2_LABEL
41444146
//#define MAIN_MENU_ITEM_3_GCODE "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
41454147
//#define MAIN_MENU_ITEM_3_CONFIRM
4148+
//#define MAIN_MENU_ITEM_3_IMMEDIATE
41464149

41474150
//#define MAIN_MENU_ITEM_4_DESC "Heat Bed/Home/Level"
41484151
//#define MAIN_MENU_ITEM_4_GCODE "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
41494152
//#define MAIN_MENU_ITEM_4_CONFIRM
4153+
//#define MAIN_MENU_ITEM_4_IMMEDIATE
41504154

41514155
//#define MAIN_MENU_ITEM_5_DESC "Home & Info"
41524156
//#define MAIN_MENU_ITEM_5_GCODE "G28\nM503"
41534157
//#define MAIN_MENU_ITEM_5_CONFIRM
4158+
//#define MAIN_MENU_ITEM_5_IMMEDIATE
41544159
#endif
41554160

41564161
// @section custom config menu
@@ -4167,22 +4172,27 @@
41674172
#define CONFIG_MENU_ITEM_1_DESC "Wifi ON"
41684173
#define CONFIG_MENU_ITEM_1_GCODE "M118 [ESP110] WIFI-STA pwd=12345678"
41694174
//#define CONFIG_MENU_ITEM_1_CONFIRM // Show a confirmation dialog before this action
4175+
//#define CONFIG_MENU_ITEM_1_IMMEDIATE // Skip the queue and execute immediately. Rarely needed.
41704176

41714177
#define CONFIG_MENU_ITEM_2_DESC "Bluetooth ON"
41724178
#define CONFIG_MENU_ITEM_2_GCODE "M118 [ESP110] BT pwd=12345678"
41734179
//#define CONFIG_MENU_ITEM_2_CONFIRM
4180+
//#define CONFIG_MENU_ITEM_2_IMMEDIATE
41744181

41754182
//#define CONFIG_MENU_ITEM_3_DESC "Radio OFF"
41764183
//#define CONFIG_MENU_ITEM_3_GCODE "M118 [ESP110] OFF pwd=12345678"
41774184
//#define CONFIG_MENU_ITEM_3_CONFIRM
4185+
//#define CONFIG_MENU_ITEM_3_IMMEDIATE
41784186

41794187
//#define CONFIG_MENU_ITEM_4_DESC "Wifi ????"
41804188
//#define CONFIG_MENU_ITEM_4_GCODE "M118 ????"
41814189
//#define CONFIG_MENU_ITEM_4_CONFIRM
4190+
//#define CONFIG_MENU_ITEM_4_IMMEDIATE
41824191

41834192
//#define CONFIG_MENU_ITEM_5_DESC "Wifi ????"
41844193
//#define CONFIG_MENU_ITEM_5_GCODE "M118 ????"
41854194
//#define CONFIG_MENU_ITEM_5_CONFIRM
4195+
//#define CONFIG_MENU_ITEM_5_IMMEDIATE
41864196
#endif
41874197

41884198
// @section custom buttons
@@ -4199,6 +4209,7 @@
41994209
#define BUTTON1_WHEN_PRINTING false // Button allowed to trigger during printing?
42004210
#define BUTTON1_GCODE "G28"
42014211
#define BUTTON1_DESC "Homing" // Optional string to set the LCD status
4212+
//#define BUTTON1_IMMEDIATE // Skip the queue and run the G-code immediately. Rarely needed.
42024213
#endif
42034214

42044215
//#define BUTTON2_PIN -1
@@ -4207,6 +4218,7 @@
42074218
#define BUTTON2_WHEN_PRINTING false
42084219
#define BUTTON2_GCODE "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
42094220
#define BUTTON2_DESC "Preheat for " PREHEAT_1_LABEL
4221+
//#define BUTTON2_IMMEDIATE
42104222
#endif
42114223

42124224
//#define BUTTON3_PIN -1
@@ -4215,6 +4227,7 @@
42154227
#define BUTTON3_WHEN_PRINTING false
42164228
#define BUTTON3_GCODE "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
42174229
#define BUTTON3_DESC "Preheat for " PREHEAT_2_LABEL
4230+
//#define BUTTON3_IMMEDIATE
42184231
#endif
42194232
#endif
42204233

Marlin/Version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* here we define this default string as the date where the latest release
4242
* version was tagged.
4343
*/
44-
//#define STRING_DISTRIBUTION_DATE "2025-11-15"
44+
//#define STRING_DISTRIBUTION_DATE "2025-11-20"
4545

4646
#define STRING_DISTRIBUTION_DATE __DATE__
4747
#define STRING_DISTRIBUTION_TIME __TIME__

Marlin/src/HAL/HC32/inc/SanityCheck.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
#error "POSTMORTEM_DEBUGGING requires CORE_DISABLE_FAULT_HANDLER to be set."
8484
#endif
8585

86-
#if defined(PANIC_ENABLE)
86+
#ifdef PANIC_ENABLE
8787
#if defined(PANIC_USART1_TX_PIN) || defined(PANIC_USART2_TX_PIN) || defined(PANIC_USART3_TX_PIN) || defined(PANIC_USART3_TX_PIN)
8888
#error "HC32 HAL uses a custom panic handler. Do not define PANIC_USARTx_TX_PIN."
8989
#endif

Marlin/src/HAL/HC32/sysclock.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ void core_hook_sysclock_init() {
171171
panic("HRC is not 16 MHz");
172172
}
173173

174-
#if defined(BOARD_XTAL_FREQUENCY)
174+
#ifdef BOARD_XTAL_FREQUENCY
175175
#warning "No valid XTAL frequency defined, falling back to HRC."
176176
#endif
177177

Marlin/src/HAL/SAMD21/timers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
165165
tc->COUNT32.INTENCLR.reg = TC_INTENCLR_OVF; // disable overflow interrupt
166166

167167
// TCn clock setup
168-
GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_ID(GCM_TC4_TC5)) ;
168+
GCLK->CLKCTRL.reg = uint16_t(GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_ID(GCM_TC4_TC5));
169169
SYNC (GCLK->STATUS.bit.SYNCBUSY);
170170

171171
tcReset(tc); // reset TC

Marlin/src/HAL/STM32/HAL.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ void MarlinHAL::idletask() {
114114
void MarlinHAL::reboot() { NVIC_SystemReset(); }
115115

116116
uint8_t MarlinHAL::get_reset_source() {
117-
return
117+
return (
118118
#ifdef RCC_FLAG_IWDGRST // Some sources may not exist...
119119
RESET != __HAL_RCC_GET_FLAG(RCC_FLAG_IWDGRST) ? RST_WATCHDOG :
120120
#endif
@@ -134,7 +134,7 @@ uint8_t MarlinHAL::get_reset_source() {
134134
RESET != __HAL_RCC_GET_FLAG(RCC_FLAG_PORRST) ? RST_POWER_ON :
135135
#endif
136136
0
137-
;
137+
);
138138
}
139139

140140
void MarlinHAL::clear_reset_source() { __HAL_RCC_CLEAR_RESET_FLAGS(); }

Marlin/src/MarlinCore.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,11 +529,15 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) {
529529
constexpr millis_t CUB_DEBOUNCE_DELAY_##N = 250UL; \
530530
static millis_t next_cub_ms_##N; \
531531
if (BUTTON##N##_HIT_STATE == READ(BUTTON##N##_PIN) \
532-
&& (ENABLED(BUTTON##N##_WHEN_PRINTING) || printer_not_busy)) { \
532+
&& (ENABLED(BUTTON##N##_WHEN_PRINTING) || printer_not_busy) \
533+
) { \
533534
if (ELAPSED(ms, next_cub_ms_##N)) { \
534535
next_cub_ms_##N = ms + CUB_DEBOUNCE_DELAY_##N; \
535536
CODE; \
536-
queue.inject(F(BUTTON##N##_GCODE)); \
537+
if (ENABLED(BUTTON##N##_IMMEDIATE)) \
538+
gcode.process_subcommands_now(F(BUTTON##N##_GCODE)); \
539+
else \
540+
queue.inject(F(BUTTON##N##_GCODE)); \
537541
TERN_(HAS_MARLINUI_MENU, ui.quick_feedback()); \
538542
} \
539543
} \

Marlin/src/core/mstring.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,12 +280,11 @@ class MString {
280280
// Quick hash to detect change (e.g., to avoid expensive drawing)
281281
typedef IF<ENABLED(DJB2_HASH), uint32_t, uint16_t>::type hash_t;
282282
hash_t hash() const {
283+
const int sz = length();
283284
#if ENABLED(DJB2_HASH)
284285
hash_t hval = 5381;
285-
char c;
286-
while ((c = *str++)) hval += (hval << 5) + c; // = hval * 33 + c
286+
for (int i = 0; i < sz; i++) hval += (hval << 5) + str[i]; // = hval * 33 + c
287287
#else
288-
const int sz = length();
289288
hash_t hval = hash_t(sz);
290289
for (int i = 0; i < sz; i++) hval = ((hval << 1) | (hval >> 15)) ^ str[i]; // ROL, XOR
291290
#endif

0 commit comments

Comments
 (0)