From b2c900b799bbb64de9ea2569772fc745e291dac5 Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Sun, 19 Dec 2021 17:23:54 +0300 Subject: [PATCH] ntp: fix terminal newlines --- code/espurna/ntp.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/code/espurna/ntp.cpp b/code/espurna/ntp.cpp index 096bd9f3..0f6bf12f 100644 --- a/code/espurna/ntp.cpp +++ b/code/espurna/ntp.cpp @@ -85,7 +85,7 @@ constexpr bool dhcp() { } // namespace build namespace settings { -namespace internal{ +namespace internal { template T randomizeDuration(T base, T offset) { @@ -468,8 +468,13 @@ namespace terminal { void report(Print& out) { const auto info = makeInfo(); - out.printf_P(PSTR("server: %s\nlast synced: %sutc time: %s\n"), + out.printf_P( + PSTR("server: %s\n" + "update every: %u (s)\n" + "last synced: %s\n" + "utc time: %s\n"), internal::server.c_str(), + internal::update_interval.count(), info.sync.c_str(), info.utc.c_str()); @@ -645,7 +650,7 @@ void schedule(espurna::duration::Seconds offset) { } void init() { - static bool initialized { false }; + static bool initialized { false }; if (!initialized) { schedule_function(callback); initialized = true; @@ -815,7 +820,7 @@ void setup() { #endif } -} // namespace +} // namespace } // namespace ntp } // namespace espurna