feat: INS_SCAN scan rsp 10 times

This commit is contained in:
Roy_01
2025-08-26 16:35:28 +08:00
parent 33dfa5692d
commit b02fd4c33f
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -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 \
{ \
+8
View File
@@ -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]");