]> granicus.if.org Git - esp-idf/commitdiff
Correct seconds calculation from TLM data field
authorAlois Mbutura <aloismbutura@gmail.com>
Fri, 12 Apr 2019 10:18:44 +0000 (13:18 +0300)
committerMahavir Jain <mahavir@espressif.com>
Wed, 29 May 2019 12:32:18 +0000 (18:02 +0530)
The SEC_CNT field in the eddystone TLM frame represents the number of centiseconds
elapsed since reboot. A divisor of 10 has been placed within the code to derive seconds from SEC_CNT.

Closes https://github.com/espressif/esp-idf/pull/3300

examples/bluetooth/ble_eddystone/main/esp_eddystone_demo.c

index 7f6e67b8622f1d586efead188cecdfa10d68de62..525bcd2ae36cfed5eb24764a7a657055638b7022 100644 (file)
@@ -70,7 +70,7 @@ static void esp_eddystone_show_inform(const esp_eddystone_result_t* res)
             ESP_LOGI(DEMO_TAG, "battery voltage: %d mV", res->inform.tlm.battery_voltage);
             ESP_LOGI(DEMO_TAG, "beacon temperature in degrees Celsius: %6.1f", res->inform.tlm.temperature);
             ESP_LOGI(DEMO_TAG, "adv pdu count since power-up: %d", res->inform.tlm.adv_count);
-            ESP_LOGI(DEMO_TAG, "time since power-up: %d s", res->inform.tlm.time);
+            ESP_LOGI(DEMO_TAG, "time since power-up: %d s", (res->inform.tlm.time)/10);
             break;
         }
         default: