diff --git a/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterDevService.java b/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterDevService.java index 4d68f613..a238a52b 100644 --- a/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterDevService.java +++ b/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterDevService.java @@ -300,7 +300,7 @@ public class SocketFreqConverterDevService { } List statusList = freqConverterService.getDipDurationStatusData(suffix, lastStatusData.getTimestamp(), pqDipData.getStartTime().plusNanos(pqDipData.getDurationMs() * 1000_000L)); - Integer originalTolerant = (lastStatusData.getStatusWord1() != freqConverterConfig.getNoTolerant()) ? 1 : 0; + Integer originalTolerant = (lastStatusData.getStatusWord1() == freqConverterConfig.getTolerant()) ? 1 : 0; LocalDateTime targetEndTime = pqDipData.getStartTime() .plusNanos(pqDipData.getDurationMs() * 1000_000L) .plusNanos(freqConverterConfig.getDt() * 1000_000L); @@ -310,7 +310,7 @@ public class SocketFreqConverterDevService { PqFreqConverterTestRes testRes = new PqFreqConverterTestRes(); testRes.setDipId(pqDipData.getId()); testRes.setTolerant(originalTolerant == 1 ? - (status.getStatusWord1() != freqConverterConfig.getNoTolerant() ? 1 : 0) + (status.getStatusWord1() == freqConverterConfig.getTolerant() ? 1 : 0) : 0); testRes.setStartTime(lastStatusData.getTimestamp()); diff --git a/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterService.java b/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterService.java index ff5c65dd..d8e20f9f 100644 --- a/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterService.java +++ b/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterService.java @@ -299,7 +299,7 @@ public class SocketFreqConverterService { ? freqConverterStatus.getTimestamp() : task.getTargetEndTime()); - testRes.setTolerant(testRes.getTolerant() & (freqConverterStatus.getStatusWord1() != freqConverterConfig.getNoTolerant() ? 1 : 0)); + testRes.setTolerant(testRes.getTolerant() & (freqConverterStatus.getStatusWord1() == freqConverterConfig.getTolerant() ? 1 : 0)); testResList.add(testRes); if (freqConverterStatus.getTimestamp().isAfter(task.getTargetEndTime())) { diff --git a/detection/src/main/java/com/njcn/gather/freqConverter/config/FreqConverterConfig.java b/detection/src/main/java/com/njcn/gather/freqConverter/config/FreqConverterConfig.java index 07f8b964..0ec36525 100644 --- a/detection/src/main/java/com/njcn/gather/freqConverter/config/FreqConverterConfig.java +++ b/detection/src/main/java/com/njcn/gather/freqConverter/config/FreqConverterConfig.java @@ -13,6 +13,6 @@ import org.springframework.stereotype.Component; @ConfigurationProperties(prefix = "freq-converter") public class FreqConverterConfig { private Long schedulePeriod; - private Integer noTolerant; + private Integer tolerant; private Integer dt; } diff --git a/entrance/src/main/resources/application.yml b/entrance/src/main/resources/application.yml index ec33b02b..ae3f0e59 100644 --- a/entrance/src/main/resources/application.yml +++ b/entrance/src/main/resources/application.yml @@ -129,5 +129,5 @@ activate: freq-converter: schedule-period: 200 #定时器运行间隔 - no-tolerant: 4 #不耐受状态 + tolerant: 1 #耐受状态 dt: 200 #延迟时间ms \ No newline at end of file