|
@@ -87,16 +87,18 @@ void Power::check() {
|
87
|
87
|
|
88
|
88
|
void Power::power_on() {
|
89
|
89
|
lastPowerOn = millis();
|
90
|
|
- PSU_PIN_ON();
|
|
90
|
+ if (!powersupply_on) {
|
|
91
|
+ PSU_PIN_ON();
|
91
|
92
|
|
92
|
|
- #if HAS_TRINAMIC
|
93
|
|
- delay(100); // Wait for power to settle
|
94
|
|
- restore_stepper_drivers();
|
95
|
|
- #endif
|
|
93
|
+ #if HAS_TRINAMIC
|
|
94
|
+ delay(100); // Wait for power to settle
|
|
95
|
+ restore_stepper_drivers();
|
|
96
|
+ #endif
|
|
97
|
+ }
|
96
|
98
|
}
|
97
|
99
|
|
98
|
100
|
void Power::power_off() {
|
99
|
|
- PSU_PIN_OFF();
|
|
101
|
+ if (powersupply_on) PSU_PIN_OFF();
|
100
|
102
|
}
|
101
|
103
|
|
102
|
104
|
#endif // AUTO_POWER_CONTROL
|