Skip to content

Commit

Permalink
🎨 Standardize naming (ProUI) (MarlinFirmware#25982)
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead authored and EvilGremlin committed Oct 26, 2023
1 parent 3a2e5a0 commit 8ba66b5
Show file tree
Hide file tree
Showing 52 changed files with 3,645 additions and 3,598 deletions.
4 changes: 2 additions & 2 deletions Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ void unified_bed_leveling::shift_mesh_height() {

TERN_(HAS_MARLINUI_MENU, ui.capture());
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart());
TERN_(DWIN_LCD_PROUI, DWIN_LevelingStart());
TERN_(DWIN_LCD_PROUI, dwinLevelingStart());

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

TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
TERN_(DWIN_LCD_PROUI, DWIN_LevelingDone());
TERN_(DWIN_LCD_PROUI, dwinLevelingDone());
}

#endif // HAS_BED_PROBE
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/feature/runout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void event_filament_runout(const uint8_t extruder) {
#endif

TERN_(EXTENSIBLE_UI, ExtUI::onFilamentRunout(ExtUI::getTool(extruder)));
TERN_(DWIN_LCD_PROUI, DWIN_FilamentRunout(extruder));
TERN_(DWIN_LCD_PROUI, dwinFilamentRunout(extruder));

#if ANY(HOST_PROMPT_SUPPORT, HOST_ACTION_COMMANDS, MULTI_FILAMENT_SENSOR)
const char tool = '0' + TERN0(MULTI_FILAMENT_SENSOR, extruder);
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/gcode/bedlevel/abl/G29.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ G29_TYPE GcodeSuite::G29() {
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> 3-point Leveling");
points[0].z = points[1].z = points[2].z = 0; // Probe at 3 arbitrary points
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
TERN_(DWIN_LCD_PROUI, DWIN_LevelingStart());
TERN_(DWIN_LCD_PROUI, dwinLevelingStart());
#endif

TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart());
Expand All @@ -440,7 +440,7 @@ G29_TYPE GcodeSuite::G29() {
#if ENABLED(PREHEAT_BEFORE_LEVELING)
if (!abl.dryrun) probe.preheat_for_probing(LEVELING_NOZZLE_TEMP,
#if ALL(DWIN_LCD_PROUI, HAS_HEATED_BED)
HMI_data.BedLevT
hmiData.bedLevT
#else
LEVELING_BED_TEMP
#endif
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/gcode/bedlevel/mbl/G29.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void GcodeSuite::G29() {
queue.inject(F("G29S2"));

TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart());
TERN_(DWIN_LCD_PROUI, DWIN_LevelingStart());
TERN_(DWIN_LCD_PROUI, dwinLevelingStart());

return;
}
Expand All @@ -169,7 +169,7 @@ void GcodeSuite::G29() {
// Save Z for the previous mesh position
bedlevel.set_zigzag_z(mbl_probe_index - 1, current_position.z);
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ix, iy, current_position.z));
TERN_(DWIN_LCD_PROUI, DWIN_MeshUpdate(_MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS), current_position.z));
TERN_(DWIN_LCD_PROUI, dwinMeshUpdate(_MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS), current_position.z));
SET_SOFT_ENDSTOP_LOOSE(false);
}
// If there's another point to sample, move there with optional lift.
Expand Down Expand Up @@ -236,7 +236,7 @@ void GcodeSuite::G29() {
if (parser.seenval('Z')) {
bedlevel.z_values[ix][iy] = parser.value_linear_units();
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ix, iy, bedlevel.z_values[ix][iy]));
TERN_(DWIN_LCD_PROUI, DWIN_MeshUpdate(ix, iy, bedlevel.z_values[ix][iy]));
TERN_(DWIN_LCD_PROUI, dwinMeshUpdate(ix, iy, bedlevel.z_values[ix][iy]));
}
else
return echo_not_entered('Z');
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/gcode/bedlevel/ubl/M421.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ void GcodeSuite::M421() {
else if (!WITHIN(ij.x, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(ij.y, 0, GRID_MAX_POINTS_Y - 1))
SERIAL_ERROR_MSG(STR_ERR_MESH_XY);
else {
float &zval = bedlevel.z_values[ij.x][ij.y]; // Altering this Mesh Point
float &zval = bedlevel.z_values[ij.x][ij.y]; // Altering this Mesh Point
zval = hasN ? NAN : parser.value_linear_units() + (hasQ ? zval : 0); // N=NAN, Z=NEWVAL, or Q=ADDVAL
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ij.x, ij.y, zval)); // Ping ExtUI in case it's showing the mesh
TERN_(DWIN_LCD_PROUI, DWIN_MeshUpdate(ij.x, ij.y, zval));
TERN_(DWIN_LCD_PROUI, dwinMeshUpdate(ij.x, ij.y, zval));
}
}

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/config/M302.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void GcodeSuite::M302() {
if (seen_S) {
thermalManager.extrude_min_temp = parser.value_celsius();
thermalManager.allow_cold_extrude = (thermalManager.extrude_min_temp == 0);
TERN_(DWIN_LCD_PROUI, HMI_data.ExtMinT = thermalManager.extrude_min_temp);
TERN_(DWIN_LCD_PROUI, hmiData.extMinT = thermalManager.extrude_min_temp);
}

if (parser.seen('P'))
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/control/M997.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*/
void GcodeSuite::M997() {

TERN_(DWIN_LCD_PROUI, DWIN_RebootScreen());
TERN_(DWIN_LCD_PROUI, dwinRebootScreen());

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

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/feature/powerloss/M1000.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void GcodeSuite::M1000() {
#elif HAS_DWIN_E3V2_BASIC
recovery.dwin_flag = true;
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) // Temporary fix until it can be better implemented
jyersDWIN.popupHandler(Resume);
jyersDWIN.popupHandler(Popup_Resume);
#elif ENABLED(EXTENSIBLE_UI)
ExtUI::onPowerLossResume();
#else
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/gcode/lcd/M0_M1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ void GcodeSuite::M0_M1() {
ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_USERWAIT));
#elif ENABLED(DWIN_LCD_PROUI)
if (parser.string_arg)
DWIN_Popup_Confirm(ICON_BLTouch, parser.string_arg, GET_TEXT_F(MSG_USERWAIT));
dwinPopupConfirm(ICON_BLTouch, parser.string_arg, GET_TEXT_F(MSG_USERWAIT));
else
DWIN_Popup_Confirm(ICON_BLTouch, GET_TEXT_F(MSG_STOPPED), GET_TEXT_F(MSG_USERWAIT));
dwinPopupConfirm(ICON_BLTouch, GET_TEXT_F(MSG_STOPPED), GET_TEXT_F(MSG_USERWAIT));
#else

if (parser.string_arg) {
Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/gcode/sd/M1001.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@

#if ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_LCD_PROUI)
#include "../../lcd/e3v2/proui/dwin.h"
#endif

#if ENABLED(HOST_ACTION_COMMANDS)
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/stats/M75-M78.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
void GcodeSuite::M75() {
startOrResumeJob();
#if ENABLED(DWIN_LCD_PROUI)
if (!IS_SD_PRINTING()) DWIN_Print_Header(parser.string_arg && parser.string_arg[0] ? parser.string_arg : GET_TEXT(MSG_HOST_START_PRINT));
if (!IS_SD_PRINTING()) dwinPrintHeader(parser.string_arg && parser.string_arg[0] ? parser.string_arg : GET_TEXT(MSG_HOST_START_PRINT));
#endif
}

Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/gcode/temp/M303.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#if ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_LCD_PROUI)
#elif ENABLED(PROUI_PID_TUNE)
#include "../../lcd/e3v2/proui/dwin.h"
#endif

Expand Down Expand Up @@ -69,7 +69,7 @@ void GcodeSuite::M303() {
SERIAL_ECHOPGM(STR_PID_AUTOTUNE);
SERIAL_ECHOLNPGM(STR_PID_BAD_HEATER_ID);
TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_BAD_HEATER_ID));
TERN_(DWIN_PID_TUNE, DWIN_PidTuning(PID_BAD_HEATER_ID));
TERN_(PROUI_PID_TUNE, dwinPidTuning(PID_BAD_HEATER_ID));
return;
}

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

TERN_(DWIN_PID_TUNE, DWIN_StartM303(seenC, c, seenS, hid, temp));
TERN_(PROUI_PID_TUNE, dwinStartM303(seenC, c, seenS, hid, temp));

IF_DISABLED(BUSY_WHILE_HEATING, KEEPALIVE_STATE(NOT_BUSY));

Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/inc/Conditionals_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -2386,10 +2386,10 @@

#if ENABLED(DWIN_LCD_PROUI)
#if ANY(PIDTEMP, PIDTEMPBED)
#define DWIN_PID_TUNE 1
#define PROUI_PID_TUNE 1
#endif
#if ANY(DWIN_PID_TUNE, MPC_AUTOTUNE) && DISABLED(DISABLE_TUNING_GRAPH)
#define SHOW_TUNING_GRAPH 1
#if ANY(PROUI_PID_TUNE, MPC_AUTOTUNE) && DISABLED(DISABLE_TUNING_GRAPH)
#define PROUI_TUNING_GRAPH 1
#endif
#endif

Expand Down
30 changes: 15 additions & 15 deletions Marlin/src/lcd/e3v2/common/dwin_color.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@
#define GetGColor(color) ((color >> 5) & 0x3F)
#define GetBColor(color) ((color >> 0) & 0x1F)

#define Color_White 0xFFFF
#define Color_Yellow RGB(0x1F,0x3F,0x00)
#define Color_Red RGB(0x1F,0x00,0x00)
#define Color_Error_Red 0xB000 // Error!
#define Color_Bg_Red 0xF00F // Red background color
#define Color_Bg_Window 0x31E8 // Popup background color
#define Color_Bg_Blue 0x1125 // Dark blue background color
#define Color_Bg_Black 0x0841 // Black background color
#define Color_IconBlue 0x45FA // Lighter blue that matches icons/accents
#define Popup_Text_Color 0xD6BA // Popup font background color
#define Line_Color 0x3A6A // Split line color
#define Rectangle_Color 0xEE2F // Blue square cursor color
#define Percent_Color 0xFE29 // Percentage color
#define BarFill_Color 0x10E4 // Fill color of progress bar
#define Select_Color 0x33BB // Selected color
#define COLOR_WHITE 0xFFFF
#define COLOR_YELLOW RGB(0x1F,0x3F,0x00)
#define COLOR_RED RGB(0x1F,0x00,0x00)
#define COLOR_ERROR_RED 0xB000 // Error!
#define COLOR_BG_RED 0xF00F // Red background color
#define COLOR_BG_WINDOW 0x31E8 // Popup background color
#define COLOR_BG_BLUE 0x1125 // Dark blue background color
#define COLOR_BG_BLACK 0x0841 // Black background color
#define COLOR_ICONBLUE 0x45FA // Lighter blue that matches icons/accents
#define COLOR_POPUP_TEXT 0xD6BA // Popup font background color
#define COLOR_LINE 0x3A6A // Split line color
#define COLOR_RECTANGLE 0xEE2F // Blue square cursor color
#define COLOR_PERCENT 0xFE29 // Percentage color
#define COLOR_BARFILL 0x10E4 // Fill color of progress bar
#define COLOR_SELECT 0x33BB // Selected color
Loading

0 comments on commit 8ba66b5

Please sign in to comment.