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

[BUG] Build failure if AUTO_POWER_CONTROL is enabled but POWER_TIMEOUT is disabled #21475

Closed
Pyro-Fox opened this issue Mar 29, 2021 · 3 comments

Comments

@Pyro-Fox
Copy link
Contributor

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

Yes, and the problem still exists.

Bug Description

under the Power Supply Control section, if I enable PSU_CONTROL and AUTO_POWER_CONTROL, but disable POWER_TIMEOUT, I get the following build failure from PIO:

                 from Marlin\src\feature\../inc/MarlinConfig.h:54,
                 from Marlin\src\feature\power.cpp:27:
Marlin\src\feature\power.cpp: In static member function 'static void Power::check()':
Marlin\src\feature\power.cpp:109:66: error: 'POWER_TIMEOUT' was not declared in this scope; did you mean 'ERR_TIMOUT'?
  109 |     else if (!lastPowerOn || ELAPSED(ms, lastPowerOn + SEC_TO_MS(POWER_TIMEOUT)))
      |                                                                  ^~~~~~~~~~~~~
c:\marlin_git\marlin\marlin\src\core\millis_t.h:32:43: note: in definition of macro 'PENDING'
   32 | #define PENDING(NOW,SOON) ((int32_t)(NOW-(SOON))<0)
      |                                           ^~~~
Marlin\src\feature\power.cpp:109:30: note: in expansion of macro 'ELAPSED'
  109 |     else if (!lastPowerOn || ELAPSED(ms, lastPowerOn + SEC_TO_MS(POWER_TIMEOUT)))
      |                              ^~~~~~~
Marlin\src\feature\power.cpp:109:56: note: in expansion of macro 'SEC_TO_MS'
  109 |     else if (!lastPowerOn || ELAPSED(ms, lastPowerOn + SEC_TO_MS(POWER_TIMEOUT)))
      |                                                        ^~~~~~~~~
*** [.pio\build\LPC1768\src\src\feature\power.cpp.o] Error 1

Bug Timeline

New

Expected behavior

I expect it to build with timeout disabled

Actual behavior

It doesn't build

Steps to Reproduce

No response

Version of Marlin Firmware

2.0.x-bugfix (Distribution date 2021-03-29)

Printer model

Custom

Electronics

BTT SKR 1.3

Add-ons

No response

Your Slicer

No response

Host Software

No response

Marlin SKR 1.3 files.zip

PIO Build Failure.log

@github-actions
Copy link

This issue has had no activity in the last 60 days. Please add a reply if you want to keep this issue active, otherwise it will be automatically closed within 10 days.

@thisiskeithb
Copy link
Member

Fixed in #21771

@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 Jul 28, 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

2 participants