Parcourir la source

Merge pull request #9576 from thinkyhead/bf2_more_tests

[2.0.x] Fix Power class
Scott Lahteine il y a 7 ans
Parent
révision
d3ddd5ffaa
Aucun compte lié à l'adresse e-mail de l'auteur
4 fichiers modifiés avec 9 ajouts et 5 suppressions
  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 Voir le fichier

@@ -62,9 +62,10 @@ script:
62 62
   - opt_set TEMP_SENSOR_0 -2
63 63
   - opt_set TEMP_SENSOR_1 1
64 64
   - opt_set TEMP_SENSOR_BED 1
65
+  - opt_set POWER_SUPPLY 1
65 66
   - opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS
66 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 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 70
   - opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL
70 71
   - opt_set ABL_GRID_POINTS_X 16

+ 4
- 3
Marlin/src/feature/power.cpp Voir le fichier

@@ -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 Voir le fichier

@@ -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 Voir le fichier

@@ -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)

Chargement…
Annuler
Enregistrer