修改:IBP盘循环逻辑增加try-catch
This commit is contained in:
parent
a6c43d601d
commit
8deff874d7
@ -1,6 +1,7 @@
|
||||
package club.joylink.rtss.services;
|
||||
|
||||
import club.joylink.rtss.entity.Ibp;
|
||||
import club.joylink.rtss.exception.BaseException;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.services.publishData.IbpService;
|
||||
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()));
|
||||
break;
|
||||
case AXLE_RESET:
|
||||
ciApiService.axleReset(simulation, buttonCode);
|
||||
ciApiService.axleReset(simulation, button.getSectionCode());
|
||||
element.setOn(true);
|
||||
break;
|
||||
case AXLE_PRE_RESET:
|
||||
@ -214,7 +215,11 @@ public class VirtualRealityIbpService implements IVirtualRealityIbpService {
|
||||
if (!button.isDown())
|
||||
continue;
|
||||
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