From 7be84fe31653fbedd2869b1dd2595025c8245672 Mon Sep 17 00:00:00 2001 From: Michal Hobot Date: Sat, 25 Nov 2017 10:01:13 +0100 Subject: [PATCH] mesh: onoff-model: Fix msec to sec conversion There is an error in meshctl while displaying transition time. 1000 ms is being presented as 16 sec, 40 ms. The reason is incorrect conversion of milliseconds to seconds. The fix is pretty trivial. --- mesh/onoff-model.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mesh/onoff-model.c b/mesh/onoff-model.c index e82dac4ba..676c14c78 100644 --- a/mesh/onoff-model.c +++ b/mesh/onoff-model.c @@ -77,8 +77,8 @@ static void print_remaining_time(uint8_t remaining_time) switch (step) { case 0: msecs = 100 * count; - secs = msecs / 60; - msecs -= (secs * 60); + secs = msecs / 1000; + msecs -= (secs * 1000); break; case 1: secs = 1 * count; -- 2.47.3