This commit is contained in:
ngfrolov 2024-03-28 15:15:52 +05:00
parent 12f6fda7b2
commit dd934bb1c5
Signed by untrusted user who does not match committer: ng.frolov
GPG Key ID: E99907A0357B29A7

View File

@ -142,6 +142,7 @@ public class DetectedOperationService : IDetectedOperationService
const int minOperationLength = 5; const int minOperationLength = 5;
const int maxDetectorsInterpolationFrameLength = 30; const int maxDetectorsInterpolationFrameLength = 30;
const int gap = maxDetectorsInterpolationFrameLength + minOperationLength; const int gap = maxDetectorsInterpolationFrameLength + minOperationLength;
var timeIncrement = TimeSpan.FromSeconds(1);
while (true) while (true)
{ {
@ -156,7 +157,7 @@ public class DetectedOperationService : IDetectedOperationService
.Where(t => t.BlockPosition >= 0) .Where(t => t.BlockPosition >= 0)
.Select(t => new DetectableTelemetry .Select(t => new DetectableTelemetry
{ {
DateTime = t.DateTime, DateTime = t.DateTime,//TODO: <-- вот тут ошибка при присвоении DateTime с kind unspecified в DateTimeOffset времени назначается локальный часовой пояс.
IdUser = t.IdUser, IdUser = t.IdUser,
Mode = t.Mode, Mode = t.Mode,
WellDepth = t.WellDepth, WellDepth = t.WellDepth,
@ -191,7 +192,9 @@ public class DetectedOperationService : IDetectedOperationService
positionBegin += 1; positionBegin += 1;
} }
beginDate = isDetected ? lastDetectedOperation!.DateEnd : detectableTelemetries[positionEnd].DateTime; beginDate = isDetected
? lastDetectedOperation!.DateEnd
: detectableTelemetries[positionEnd].DateTime;
} }
return detectedOperations; return detectedOperations;