make summer mode do something, update readme

fix-tempmode
Ondřej Hruška 2 years ago
parent afafc0172e
commit 95927f05da
  1. 11
      README.md
  2. 4
      main/fancontrol.c
  3. 2
      main/fancontrol.h

@ -29,9 +29,16 @@ H_RECUP_MODE = 12, // 0=na cas, 1=na teplotu (experimentalni)
H_RECUP_TIME = 13, // pokud na cas, pak toho je cas rekuperace
H_RECUP_TIME_MIN = 14, // na teplotu - spodni limit
H_RECUP_TIME_MAX = 15, // na teplotu - horni limit
H_RECUP_FACTOR = 16, // na teplotu - faktor, 80% = foukej dokud delta teplot neklesne o 80%
// 16 - reserved
H_MIN_POWER = 17, // min povoleny vykon motoru
H_T_IN_MIN = 18,
H_T_IN_MAX = 19,
// these don't work in summer mode:
H_T_STOPDELTA_IN = 20,
H_T_STOPDELTA_OUT = 21,
H_T_STOP_SPEED = 22,
// Hardware settings (don't need to change once set correctly)
H_RAMP_TIME = 30, // doba rozbehu nebo zastaveni motoru
H_BLIND_TIME = 31, // doba otevreni roletky
@ -51,7 +58,7 @@ Je take zrcadleno v holding mape s ofsetem 1000 (read-only)
// napr. 3 = jsou platne jen T_{IN,OUT}_INST
I_T_VALIDITY = 1,
I_T_IN_INST = 2,
I_T_IN_INST = 2, // teplota x100 (C)
I_T_OUT_INST = 3,
I_T_INDOOR = 4,
I_T_OUTDOOR = 5,

@ -98,9 +98,11 @@ static void timerCallback()
cels_t tin = act_temp1();
cels_t tout = act_temp2();
uint16_t old_tempSerial = gState.tempSerial;
float old_tin = gState.t_actual_in;
float old_tout = gState.t_actual_out;
gState.tempSerial = act_temps_serial();
gState.t_actual_in = tin;
gState.t_actual_out = tout;
@ -216,7 +218,7 @@ static void timerCallback()
// Max time elapsed, switch even if the condition was not reached
do_switch = true;
} else {
if (gState.lastTempsSerial != act_temps_serial()) {
if (!gSettings.summer_mode && gState.tempSerial != old_tempSerial) {
// expecting some change in temps
float speed;
if (gState.real_direction == MOTOR_DIR_IN) {

@ -54,7 +54,7 @@ struct FanControlState {
cels_t t_inflow;
cels_t t_exhaust;
uint16_t lastTempsSerial;
uint16_t tempSerial;
cels_t t_actual_in;
cels_t t_actual_out;

Loading…
Cancel
Save