diff --git a/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationService.cs b/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationService.cs index aacfe853..387999b2 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationService.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationService.cs @@ -237,12 +237,9 @@ public class DetectedOperationService : IDetectedOperationService break; } - var skip = 1; - - while (IsChangingTelemetryInterval(detectableTelemetries[positionBegin], detectableTelemetries[positionBegin + skip])) - skip++; - - positionBegin += skip; + var point0 = detectableTelemetries[positionBegin]; + while (positionBegin < positionEnd && IsChangingTelemetryInterval(point0, detectableTelemetries[++positionBegin])) + ; } return (detectableTelemetries[positionBegin].DateTime, detectedOperations);