Skip to content

Commit 9f55a3a

Browse files
committed
Apply case (ProUI)
1 parent 8595dce commit 9f55a3a

Some content is hidden

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

43 files changed

+2450
-2451
lines changed

Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ void unified_bed_leveling::shift_mesh_height() {
759759

760760
TERN_(HAS_MARLINUI_MENU, ui.capture());
761761
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart());
762-
TERN_(DWIN_LCD_PROUI, DWIN_LevelingStart());
762+
TERN_(DWIN_LCD_PROUI, dwinLevelingStart());
763763

764764
save_ubl_active_state_and_disable(); // No bed level correction so only raw data is obtained
765765
grid_count_t count = GRID_MAX_POINTS;
@@ -820,7 +820,7 @@ void unified_bed_leveling::shift_mesh_height() {
820820
);
821821

822822
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
823-
TERN_(DWIN_LCD_PROUI, DWIN_LevelingDone());
823+
TERN_(DWIN_LCD_PROUI, dwinLevelingDone());
824824
}
825825

826826
#endif // HAS_BED_PROBE

Marlin/src/feature/runout.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ void event_filament_runout(const uint8_t extruder) {
8888
#endif
8989

9090
TERN_(EXTENSIBLE_UI, ExtUI::onFilamentRunout(ExtUI::getTool(extruder)));
91-
TERN_(DWIN_LCD_PROUI, DWIN_FilamentRunout(extruder));
91+
TERN_(DWIN_LCD_PROUI, dwinFilamentRunout(extruder));
9292

9393
#if ANY(HOST_PROMPT_SUPPORT, HOST_ACTION_COMMANDS, MULTI_FILAMENT_SENSOR)
9494
const char tool = '0' + TERN0(MULTI_FILAMENT_SENSOR, extruder);

Marlin/src/gcode/bedlevel/abl/G29.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ G29_TYPE GcodeSuite::G29() {
429429
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> 3-point Leveling");
430430
points[0].z = points[1].z = points[2].z = 0; // Probe at 3 arbitrary points
431431
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
432-
TERN_(DWIN_LCD_PROUI, DWIN_LevelingStart());
432+
TERN_(DWIN_LCD_PROUI, dwinLevelingStart());
433433
#endif
434434

435435
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart());
@@ -440,7 +440,7 @@ G29_TYPE GcodeSuite::G29() {
440440
#if ENABLED(PREHEAT_BEFORE_LEVELING)
441441
if (!abl.dryrun) probe.preheat_for_probing(LEVELING_NOZZLE_TEMP,
442442
#if ALL(DWIN_LCD_PROUI, HAS_HEATED_BED)
443-
HMI_data.BedLevT
443+
hmiData.bedLevT
444444
#else
445445
LEVELING_BED_TEMP
446446
#endif

Marlin/src/gcode/bedlevel/mbl/G29.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ void GcodeSuite::G29() {
143143
queue.inject(F("G29S2"));
144144

145145
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart());
146-
TERN_(DWIN_LCD_PROUI, DWIN_LevelingStart());
146+
TERN_(DWIN_LCD_PROUI, dwinLevelingStart());
147147

148148
return;
149149
}
@@ -169,7 +169,7 @@ void GcodeSuite::G29() {
169169
// Save Z for the previous mesh position
170170
bedlevel.set_zigzag_z(mbl_probe_index - 1, current_position.z);
171171
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ix, iy, current_position.z));
172-
TERN_(DWIN_LCD_PROUI, DWIN_MeshUpdate(_MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS), current_position.z));
172+
TERN_(DWIN_LCD_PROUI, dwinMeshUpdate(_MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS), current_position.z));
173173
SET_SOFT_ENDSTOP_LOOSE(false);
174174
}
175175
// If there's another point to sample, move there with optional lift.
@@ -236,7 +236,7 @@ void GcodeSuite::G29() {
236236
if (parser.seenval('Z')) {
237237
bedlevel.z_values[ix][iy] = parser.value_linear_units();
238238
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ix, iy, bedlevel.z_values[ix][iy]));
239-
TERN_(DWIN_LCD_PROUI, DWIN_MeshUpdate(ix, iy, bedlevel.z_values[ix][iy]));
239+
TERN_(DWIN_LCD_PROUI, dwinMeshUpdate(ix, iy, bedlevel.z_values[ix][iy]));
240240
}
241241
else
242242
return echo_not_entered('Z');

Marlin/src/gcode/bedlevel/ubl/M421.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ void GcodeSuite::M421() {
6666
else if (!WITHIN(ij.x, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(ij.y, 0, GRID_MAX_POINTS_Y - 1))
6767
SERIAL_ERROR_MSG(STR_ERR_MESH_XY);
6868
else {
69-
float &zval = bedlevel.z_values[ij.x][ij.y]; // Altering this Mesh Point
69+
float &zval = bedlevel.z_values[ij.x][ij.y]; // Altering this Mesh Point
7070
zval = hasN ? NAN : parser.value_linear_units() + (hasQ ? zval : 0); // N=NAN, Z=NEWVAL, or Q=ADDVAL
7171
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ij.x, ij.y, zval)); // Ping ExtUI in case it's showing the mesh
72-
TERN_(DWIN_LCD_PROUI, DWIN_MeshUpdate(ij.x, ij.y, zval));
72+
TERN_(DWIN_LCD_PROUI, dwinMeshUpdate(ij.x, ij.y, zval));
7373
}
7474
}
7575

Marlin/src/gcode/config/M302.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void GcodeSuite::M302() {
5151
if (seen_S) {
5252
thermalManager.extrude_min_temp = parser.value_celsius();
5353
thermalManager.allow_cold_extrude = (thermalManager.extrude_min_temp == 0);
54-
TERN_(DWIN_LCD_PROUI, HMI_data.ExtMinT = thermalManager.extrude_min_temp);
54+
TERN_(DWIN_LCD_PROUI, hmiData.extMinT = thermalManager.extrude_min_temp);
5555
}
5656

5757
if (parser.seen('P'))

Marlin/src/gcode/control/M997.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*/
3434
void GcodeSuite::M997() {
3535

36-
TERN_(DWIN_LCD_PROUI, DWIN_RebootScreen());
36+
TERN_(DWIN_LCD_PROUI, dwinRebootScreen());
3737

3838
flashFirmware(parser.intval('S'));
3939

Marlin/src/gcode/lcd/M0_M1.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ void GcodeSuite::M0_M1() {
7373
ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_USERWAIT));
7474
#elif ENABLED(DWIN_LCD_PROUI)
7575
if (parser.string_arg)
76-
DWIN_Popup_Confirm(ICON_BLTouch, parser.string_arg, GET_TEXT_F(MSG_USERWAIT));
76+
dwinPopupConfirm(ICON_BLTouch, parser.string_arg, GET_TEXT_F(MSG_USERWAIT));
7777
else
78-
DWIN_Popup_Confirm(ICON_BLTouch, GET_TEXT_F(MSG_STOPPED), GET_TEXT_F(MSG_USERWAIT));
78+
dwinPopupConfirm(ICON_BLTouch, GET_TEXT_F(MSG_STOPPED), GET_TEXT_F(MSG_USERWAIT));
7979
#else
8080

8181
if (parser.string_arg) {

Marlin/src/gcode/sd/M1001.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@
4949

5050
#if ENABLED(EXTENSIBLE_UI)
5151
#include "../../lcd/extui/ui_api.h"
52-
#elif ENABLED(DWIN_LCD_PROUI)
53-
#include "../../lcd/e3v2/proui/dwin.h"
5452
#endif
5553

5654
#if ENABLED(HOST_ACTION_COMMANDS)

Marlin/src/gcode/stats/M75-M78.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
void GcodeSuite::M75() {
4040
startOrResumeJob();
4141
#if ENABLED(DWIN_LCD_PROUI)
42-
if (!IS_SD_PRINTING()) DWIN_Print_Header(parser.string_arg && parser.string_arg[0] ? parser.string_arg : GET_TEXT(MSG_HOST_START_PRINT));
42+
if (!IS_SD_PRINTING()) dwinPrintHeader(parser.string_arg && parser.string_arg[0] ? parser.string_arg : GET_TEXT(MSG_HOST_START_PRINT));
4343
#endif
4444
}
4545

Marlin/src/gcode/temp/M303.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
#if ENABLED(EXTENSIBLE_UI)
3333
#include "../../lcd/extui/ui_api.h"
34-
#elif ENABLED(DWIN_LCD_PROUI)
34+
#elif ENABLED(PROUI_PID_TUNE)
3535
#include "../../lcd/e3v2/proui/dwin.h"
3636
#endif
3737

@@ -69,7 +69,7 @@ void GcodeSuite::M303() {
6969
SERIAL_ECHOPGM(STR_PID_AUTOTUNE);
7070
SERIAL_ECHOLNPGM(STR_PID_BAD_HEATER_ID);
7171
TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_BAD_HEATER_ID));
72-
TERN_(DWIN_PID_TUNE, DWIN_PidTuning(PID_BAD_HEATER_ID));
72+
TERN_(PROUI_PID_TUNE, dwinPidTuning(PID_BAD_HEATER_ID));
7373
return;
7474
}
7575

@@ -79,7 +79,7 @@ void GcodeSuite::M303() {
7979
const celsius_t temp = seenS ? parser.value_celsius() : default_temp;
8080
const bool u = parser.boolval('U');
8181

82-
TERN_(DWIN_PID_TUNE, DWIN_StartM303(seenC, c, seenS, hid, temp));
82+
TERN_(PROUI_PID_TUNE, dwinStartM303(seenC, c, seenS, hid, temp));
8383

8484
IF_DISABLED(BUSY_WHILE_HEATING, KEEPALIVE_STATE(NOT_BUSY));
8585

Marlin/src/inc/Conditionals_post.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -2386,10 +2386,10 @@
23862386

23872387
#if ENABLED(DWIN_LCD_PROUI)
23882388
#if ANY(PIDTEMP, PIDTEMPBED)
2389-
#define DWIN_PID_TUNE 1
2389+
#define PROUI_PID_TUNE 1
23902390
#endif
2391-
#if ANY(DWIN_PID_TUNE, MPC_AUTOTUNE) && DISABLED(DISABLE_TUNING_GRAPH)
2392-
#define SHOW_TUNING_GRAPH 1
2391+
#if ANY(PROUI_PID_TUNE, MPC_AUTOTUNE) && DISABLED(DISABLE_TUNING_GRAPH)
2392+
#define PROUI_TUNING_GRAPH 1
23932393
#endif
23942394
#endif
23952395

Marlin/src/lcd/e3v2/jyersui/dwin.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -265,14 +265,14 @@ class TextScroller {
265265
#if ENABLED(AUTO_BED_LEVELING_UBL)
266266
uint8_t tilt_grid = 1;
267267

268-
void manual_value_update(bool undefined=false) {
268+
void manualValueUpdate(bool undefined=false) {
269269
gcode.process_subcommands_now(
270270
TS(F("M421I"), mesh_x, 'J', mesh_y, 'Z', p_float_t(current_position.z, 3), undefined ? "N" : "")
271271
);
272272
planner.synchronize();
273273
}
274274

275-
bool create_plane_from_mesh() {
275+
bool createPlaneFromMesh() {
276276
struct linear_fit_data lsf_results;
277277
incremental_LSF_reset(&lsf_results);
278278
GRID_LOOP(x, y) {
@@ -312,7 +312,7 @@ class TextScroller {
312312

313313
#else
314314

315-
void manual_value_update() {
315+
void manualValueUpdate() {
316316
gcode.process_subcommands_now(
317317
TS(F("G29I"), mesh_x, 'J', mesh_y, 'Z', p_float_t(current_position.z, 3))
318318
);
@@ -340,7 +340,7 @@ class TextScroller {
340340
}
341341
}
342342

343-
float get_max_value() {
343+
float getMaxValue() {
344344
float max = __FLT_MIN__;
345345
GRID_LOOP(x, y) {
346346
if (!isnan(bedlevel.z_values[x][y]) && bedlevel.z_values[x][y] > max)
@@ -349,7 +349,7 @@ class TextScroller {
349349
return max;
350350
}
351351

352-
float get_min_value() {
352+
float getMinValue() {
353353
float min = __FLT_MAX__;
354354
GRID_LOOP(x, y) {
355355
if (!isnan(bedlevel.z_values[x][y]) && bedlevel.z_values[x][y] < min)
@@ -363,7 +363,7 @@ class TextScroller {
363363
const uint16_t total_width_px = DWIN_WIDTH - padding_x - padding_x,
364364
cell_width_px = total_width_px / (GRID_MAX_POINTS_X),
365365
cell_height_px = total_width_px / (GRID_MAX_POINTS_Y);
366-
const float v_max = abs(get_max_value()), v_min = abs(get_min_value()), range = _MAX(v_min, v_max);
366+
const float v_max = abs(getMaxValue()), v_min = abs(getMinValue()), range = _MAX(v_min, v_max);
367367

368368
// Clear background from previous selection and select new square
369369
dwinDrawRectangle(1, COLOR_BG_BLACK, _MAX(0, padding_x - gridline_width), _MAX(0, padding_y_top - gridline_width), padding_x + total_width_px, padding_y_top + total_width_px);
@@ -418,8 +418,8 @@ class TextScroller {
418418

419419
void setMeshViewerStatus() { // TODO: draw gradient with values as a legend instead
420420
float v1, v2,
421-
v_min = abs(get_min_value()),
422-
v_max = abs(get_max_value());
421+
v_min = abs(getMinValue()),
422+
v_max = abs(getMaxValue());
423423
if (viewer_asymmetric_range) {
424424
if (v_min > 3e+10F) v_min = 0.0000001;
425425
if (v_max > 3e+10F) v_max = 0.0000001;
@@ -3437,7 +3437,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra
34373437
if (draw)
34383438
drawMenuItem(row, ICON_ResumeEEPROM, F("Convert Mesh to Plane"));
34393439
else {
3440-
if (mesh_conf.create_plane_from_mesh()) break;
3440+
if (mesh_conf.createPlaneFromMesh()) break;
34413441
gcode.process_subcommands_now(F("M420 S1"));
34423442
planner.synchronize();
34433443
audioFeedback(true);
@@ -3582,7 +3582,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra
35823582
if (draw)
35833583
drawMenuItem(row, ICON_ResumeEEPROM, F("Clear Point Value"));
35843584
else {
3585-
mesh_conf.manual_value_update(true);
3585+
mesh_conf.manualValueUpdate(true);
35863586
redrawMenu(false);
35873587
}
35883588
break;

0 commit comments

Comments
 (0)