[PATCH BlueZ] mesh/onoff-model: Fix msec to sec conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

--- ../../bluez/mesh/onoff-model.c	2017-11-21 18:04:57.000000000 +0100
+++ onoff-model.c	2017-11-21 17:25:14.000000000 +0100
@@ -77,8 +77,8 @@ static void print_remaining_time(uint8_t
 	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;

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux