Bläddra i källkod

Merge pull request #9576 from thinkyhead/bf2_more_tests

[2.0.x] Fix Power class
Scott Lahteine 7 år sedan
förälder
incheckning
d3ddd5ffaa
Inget konto är kopplat till bidragsgivarens mejladress
4 ändrade filer med 9 tillägg och 5 borttagningar
  1. 2
    1
      .travis.yml
  2. 4
    3
      Marlin/src/feature/power.cpp
  3. 2
    0
      Marlin/src/feature/power.h
  4. 1
    1
      Marlin/src/module/temperature.h

+ 2
- 1
.travis.yml Visa fil

62
   - opt_set TEMP_SENSOR_0 -2
62
   - opt_set TEMP_SENSOR_0 -2
63
   - opt_set TEMP_SENSOR_1 1
63
   - opt_set TEMP_SENSOR_1 1
64
   - opt_set TEMP_SENSOR_BED 1
64
   - opt_set TEMP_SENSOR_BED 1
65
+  - opt_set POWER_SUPPLY 1
65
   - opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS
66
   - opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS
66
   - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS
67
   - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS
67
-  - opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED
68
+  - opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED AUTO_POWER_CONTROL
68
   - opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE
69
   - opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE
69
   - opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL
70
   - opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL
70
   - opt_set ABL_GRID_POINTS_X 16
71
   - opt_set ABL_GRID_POINTS_X 16

+ 4
- 3
Marlin/src/feature/power.cpp Visa fil

29
 #if ENABLED(AUTO_POWER_CONTROL)
29
 #if ENABLED(AUTO_POWER_CONTROL)
30
 
30
 
31
 #include "power.h"
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
 Power powerManager;
36
 Power powerManager;
36
 
37
 
50
   #endif
51
   #endif
51
 
52
 
52
   if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON ||
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
       || E0_ENABLE_READ == E_ENABLE_ON // If any of the drivers are enabled...
55
       || E0_ENABLE_READ == E_ENABLE_ON // If any of the drivers are enabled...
55
       #if E_STEPPERS > 1
56
       #if E_STEPPERS > 1
56
         || E1_ENABLE_READ == E_ENABLE_ON
57
         || E1_ENABLE_READ == E_ENABLE_ON

+ 2
- 0
Marlin/src/feature/power.h Visa fil

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

+ 1
- 1
Marlin/src/module/temperature.h Visa fil

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

Laddar…
Avbryt
Spara