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

@@ -210,11 +210,12 @@ extern millis_t max_inactive_time, stepper_inactive_time;
extern bool fans_paused;
extern uint8_t paused_fan_speed[FAN_COUNT];
#endif
#define FANS_LOOP(I) LOOP_L_N(I, FAN_COUNT)
#endif
inline void zero_fan_speeds() {
#if FAN_COUNT > 0
LOOP_L_N(i, FAN_COUNT) fan_speed[i] = 0;
FANS_LOOP(i) fan_speed[i] = 0;
#endif
}