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

ASSISTED_TRAMMING and MAGNETIC_SWITCHING_TOOLHEAD : Compilation error in G35.cpp #19252

Closed
yopla31 opened this issue Sep 3, 2020 · 7 comments

Comments

@yopla31
Copy link

yopla31 commented Sep 3, 2020

Marlin.zip
Printer : Ender 5 Pro modified !
Board : MKS SGEN-L
I use 2 hotends with magnetic attachment (#define MAGNETIC_SWITCHING_TOOLHEAD)
See at https://www.youtube.com/watch?v=mZzq3hM-eWg
If I set #define ASSISTED_TRAMMING, I get a compilation error :

**> _Marlin\src\gcode\bedlevel\G35.cpp: In static member function 'static void GcodeSuite::G35()':

Marlin\src\gcode\bedlevel\G35.cpp:106:5: error: 'tool_change' was not declared in this scope
106 | tool_change(0, true);
| ^~~~~~~~~~~
*** [.pio\build\LPC1768\src\src\gcode\bedlevel\G35.cpp.o] Error 1_**

Same error with bugfix-2.0.x #19250 (Bump distribution date (2020-09-03) 768182c )
If I disable ASSISTED_TRAMMING, the compilation is OK
I use a BL-Touch.

@ellensp
Copy link
Contributor

ellensp commented Sep 5, 2020

add to G35.cpp around line 32.. after includes but before define DEBUG_OUT

#if HAS_MULTI_HOTEND
  #include "../../module/tool_change.h"
#endif

I cannot test this... but it compiles.

@yopla31
Copy link
Author

yopla31 commented Sep 5, 2020

Yes, it compiles, but a big print is printing.
I shall try tomorrow this feature.

Thx !!

@thisiskeithb
Copy link
Member

Did @ellensp's fix work for you @yopla31?

@yopla31
Copy link
Author

yopla31 commented Sep 15, 2020 via email

@thisiskeithb
Copy link
Member

Yes, it's OK.

Great!

@ellensp: I'm hoping your suggestion will also fix the issue in #19402, but I'm waiting for more feedback (hopefully some error output over serial will give me more info), but feel free to put in a PR.

@thisiskeithb
Copy link
Member

I've put in a PR that will allow G35 to work on multi hotend setups: #19418 (thanks @ellensp for the fix!)

@github-actions
Copy link

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 Nov 19, 2020
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

3 participants