Fans loop macro

This commit is contained in:
Scott Lahteine
2018-11-28 15:35:18 -06:00
parent 61db0b65b6
commit 95d154a91f
4 changed files with 7 additions and 6 deletions

View File

@ -39,7 +39,7 @@ millis_t Power::lastPowerOn;
bool Power::is_power_needed() {
#if ENABLED(AUTO_POWER_FANS)
for (uint8_t i = 0; i < FAN_COUNT; i++) if (fan_speed[i]) return true;
FANS_LOOP(i) if (fan_speed[i]) return true;
#endif
#if ENABLED(AUTO_POWER_E_FANS)

View File

@ -277,7 +277,7 @@ void PrintJobRecovery::resume() {
}
// Restore print cooling fan speeds
for (uint8_t i = 0; i < FAN_COUNT; i++) {
FANS_LOOP(i) {
uint8_t f = info.fan_speed[i];
if (f) {
sprintf_P(cmd, PSTR("M106 P%i S%i"), i, f);