-
-
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] Fan calculation macro uses defines that do not exist yet (wrong import order) #25347
Comments
Can you confirm whether this is still an issue? If so, please attach configuration files which can be used to reproduce this. |
I did some test and it seems confirmed with latest bugfix |
@sjasonsmith you may use any configuration you want, I used mine, just comment out FAN_MIN_PWM and FAN_MAX_PWM in your "Configuration_adv.h" file and check which 'CALC_FAN_SPEED' branch is compiled (I added a simple #error but intellisense already display it) |
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
Pull request #24873 moved the
CALC_FAN_SPEED
macro intoMarlin/src/inc/Conditionals_adv.h
, the macro however, makes use ofFAN_MIN_PWM
,FAN_MAX_PWM
andFAN_OFF_PWM
which are undefined by default. The values for these defines are "fixed" (if undefined) inConditionals_post.h
(lines 2707-2731). ButConditionals_post.h
is only imported afterConditionals_adv.h
.Therefore, in the default case of undefined
FAN_MIN_PWM
,FAN_MAX_PWM
orFAN_OFF_PWM
the current macro forCALC_FAN_SPEED
always falls into the "else" clause because MIN/MAX are undefined:I am not sure where would be a good place for the
CALC_FAN_SPEED
, I'll be happy to submit a pull-request if anyone has a suggestion.Bug Timeline
No response
Expected behavior
No response
Actual behavior
No response
Steps to Reproduce
No response
Version of Marlin Firmware
2.1.2
Printer model
No response
Electronics
No response
Add-ons
No response
Bed Leveling
None
Your Slicer
None
Host Software
None
Don't forget to include
Configuration.h
andConfiguration_adv.h
.Additional information & file uploads
No response
The text was updated successfully, but these errors were encountered: