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 3 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
16 changes: 16 additions & 0 deletions Marlin/src/lcd/e3v2/proui/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1715,6 +1715,22 @@ void dwinPrintFinished() {

// Print was aborted
void dwinPrintAborted() {
#if ENABLED(NOZZLE_PARK_FEATURE)
const xyz_pos_t park_point = NOZZLE_PARK_POINT;
#endif
if (all_axes_homed()) {
const int16_t zpos = current_position.z + TERN(NOZZLE_PARK_FEATURE,
NOZZLE_PARK_Z_RAISE_MIN, Z_POST_CLEARANCE);
_MIN(zpos, Z_MAX_POS);
MString<25> cmd;
cmd.setf(cmd, F("G0Z%i\nG0F2000Y%i"), zpos, TERN(NOZZLE_PARK_FEATURE, park_pos.y, 200));
queue.inject(&cmd);
}
#ifdef SD_FINISHED_RELEASECOMMAND
thinkyhead marked this conversation as resolved.
Show resolved Hide resolved
queue.inject(SD_FINISHED_RELEASECOMMAND);
#endif

hostui.notify("Print Aborted");
dwinPrintFinished();
}

Expand Down
9 changes: 8 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,16 @@ inline void drawPopupBkgd() {

template<typename T, typename U>
void dwinDrawPopup(const uint8_t icon, T amsg1=nullptr, U amsg2=nullptr, uint8_t button=0) {
uint8_t xpos = 81;
uint8_t ypos = 90;
switch (icon) {
case 17 ... 24: xpos = 96; break; // Icon#:17-24; W: 80px|H:100px
case 78 ... 81: xpos = 100; ypos = 107; break; // Icon#:78-81; W: 73px|H: 66px
default: xpos = 81; ypos = 90; break; // Icon#:1-8,90-91; W:110px|H:100px
}
DWINUI::clearMainArea();
drawPopupBkgd();
if (icon) DWINUI::drawIcon(icon, 101, 105);
if (icon) DWINUI::drawIcon(icon, xpos, ypos);
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
4 changes: 2 additions & 2 deletions Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ uint8_t USB::ctrlReq(uint8_t addr, uint8_t ep, uint8_t bmReqType, uint8_t bReque
* rcode 0 if no errors. rcode 01-0f is relayed from dispatchPkt(). Rcode f0 means RCVDAVIRQ error, fe = USB xfer timeout
*/
uint8_t USB::inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t *data, uint8_t bInterval /*= 0*/) {
EpInfo *pep = nullptr;
EpInfo *pep=nullptr;
uint16_t nak_limit = 0;

uint8_t rcode = SetAddress(addr, ep, &pep, &nak_limit);
Expand All @@ -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);
};