苏电院修改响铃时长

This commit is contained in:
thesai 2021-01-09 19:47:54 +08:00
parent f49d344553
commit 1d3409fb45

View File

@ -126,12 +126,12 @@ public class SdyPsdServiceImpl implements RealDeviceService {
if (config.isRunning())
return;
LocalDateTime now = LocalDateTime.now();
if (now.isAfter(buzzerRingingTime.plusSeconds(3))) { //蜂鸣器响了超过3秒
if (now.isAfter(buzzerRingingTime.plusSeconds(1))) { //蜂鸣器响了超过3秒
if ((km || gm) && !config.isTriggerOpenOrClose()) {
this.plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, config.getConfigVO().getW_kgm(), w_kgm, true, channel);
config.setTriggerOpenOrClose(true);
}
if (now.isAfter(buzzerRingingTime.plusSeconds(6))) { //如果响铃超过6秒门还没有进入运动状态取消触发状态
if (now.isAfter(buzzerRingingTime.plusSeconds(3))) { //如果响铃超过该时长门还没有进入运动状态取消触发状态
// this.plcGatewayService.writeSingleCoil(baseAddr, config.getConfigVO().getW_jb(), false, channel);
// config.cancelControl();
this.plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, config.getConfigVO().getW_kgm(), w_kgm, false, channel);