kopia lustrzana https://github.com/espressif/esp-idf
ESP BLE Mesh: Minor fix - Print the address and the on/off value appropriately
The new value should be printed in the set function and not the previous one.pull/4212/head
rodzic
bf87d0949b
commit
04325d2876
|
@ -150,12 +150,12 @@ static void gen_onoff_set_unack_handler(esp_ble_mesh_model_t *model,
|
||||||
uint8_t prev_onoff;
|
uint8_t prev_onoff;
|
||||||
esp_err_t err;
|
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;
|
prev_onoff = led->previous;
|
||||||
led->current = data[0];
|
led->current = data[0];
|
||||||
remote_onoff = led->current;
|
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);
|
board_led_operation(led->pin, led->current);
|
||||||
|
|
||||||
/* If Generic OnOff state is changed, and the publish address of Generic OnOff Server
|
/* 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;
|
uint8_t prev_onoff, send_data;
|
||||||
esp_err_t err;
|
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;
|
prev_onoff = led->previous;
|
||||||
led->current = data[0];
|
led->current = data[0];
|
||||||
remote_onoff = led->current;
|
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);
|
board_led_operation(led->pin, led->current);
|
||||||
|
|
||||||
send_data = led->current;
|
send_data = led->current;
|
||||||
|
|
|
@ -146,11 +146,11 @@ static void gen_onoff_set_unack_handler(esp_ble_mesh_model_t *model,
|
||||||
uint8_t prev_onoff;
|
uint8_t prev_onoff;
|
||||||
esp_err_t err;
|
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;
|
prev_onoff = led->previous;
|
||||||
led->current = data[0];
|
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);
|
board_led_operation(led->pin, led->current);
|
||||||
|
|
||||||
/* If Generic OnOff state is changed, and the publish address of Generic OnOff Server
|
/* 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;
|
uint8_t prev_onoff, send_data;
|
||||||
esp_err_t err;
|
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;
|
prev_onoff = led->previous;
|
||||||
led->current = data[0];
|
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);
|
board_led_operation(led->pin, led->current);
|
||||||
|
|
||||||
send_data = led->current;
|
send_data = led->current;
|
||||||
|
|
Ładowanie…
Reference in New Issue