Fix ui.external_control compile error (#18778)
This commit is contained in:
parent
11702dc059
commit
6f26ed23ee
1 changed files with 13 additions and 11 deletions
|
@ -753,19 +753,19 @@ void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) {
|
||||||
//SERIAL_ECHOLNPAIR("Post Move with Axis ", int(axis), " soon.");
|
//SERIAL_ECHOLNPAIR("Post Move with Axis ", int(axis), " soon.");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HAS_LCD_MENU
|
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||||
|
|
||||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
void MarlinUI::external_encoder() {
|
||||||
|
if (external_control && encoderDiff) {
|
||||||
void MarlinUI::external_encoder() {
|
ubl.encoder_diff += encoderDiff; // Encoder for UBL G29 mesh editing
|
||||||
if (external_control && encoderDiff) {
|
encoderDiff = 0; // Hide encoder events from the screen handler
|
||||||
ubl.encoder_diff += encoderDiff; // Encoder for UBL G29 mesh editing
|
refresh(LCDVIEW_REDRAW_NOW); // ...but keep the refresh.
|
||||||
encoderDiff = 0; // Hide encoder events from the screen handler
|
}
|
||||||
refresh(LCDVIEW_REDRAW_NOW); // ...but keep the refresh.
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif // HAS_LCD_MENU
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the LCD, read encoder buttons, etc.
|
* Update the LCD, read encoder buttons, etc.
|
||||||
|
@ -1283,7 +1283,9 @@ void MarlinUI::update() {
|
||||||
case encrot2: ENCODER_SPIN(encrot1, encrot3); break;
|
case encrot2: ENCODER_SPIN(encrot1, encrot3); break;
|
||||||
case encrot3: ENCODER_SPIN(encrot2, encrot0); break;
|
case encrot3: ENCODER_SPIN(encrot2, encrot0); break;
|
||||||
}
|
}
|
||||||
TERN_(AUTO_BED_LEVELING_UBL, external_encoder());
|
#if BOTH(HAS_LCD_MENU, AUTO_BED_LEVELING_UBL)
|
||||||
|
external_encoder();
|
||||||
|
#endif
|
||||||
lastEncoderBits = enc;
|
lastEncoderBits = enc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue