From b9ff8719ca9de8d199cd96959d8e63db9bdc10f7 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 23 Jan 2015 11:34:57 +0100 Subject: Fix lto indication in startup screen --- src/utils.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/utils.cpp b/src/utils.cpp index cc89c7b..ab3d75a 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -489,7 +489,16 @@ void printEnsemble(dabEnsemble* ensemble) etiLog.log(info, " (0x%x)", ensemble->label.flag()); etiLog.log(info, " mode: %u", ensemble->mode); - etiLog.log(info, " lto: %f", 2.0 * ensemble->lto); + + if (ensemble->lto_auto) { + time_t now = time(NULL); + struct tm* ltime = localtime(&now); + time_t now2 = timegm(ltime); + etiLog.log(info, " lto: %2.1f hours", 0.5 * (now2 - now) / 1800); + } + else { + etiLog.log(info, " lto: %2.1f hours", 0.5 * ensemble->lto); + } etiLog.log(info, " intl. table. %d", ensemble->international_table); } -- cgit v1.2.3