Browse Source

update device name

master
zwsd 3 years ago
parent
commit
6637d898cb
  1. 4
      main/ble_spp_server_demo.c
  2. 1
      main/main.c

4
main/ble_spp_server_demo.c

@ -34,7 +34,7 @@ static uint16_t table_handle_m;
#define SPP_PROFILE_NUM 1
#define SPP_PROFILE_APP_IDX 0
#define ESP_SPP_APP_ID 0x56
#define SAMPLE_DEVICE_NAME "ESP_SPP_SERVER" // The Device Name Characteristics in GAP
#define SAMPLE_DEVICE_NAME s_module->bleName // The Device Name Characteristics in GAP
#define SPP_SVC_INST_ID 0
/// SPP Service
@ -55,7 +55,7 @@ static const uint8_t spp_adv_data[23] = {
/* Complete List of 16-bit Service Class UUIDs */
0x03, 0x03, 0xF0, 0xAB,
/* Complete Local Name in advertising */
0x0F, 0x09, 'E', 'S', 'P', '_', 'S', 'P', 'P', '_', 'S', 'E', 'R', 'V', 'E', 'R'};
0x0B, 0x09, 'y', 'i', 'm', 'e', 'i', '_', 'b', 'l', 'e'};
static uint16_t spp_mtu_size = 23;
static uint16_t spp_conn_id = 0xffff;

1
main/main.c

@ -127,6 +127,7 @@ void process_setPosition(cJSON *rxjson) {
if (cJSON_IsNumber(cJSON_GetObjectItem(rxjson, "direction"))) {
direction = cJSON_GetNumberValue(cJSON_GetObjectItem(rxjson, "direction"));
}
ESP_LOGI(MAIN_LOG_TAG, "index = %d,speedLevel = %d,position = %lf,direction = %d", index, speedLevel, position, direction);
setPosition_code = motor_run_to_postion(1, position, 0);
order_receipt_setPosition(index, setPosition_code);
}

Loading…
Cancel
Save