Modified blinker message

This commit is contained in:
CommanderRedYT
2022-05-11 20:29:09 +02:00
parent 8c884c0b4e
commit a58a8d1344
2 changed files with 2 additions and 2 deletions

View File

@ -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));
}

View File

@ -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;