Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove whitespace, ProUI fixes #26308

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Marlin/src/core/serial_hook.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ struct RuntimeSerial : public SerialBase< RuntimeSerial<SerialT> >, public Seria
// Append Hookable for this class
SerialFeature features(serial_index_t index) const { return SerialFeature::Hookable | CALL_IF_EXISTS(SerialFeature, static_cast<const SerialT*>(this), features, index); }

void setHook(WriteHook writeHook = 0, EndOfMessageHook eofHook = 0, void * userPointer = 0) {
void setHook(WriteHook writeHook=0, EndOfMessageHook eofHook=0, void * userPointer=0) {
// Order is important here as serial code can be called inside interrupts
// When setting a hook, the user pointer must be set first so if writeHook is called as soon as it's set, it'll be valid
if (userPointer) this->userPointer = userPointer;
Expand Down Expand Up @@ -292,7 +292,7 @@ struct MultiSerial : public SerialBase< MultiSerial< REPEAT(NUM_SERIAL, _S_NAME)
#define _S_REFS(N) Serial##N##T & serial##N,
#define _S_INIT(N) ,serial##N (serial##N)

MultiSerial(REPEAT(NUM_SERIAL, _S_REFS) const SerialMask mask = ALL, const bool e = false)
MultiSerial(REPEAT(NUM_SERIAL, _S_REFS) const SerialMask mask=ALL, const bool e=false)
: BaseClassT(e), portMask(mask) REPEAT(NUM_SERIAL, _S_INIT) {}

};
Expand Down
15 changes: 14 additions & 1 deletion Marlin/src/lcd/e3v2/proui/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1713,6 +1713,18 @@ void dwinPrintFinished() {

// Print was aborted
void dwinPrintAborted() {
#ifndef EVENT_GCODE_SD_ABORT
if (all_axes_homed()) {
queue.inject(
#if ENABLED(NOZZLE_PARK_FEATURE)
F("G27")
#else
TS(F("G0Z"), float(_MIN(current_position.z + (Z_POST_CLEARANCE), Z_MAX_POS)), F("\nG0F2000Y"), Y_MAX_POS);
#endif
);
}
#endif
hostui.notify("Print Aborted");
dwinPrintFinished();
}

Expand Down Expand Up @@ -2226,7 +2238,8 @@ void setMoveZ() { hmiValue.axis = Z_AXIS; setPFloatOnClick(Z_MIN_POS, Z_MAX_POS,
#endif

#if LCD_BACKLIGHT_TIMEOUT_MINS
void setTimer() { setPIntOnClick(ui.backlight_timeout_min, ui.backlight_timeout_max); }
void applyTimer() { ui.backlight_timeout_minutes = menuData.value; }
void setTimer() { setIntOnClick(ui.backlight_timeout_min, ui.backlight_timeout_max, ui.backlight_timeout_minutes, applyTimer); }
#endif

#if HAS_FILAMENT_SENSOR
Expand Down
8 changes: 7 additions & 1 deletion Marlin/src/lcd/e3v2/proui/dwin_popup.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,15 @@ inline void drawPopupBkgd() {

template<typename T, typename U>
void dwinDrawPopup(const uint8_t icon, T amsg1=nullptr, U amsg2=nullptr, uint8_t button=0) {
xy_uint8_t pos;
switch (icon) {
default: pos.set(81, 90); break; // Icon 1 - 8, 90 - 91; (110 x 100)
case 17 ... 24: pos.set(96, 90); break; // Icon 17 - 24; ( 80 x 100)
case 78 ... 81: pos.set(100, 107); break; // Icon 78 - 81; ( 73 x 66)
}
DWINUI::clearMainArea();
drawPopupBkgd();
if (icon) DWINUI::drawIcon(icon, 101, 105);
if (icon) DWINUI::drawIcon(icon, pos.x, pos.y);
if (amsg1) DWINUI::drawCenteredString(hmiData.colorPopupTxt, 210, amsg1);
if (amsg2) DWINUI::drawCenteredString(hmiData.colorPopupTxt, 240, amsg2);
if (button) DWINUI::drawButton(button, 86, 280);
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/e3v2/proui/menus.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class MenuItem: public CustomMenuItem {
MenuItem(uint8_t cicon, const char * const text=nullptr, OnDrawItem ondraw=nullptr, OnClickItem onclick=nullptr);
MenuItem(uint8_t cicon, uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, OnDrawItem ondraw=nullptr, OnClickItem onclick=nullptr);
void setFrame(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2);
void setCaption(const char * const text = nullptr);
void setCaption(const char * const text=nullptr);
};

class MenuItemPtr: public MenuItem {
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ uint8_t USB::inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t *
return InTransfer(pep, nak_limit, nbytesptr, data, bInterval);
}

uint8_t USB::InTransfer(EpInfo *pep, uint16_t nak_limit, uint16_t *nbytesptr, uint8_t *data, uint8_t bInterval /*= 0*/) {
uint8_t USB::InTransfer(EpInfo *pep, uint16_t nak_limit, uint16_t *nbytesptr, uint8_t *data, uint8_t bInterval/*=0*/) {
uint8_t rcode = 0;
uint8_t pktsize;

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/sd/usb_flashdrive/lib-uhs2/parsetools.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,5 @@ class PTPListParser {
theParser.Initialize(p);
}

bool Parse(uint8_t **pp, uint16_t *pcntdn, PTP_ARRAY_EL_FUNC pf, const void *me = nullptr);
bool Parse(uint8_t **pp, uint16_t *pcntdn, PTP_ARRAY_EL_FUNC pf, const void *me=nullptr);
};
2 changes: 1 addition & 1 deletion buildroot/tests/STM32F103RE_creality
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ opt_enable DWIN_MARLINUI_LANDSCAPE LCD_ENDSTOP_TEST AUTO_BED_LEVELING_UBL BLTOUC
exec_test $1 $2 "Ender-3 v2 - MarlinUI (UBL+BLTOUCH, MPCTEMP, LCD_ENDSTOP_TEST)" "$3"

use_example_configs "Creality/Ender-3 S1/STM32F1"
opt_disable DWIN_CREALITY_LCD Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN AUTO_BED_LEVELING_BILINEAR CANCEL_OBJECTS FWRETRACT
opt_disable DWIN_CREALITY_LCD Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN AUTO_BED_LEVELING_BILINEAR CANCEL_OBJECTS FWRETRACT EVENT_GCODE_SD_ABORT
opt_enable DWIN_LCD_PROUI INDIVIDUAL_AXIS_HOMING_SUBMENU SET_PROGRESS_MANUALLY SET_PROGRESS_PERCENT STATUS_MESSAGE_SCROLLING \
SOUND_MENU_ITEM PRINTCOUNTER NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE FILAMENT_RUNOUT_SENSOR \
BLTOUCH Z_SAFE_HOMING AUTO_BED_LEVELING_UBL MESH_EDIT_MENU LCD_BED_TRAMMING \
Expand Down
Loading