Browse Source

Patch Power class

Scott Lahteine 6 years ago
parent
commit
7280fa1e31
3 changed files with 7 additions and 4 deletions
  1. 4
    3
      Marlin/src/feature/power.cpp
  2. 2
    0
      Marlin/src/feature/power.h
  3. 1
    1
      Marlin/src/module/temperature.h

+ 4
- 3
Marlin/src/feature/power.cpp View File

@@ -29,8 +29,9 @@
29 29
 #if ENABLED(AUTO_POWER_CONTROL)
30 30
 
31 31
 #include "power.h"
32
-#include "temperature.h"
33
-#include "stepper_indirection.h"
32
+#include "../module/temperature.h"
33
+#include "../module/stepper_indirection.h"
34
+#include "../Marlin.h"
34 35
 
35 36
 Power powerManager;
36 37
 
@@ -50,7 +51,7 @@ bool Power::is_power_needed() {
50 51
   #endif
51 52
 
52 53
   if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON ||
53
-      thermalManager.soft_pwm_bed > 0
54
+      thermalManager.soft_pwm_amount_bed > 0
54 55
       || E0_ENABLE_READ == E_ENABLE_ON // If any of the drivers are enabled...
55 56
       #if E_STEPPERS > 1
56 57
         || E1_ENABLE_READ == E_ENABLE_ON

+ 2
- 0
Marlin/src/feature/power.h View File

@@ -27,6 +27,8 @@
27 27
 #ifndef POWER_H
28 28
 #define POWER_H
29 29
 
30
+#include "../core/types.h"
31
+
30 32
 class Power {
31 33
   public:
32 34
     static void check();

+ 1
- 1
Marlin/src/module/temperature.h View File

@@ -35,7 +35,7 @@
35 35
 #endif
36 36
 
37 37
 #if ENABLED(AUTO_POWER_CONTROL)
38
-  #include "power.h"
38
+  #include "../feature/power.h"
39 39
 #endif
40 40
 
41 41
 #if ENABLED(PID_EXTRUSION_SCALING)

Loading…
Cancel
Save