修改:IBP盘循环逻辑增加try-catch
This commit is contained in:
parent
a6c43d601d
commit
8deff874d7
@ -1,6 +1,7 @@
|
|||||||
package club.joylink.rtss.services;
|
package club.joylink.rtss.services;
|
||||||
|
|
||||||
import club.joylink.rtss.entity.Ibp;
|
import club.joylink.rtss.entity.Ibp;
|
||||||
|
import club.joylink.rtss.exception.BaseException;
|
||||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||||
import club.joylink.rtss.services.publishData.IbpService;
|
import club.joylink.rtss.services.publishData.IbpService;
|
||||||
import club.joylink.rtss.simulation.cbtc.ATS.operation.handler.StandOperateHandler;
|
import club.joylink.rtss.simulation.cbtc.ATS.operation.handler.StandOperateHandler;
|
||||||
@ -133,7 +134,7 @@ public class VirtualRealityIbpService implements IVirtualRealityIbpService {
|
|||||||
ibp.queryByType(VirtualRealityIbp.Mean.SXYS).forEach(ele -> ele.setOn(!ele.isOn()));
|
ibp.queryByType(VirtualRealityIbp.Mean.SXYS).forEach(ele -> ele.setOn(!ele.isOn()));
|
||||||
break;
|
break;
|
||||||
case AXLE_RESET:
|
case AXLE_RESET:
|
||||||
ciApiService.axleReset(simulation, buttonCode);
|
ciApiService.axleReset(simulation, button.getSectionCode());
|
||||||
element.setOn(true);
|
element.setOn(true);
|
||||||
break;
|
break;
|
||||||
case AXLE_PRE_RESET:
|
case AXLE_PRE_RESET:
|
||||||
@ -214,7 +215,11 @@ public class VirtualRealityIbpService implements IVirtualRealityIbpService {
|
|||||||
if (!button.isDown())
|
if (!button.isDown())
|
||||||
continue;
|
continue;
|
||||||
if (!now.isBefore(button.getPressTime().plusSeconds(3))) { //按下按钮三秒时/后
|
if (!now.isBefore(button.getPressTime().plusSeconds(3))) { //按下按钮三秒时/后
|
||||||
ciApiService.axlePreReset(simulation, button.getSectionCode());
|
try {
|
||||||
|
ciApiService.axlePreReset(simulation, button.getSectionCode());
|
||||||
|
} catch (BaseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user