-
-
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
[BUG] Enabling both MPCTEMP and ADAPTIVE_FAN_SLOWING breaks build #25115
Comments
AFAIK MPC should take care of fan and then adaptive fan shouldn't be necessary. |
With |
I have always had ADAPTIVE_FAN_SLOWING enabled along with MPC and no compile error. |
I would guess something broke it recently. Using a fresh Indexing .pio/build/mega2560/libFrameworkArduino.a
Marlin/src/module/temperature.cpp: In member function 'void Temperature::tr_state_machine_t::run(const_celsius_float_t, const_celsius_float_t, heater_id_t, uint16_t, celsius_t)':
Marlin/src/module/temperature.cpp:2893:15: error: 'adaptive_fan_slowing' was not declared in this scope
if (adaptive_fan_slowing && heater_id >= 0) {
^~~~~~~~~~~~~~~~~~~~
*** [.pio/build/mega2560/src/src/module/temperature.cpp.o] Error 1 |
I do not get the compile error because I have PIDTEMPBED defined. The problem is not with enabling MPCTEMP, it is with disabling PIDTEMP. The same happens if you disable PIDTEMP for bang bang control. The following code incorrectly couples ADAPTIVE_FAN_SLOWING with PID. Marlin/Marlin/src/module/temperature.h Lines 1176 to 1180 in 67bc855
|
I think https://github.com/tombrazier/Marlin/tree/25115 should fix it. Haven't tried it though. |
Closing since there's now a PR fix this: |
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. |
Did you test the latest
bugfix-2.1.x
code?Yes, and the problem still exists.
Bug Description
Building fails when enabling both
MPCTEMP
andADAPTIVE_FAN_SLOWING
. This combination is not mentioned anywhere in the MPCTEMP documentation, nor is it mentioned anywhere in the config files, and it seems like these features should be compatible.I believe that this has gone unnoticed for so long because
MPCTEMP
is still noted as experimental and unreliable, and I don't thinkADAPTIVE_FAN_SLOWING
is a particularly common option to enable either. Most likely related to #24687.Possible Solution
Starting at line 1168 in
src/module/temperature.h
, there is:Marlin builds successfully when this is replaced with the following:
If these features truly are incompatible, then this will cause other problems. But I don't see why they would be.
Bug Timeline
Old - this has probably existed ever since both features have been available.
Expected behavior
Marlin should either build successfully, or fail with a message stating that these two options cannot be used together. If the latter, this should also be documented somewhere.
Actual behavior
Build fails with the error:
Steps to Reproduce
Checkout most the recent Marlin bugfix-2.1.x code @ fb5a595
Disable PIDTEMP and enable MPCTEMP in Configuration.h
Enable ADAPTIVE_FAN_SLOWING in Configuration_adv.h
Try to build
Version of Marlin Firmware
bugfix-2.1.x
Printer model
N/A
Electronics
N/A
Add-ons
N/A
Bed Leveling
None
Your Slicer
None
Host Software
None
Don't forget to include
Configuration.h
andConfiguration_adv.h
.Additional information & file uploads
Config.zip
The text was updated successfully, but these errors were encountered: