Commit a363a16b authored by duanruiming's avatar duanruiming

[update] 优化转向设置

parent 1f444089
...@@ -357,14 +357,15 @@ public class ControlCommandStrategyServiceImpl implements ControlCommandStrategy ...@@ -357,14 +357,15 @@ public class ControlCommandStrategyServiceImpl implements ControlCommandStrategy
crossLightsPO.setType(1); crossLightsPO.setType(1);
if (Objects.equals(lightsPO.getType(), 1)) { if (Objects.equals(lightsPO.getType(), 1)) {
crossLightsPO.setType(2); // 1箭头 2圆饼 crossLightsPO.setType(2); // 1箭头 2圆饼
crossLightsPO.setTurn(2);
} else if (Objects.equals(lightsPO.getType(), 2)) { } else if (Objects.equals(lightsPO.getType(), 2)) {
crossLightsPO.setTurn(1); // 1箭头 2圆饼 crossLightsPO.setTurn(1);
} else if (Objects.equals(lightsPO.getType(), 3)) { } else if (Objects.equals(lightsPO.getType(), 3)) {
crossLightsPO.setTurn(2); // 1箭头 2圆饼 crossLightsPO.setTurn(2);
} else if (Objects.equals(lightsPO.getType(), 4)) { } else if (Objects.equals(lightsPO.getType(), 4)) {
crossLightsPO.setTurn(3); // 1箭头 2圆饼 crossLightsPO.setTurn(3);
} else if (Objects.equals(lightsPO.getType(), 20)) { } else if (Objects.equals(lightsPO.getType(), 20)) {
crossLightsPO.setType(3); // 1箭头 2圆饼 crossLightsPO.setType(3);
crossLightsPO.setTurn(20); crossLightsPO.setTurn(20);
} }
crossLightsMapper.insertOne(crossLightsPO); crossLightsMapper.insertOne(crossLightsPO);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment