Browse Source

Remove dead code from 0e0a9364

master
Shawn Anastasio 2 years ago
parent
commit
dfeeb1a894
  1. 32
      src/control.c

32
src/control.c

@ -158,37 +158,5 @@ bool update_zone(struct controller_state *state, enum zone z) {
pwm_provider->set_zone_speed(z, zone->curve[zone->next_curve_pos].speed);
zone->curve_pos = zone->next_curve_pos;
#if 0
// Check for raise
if (zone->curve_pos != zone->curve_size - 1) {
const struct fan_curve_point *next = &zone->curve[zone->curve_pos + 1];
// Check if temperature is high enough to go to next point
if (max_temp >= next->temp) {
uint32_t n = find_new_curve_point(zone->curve, zone->curve_size, max_temp);
const struct fan_curve_point *new = &zone->curve[n];
dbg_printf("Zone %u temperature increased to %u, setting speed to %u\n", z, max_temp, new->speed);
pwm_provider->set_zone_speed(z, new->speed);
zone->curve_pos = n;
return true;
}
}
// Check for drop
if (zone->curve_pos != 0) {
const struct fan_curve_point *cur = &zone->curve[zone->curve_pos];
// Check if temperature dropped below cur - hysteresis
if (max_temp < cur->temp - cur->hysteresis) {
uint32_t n = find_new_curve_point(zone->curve, zone->curve_size, max_temp);
const struct fan_curve_point *new = &zone->curve[n];
dbg_printf("Zone %u temperature decreased to %u, setting speed to %u\n", z, max_temp, new->speed);
pwm_provider->set_zone_speed(z, new->speed);
zone->curve_pos = n;
return true;
}
}
#endif
return true;
}

Loading…
Cancel
Save