Browse Source

♻️ Consolidate PSU_CONTROL (#22304)

Katelyn Schiesser 2 years ago
parent
commit
c8ee056cc6
No account linked to committer's email address

+ 6
- 3
Marlin/src/MarlinCore.cpp View File

@@ -236,6 +236,10 @@
236 236
   #include "feature/stepper_driver_safety.h"
237 237
 #endif
238 238
 
239
+#if ENABLED(PSU_CONTROL)
240
+  #include "feature/power.h"
241
+#endif
242
+
239 243
 PGMSTR(M112_KILL_STR, "M112 Shutdown");
240 244
 
241 245
 MarlinState marlin_state = MF_INITIALIZING;
@@ -883,7 +887,7 @@ void minkill(const bool steppers_off/*=false*/) {
883 887
   // Power off all steppers (for M112) or just the E steppers
884 888
   steppers_off ? disable_all_steppers() : disable_e_steppers();
885 889
 
886
-  TERN_(PSU_CONTROL, PSU_OFF());
890
+  TERN_(PSU_CONTROL, powerManager.power_off());
887 891
 
888 892
   TERN_(HAS_SUICIDE, suicide());
889 893
 
@@ -1189,8 +1193,7 @@ void setup() {
1189 1193
 
1190 1194
   #if ENABLED(PSU_CONTROL)
1191 1195
     SETUP_LOG("PSU_CONTROL");
1192
-    powersupply_on = ENABLED(PSU_DEFAULT_OFF);
1193
-    if (ENABLED(PSU_DEFAULT_OFF)) PSU_OFF(); else PSU_ON();
1196
+    powerManager.init();
1194 1197
   #endif
1195 1198
 
1196 1199
   #if ENABLED(POWER_LOSS_RECOVERY)

+ 0
- 19
Marlin/src/MarlinCore.h View File

@@ -81,25 +81,6 @@ extern bool wait_for_heatup;
81 81
   void wait_for_user_response(millis_t ms=0, const bool no_sleep=false);
82 82
 #endif
83 83
 
84
-#if ENABLED(PSU_CONTROL)
85
-  extern bool powersupply_on;
86
-  #define PSU_PIN_ON()  do{ OUT_WRITE(PS_ON_PIN,  PSU_ACTIVE_STATE); powersupply_on = true;  }while(0)
87
-  #define PSU_PIN_OFF() do{ OUT_WRITE(PS_ON_PIN, !PSU_ACTIVE_STATE); powersupply_on = false; }while(0)
88
-  #if ENABLED(AUTO_POWER_CONTROL)
89
-    #define PSU_ON()       powerManager.power_on()
90
-    #define PSU_OFF()      powerManager.power_off()
91
-    #define PSU_OFF_SOON() powerManager.power_off_soon()
92
-  #else
93
-    #define PSU_ON()     PSU_PIN_ON()
94
-    #if ENABLED(PS_OFF_SOUND)
95
-      #define PSU_OFF()  do{ BUZZ(1000, 659); PSU_PIN_OFF(); }while(0)
96
-    #else
97
-      #define PSU_OFF()  PSU_PIN_OFF()
98
-    #endif
99
-    #define PSU_OFF_SOON PSU_OFF
100
-  #endif
101
-#endif
102
-
103 84
 bool pin_is_protected(const pin_t pin);
104 85
 
105 86
 #if HAS_SUICIDE

+ 141
- 98
Marlin/src/feature/power.cpp View File

@@ -26,10 +26,7 @@
26 26
 
27 27
 #include "../inc/MarlinConfig.h"
28 28
 
29
-#if ENABLED(AUTO_POWER_CONTROL)
30
-
31 29
 #include "power.h"
32
-#include "../module/temperature.h"
33 30
 #include "../module/stepper/indirection.h"
34 31
 #include "../MarlinCore.h"
35 32
 
@@ -41,133 +38,179 @@
41 38
   #include "../gcode/gcode.h"
42 39
 #endif
43 40
 
44
-#if BOTH(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN)
45
-  #include "controllerfan.h"
41
+Power powerManager;
42
+bool Power::psu_on;
43
+
44
+#if ENABLED(AUTO_POWER_CONTROL)
45
+  #include "../module/temperature.h"
46
+
47
+  #if BOTH(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN)
48
+    #include "controllerfan.h"
49
+  #endif
50
+
51
+  millis_t Power::lastPowerOn;
46 52
 #endif
47 53
 
48
-Power powerManager;
54
+/**
55
+ * Initialize pins & state for the power manager.
56
+ *
57
+ */
58
+void Power::init(){
59
+  psu_on = ENABLED(PSU_DEFAULT_OFF);              // Set opposite state to get full power_off/on
60
+  TERN(PSU_DEFAULT_OFF, power_off(), power_on());
61
+}
49 62
 
50
-millis_t Power::lastPowerOn;
63
+/**
64
+ * Power on if the power is currently off.
65
+ * Restores stepper drivers and processes any PSU_POWERUP_GCODE.
66
+ *
67
+ */
68
+void Power::power_on() {
69
+  #if ENABLED(AUTO_POWER_CONTROL)
70
+    const millis_t now = millis();
71
+    lastPowerOn = now + !now;
72
+  #endif
51 73
 
52
-bool Power::is_power_needed() {
74
+  if (psu_on) return;
53 75
 
54
-  if (printJobOngoing() || printingIsPaused()) return true;
76
+  OUT_WRITE(PS_ON_PIN, PSU_ACTIVE_STATE);
77
+  psu_on = true;
78
+  safe_delay(PSU_POWERUP_DELAY);
79
+  restore_stepper_drivers();
80
+  TERN_(HAS_TRINAMIC_CONFIG, safe_delay(PSU_POWERUP_DELAY));
55 81
 
56
-  #if ENABLED(AUTO_POWER_FANS)
57
-    FANS_LOOP(i) if (thermalManager.fan_speed[i]) return true;
82
+  #ifdef PSU_POWERUP_GCODE
83
+    GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWERUP_GCODE));
58 84
   #endif
85
+}
86
+
87
+/**
88
+ * Power off if the power is currently on.
89
+ * Processes any PSU_POWEROFF_GCODE and makes a PS_OFF_SOUND if enabled.
90
+ *
91
+ */
92
+void Power::power_off() {
93
+  if (!psu_on) return;
59 94
 
60
-  #if ENABLED(AUTO_POWER_E_FANS)
61
-    HOTEND_LOOP() if (thermalManager.autofan_speed[e]) return true;
95
+  #ifdef PSU_POWEROFF_GCODE
96
+    GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWEROFF_GCODE));
62 97
   #endif
63 98
 
64
-  #if BOTH(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN)
65
-    if (controllerFan.state()) return true;
99
+  #if ENABLED(PS_OFF_SOUND)
100
+    BUZZ(1000, 659);
66 101
   #endif
67 102
 
68
-  if (TERN0(AUTO_POWER_CHAMBER_FAN, thermalManager.chamberfan_speed))
69
-    return true;
103
+  OUT_WRITE(PS_ON_PIN, !PSU_ACTIVE_STATE);
104
+  psu_on = false;
105
+}
70 106
 
71
-  if (TERN0(AUTO_POWER_COOLER_FAN, thermalManager.coolerfan_speed))
72
-    return true;
73 107
 
74
-  // If any of the drivers or the bed are enabled...
75
-  if (X_ENABLE_READ() == X_ENABLE_ON || Y_ENABLE_READ() == Y_ENABLE_ON || Z_ENABLE_READ() == Z_ENABLE_ON
76
-    #if HAS_X2_ENABLE
77
-      || X2_ENABLE_READ() == X_ENABLE_ON
78
-    #endif
79
-    #if HAS_Y2_ENABLE
80
-      || Y2_ENABLE_READ() == Y_ENABLE_ON
81
-    #endif
82
-    #if HAS_Z2_ENABLE
83
-      || Z2_ENABLE_READ() == Z_ENABLE_ON
84
-    #endif
85
-    #if E_STEPPERS
86
-      #define _OR_ENABLED_E(N) || E##N##_ENABLE_READ() == E_ENABLE_ON
87
-      REPEAT(E_STEPPERS, _OR_ENABLED_E)
88
-    #endif
89
-  ) return true;
108
+#if ENABLED(AUTO_POWER_CONTROL)
90 109
 
91
-  #if HAS_HOTEND
92
-    HOTEND_LOOP() if (thermalManager.degTargetHotend(e) > 0 || thermalManager.temp_hotend[e].soft_pwm_amount > 0) return true;
110
+  #ifndef POWER_TIMEOUT
111
+    #define POWER_TIMEOUT 0
93 112
   #endif
94 113
 
95
-  if (TERN0(HAS_HEATED_BED, thermalManager.degTargetBed() > 0 || thermalManager.temp_bed.soft_pwm_amount > 0)) return true;
114
+  /**
115
+   * Check all conditions that would signal power needing to be on.
116
+   *
117
+   * @returns bool  if power is needed
118
+   */
119
+  bool Power::is_power_needed() {
96 120
 
97
-  #if HAS_HOTEND && AUTO_POWER_E_TEMP
98
-    HOTEND_LOOP() if (thermalManager.degHotend(e) >= (AUTO_POWER_E_TEMP)) return true;
99
-  #endif
121
+    if (printJobOngoing() || printingIsPaused()) return true;
100 122
 
101
-  #if HAS_HEATED_CHAMBER && AUTO_POWER_CHAMBER_TEMP
102
-    if (thermalManager.degChamber() >= (AUTO_POWER_CHAMBER_TEMP)) return true;
103
-  #endif
123
+    #if ENABLED(AUTO_POWER_FANS)
124
+      FANS_LOOP(i) if (thermalManager.fan_speed[i]) return true;
125
+    #endif
104 126
 
105
-  #if HAS_COOLER && AUTO_POWER_COOLER_TEMP
106
-    if (thermalManager.degCooler() >= (AUTO_POWER_COOLER_TEMP)) return true;
107
-  #endif
127
+    #if ENABLED(AUTO_POWER_E_FANS)
128
+      HOTEND_LOOP() if (thermalManager.autofan_speed[e]) return true;
129
+    #endif
108 130
 
109
-  return false;
110
-}
131
+    #if BOTH(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN)
132
+      if (controllerFan.state()) return true;
133
+    #endif
111 134
 
112
-#ifndef POWER_TIMEOUT
113
-  #define POWER_TIMEOUT 0
114
-#endif
135
+    if (TERN0(AUTO_POWER_CHAMBER_FAN, thermalManager.chamberfan_speed))
136
+      return true;
137
+
138
+    if (TERN0(AUTO_POWER_COOLER_FAN, thermalManager.coolerfan_speed))
139
+      return true;
140
+
141
+    // If any of the drivers or the bed are enabled...
142
+    if (X_ENABLE_READ() == X_ENABLE_ON || Y_ENABLE_READ() == Y_ENABLE_ON || Z_ENABLE_READ() == Z_ENABLE_ON
143
+      #if HAS_X2_ENABLE
144
+        || X2_ENABLE_READ() == X_ENABLE_ON
145
+      #endif
146
+      #if HAS_Y2_ENABLE
147
+        || Y2_ENABLE_READ() == Y_ENABLE_ON
148
+      #endif
149
+      #if HAS_Z2_ENABLE
150
+        || Z2_ENABLE_READ() == Z_ENABLE_ON
151
+      #endif
152
+      #if E_STEPPERS
153
+        #define _OR_ENABLED_E(N) || E##N##_ENABLE_READ() == E_ENABLE_ON
154
+        REPEAT(E_STEPPERS, _OR_ENABLED_E)
155
+      #endif
156
+    ) return true;
157
+
158
+    #if HAS_HOTEND
159
+      HOTEND_LOOP() if (thermalManager.degTargetHotend(e) > 0 || thermalManager.temp_hotend[e].soft_pwm_amount > 0) return true;
160
+    #endif
115 161
 
116
-void Power::check(const bool pause) {
117
-  static bool _pause = false;
118
-  static millis_t nextPowerCheck = 0;
119
-  const millis_t now = millis();
120
-  #if POWER_TIMEOUT > 0
121
-    if (pause != _pause) {
122
-      lastPowerOn = now + !now;
123
-      _pause = pause;
124
-    }
125
-    if (pause) return;
126
-  #endif
127
-  if (ELAPSED(now, nextPowerCheck)) {
128
-    nextPowerCheck = now + 2500UL;
129
-    if (is_power_needed())
130
-      power_on();
131
-    else if (!lastPowerOn || (POWER_TIMEOUT > 0 && ELAPSED(now, lastPowerOn + SEC_TO_MS(POWER_TIMEOUT))))
132
-      power_off();
133
-  }
134
-}
162
+    if (TERN0(HAS_HEATED_BED, thermalManager.degTargetBed() > 0 || thermalManager.temp_bed.soft_pwm_amount > 0)) return true;
135 163
 
136
-void Power::power_on() {
137
-  const millis_t now = millis();
138
-  lastPowerOn = now + !now;
139
-  if (!powersupply_on) {
140
-    PSU_PIN_ON();
141
-    safe_delay(PSU_POWERUP_DELAY);
142
-    restore_stepper_drivers();
143
-    TERN_(HAS_TRINAMIC_CONFIG, safe_delay(PSU_POWERUP_DELAY));
144
-    #ifdef PSU_POWERUP_GCODE
145
-      GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWERUP_GCODE));
164
+    #if HAS_HOTEND && AUTO_POWER_E_TEMP
165
+      HOTEND_LOOP() if (thermalManager.degHotend(e) >= (AUTO_POWER_E_TEMP)) return true;
146 166
     #endif
147
-  }
148
-}
149 167
 
150
-void Power::power_off() {
151
-  if (powersupply_on) {
152
-    #ifdef PSU_POWEROFF_GCODE
153
-      GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWEROFF_GCODE));
168
+    #if HAS_HEATED_CHAMBER && AUTO_POWER_CHAMBER_TEMP
169
+      if (thermalManager.degChamber() >= (AUTO_POWER_CHAMBER_TEMP)) return true;
154 170
     #endif
155 171
 
156
-    #if ENABLED(PS_OFF_SOUND)
157
-      BUZZ(1000, 659);
172
+    #if HAS_COOLER && AUTO_POWER_COOLER_TEMP
173
+      if (thermalManager.degCooler() >= (AUTO_POWER_COOLER_TEMP)) return true;
158 174
     #endif
159 175
 
160
-    PSU_PIN_OFF();
176
+    return false;
161 177
   }
162
-}
163 178
 
164
-void Power::power_off_soon() {
165
-  #if POWER_OFF_DELAY
166
-    lastPowerOn = millis() - SEC_TO_MS(POWER_TIMEOUT) + SEC_TO_MS(POWER_OFF_DELAY);
167
-    //if (!lastPowerOn) ++lastPowerOn;
168
-  #else
169
-    power_off();
179
+  /**
180
+   * Check if we should power off automatically (POWER_TIMEOUT elapsed, !is_power_needed).
181
+   *
182
+   * @param pause  pause the 'timer'
183
+   */
184
+  void Power::check(const bool pause) {
185
+    static millis_t nextPowerCheck = 0;
186
+    const millis_t now = millis();
187
+    #if POWER_TIMEOUT > 0
188
+      static bool _pause = false;
189
+      if (pause != _pause) {
190
+        lastPowerOn = now + !now;
191
+        _pause = pause;
192
+      }
193
+      if (pause) return;
194
+    #endif
195
+    if (ELAPSED(now, nextPowerCheck)) {
196
+      nextPowerCheck = now + 2500UL;
197
+      if (is_power_needed())
198
+        power_on();
199
+      else if (!lastPowerOn || (POWER_TIMEOUT > 0 && ELAPSED(now, lastPowerOn + SEC_TO_MS(POWER_TIMEOUT))))
200
+        power_off();
201
+    }
202
+  }
203
+
204
+  #if POWER_OFF_DELAY > 0
205
+
206
+    /**
207
+     * Power off with a delay. Power off is triggered by check() after the delay.
208
+     *
209
+     */
210
+    void Power::power_off_soon() {
211
+      lastPowerOn = millis() - SEC_TO_MS(POWER_TIMEOUT) + SEC_TO_MS(POWER_OFF_DELAY);
212
+    }
213
+
170 214
   #endif
171
-}
172 215
 
173 216
 #endif // AUTO_POWER_CONTROL

+ 20
- 5
Marlin/src/feature/power.h View File

@@ -25,17 +25,32 @@
25 25
  * power.h - power control
26 26
  */
27 27
 
28
-#include "../core/millis_t.h"
28
+#if ENABLED(AUTO_POWER_CONTROL)
29
+  #include "../core/millis_t.h"
30
+#endif
29 31
 
30 32
 class Power {
31 33
   public:
32
-    static void check(const bool pause);
34
+    static bool psu_on;
35
+
36
+    static void init();
33 37
     static void power_on();
34 38
     static void power_off();
39
+
40
+  #if ENABLED(AUTO_POWER_CONTROL) && POWER_OFF_DELAY > 0
35 41
     static void power_off_soon();
36
-  private:
37
-    static millis_t lastPowerOn;
38
-    static bool is_power_needed();
42
+  #else
43
+    static inline void power_off_soon() { power_off(); }
44
+  #endif
45
+
46
+  #if ENABLED(AUTO_POWER_CONTROL)
47
+    static void check(const bool pause);
48
+
49
+    private:
50
+      static millis_t lastPowerOn;
51
+      static bool is_power_needed();
52
+
53
+  #endif
39 54
 };
40 55
 
41 56
 extern Power powerManager;

+ 8
- 22
Marlin/src/gcode/control/M80_M81.cpp View File

@@ -29,25 +29,17 @@
29 29
 
30 30
 #include "../../inc/MarlinConfig.h"
31 31
 
32
+#if ENABLED(PSU_CONTROL)
33
+  #include "../queue.h"
34
+  #include "../../feature/power.h"
35
+#endif
36
+
32 37
 #if HAS_SUICIDE
33 38
   #include "../../MarlinCore.h"
34 39
 #endif
35 40
 
36 41
 #if ENABLED(PSU_CONTROL)
37 42
 
38
-  #if ENABLED(AUTO_POWER_CONTROL)
39
-    #include "../../feature/power.h"
40
-  #else
41
-    void restore_stepper_drivers();
42
-  #endif
43
-
44
-  // Could be moved to a feature, but this is all the data
45
-  bool powersupply_on;
46
-
47
-  #if HAS_TRINAMIC_CONFIG
48
-    #include "../../feature/tmc_util.h"
49
-  #endif
50
-
51 43
   /**
52 44
    * M80   : Turn on the Power Supply
53 45
    * M80 S : Report the current state and exit
@@ -56,11 +48,11 @@
56 48
 
57 49
     // S: Report the current power supply state and exit
58 50
     if (parser.seen('S')) {
59
-      SERIAL_ECHOPGM_P(powersupply_on ? PSTR("PS:1\n") : PSTR("PS:0\n"));
51
+      SERIAL_ECHOPGM_P(powerManager.psu_on ? PSTR("PS:1\n") : PSTR("PS:0\n"));
60 52
       return;
61 53
     }
62 54
 
63
-    PSU_ON();
55
+    powerManager.power_on();
64 56
 
65 57
     /**
66 58
      * If you have a switch on suicide pin, this is useful
@@ -71,12 +63,6 @@
71 63
       OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_INVERTING);
72 64
     #endif
73 65
 
74
-    #if DISABLED(AUTO_POWER_CONTROL)
75
-      safe_delay(PSU_POWERUP_DELAY);
76
-      restore_stepper_drivers();
77
-      TERN_(HAS_TRINAMIC_CONFIG, safe_delay(PSU_POWERUP_DELAY));
78
-    #endif
79
-
80 66
     TERN_(HAS_LCD_MENU, ui.reset_status());
81 67
   }
82 68
 
@@ -106,7 +92,7 @@ void GcodeSuite::M81() {
106 92
   #if HAS_SUICIDE
107 93
     suicide();
108 94
   #elif ENABLED(PSU_CONTROL)
109
-    PSU_OFF_SOON();
95
+    powerManager.power_off_soon();
110 96
   #endif
111 97
 
112 98
   LCD_MESSAGEPGM_P(PSTR(MACHINE_NAME " " STR_OFF "."));

+ 8
- 4
Marlin/src/lcd/marlinui.cpp View File

@@ -158,6 +158,10 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
158 158
     #include "../feature/power_monitor.h"
159 159
   #endif
160 160
 
161
+  #if ENABLED(PSU_CONTROL) && defined(LED_BACKLIGHT_TIMEOUT)
162
+    #include "../feature/power.h"
163
+  #endif
164
+
161 165
   #if HAS_ENCODER_ACTION
162 166
     volatile uint8_t MarlinUI::buttons;
163 167
     #if HAS_SLOW_BUTTONS
@@ -826,8 +830,8 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
826 830
     static uint16_t max_display_update_time = 0;
827 831
     millis_t ms = millis();
828 832
 
829
-    #ifdef LED_BACKLIGHT_TIMEOUT
830
-      leds.update_timeout(powersupply_on);
833
+    #if ENABLED(PSU_CONTROL) && defined(LED_BACKLIGHT_TIMEOUT)
834
+      leds.update_timeout(powerManager.psu_on);
831 835
     #endif
832 836
 
833 837
     #if HAS_LCD_MENU
@@ -976,8 +980,8 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
976 980
 
977 981
           refresh(LCDVIEW_REDRAW_NOW);
978 982
 
979
-          #ifdef LED_BACKLIGHT_TIMEOUT
980
-            if (!powersupply_on) leds.reset_timeout(ms);
983
+          #if ENABLED(PSU_CONTROL) && defined(LED_BACKLIGHT_TIMEOUT)
984
+            if (!powerManager.psu_on) leds.reset_timeout(ms);
981 985
           #endif
982 986
         }
983 987
 

+ 5
- 6
Marlin/src/lcd/menu/menu_led.cpp View File

@@ -30,6 +30,10 @@
30 30
 
31 31
 #include "menu_item.h"
32 32
 
33
+#if ENABLED(PSU_CONTROL)
34
+  #include "../../feature/power.h"
35
+#endif
36
+
33 37
 #if ENABLED(LED_CONTROL_MENU)
34 38
   #include "../../feature/leds/leds.h"
35 39
 
@@ -125,12 +129,7 @@ void menu_led() {
125 129
   BACK_ITEM(MSG_MAIN);
126 130
 
127 131
   #if ENABLED(LED_CONTROL_MENU)
128
-    #if ENABLED(PSU_CONTROL)
129
-      extern bool powersupply_on;
130
-    #else
131
-      constexpr bool powersupply_on = true;
132
-    #endif
133
-    if (powersupply_on) {
132
+    if (TERN1(PSU_CONTROL, powerManager.psu_on)) {
134 133
       editable.state = leds.lights_on;
135 134
       EDIT_ITEM(bool, MSG_LEDS, &editable.state, leds.toggle);
136 135
     }

+ 5
- 1
Marlin/src/lcd/menu/menu_main.cpp View File

@@ -35,6 +35,10 @@
35 35
 #include "../../module/stepper.h"
36 36
 #include "../../sd/cardreader.h"
37 37
 
38
+#if ENABLED(PSU_CONTROL)
39
+  #include "../../feature/power.h"
40
+#endif
41
+
38 42
 #if HAS_GAMES && DISABLED(LCD_INFO_MENU)
39 43
   #include "game/game.h"
40 44
 #endif
@@ -385,7 +389,7 @@ void menu_main() {
385 389
   // Switch power on/off
386 390
   //
387 391
   #if ENABLED(PSU_CONTROL)
388
-    if (powersupply_on)
392
+    if (powerManager.psu_on)
389 393
       #if ENABLED(PS_OFF_CONFIRM)
390 394
         CONFIRM_ITEM(MSG_SWITCH_PS_OFF,
391 395
           MSG_YES, MSG_NO,

+ 1
- 1
Marlin/src/module/stepper/indirection.h View File

@@ -44,7 +44,7 @@
44 44
   #include "trinamic.h"
45 45
 #endif
46 46
 
47
-void restore_stepper_drivers();  // Called by PSU_ON
47
+void restore_stepper_drivers();  // Called by powerManager.power_on()
48 48
 void reset_stepper_drivers();    // Called by settings.load / settings.reset
49 49
 
50 50
 // X Stepper

+ 1
- 1
ini/features.ini View File

@@ -128,7 +128,7 @@ HAS_PRUSA_MMU1                         = src_filter=+<src/feature/mmu/mmu.cpp>
128 128
 HAS_PRUSA_MMU2                         = src_filter=+<src/feature/mmu/mmu2.cpp> +<src/gcode/feature/prusa_MMU2>
129 129
 PASSWORD_FEATURE                       = src_filter=+<src/feature/password> +<src/gcode/feature/password>
130 130
 ADVANCED_PAUSE_FEATURE                 = src_filter=+<src/feature/pause.cpp> +<src/gcode/feature/pause/M600.cpp> +<src/gcode/feature/pause/M603.cpp>
131
-AUTO_POWER_CONTROL                     = src_filter=+<src/feature/power.cpp>
131
+PSU_CONTROL                            = src_filter=+<src/feature/power.cpp>
132 132
 HAS_POWER_MONITOR                      = src_filter=+<src/feature/power_monitor.cpp> +<src/gcode/feature/power_monitor>
133 133
 POWER_LOSS_RECOVERY                    = src_filter=+<src/feature/powerloss.cpp> +<src/gcode/feature/powerloss>
134 134
 PROBE_TEMP_COMPENSATION                = src_filter=+<src/feature/probe_temp_comp.cpp> +<src/gcode/calibrate/G76_M192_M871.cpp>

Loading…
Cancel
Save