MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.22k stars 19.22k forks source link

AUTO_POWER_CONTROL breaks compilation. #9570

Closed caffeineflo closed 6 years ago

caffeineflo commented 6 years ago

Compile Error

When I compile with AUTO_POWER_CONTROL I get an error:

In file included from Marlin/power.cpp:31:0:
Marlin/power.h:36:12: error: 'millis_t' does not name a type
static millis_t lastPowerOn;
^
Marlin/power.cpp:37:17: error: 'millis_t Power::lastPowerOn' is not a static member of 'class Power'
millis_t Power::lastPowerOn;
^
Marlin/power.cpp: In static member function 'static bool Power::is_power_needed()':
Marlin/power.cpp:53:22: error: 'class Temperature' has no member named 'soft_pwm_bed'
thermalManager.soft_pwm_bed > 0
^
Marlin/power.cpp: In static member function 'static void Power::check()':
Marlin/power.cpp:82:15: error: 'lastPowerOn' was not declared in this scope
else if (!lastPowerOn || ELAPSED(ms, lastPowerOn + (POWER_TIMEOUT) * 1000UL))
^
Marlin/power.cpp: In static member function 'static void Power::power_on()':
Marlin/power.cpp:88:3: error: 'lastPowerOn' was not declared in this scope
lastPowerOn = millis();
^
compilation terminated due to -fmax-errors=5.
Compiling .pioenvs/megaatmega2560/src/servo.o
Compiling .pioenvs/megaatmega2560/src/stepper.o
Compiling .pioenvs/megaatmega2560/src/stepper_dac.o
*** [.pioenvs/megaatmega2560/src/power.o] Error 1

This option has been added to the Configuration.h yesterday looking at the commit log. Not sure why it was introduced in a bugfix branch, but it definitely breaks compilation.

github-actions[bot] commented 3 years ago

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.