From 491178567f1dda45b643ea38ada8ab8d09b74f7e Mon Sep 17 00:00:00 2001 From: Dominic Reich Date: Thu, 22 Oct 2020 23:06:52 +0200 Subject: [PATCH] fix duration when coming from RF (round values) --- func.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/func.php b/func.php index 0d75fe9..276ddaf 100644 --- a/func.php +++ b/func.php @@ -109,7 +109,7 @@ function getLastHeard($limit = MAXENTRIES) { $time = date( "Y-m-d H:i:s", strtotime( substr( $line, 3, 23 )." UTC" )); $callsign = substr( $line, 69, strpos( $line, "to" ) - 69 ); $dgid = substr( $line, 89, strpos( $line, ",", 89 ) - 89 ); - $duration = trim( substr( $line, 92, strpos( $line, "seconds,", 92 ) - 92 ), " ,"); + $duration = round( trim( substr( $line, 92, strpos( $line, "seconds,", 92 ) - 92 ), " ," )); $rssi_values = explode( "/", substr( $line, 113, strpos( $line, "dBm", 113 ) - 113 )); $rssi = rssiCalc( round( array_sum( $rssi_values ) / count( $rssi_values ))); $loss = "---";