diff --git a/LiveConditionsServerPlugin.cs b/LiveConditionsServerPlugin.cs index 6d64563..a4f0793 100644 --- a/LiveConditionsServerPlugin.cs +++ b/LiveConditionsServerPlugin.cs @@ -202,7 +202,7 @@ private async Task UpdateStateAsync() { if (PluginManager != null) { foreach (var info in PluginManager.GetDriverInfos()) { - if (info?.IsConnected == true) { + if (info?.IsConnected == true && !float.IsNaN(info.CurrentSpeed) && info.CurrentSpeed > 0) { var drivenDistanceKm = info.CurrentSpeed * UpdateRainPeriod.TotalHours; _drivenLapsEstimate += drivenDistanceKm / _lapLengthKm; } @@ -529,4 +529,4 @@ private static double GetRoadTemperatureCoefficient(WeatherType type) { } } } -} \ No newline at end of file +}