forked from electro/esp-irblaster
temps dummy
This commit is contained in:
+25
-6
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Stop condition
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user