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

anycubic_i3mega_lcd.cpp and compiling errors #21486

Closed
francko76 opened this issue Mar 30, 2021 · 4 comments
Closed

anycubic_i3mega_lcd.cpp and compiling errors #21486

francko76 opened this issue Mar 30, 2021 · 4 comments

Comments

@francko76
Copy link

francko76 commented Mar 30, 2021

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

Yes, and the problem still exists.

Bug Description

PlatformIO Output
In file included from Marlin\src\lcd\extui\lib\anycubic_i3mega\../../../../inc/../core/boards.h:24:0,
                 from Marlin\src\lcd\extui\lib\anycubic_i3mega\../../../../inc/MarlinConfigPre.h:37,
                 from Marlin\src\lcd\extui\lib\anycubic_i3mega\anycubic_i3mega_lcd.cpp:22:
Marlin\src\lcd\extui\lib\anycubic_i3mega\../../../../inc/../core/macros.h: In instantiation of 'constexpr void LIMIT(V&, N1, N2) [with V = const float; N1 = int; N2 = int]':
Marlin\src\lcd\extui\lib\anycubic_i3mega\anycubic_i3mega_lcd.cpp:587:13:   required from here
Marlin\src\lcd\extui\lib\anycubic_i3mega\../../../../inc/../core/macros.h:126:19: error: assignment of read-only reference 'v'
     if (n1 > v) v = n1;
                   ^
Marlin\src\lcd\extui\lib\anycubic_i3mega\../../../../inc/../core/macros.h:127:24: error: assignment of read-only reference 'v'
     else if (n2 < v) v = n2;
                        ^
Marlin\src\lcd\extui\lib\anycubic_i3mega\anycubic_i3mega_lcd.cpp: In static member function 'static void AnycubicTFTClass::GetCommandFromTFT()':
Marlin\src\lcd\extui\lib\anycubic_i3mega\anycubic_i3mega_lcd.cpp:587:43: error: void value not ignored as it ought to be
             SEND_PGM_VAL("A4V ", int(LIMIT(fanPercent, 0, 100)));
                                           ^
Marlin\src\lcd\extui\lib\anycubic_i3mega\anycubic_i3mega_lcd.cpp:37:66: note: in definition of macro 'SEND_PGM_VAL'
 #define SEND_PGM_VAL(x,y) (send_P(PSTR(x)), sendLine(i16tostr3rj(y)))
                                                                  ^
At global scope:
cc1plus.exe: warning: unrecognized command line option '-Wno-register'
Compiling .pio\build\mega2560\src\src\lcd\marlinui.cpp.o
*** [.pio\build\mega2560\src\src\lcd\extui\lib\anycubic_i3mega\anycubic_i3mega_lcd.cpp.o] Error 1
Arduino Output
c:\tmp\sketch\src\lcd\extui\lib\anycubic_i3mega\anycubic_i3mega_lcd.cpp: In static member function 'static void AnycubicTFTClass::GetCommandFromTFT()':
c:\tmp\sketch\src\lcd\extui\lib\anycubic_i3mega\anycubic_i3mega_lcd.cpp:587:43: error: void value not ignored as it ought to be
             SEND_PGM_VAL("A4V ", int(LIMIT(fanPercent, 0, 100)));
                                      ~~~~~^~~~~~~~~~~~~~~~~~~~
c:\tmp\sketch\src\lcd\extui\lib\anycubic_i3mega\anycubic_i3mega_lcd.cpp:37:66: note: in definition of macro 'SEND_PGM_VAL'
 #define SEND_PGM_VAL(x,y) (send_P(PSTR(x)), sendLine(i16tostr3rj(y)))
                                                                  ^
In file included from c:\tmp\sketch\src\core\boards.h:24:0,
                 from c:\tmp\sketch\src\inc\marlinconfigpre.h:37,
                 from c:\tmp\sketch\src\lcd\extui\lib\anycubic_i3mega\anycubic_i3mega_lcd.cpp:22:
c:\tmp\sketch\src\core\macros.h: In instantiation of 'constexpr void LIMIT(V&, N1, N2) [with V = const float; N1 = int; N2 = int]':
c:\tmp\sketch\src\lcd\extui\lib\anycubic_i3mega\anycubic_i3mega_lcd.cpp:587:13:   required from here
c:\tmp\sketch\src\core\macros.h:126:19: error: assignment of read-only reference 'v'
     if (n1 > v) v = n1;
                 ~~^~~~
c:\tmp\sketch\src\core\macros.h:127:24: error: assignment of read-only reference 'v'
     else if (n2 < v) v = n2;
                      ~~^~~~
exit status 1

Bug Timeline

No response

Expected behavior

No response

Actual behavior

No response

Steps to Reproduce

No response

Version of Marlin Firmware

bugfix-2.0.x

Printer model

Anycubic i3 mega s

Electronics

No response

Add-ons

No response

Your Slicer

No response

Host Software

No response

@ellensp
Copy link
Contributor

ellensp commented Mar 30, 2021

Please attach your configuration files.

@francko76
Copy link
Author

www.inforicambi.tv/temp/Configuration.h
www.inforicambi.tv/temp/Configuration_adv.h

Please attach your configuration files.

@francko76
Copy link
Author

I fixed temporarly for compiling changing this

anycubic_i3mega_lcd.cpp
row 587

image

@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 Jun 12, 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

4 participants