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

Compiling error and suggested fix #20905

Closed
francko76 opened this issue Jan 28, 2021 · 3 comments
Closed

Compiling error and suggested fix #20905

francko76 opened this issue Jan 28, 2021 · 3 comments

Comments

@francko76
Copy link

Marlin\src\lcd\extui\lib\anycubic_i3mega\anycubic_i3mega_lcd.cpp

row 768:
ExtUI::injectCommands_P(G28_STR);

should be
ExtUI::injectCommands_P(PSTR("G28_STR"));

@ellensp
Copy link
Contributor

ellensp commented Jan 28, 2021

No, that would send "G28_STR" as a gcode, which is invalid.

error is

Marlin/src/lcd/extui/lib/anycubic_i3mega/anycubic_i3mega_lcd.cpp: In member function 'void AnycubicTFTClass::GetCommandFromTFT()':
Marlin/src/lcd/extui/lib/anycubic_i3mega/anycubic_i3mega_lcd.cpp:768:41: error: 'G28_STR' was not declared in this scope
                 ExtUI::injectCommands_P(G28_STR);

A more correct solution is to add "extern const char G28_STR[];" to the end of anycubic_i3mega_lcd.h

@ellensp
Copy link
Contributor

ellensp commented Jan 29, 2021

That PR will fix it.

Next time please follow the bug template when submitting bug reports.

@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 Mar 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants