Skip to content

Commit 90a4a00

Browse files
⛙ Merge w/Marlin
2 parents 72552de + b2fde58 commit 90a4a00

61 files changed

Lines changed: 1301 additions & 170 deletions

Some content is hidden

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

Marlin/Configuration.h

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,8 @@
507507
* 10 : 100kΩ RS PRO 198-961
508508
* 11 : 100kΩ Keenovo AC silicone mats, most Wanhao i3 machines - beta 3950, 1%
509509
* 12 : 100kΩ Vishay 0603 SMD NTCS0603E3104FXT (#8) - calibrated for Makibox hot bed
510-
* 13 : 100kΩ Hisense up to 300°C - for "Simple ONE" & "All In ONE" hotend - beta 3950, 1%
511-
* 14 : 100kΩ (R25), 4092K (beta25), 4.7kΩ pull-up, bed thermistor as used in Ender-5 S1
510+
* 13 : 100kΩ Hisense up to 300°C - for "Simple ONE" & "All In ONE" hotend - R25 = 100 kOhm, beta25 = 4100 K, 4.7kΩ pull-up
511+
* 14 : 100kΩ (R25), 4092K (beta25), 4.7kΩ pull-up, bed thermistor (as used in Ender-5 S1)
512512
* 15 : 100kΩ Calibrated for JGAurora A5 hotend
513513
* 17 : 100kΩ Dagoma NTC white thermistor
514514
* 18 : 200kΩ ATC Semitec 204GT-2 Dagoma.Fr - MKS_Base_DKU001327
@@ -3081,6 +3081,18 @@
30813081
//
30823082
//#define FF_INTERFACEBOARD
30833083

3084+
//
3085+
// MightyBoard LCD and Interface
3086+
//
3087+
//#define MIGHTYBOARD_LCD
3088+
#if ENABLED(MIGHTYBOARD_LCD)
3089+
//#define MIGHTYBOARD_DEBUG // Lightweight debug output for buttons and encoder
3090+
//#define MIGHTYBOARD_DISABLE_ENC_PULLUP // Enable if the encoder button is unreliable
3091+
//#define MIGHTYBOARD_BUTTON_PULLUPS // Enable if other buttons are unreliable
3092+
//#define MIGHTYBOARD_BACK_STATUS_BUTTONS // Use LEFT/RIGHT buttons for Back / Home.
3093+
// Otherwise they act like encoder down / up.
3094+
#endif
3095+
30843096
//
30853097
// TFT GLCD Panel with Marlin UI
30863098
// Panel connected to main board by SPI or I2C interface.

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 "2026-03-25"
44+
//#define STRING_DISTRIBUTION_DATE "2026-03-29"
4545

4646
#define STRING_DISTRIBUTION_DATE __DATE__
4747
#define STRING_DISTRIBUTION_TIME __TIME__

Marlin/src/core/boards.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@
187187
#define BOARD_MALYAN_M180 1333 // Malyan M180 Mainboard Version 2 (no display function, direct G-code only)
188188
#define BOARD_PROTONEER_CNC_SHIELD_V3 1334 // Mega controller & Protoneer CNC Shield V3.00
189189
#define BOARD_WEEDO_62A 1335 // WEEDO 62A board (TINA2, Monoprice Cadet, etc.)
190+
#define BOARD_MIGHTYBOARD_REVG 1336 // Makerbot Mightyboard Revision G and H
190191

191192
//
192193
// ATmega1281, ATmega2561

Marlin/src/feature/leds/pca9632.cpp

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@
8181
#define LED_ON 0x01
8282
#define LED_PWM 0x02
8383

84-
#define PCA9632_ADDRESS 0b01100000
84+
#ifndef PCA9632_ADDRESS
85+
#define PCA9632_ADDRESS 0b01100000
86+
#warning "Using default PCA9632_ADDRESS for I2C (0b01100000)."
87+
#endif
88+
//static_assert(false, "Using PCA9632 I2C address=" STRINGIFY(PCA9632_ADDRESS));
8589

8690
byte PCA_init = 0;
8791

@@ -98,16 +102,16 @@ static void PCA9632_WriteAllRegisters(const byte addr, const byte regadd, const
98102
#if DISABLED(PCA9632_NO_AUTO_INC)
99103
uint8_t data[4];
100104
data[0] = PCA9632_AUTO_IND | regadd;
101-
data[1 + (PCA9632_RED >> 1)] = vr;
105+
data[1 + (PCA9632_RED >> 1)] = TERN(PCA9632_SWAP_RB, vb, vr);
102106
data[1 + (PCA9632_GRN >> 1)] = vg;
103-
data[1 + (PCA9632_BLU >> 1)] = vb;
107+
data[1 + (PCA9632_BLU >> 1)] = TERN(PCA9632_SWAP_RB, vr, vb);
104108
Wire.beginTransmission(I2C_ADDRESS(addr));
105109
Wire.write(data, sizeof(data));
106110
Wire.endTransmission();
107111
#else
108-
PCA9632_WriteRegister(addr, regadd + (PCA9632_RED >> 1), vr);
112+
PCA9632_WriteRegister(addr, regadd + (PCA9632_RED >> 1), TERN(PCA9632_SWAP_RB, vb, vr));
109113
PCA9632_WriteRegister(addr, regadd + (PCA9632_GRN >> 1), vg);
110-
PCA9632_WriteRegister(addr, regadd + (PCA9632_BLU >> 1), vb);
114+
PCA9632_WriteRegister(addr, regadd + (PCA9632_BLU >> 1), TERN(PCA9632_SWAP_RB, vb, vr));
111115
#if ENABLED(PCA9632_RGBW)
112116
PCA9632_WriteRegister(addr, regadd + (PCA9632_WHT >> 1), vw);
113117
#endif
@@ -132,15 +136,20 @@ void PCA9632_set_led_color(const LED1Color_t &color) {
132136
PCA9632_WriteRegister(PCA9632_ADDRESS,PCA9632_MODE2, PCA9632_MODE2_VALUE);
133137
}
134138

135-
const byte LEDOUT = (color.r ? LED_PWM << PCA9632_RED : 0)
139+
const byte LEDOUT = (TERN(PCA9632_SWAP_RB, color.b, color.r) ? LED_PWM << PCA9632_RED : 0)
136140
| (color.g ? LED_PWM << PCA9632_GRN : 0)
137-
| (color.b ? LED_PWM << PCA9632_BLU : 0)
141+
| (TERN(PCA9632_SWAP_RB, color.r, color.b) ? LED_PWM << PCA9632_BLU : 0)
138142
| (TERN0(PCA9632_RGBW, color.w ? LED_PWM << PCA9632_WHT : 0));
139143

140-
PCA9632_WriteAllRegisters(PCA9632_ADDRESS,PCA9632_PWM0, color.r, color.g, color.b
144+
PCA9632_WriteAllRegisters(
145+
PCA9632_ADDRESS, PCA9632_PWM0,
146+
TERN(PCA9632_SWAP_RB, color.b, color.r),
147+
color.g,
148+
TERN(PCA9632_SWAP_RB, color.r, color.b)
141149
OPTARG(PCA9632_RGBW, color.w)
142150
);
143151
PCA9632_WriteRegister(PCA9632_ADDRESS,PCA9632_LEDOUT, LEDOUT);
152+
144153
}
145154

146155
#if ENABLED(PCA9632_BUZZER)

Marlin/src/gcode/host/M360.cpp

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@
3737
#include "../../module/temperature.h"
3838
#endif
3939

40-
#include <cstddef>
41-
4240
struct ProgStr {
4341
PGM_P ptr;
4442
constexpr ProgStr(PGM_P p) : ptr(p) {}
4543
ProgStr(FSTR_P f) : ptr(FTOP(f)) {}
46-
ProgStr(std::nullptr_t) : ptr(nullptr) {}
44+
ProgStr(nullptr_t) : ptr(nullptr) {}
4745

4846
constexpr operator PGM_P() const { return ptr; }
4947
constexpr explicit operator bool() const { return ptr != nullptr; }
@@ -92,13 +90,13 @@ void GcodeSuite::M360() {
9290
//
9391
// Axis letters, in PROGMEM
9492
//
95-
#define _DEFINE_A_STR(Q) PGMSTR(Q##_STR, STR_##Q);
93+
#define _DEFINE_A_STR(Q) static PGMSTR(Q##_STR, STR_##Q);
9694
MAIN_AXIS_MAP(_DEFINE_A_STR);
9795

9896
//
9997
// Homing Directions
10098
//
101-
PGMSTR(H_DIR_STR, "HomeDir");
99+
static PGMSTR(H_DIR_STR, "HomeDir");
102100
#if X_HOME_DIR
103101
config_line(H_DIR_STR, X_HOME_DIR, X_STR);
104102
#endif
@@ -128,14 +126,18 @@ void GcodeSuite::M360() {
128126
#endif
129127

130128
#if ANY(CLASSIC_JERK, HAS_LINEAR_E_JERK)
131-
PGMSTR(JERK_STR, "Jerk");
129+
static PGMSTR(JERK_STR, "Jerk");
132130
#endif
133131

134132
//
135133
// XYZ Axis Jerk
136134
//
137135
#if ENABLED(CLASSIC_JERK)
138136
#define _REPORT_JERK(Q) config_line(Q##_STR, planner.max_jerk.Q, JERK_STR);
137+
#define XY_MAP(FUNC) do { \
138+
TERN_(HAS_X_AXIS, FUNC(X)) \
139+
TERN_(HAS_Y_AXIS, FUNC(Y)) \
140+
}while(0)
139141
if (TERN0(HAS_Y_AXIS, planner.max_jerk.x == planner.max_jerk.y))
140142
config_line(F("XY"), planner.max_jerk.x, JERK_STR);
141143
else {
@@ -150,9 +152,9 @@ void GcodeSuite::M360() {
150152
//
151153
config_line(F("SupportG10G11"), ENABLED(FWRETRACT));
152154
#if ENABLED(FWRETRACT)
153-
PGMSTR(RET_STR, "Retraction");
154-
PGMSTR(UNRET_STR, "RetractionUndo");
155-
PGMSTR(SPEED_STR, "Speed");
155+
static PGMSTR(RET_STR, "Retraction");
156+
static PGMSTR(UNRET_STR, "RetractionUndo");
157+
static PGMSTR(SPEED_STR, "Speed");
156158
// M10 Retract with swap (long) moves
157159
config_line(F("Length"), fwretract.settings.retract_length, RET_STR);
158160
config_line(F("LongLength"), fwretract.settings.swap_retract_length, RET_STR);
@@ -175,22 +177,22 @@ void GcodeSuite::M360() {
175177
motion.apply_limits(cmax);
176178
const xyz_pos_t wmin = cmin.asLogical(), wmax = cmax.asLogical();
177179

178-
PGMSTR(MIN_STR, "Min");
180+
static PGMSTR(MIN_STR, "Min");
179181
#define _REPORT_MIN(Q) config_line(MIN_STR, wmin.Q, Q##_STR);
180182
MAIN_AXIS_MAP(_REPORT_MIN);
181183

182-
PGMSTR(MAX_STR, "Max");
184+
static PGMSTR(MAX_STR, "Max");
183185
#define _REPORT_MAX(Q) config_line(MAX_STR, wmax.Q, Q##_STR);
184186
MAIN_AXIS_MAP(_REPORT_MAX);
185187

186-
PGMSTR(SIZE_STR, "Size");
188+
static PGMSTR(SIZE_STR, "Size");
187189
#define _REPORT_SIZE(Q) config_line(SIZE_STR, wmax.Q - wmin.Q, Q##_STR);
188190
MAIN_AXIS_MAP(_REPORT_SIZE);
189191

190192
//
191193
// Axis Steps per mm
192194
//
193-
PGMSTR(S_MM_STR, "Steps/mm");
195+
static PGMSTR(S_MM_STR, "Steps/mm");
194196
#define _REPORT_S_MM(Q) config_line(S_MM_STR, planner.settings.axis_steps_per_mm[_AXIS(Q)], Q##_STR);
195197
MAIN_AXIS_MAP(_REPORT_S_MM);
196198

@@ -199,11 +201,11 @@ void GcodeSuite::M360() {
199201
//
200202
#define _ACCEL(Q,B) _MIN(planner.settings.max_acceleration_mm_per_s2[Q##_AXIS], planner.settings.B)
201203

202-
PGMSTR(P_ACC_STR, "PrintAccel");
204+
static PGMSTR(P_ACC_STR, "PrintAccel");
203205
#define _REPORT_P_ACC(Q) config_line(P_ACC_STR, _ACCEL(Q, acceleration), Q##_STR);
204206
MAIN_AXIS_MAP(_REPORT_P_ACC);
205207

206-
PGMSTR(T_ACC_STR, "TravelAccel");
208+
static PGMSTR(T_ACC_STR, "TravelAccel");
207209
#define _REPORT_T_ACC(Q) config_line(T_ACC_STR, _ACCEL(Q, travel_acceleration), Q##_STR);
208210
MAIN_AXIS_MAP(_REPORT_T_ACC);
209211

Marlin/src/gcode/temp/M303.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,23 @@ void GcodeSuite::M303() {
7171
return;
7272
}
7373

74-
const bool seenC = parser.seenval('C');
75-
const int c = seenC ? parser.value_int() : 5;
74+
const int cycles = parser.intval('C', 5);
75+
if (cycles < 3) {
76+
SERIAL_ECHOLNPGM("?(C)ycles not plausible (>=3).");
77+
return;
78+
}
79+
7680
const bool seenS = parser.seenval('S');
7781
const celsius_t temp = seenS ? parser.value_celsius() : default_temp;
78-
const bool u = parser.boolval('U');
82+
const bool uflag = parser.boolval('U');
7983

80-
TERN_(DWIN_LCD_PROUI, DWIN_M303(c, hid, temp);)
81-
TERN_(EXTENSIBLE_UI, ExtUI::onStartM303(c, hid, temp));
84+
TERN_(DWIN_LCD_PROUI, DWIN_M303(cycles, hid, temp);)
85+
TERN_(EXTENSIBLE_UI, ExtUI::onStartM303(cycles, hid, temp));
8286

8387
IF_DISABLED(BUSY_WHILE_HEATING, KEEPALIVE_STATE(NOT_BUSY));
8488

8589
LCD_MESSAGE(MSG_PID_AUTOTUNE);
86-
thermalManager.PID_autotune(temp, hid, c, u);
90+
thermalManager.PID_autotune(temp, hid, cycles, uflag);
8791
ui.reset_status();
8892

8993
queue.flush_rx();

Marlin/src/inc/Conditionals-2-LCD.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,12 @@
316316
#define IS_RRD_SC 1
317317
#define U8GLIB_SSD1309
318318

319+
#elif ENABLED(MIGHTYBOARD_LCD)
320+
321+
#define IS_ULTIPANEL 1
322+
#define LCD_WIDTH 20
323+
#define LCD_HEIGHT 4
324+
319325
#endif
320326

321327
// ST7920-based graphical displays
@@ -939,6 +945,7 @@
939945
+ ENABLED(CARTESIO_UI) \
940946
+ ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
941947
+ ENABLED(FF_INTERFACEBOARD) \
948+
+ ENABLED(MIGHTYBOARD_LCD) \
942949
+ ENABLED(FYSETC_242_OLED_12864) \
943950
+ ENABLED(G3D_PANEL) \
944951
+ ENABLED(LCD_FOR_MELZI) \

Marlin/src/inc/Version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
* version was tagged.
4343
*/
4444
#ifndef STRING_DISTRIBUTION_DATE
45-
#define STRING_DISTRIBUTION_DATE "2026-03-25"
45+
#define STRING_DISTRIBUTION_DATE "2026-03-29"
4646
#endif
4747

4848
/**

Marlin/src/lcd/HD44780/marlinui_HD44780.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@
8989
#endif
9090
);
9191

92+
#elif ENABLED(MIGHTYBOARD_LCD)
93+
94+
// 3-wire shift-register LCD for Mightyboard
95+
LCD_CLASS lcd;
96+
9297
#elif ENABLED(SR_LCD_3W_NL)
9398

9499
// NewLiquidCrystal was not working

Marlin/src/lcd/HD44780/marlinui_HD44780.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,15 @@
8989
#include <LiquidCrystal_SR.h>
9090
#define LCD_CLASS LiquidCrystal_SR
9191

92+
#elif ENABLED(MIGHTYBOARD_LCD)
93+
94+
// 3-wire shift-register LCD for Mightyboard
95+
// Optimized in-tree implementation
96+
// Pin mapping: SR_STROBE_PIN, SR_DATA_PIN, SR_CLK_PIN
97+
98+
#include "mighty/mighty_lcd_serial.h"
99+
#define LCD_CLASS MightyboardLCDSerial
100+
92101
#elif ENABLED(SR_LCD_3W_NL)
93102

94103
// NewLiquidCrystal didn't work, so this uses

0 commit comments

Comments
 (0)