diff --git a/lib/main_screen.dart b/lib/main_screen.dart index c014752..7564b4d 100644 --- a/lib/main_screen.dart +++ b/lib/main_screen.dart @@ -59,7 +59,7 @@ class _MainScreenState extends State with TickerProviderStateMixin { _lastLon = lon.toStringAsFixed(5); } final speed = status?['lastSpeed']; - if (speed != null) { + if (speed != null && speed > 0) { _lastSpeed = (speed * 3.6).toStringAsFixed(1); } final timestamp = status?['lastTimestamp']; @@ -76,7 +76,7 @@ class _MainScreenState extends State with TickerProviderStateMixin { setState(() { _lastLat = location['latitude']?.toStringAsFixed(5) ?? '--'; _lastLon = location['longitude']?.toStringAsFixed(5) ?? '--'; - _lastSpeed = location['speed'] != null + _lastSpeed = location['speed'] != null && location['speed'] > 0 ? (location['speed'] * 3.6).toStringAsFixed(1) : '--'; _lastTime = location['timestamp'] != null && location['timestamp'] > 0