连接server并发送数据成功
This commit is contained in:
@ -55,7 +55,7 @@ const int config_rcsp_stack_enable = 0;
|
||||
const int config_le_hci_connection_num = 1;//支持同时连接个数
|
||||
const int config_le_sm_support_enable = 0; //是否支持加密配对
|
||||
const int config_le_gatt_client_num = 1; //支持client角色个数
|
||||
const int config_le_gatt_server_num = 1; //支持server角色个数
|
||||
const int config_le_gatt_server_num = 0; //支持server角色个数
|
||||
|
||||
#elif (TCFG_BLE_DEMO_SELECT == DEF_BLE_DEMO_WIRELESS_MIC_SERVER)
|
||||
const int config_le_hci_connection_num = 1;//支持同时连接个数
|
||||
|
||||
1592
apps/earphone/xtell_remote_control/ble_handler/client_handler copy.c
Normal file
1592
apps/earphone/xtell_remote_control/ble_handler/client_handler copy.c
Normal file
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
@ -258,11 +258,11 @@ void contol_key_task(void){
|
||||
static u16 Xout_adc = 0;
|
||||
static u16 Yout_adc = 0;
|
||||
static u8 key1_state = 1;
|
||||
u8 ble_data_buff[13] = {0xBE, 0xBB, 0x0A, 0x01, //0-3
|
||||
u8 ble_data_buff[12] = {0xBE, 0xBB, 0x0A, 0x01, //0-3
|
||||
0x00, 0x00, 0x00, 0x00, //4-7 遥感值:上下、左右
|
||||
0x00, 0x00, //8、9 两个按键
|
||||
0x00, 0x00, //10、11 vbat adc值
|
||||
0x0C}; //12 校验和
|
||||
0x00, //10 电量百分比
|
||||
0x0C}; //11 校验和
|
||||
|
||||
control_key_init(); //遥感按键初始化
|
||||
|
||||
@ -279,8 +279,7 @@ void contol_key_task(void){
|
||||
ble_data_buff[8] = key1_state;
|
||||
ble_data_buff[9] = 0x01;
|
||||
|
||||
ble_data_buff[10] = (u8)(vbat_value & 0xFF);
|
||||
ble_data_buff[11] = (u8)((vbat_value >> 8) & 0xFF);
|
||||
ble_data_buff[10] = get_vbat_percent();
|
||||
|
||||
g_send_data_to_ble_server(ble_data_buff, sizeof(ble_data_buff));
|
||||
os_time_dly(5);
|
||||
|
||||
Reference in New Issue
Block a user