v2.0 beta6: max adv.interval 15 sec, default 5 sec.
This commit is contained in:
parent
145a725707
commit
090a3feabd
29 changed files with 16624 additions and 16631 deletions
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
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
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Binary file not shown.
BIN
bin/KEY2_v20.bin
BIN
bin/KEY2_v20.bin
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bin/TH05_v20.bin
BIN
bin/TH05_v20.bin
Binary file not shown.
BIN
bin/THB1_v20.bin
BIN
bin/THB1_v20.bin
Binary file not shown.
BIN
bin/THB2_v20.bin
BIN
bin/THB2_v20.bin
Binary file not shown.
BIN
bin/THB3_v20.bin
BIN
bin/THB3_v20.bin
Binary file not shown.
|
|
@ -160,8 +160,8 @@ void test_config(void) {
|
||||||
#endif
|
#endif
|
||||||
if(cfg.advertising_interval == 0)
|
if(cfg.advertising_interval == 0)
|
||||||
cfg.advertising_interval = 1;
|
cfg.advertising_interval = 1;
|
||||||
else if(cfg.advertising_interval > 160)
|
// else if(cfg.advertising_interval > 160)
|
||||||
cfg.advertising_interval = 160;
|
// cfg.advertising_interval = 160;
|
||||||
if(cfg.measure_interval < 2)
|
if(cfg.measure_interval < 2)
|
||||||
cfg.measure_interval = 2;
|
cfg.measure_interval = 2;
|
||||||
adv_wrk.measure_interval_ms = (cfg.advertising_interval * cfg.measure_interval * 625) / 10;
|
adv_wrk.measure_interval_ms = (cfg.advertising_interval * cfg.measure_interval * 625) / 10;
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@
|
||||||
#define DEVICE_KEY2 30
|
#define DEVICE_KEY2 30
|
||||||
|
|
||||||
#ifndef DEVICE
|
#ifndef DEVICE
|
||||||
#define DEVICE DEVICE_KEY2
|
#define DEVICE DEVICE_THB2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// supported services by the device (bits)
|
// supported services by the device (bits)
|
||||||
|
|
|
||||||
|
|
@ -77,8 +77,8 @@ int read_sensor_cht821x(pdev_i2c_t pi2c_dev) {
|
||||||
uint8_t reg_data[4];
|
uint8_t reg_data[4];
|
||||||
uint32_t _r32;
|
uint32_t _r32;
|
||||||
int16_t _r16;
|
int16_t _r16;
|
||||||
if (read_i2c_bytes(pi2c_dev, thsensor_cfg.i2c_addr, CHT83xx_REG_TMP, reg_data, 2) == 0
|
if (read_i2c_bytes(pi2c_dev, thsensor_cfg.i2c_addr, CHT8215_REG_TMP, reg_data, 2) == 0
|
||||||
&& read_i2c_bytes(pi2c_dev, thsensor_cfg.i2c_addr, CHT83xx_REG_HMD, ®_data[2], 2) == 0) {
|
&& read_i2c_bytes(pi2c_dev, thsensor_cfg.i2c_addr, CHT8215_REG_HMD, ®_data[2], 2) == 0) {
|
||||||
_r16 = (reg_data[0] << 8) | reg_data[1];
|
_r16 = (reg_data[0] << 8) | reg_data[1];
|
||||||
measured_data.temp = ((int32_t)(_r16 * thsensor_cfg.coef.temp_k) >> 16) + thsensor_cfg.coef.temp_z;; // x 0.01 C
|
measured_data.temp = ((int32_t)(_r16 * thsensor_cfg.coef.temp_k) >> 16) + thsensor_cfg.coef.temp_z;; // x 0.01 C
|
||||||
_r32 = ((reg_data[2] << 8) | reg_data[3]); // & 0x7fff;
|
_r32 = ((reg_data[2] << 8) | reg_data[3]); // & 0x7fff;
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
#define CHT8215_CFG_CONSEC_FQ 0x0006
|
#define CHT8215_CFG_CONSEC_FQ 0x0006
|
||||||
#define CHT8215_CFG_ATM 0x0001
|
#define CHT8215_CFG_ATM 0x0001
|
||||||
|
|
||||||
#define CHT8315_MID 0x5959
|
#define CHT8215_MID 0x5959
|
||||||
#define CHT8215_VID 0x1582
|
#define CHT8215_VID 0x1582
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,13 +23,9 @@ extern "C"
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
* CONSTANTS
|
* CONSTANTS
|
||||||
*/
|
*/
|
||||||
#if (DEV_SERVICES & SERVICE_BUTTON)
|
|
||||||
#define DEF_ADV_INERVAL 16000 // = 10 sec, actual time = advInt * 625us
|
|
||||||
#define DEF_ADV_INERVAL_MS ((DEF_ADV_INERVAL*625)/1000) // 10000 ms
|
|
||||||
#else
|
|
||||||
#define DEF_ADV_INERVAL 8000 // = 5 sec, actual time = advInt * 625us
|
#define DEF_ADV_INERVAL 8000 // = 5 sec, actual time = advInt * 625us
|
||||||
#define DEF_ADV_INERVAL_MS ((DEF_ADV_INERVAL*625)/1000) // 5000 ms
|
#define DEF_ADV_INERVAL_MS ((DEF_ADV_INERVAL*625)/1000) // 5000 ms
|
||||||
#endif
|
|
||||||
#define DEF_CON_ADV_INERVAL 2500 // 1.5625 sec
|
#define DEF_CON_ADV_INERVAL 2500 // 1.5625 sec
|
||||||
#define DEF_CON_ADV_INERVAL_MS ((DEF_CON_ADV_INERVAL*625)/1000) // 1562 ms
|
#define DEF_CON_ADV_INERVAL_MS ((DEF_CON_ADV_INERVAL*625)/1000) // 1562 ms
|
||||||
#if (DEV_SERVICES & SERVICE_BUTTON)
|
#if (DEV_SERVICES & SERVICE_BUTTON)
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue