v1.1 tested (TH-05)
This commit is contained in:
parent
f4bfdb8f9d
commit
f47d7540fe
14 changed files with 20 additions and 9252 deletions
Binary file not shown.
BIN
bin/TH05_v11.bin
BIN
bin/TH05_v11.bin
Binary file not shown.
BIN
bin/THB2_v11.bin
BIN
bin/THB2_v11.bin
Binary file not shown.
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -224,7 +224,7 @@ extern const cfg_t def_cfg;
|
||||||
#define FLG_SHOW_TIME 0x00000002 // включить показ часов на LCD
|
#define FLG_SHOW_TIME 0x00000002 // включить показ часов на LCD
|
||||||
#define FLG_SHOW_SMILEY 0x00000004 // включить показ смайлика
|
#define FLG_SHOW_SMILEY 0x00000004 // включить показ смайлика
|
||||||
#define FLG_SHOW_TRG 0x00000008 // смайлик поаказывает TRG
|
#define FLG_SHOW_TRG 0x00000008 // смайлик поаказывает TRG
|
||||||
#define FLG_ADV_CRYPT 0x00000010 // Зашифрованная BLE реклама (bindkey)
|
//#define FLG_ADV_CRYPT 0x00000010 // Зашифрованная BLE реклама (bindkey)
|
||||||
|
|
||||||
typedef struct _adv_work_t {
|
typedef struct _adv_work_t {
|
||||||
uint32_t measure_interval_ms;
|
uint32_t measure_interval_ms;
|
||||||
|
|
|
||||||
|
|
@ -252,14 +252,16 @@ void chow_measure(void) {
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif // SERVICE_TH_TRG
|
#endif // SERVICE_TH_TRG
|
||||||
|
{
|
||||||
if(measured_data.flg.comfort)
|
if(measured_data.flg.comfort)
|
||||||
show_smiley(LD_SSYMBOL_HAPPY);
|
show_smiley(LD_SSYMBOL_HAPPY);
|
||||||
else
|
else
|
||||||
show_smiley(LD_SSYMBOL_SAD);
|
show_smiley(LD_SSYMBOL_SAD);
|
||||||
|
}
|
||||||
#if (DEV_SERVICES & SERVICE_TH_TRG)
|
#if (DEV_SERVICES & SERVICE_TH_TRG)
|
||||||
} else if(cfg.flg & FLG_SHOW_TRG) {
|
} else if(cfg.flg & FLG_SHOW_TRG) {
|
||||||
if(measured_data.flg.trg_on)
|
if(measured_data.flg.trg_on)
|
||||||
show_smiley(LD_SSYMBOL_CC);
|
show_smiley(LD_SSYMBOL_ALL);
|
||||||
else
|
else
|
||||||
show_smiley(LD_SSYMBOL_OFF);
|
show_smiley(LD_SSYMBOL_OFF);
|
||||||
} else
|
} else
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,6 @@ typedef struct _measured_data_t {
|
||||||
int16_t humi; // x 0.01 %
|
int16_t humi; // x 0.01 %
|
||||||
uint16_t battery_mv; // mV
|
uint16_t battery_mv; // mV
|
||||||
uint8_t battery; // 0..100 %
|
uint8_t battery; // 0..100 %
|
||||||
// uint8_t out_flg; // _measured_flg_t
|
|
||||||
measured_flg_t flg;
|
measured_flg_t flg;
|
||||||
} measured_data_t;
|
} measured_data_t;
|
||||||
#define send_len_measured_data 10
|
#define send_len_measured_data 10
|
||||||
|
|
|
||||||
|
|
@ -89,15 +89,15 @@ void set_trigger_out(void) {
|
||||||
}
|
}
|
||||||
} else measured_data.flg.humi_trg_on = false;
|
} else measured_data.flg.humi_trg_on = false;
|
||||||
|
|
||||||
measured_data.flg.trg_on = measured_data.flg.humi_trg_on || measured_data.flg.humi_trg_on;
|
measured_data.flg.trg_on = measured_data.flg.temp_trg_on || measured_data.flg.humi_trg_on;
|
||||||
|
measured_data.flg.trg_output = (trg.cfg & TRG_CFG_OUT_INV)? !measured_data.flg.trg_on : measured_data.flg.trg_on;
|
||||||
#ifdef GPIO_TRG
|
#ifdef GPIO_TRG
|
||||||
hal_gpio_fast_write(GPIO_TRG, (trg.cfg & TRG_CFG_OUT_INV)? !measured_data.flg.trg_on : measured_data.flg.trg_on);
|
hal_gpio_fast_write(GPIO_TRG, measured_data.flg.trg_output);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef GPIO_INP
|
#ifdef GPIO_INP
|
||||||
measured_data.flg.pin_input = hal_gpio_read(GPIO_INP);
|
measured_data.flg.pin_input = hal_gpio_read(GPIO_INP);
|
||||||
#endif
|
#endif
|
||||||
// measured_data.out_flg = *((uint8_t *)&measured_data.flg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -979,7 +979,7 @@ var ota_errors = [
|
||||||
|
|
||||||
function get_msg_ota_err(err) {
|
function get_msg_ota_err(err) {
|
||||||
if(err == 0)
|
if(err == 0)
|
||||||
return "OK";
|
return "ok";
|
||||||
if(err == 255)
|
if(err == 255)
|
||||||
return "OTA end";
|
return "OTA end";
|
||||||
if(err <= 11)
|
if(err <= 11)
|
||||||
|
|
@ -1805,7 +1805,6 @@ function ShowGrf(temp, humi) {
|
||||||
digitsAfterDecimal: 3,
|
digitsAfterDecimal: 3,
|
||||||
});
|
});
|
||||||
gu.updateOptions({'file': datau});
|
gu.updateOptions({'file': datau});
|
||||||
$(window).trigger('resize');
|
|
||||||
} else if (gu_flg == 3)
|
} else if (gu_flg == 3)
|
||||||
gu.updateOptions({'file': datau});
|
gu.updateOptions({'file': datau});
|
||||||
}
|
}
|
||||||
|
|
@ -1885,13 +1884,13 @@ function ShowGrf(temp, humi) {
|
||||||
</tr>
|
</tr>
|
||||||
<tr align="center">
|
<tr align="center">
|
||||||
<td><!--- надо отдельно, на ходу, при изменении, выводить расчетное значение inputAdvInt*62.5 в ms --->
|
<td><!--- надо отдельно, на ходу, при изменении, выводить расчетное значение inputAdvInt*62.5 в ms --->
|
||||||
<input size="4" type="text" id="inputAdvInt" maxlength="4" title="Интервал BLE рекламы в мс, кратность 62.5 мс"></td>
|
<input size="4" type="text" id="inputAdvInt" maxlength="8" title="Интервал BLE рекламы в мс, кратность 62.5 мс"></td>
|
||||||
<td><!--- надо отдельно выводить расчетное значение inputAdvInt*62.5*inputMeasInt в ms --->
|
<td><!--- надо отдельно выводить расчетное значение inputAdvInt*62.5*inputMeasInt в ms --->
|
||||||
<input size="4" type="text" id="inputMeasInt" maxlength="4" title="Опрос датчика в интервалах BLE рекламы, минимум = 2 интервала рекламы"></td>
|
<input size="4" type="text" id="inputMeasInt" maxlength="8" title="Опрос датчика в интервалах BLE рекламы, минимум = 2 интервала рекламы"></td>
|
||||||
<td><!--- надо отдельно выводить расчетное значение inputAdvInt*62.5*inputMeasInt*inputAverInt в мс, сек --->
|
<td><!--- надо отдельно выводить расчетное значение inputAdvInt*62.5*inputMeasInt*inputAverInt в мс, сек --->
|
||||||
<input size="4" type="text" id="inputAverInt" maxlength="4" title="Запись истории: при 0 - отключена, 1...255 * шаг опроса датчика = интервал записи истории"></td>
|
<input size="4" type="text" id="inputAverInt" maxlength="8" title="Запись истории: при 0 - отключена, 1...255 * шаг опроса датчика = интервал записи истории"></td>
|
||||||
<td>
|
<td>
|
||||||
<input size="4" type="text" id="inputBatInt" maxlength="4" title="В секундах, минимум 2 секунды, но обрабатывается кратно интервалу BLE рекламы"></td>
|
<input size="4" type="text" id="inputBatInt" maxlength="8" title="В секундах, минимум 2 секунды, но обрабатывается кратно интервалу BLE рекламы"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<button type="button"id="btnGetDev" onclick="getDevCfg()" >Прочитать</button>
|
<button type="button"id="btnGetDev" onclick="getDevCfg()" >Прочитать</button>
|
||||||
|
|
@ -1939,19 +1938,19 @@ function ShowGrf(temp, humi) {
|
||||||
<table id="tbComfort" disabled="true">
|
<table id="tbComfort" disabled="true">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Комфорт: </td>
|
<td>Комфорт: </td>
|
||||||
<td>Температура от <input size="4" type="text" id="inputTempMin" maxlength="4" title="Минимальная температура">
|
<td>Температура от <input size="4" type="text" id="inputTempMin" maxlength="8" title="Минимальная температура">
|
||||||
до <input size="4" type="text" id="inputTempMax" maxlength="4" title="Максимальная температура"> °C,</td>
|
до <input size="4" type="text" id="inputTempMax" maxlength="8" title="Максимальная температура"> °C,</td>
|
||||||
<td>Влажность от <input size="4" type="text" id="inputHumiMin" maxlength="4" title="Минимальная влажность">
|
<td>Влажность от <input size="4" type="text" id="inputHumiMin" maxlength="8" title="Минимальная влажность">
|
||||||
до <input size="4" type="text" id="inputHumiMax" maxlength="4" title="Максимальная влажность"> %RH</td>
|
до <input size="4" type="text" id="inputHumiMax" maxlength="8" title="Максимальная влажность"> %RH</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table id="tbTrigger" disabled="true">
|
<table id="tbTrigger" disabled="true">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Триггер: </td>
|
<td>Триггер: </td>
|
||||||
<td>Температура: <input size="4" type="text" id="inputTempThr" maxlength="4" title="Температура переключения"> °C</td>
|
<td>Температура: <input size="4" type="text" id="inputTempThr" maxlength="8" title="Температура переключения"> °C, </td>
|
||||||
<td>Влажность: <input size="4" type="text" id="inputHumiThr" maxlength="4" title="Влажность переключения"> %RH, </td>
|
<td>Влажность: <input size="4" type="text" id="inputHumiThr" maxlength="8" title="Влажность переключения"> %RH, </td>
|
||||||
<td>Гистерезис: <input size="4" type="text" id="inputTempHsr" maxlength="4" title="Гистерезис температуры"> °C</td>
|
<td>Гистерезис: <input size="4" type="text" id="inputTempHsr" maxlength="8" title="Гистерезис температуры"> °C</td>
|
||||||
<td><input size="4" type="text" id="inputHumiHsr" maxlength="4" title="Гистерезис влажности"> %RH</td>
|
<td><input size="4" type="text" id="inputHumiHsr" maxlength="8" title="Гистерезис влажности"> %RH, </td>
|
||||||
<td>Инверсия вывода <input type="checkbox" id="chbInvOut"></td>
|
<td>Инверсия вывода <input type="checkbox" id="chbInvOut"></td>
|
||||||
<td>
|
<td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue