Browse Source
Merge pull request #9576 from thinkyhead/bf2_more_tests
[2.0.x] Fix Power class
pull/1/head
Scott Lahteine
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
9 additions and
5 deletions
-
.travis.yml
-
Marlin/src/feature/power.cpp
-
Marlin/src/feature/power.h
-
Marlin/src/module/temperature.h
|
@ -62,9 +62,10 @@ script: |
|
|
- opt_set TEMP_SENSOR_0 -2 |
|
|
- opt_set TEMP_SENSOR_0 -2 |
|
|
- opt_set TEMP_SENSOR_1 1 |
|
|
- opt_set TEMP_SENSOR_1 1 |
|
|
- opt_set TEMP_SENSOR_BED 1 |
|
|
- opt_set TEMP_SENSOR_BED 1 |
|
|
|
|
|
- opt_set POWER_SUPPLY 1 |
|
|
- opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS |
|
|
- opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS |
|
|
- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS |
|
|
- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS |
|
|
- opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED |
|
|
- opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED AUTO_POWER_CONTROL |
|
|
- opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE |
|
|
- opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE |
|
|
- opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL |
|
|
- opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL |
|
|
- opt_set ABL_GRID_POINTS_X 16 |
|
|
- opt_set ABL_GRID_POINTS_X 16 |
|
|
|
@ -29,8 +29,9 @@ |
|
|
#if ENABLED(AUTO_POWER_CONTROL) |
|
|
#if ENABLED(AUTO_POWER_CONTROL) |
|
|
|
|
|
|
|
|
#include "power.h" |
|
|
#include "power.h" |
|
|
#include "temperature.h" |
|
|
#include "../module/temperature.h" |
|
|
#include "stepper_indirection.h" |
|
|
#include "../module/stepper_indirection.h" |
|
|
|
|
|
#include "../Marlin.h" |
|
|
|
|
|
|
|
|
Power powerManager; |
|
|
Power powerManager; |
|
|
|
|
|
|
|
@ -50,7 +51,7 @@ bool Power::is_power_needed() { |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON || |
|
|
if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON || |
|
|
thermalManager.soft_pwm_bed > 0 |
|
|
thermalManager.soft_pwm_amount_bed > 0 |
|
|
|| E0_ENABLE_READ == E_ENABLE_ON // If any of the drivers are enabled...
|
|
|
|| E0_ENABLE_READ == E_ENABLE_ON // If any of the drivers are enabled...
|
|
|
#if E_STEPPERS > 1 |
|
|
#if E_STEPPERS > 1 |
|
|
|| E1_ENABLE_READ == E_ENABLE_ON |
|
|
|| E1_ENABLE_READ == E_ENABLE_ON |
|
|
|
@ -27,6 +27,8 @@ |
|
|
#ifndef POWER_H |
|
|
#ifndef POWER_H |
|
|
#define POWER_H |
|
|
#define POWER_H |
|
|
|
|
|
|
|
|
|
|
|
#include "../core/types.h" |
|
|
|
|
|
|
|
|
class Power { |
|
|
class Power { |
|
|
public: |
|
|
public: |
|
|
static void check(); |
|
|
static void check(); |
|
|
|
@ -35,7 +35,7 @@ |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if ENABLED(AUTO_POWER_CONTROL) |
|
|
#if ENABLED(AUTO_POWER_CONTROL) |
|
|
#include "power.h" |
|
|
#include "../feature/power.h" |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if ENABLED(PID_EXTRUSION_SCALING) |
|
|
#if ENABLED(PID_EXTRUSION_SCALING) |
|
|