-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
[BUG] Bootloop, if HAS_PRINT_PROGRESS, but no options enabled #25249
Labels
Comments
@EvilGremlin you might want to look into this |
A quick fix is --- a/Marlin/src/lcd/marlinui.cpp
+++ b/Marlin/src/lcd/marlinui.cpp
@@ -1746,20 +1746,22 @@ void MarlinUI::init() {
#if LCD_WITH_BLINK && DISABLED(HAS_GRAPHICAL_TFT)
typedef void (*PrintProgress_t)();
void MarlinUI::rotate_progress() { // Renew and redraw all enabled progress strings
- const PrintProgress_t progFunc[] = {
- OPTITEM(SHOW_PROGRESS_PERCENT, drawPercent)
- OPTITEM(SHOW_ELAPSED_TIME, drawElapsed)
- OPTITEM(SHOW_REMAINING_TIME, drawRemain)
- OPTITEM(SHOW_INTERACTION_TIME, drawInter)
- };
- static bool prev_blink;
- static uint8_t i;
- if (prev_blink != get_blink()) {
- prev_blink = get_blink();
- if (++i >= COUNT(progFunc)) i = 0;
- (*progFunc[i])();
+ #if ANY(SHOW_PROGRESS_PERCENT,SHOW_ELAPSED_TIME,SHOW_REMAINING_TIME,SHOW_INTERACTION_TIME)
+ const PrintProgress_t progFunc[] = {
+ OPTITEM(SHOW_PROGRESS_PERCENT, drawPercent)
+ OPTITEM(SHOW_ELAPSED_TIME, drawElapsed)
+ OPTITEM(SHOW_REMAINING_TIME, drawRemain)
+ OPTITEM(SHOW_INTERACTION_TIME, drawInter)
+ };
+ static bool prev_blink;
+ static uint8_t i;
+ if (prev_blink != get_blink()) {
+ prev_blink = get_blink();
+ if (++i >= COUNT(progFunc)) i = 0;
+ (*progFunc[i])();
+ }
+ #endif
}
- }
#endif
#endif // HAS_PRINT_PROGRESS
but the following warning remains
|
same here |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Did you test the latest
bugfix-2.1.x
code?Yes, and the problem still exists.
Bug Description
In Configuration_adv.h is the following
If you have a display and enable SDSUPPORT but disable all the following options
SHOW_PROGRESS_PERCENT
SHOW_ELAPSED_TIME
SHOW_REMAINING_TIME
SHOW_INTERACTION_TIME
Marlin will compile without errors, but will bootloop
A warning is given
Bug Timeline
3 months, Since #24767
Expected behavior
No bootloop
Actual behavior
Bootloop
Steps to Reproduce
1 use provided config
2. watch marlin bootloop
Version of Marlin Firmware
Bugfix-2.1.x
Electronics
RAMPS 1.4 and REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
Additional information & file uploads
Configuration.zip
The cause
progFunc
IN this code
progFunc is populated with optional functions.
Later (*progFunc[i])(); calls these functions.
But when they are all disabled it crashes marlin
The text was updated successfully, but these errors were encountered: