-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
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
Marlin 2.0.7.2 failed to compile with the feature of "controller fan" for arduino DUE #19895
Comments
does this also happen if you use vscode+platform.io ? i use a re-arm and not the due but i dont have any compile errors |
What DUE based motherboard, there are 28 possibilities... |
I guessed a motherboard, added a CONTROLLER_FAN_PIN and can replicate the error in arduinio ide. |
Enabling CONTROLLER_FAN_EDITABLE bypasses the the issue |
Looks like the following line in Marlin/src/feature/controllerfan.h really shouldn't have the &. |
Thank your for boelle's and ellensp's advice. It is success to compile with PlatformIO under windows environment. |
The & operator seems to cause issue for STM32 in general. Such as: |
A pull request is posted to fix this. |
My changes have been merged. Closing as presumed fixed. |
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. |
Marlin 2.0.7.2
Arduino IDE 1.8.13 running under ubuntu OS
Target: Arduino Due (Programming Port)
When enable the "USE_CONTROLLER FAN" in "Configuration_adv.h"
#define USE_CONTROLLER_FAN
#if ENABLED(USE_CONTROLLER_FAN)
#define CONTROLLER_FAN_PIN 11
//#define CONTROLLER_FAN_USE_Z_ONLY // With this option only the Z axis is considered
//#define CONTROLLER_FAN_IGNORE_Z // Ignore Z stepper. Useful when stepper timeout is disabled.
#define CONTROLLERFAN_SPEED_MIN 0 // (0-255) Minimum speed. (If set below this value the fan is turned off.)
#define CONTROLLERFAN_SPEED_ACTIVE 255 // (0-255) Active speed, used when any motor is enabled
#define CONTROLLERFAN_SPEED_IDLE 0 // (0-255) Idle speed, used when motors are disabled
#define CONTROLLERFAN_IDLE_TIME 10 // (seconds) Extra time to keep the fan running after disabling motors
//#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings
#if ENABLED(CONTROLLER_FAN_EDITABLE)
#define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu
#endif
#endif_
The following compiling errors were observed:
In file included from sketch/src/MarlinCore.cpp:209:0:
sketch/src/feature/controllerfan.h:61:67: error: non-constant in-class initialization invalid for static member 'ControllerFan::settings'
static const controllerFan_settings_t constexpr &settings = controllerFan_defaults;
^
sketch/src/feature/controllerfan.h:61:67: error: (an out of class initialization is required)
sketch/src/feature/controllerfan.h:61:67: error: 'ControllerFan::settings' cannot be initialized by a non-constant expression when being declared
exit status 1
Error compiling for board Arduino Due (Programming Port).
The text was updated successfully, but these errors were encountered: