Commit 7cd18400 authored by 薛晓虎's avatar 薛晓虎

Merge branch 'TYW-2025-00746_devlop' into 'TYW-2025-00746_release'

TYW-2025-00746释放合并请求250902

See merge request !18
parents ec853788 2380bfed
......@@ -140,12 +140,12 @@ void BT_User_Process(void )
/* */
uint8_t ODO_Clear_BLEinfo(void )
{
if (Ble_User.Ble_Sts == Ble_Conn)
{
esp_hf_client_disconnect(peer_addr);
}
// if (Ble_User.Ble_Sts == Ble_Conn)
// {
// esp_hf_client_disconnect(peer_addr);
// }
uint8_t ret = 0;
uint8_t bond_dev_num = esp_bt_gap_get_bond_device_num();
int bond_dev_num = esp_bt_gap_get_bond_device_num();
if(bond_dev_num)
{
......
......@@ -456,10 +456,16 @@ void bt_app_hf_client_cb(esp_hf_client_cb_event_t event, esp_hf_client_cb_param_
// call_timer = 0;
// }
// break;
if((strstr(param->clcc.number,"10000000") == NULL) && (strstr(param->clcc.number,"00000000") == NULL))
if((param->clcc.idx!=0)&&(param->clcc.number))
{
// printf("%s\n",param->clcc.number);
BT_User.Get_Call_Num = 1;
if((strstr(param->clcc.number,"10000000") == NULL) && (strstr(param->clcc.number,"00000000") == NULL))
{
// printf("%s\n",param->clcc.number);
// if (param->clcc.number[0] != '+')
{
BT_User.Get_Call_Num = 1;
}
}
}
}
......
......@@ -256,7 +256,7 @@ static esp_ble_adv_params_t adv_params = {
.adv_int_min = 0x20,
.adv_int_max = 0x40,
.adv_type = ADV_TYPE_IND,
.own_addr_type = BLE_ADDR_TYPE_PUBLIC,
.own_addr_type = BLE_ADDR_TYPE_RANDOM,
.channel_map = ADV_CHNL_ALL,
.adv_filter_policy = ADV_FILTER_ALLOW_SCAN_ANY_CON_ANY,
};
......@@ -666,7 +666,7 @@ static void gatts_profile_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_
{
switch (event) {
case ESP_GATTS_REG_EVT:{
// esp_ble_gap_set_rand_addr(rand_addr);
esp_ble_gap_set_rand_addr(rand_addr);
esp_err_t set_dev_name_ret = esp_ble_gap_set_device_name((const char *)BT_Device_Name);
if (set_dev_name_ret){
ESP_LOGE(GATTS_TABLE_TAG, "set device name failed, error code = %x", set_dev_name_ret);
......@@ -908,6 +908,14 @@ void Get_Mac_Init(void )
char temp[10] = {0};
char temp1[20] = {0};
esp_read_mac(ble_mac, ESP_MAC_BT);
for(i = 1; i<6; i++)
{
if (ble_mac[i])
{
rand_addr[i] = ble_mac[i] ;
}
}
// printf("%d\n",temp);
for(i = 6; i > 0; i--)
{
......
......@@ -2,8 +2,8 @@
#define _MAIN_USER_H_
#define BL_INTERNAL_SW_YEAR 0x25
#define BL_INTERNAL_SW_MONTH 0x02
#define BL_INTERNAL_SW_DAY 0x04
#define BL_INTERNAL_SW_MONTH 0x09
#define BL_INTERNAL_SW_DAY 0x02
#endif
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment