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

[BUG] Cant compile MMU2 cause idle was not declared #21795

Closed
Lyr3x opened this issue May 4, 2021 · 7 comments
Closed

[BUG] Cant compile MMU2 cause idle was not declared #21795

Lyr3x opened this issue May 4, 2021 · 7 comments

Comments

@Lyr3x
Copy link

Lyr3x commented May 4, 2021

Did you test the latest bugfix-2.0.x code?

Yes, and the problem still exists.

Bug Description

I yesterday synced to the latest bugfix-2.0.x branch (old one is about 5 month old). Triple checked the configuration changes but I can't compile marlin when uncommenting #define MMU_MODEL PRUSA_MMU2

Error:

Marlin/src/lcd/menu/menu_mmu2.cpp: In function 'void action_mmu2_unload_filament()':
Marlin/src/lcd/menu/menu_mmu2.cpp:85:3: error: 'idle' was not declared in this scope
   85 |   idle();
      |   ^~~~
Marlin/src/lcd/menu/menu_mmu2.cpp: In function 'void mmu2_M600()':
Marlin/src/lcd/menu/menu_mmu2.cpp:158:29: error: 'idle' was not declared in this scope
  158 |   while (wait_for_mmu_menu) idle();
      |                             ^~~~
Marlin/src/lcd/menu/menu_mmu2.cpp: In function 'uint8_t mmu2_choose_filament()':
Marlin/src/lcd/menu/menu_mmu2.cpp:165:29: error: 'idle' was not declared in this scope
  165 |   while (wait_for_mmu_menu) idle();
      |                             ^~~~
*** [.pio/build/BIGTREE_SKR_PRO/src/src/lcd/menu/menu_mmu2.cpp.o] Error 1

#define NOZZLE_PARK_FEATURE is activated so are the advanced options like #define MMU2_MENUS

Bug Timeline

Seems to be a fairly new bug

Expected behavior

Compiling succeed without errors

Actual behavior

Compile stopped with errors

Steps to Reproduce

No response

Version of Marlin Firmware

53fc13b

Printer model

HevoRS

Electronics

SKR Pro 1.1

Add-ons

No response

Your Slicer

No response

Host Software

No response

Additional information & file uploads

configuration.zip

Complete config: https://github.com/Lyr3x/Marlin/blob/bugfix-2.0.x-mmu/

Minimal changes: https://github.com/Lyr3x/Marlin/blob/bugfix-2.0.x-mmu-debug/

@ellensp
Copy link
Contributor

ellensp commented May 4, 2021

Give this a try, in Marlin/src/lcd/menu/menu_mmu2.cpp add the line #include "../../MarlinCore.h"

ie

diff --git a/Marlin/src/lcd/menu/menu_mmu2.cpp b/Marlin/src/lcd/menu/menu_mmu2.cpp
index 7e71f00d25..af3d9232b2 100644
--- a/Marlin/src/lcd/menu/menu_mmu2.cpp
+++ b/Marlin/src/lcd/menu/menu_mmu2.cpp
@@ -24,6 +24,7 @@
 
 #if BOTH(HAS_LCD_MENU, MMU2_MENUS)
 
+#include "../../MarlinCore.h"
 #include "../../feature/mmu/mmu2.h"
 #include "menu_mmu2.h"
 #include "menu_item.h"

It compiles, but I can't test it

@Lyr3x
Copy link
Author

Lyr3x commented May 4, 2021

That was an easy one at least compilation is done without errors. Ill test that later today and update. Ty for the hint!

@Lyr3x
Copy link
Author

Lyr3x commented May 4, 2021

Didnt print anything but communication with the MMU is working fine. Tested loading and unloading of filament. Should i provide a PR?

@ellensp
Copy link
Contributor

ellensp commented May 4, 2021

Go for it.

@ellensp
Copy link
Contributor

ellensp commented May 5, 2021

Since this still hasn't been created I have done it.

@ellensp
Copy link
Contributor

ellensp commented May 6, 2021

Merged, closing issue

@ellensp ellensp closed this as completed May 6, 2021
@github-actions
Copy link

github-actions bot commented Jul 5, 2021

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.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants