Merge branch 'bugfix/apps_esp_ble_mesh_v4.0' into 'release/v4.0'

ESP BLE Mesh: Minor fix - Print the address and the on/off value appropriately (v4.0)

See merge request espressif/esp-idf!6374
This commit is contained in:
Jiang Jiang Jian
2019-10-21 10:37:09 +08:00
2 changed files with 8 additions and 8 deletions

View File

@@ -150,12 +150,12 @@ static void gen_onoff_set_unack_handler(esp_ble_mesh_model_t *model,
uint8_t prev_onoff;
esp_err_t err;
ESP_LOGI(TAG, "%s, addr 0x%02x onoff 0x%02x", __func__, model->element->element_addr, led->current);
prev_onoff = led->previous;
led->current = data[0];
remote_onoff = led->current;
ESP_LOGI(TAG, "%s, addr 0x%04x onoff 0x%02x", __func__, model->element->element_addr, led->current);
board_led_operation(led->pin, led->current);
/* If Generic OnOff state is changed, and the publish address of Generic OnOff Server
@@ -181,12 +181,12 @@ static void gen_onoff_set_handler(esp_ble_mesh_model_t *model,
uint8_t prev_onoff, send_data;
esp_err_t err;
ESP_LOGI(TAG, "%s, addr 0x%02x onoff 0x%02x", __func__, model->element->element_addr, led->current);
prev_onoff = led->previous;
led->current = data[0];
remote_onoff = led->current;
ESP_LOGI(TAG, "%s, addr 0x%04x onoff 0x%02x", __func__, model->element->element_addr, led->current);
board_led_operation(led->pin, led->current);
send_data = led->current;

View File

@@ -146,11 +146,11 @@ static void gen_onoff_set_unack_handler(esp_ble_mesh_model_t *model,
uint8_t prev_onoff;
esp_err_t err;
ESP_LOGI(TAG, "%s, addr 0x%02x onoff 0x%02x", __func__, model->element->element_addr, led->current);
prev_onoff = led->previous;
led->current = data[0];
ESP_LOGI(TAG, "%s, addr 0x%04x onoff 0x%02x", __func__, model->element->element_addr, led->current);
board_led_operation(led->pin, led->current);
/* If Generic OnOff state is changed, and the publish address of Generic OnOff Server
@@ -175,11 +175,11 @@ static void gen_onoff_set_handler(esp_ble_mesh_model_t *model,
uint8_t prev_onoff, send_data;
esp_err_t err;
ESP_LOGI(TAG, "%s, addr 0x%02x onoff 0x%02x", __func__, model->element->element_addr, led->current);
prev_onoff = led->previous;
led->current = data[0];
ESP_LOGI(TAG, "%s, addr 0x%04x onoff 0x%02x", __func__, model->element->element_addr, led->current);
board_led_operation(led->pin, led->current);
send_data = led->current;