diff --git a/app/app_config.h b/app/app_config.h index 2d0a479..b9f24d1 100644 --- a/app/app_config.h +++ b/app/app_config.h @@ -119,7 +119,7 @@ extern "C" #define VERSION_DATE_MONTH 8 #define VERSION_DATE_DAY 26 #define VERSION_DATE_HOUR 16 -#define VERSION_DATE_MINUTE 17 +#define VERSION_DATE_MINUTE 35 #define ELITE_DEVICE_NAME_LIST \ { \ diff --git a/app/host_tasks.c b/app/host_tasks.c index 02a7b2c..6a3d44a 100644 --- a/app/host_tasks.c +++ b/app/host_tasks.c @@ -280,6 +280,7 @@ typedef struct } __PACKED data; } manu_spec_data_t; +static uint16_t scan_times = 0; void host_scan_filter_match_cb( void *p_manu_spec_data, uint32_t manu_spec_data_len, @@ -320,6 +321,12 @@ void host_scan_filter_match_cb( host_scan_rsp.dev_name, peer_addr_str, rssi); + scan_times++; + if (scan_times >= 10) + { + extern void le_scan_stop(void); + le_scan_stop(); + } } void host_connected_cb(void) @@ -344,6 +351,7 @@ static void host_cmd_exec_task(void *p_arg) case INS_SCAN: NRF_LOG_INFO("[INS_SCAN]"); on_ins_scan(&p_ins->scan); + scan_times = 0; break; case INS_CONNECT: NRF_LOG_INFO("[INS_CONNECT]");