temps dummy

master
Ondřej Hruška 2 years ago
parent cbf3ebd8e0
commit 5c163672ff
  1. 21
      main/fancontrol.c
  2. 8
      main/fancontrol.h

@ -96,18 +96,37 @@ static void timerCallback(TimerHandle_t xTimer) {
act_blind_set(1);
if (gState.blind_position >= gSettings.blind_time) {
act_motor_power_set(gState.set_power);
}
// Stop condition
if (gState.real_direction == gAct.dir) {
if (gState.run_time >= gSettings.recup_time) {
// zmena smeru
gState.run_time = 0;
act_motor_direction_set(1 - gAct.dir);
}
}
}
break;
}
if (gAct.dir == gState.real_direction && gState.ramp >= gSettings.ramp_time) {
// Measure temperatures
int16_t t1 = 200;
int16_t t2 = 200; // TODO
gState.t_actual_1 = t1;
gState.t_actual_2 = t2;
switch (gState.real_direction) {
case MOTOR_DIR_IN:
gState.t_outdoor = t2;
gState.t_intake = t1;
break;
case MOTOR_DIR_OUT:
gState.t_indoor = t1;
gState.t_exhaust = t2;
break;
}
}
}

@ -44,6 +44,14 @@ struct FanControlState {
* rezim ventilace
*/
enum ventilation_mode vent_mode;
uint16_t t_indoor;
uint16_t t_outdoor;
uint16_t t_intake;
uint16_t t_exhaust;
uint16_t t_actual_1;
uint16_t t_actual_2;
};
extern struct FanControlState gState;

Loading…
Cancel
Save