namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors { #nullable enable class DetectorSlipsTime : DetectorAbstract { public DetectorSlipsTime() : base(10_001, "Удержание в клиньях") { } public double HookWeightSP { get; set; } = 20; public double PressureSP { get; set; } = 15; public double PosisionSP { get; set; } = 8; protected override bool DetectStart(DetectableTelemetry[] telemetry, int position) { var item = telemetry[position]; var result = item.HookWeight < HookWeightSP && item.Pressure < PressureSP && item.BlockPosition < PosisionSP; return result; } protected override bool DetectEnd(DetectableTelemetry[] telemetry, int position) { var item = telemetry[position]; var result = item.Pressure > PressureSP && item.BlockPosition > PosisionSP; return result; } } #nullable disable }