Modified blinker message
This commit is contained in:
@ -18,7 +18,7 @@ namespace {
|
||||
|
||||
void sendState(const std::string& state)
|
||||
{
|
||||
if (const auto error = espnow::send_espnow_message(fmt::format("{}:0:{}", state, configs.anhaenger_id.value)); error != ESP_OK)
|
||||
if (const auto error = espnow::send_espnow_message(fmt::format("{}:{}:{}", state, espchrono::utc_clock::now().time_since_epoch().count(), configs.anhaenger_id.value)); error != ESP_OK)
|
||||
{
|
||||
ESP_LOGE(TAG, "Error sending blinker message: %s", esp_err_to_name(error));
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ esp_err_t send_espnow_message(std::string_view message)
|
||||
else
|
||||
{
|
||||
const auto timeAfter = espchrono::millis_clock::now();
|
||||
ESP_LOGD(TAG, "Successfully executed esp_now_send(): Took %lldms", std::chrono::floor<std::chrono::milliseconds>(timeAfter-timeBefore).count());
|
||||
ESP_LOGI(TAG, "Successfully executed esp_now_send(): Took %lldms", std::chrono::floor<std::chrono::milliseconds>(timeAfter-timeBefore).count());
|
||||
}
|
||||
}
|
||||
return ESP_OK;
|
||||
|
Reference in New Issue
Block a user