refactor the vars
This commit is contained in:
12
src/aio.c
12
src/aio.c
@@ -137,9 +137,9 @@ void aio_detect(struct aio_t *aio) {
|
||||
return;
|
||||
}
|
||||
|
||||
aio->t_q = 36.5f;
|
||||
aio->t_b = 38.5f;
|
||||
aio->t_e = 41.0f;
|
||||
aio->t_quiet = 36.5f;
|
||||
aio->t_balanced = 38.5f;
|
||||
aio->t_extreme = 41.0f;
|
||||
|
||||
const struct curve_point_t fan_curve[] = {
|
||||
{ 34, SPD2DTY(0)},
|
||||
@@ -172,13 +172,13 @@ void aio_update(struct aio_t *aio) {
|
||||
aio->pump_mode = aio_get_pump_mode(aio->handle);
|
||||
aio_get_fan_speed(aio->handle, aio->fan_speed);
|
||||
|
||||
if ((aio->pump_mode == QUIET && aio->water_temp > aio->t_b) || (aio->pump_mode == EXTREME && aio->water_temp < aio->t_b))
|
||||
if ((aio->pump_mode == QUIET && aio->water_temp > aio->t_balanced) || (aio->pump_mode == EXTREME && aio->water_temp < aio->t_balanced))
|
||||
aio_set_pump_mode(aio->handle, BALANCED);
|
||||
|
||||
if (aio->pump_mode == BALANCED) {
|
||||
if (aio->water_temp > aio->t_e)
|
||||
if (aio->water_temp > aio->t_extreme)
|
||||
aio_set_pump_mode(aio->handle, EXTREME);
|
||||
if (aio->water_temp < aio->t_q)
|
||||
if (aio->water_temp < aio->t_quiet)
|
||||
aio_set_pump_mode(aio->handle, QUIET);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user