diff --git a/src/main/java/com/iflytop/handacid/app/service/ChannelCtrlService.java b/src/main/java/com/iflytop/handacid/app/service/ChannelCtrlService.java index e2478ec..c2683ba 100644 --- a/src/main/java/com/iflytop/handacid/app/service/ChannelCtrlService.java +++ b/src/main/java/com/iflytop/handacid/app/service/ChannelCtrlService.java @@ -29,7 +29,6 @@ import java.util.concurrent.CompletableFuture; @RequiredArgsConstructor public class ChannelCtrlService { private final FormulationService formulationService; - private final ChannelCtrlService channelCtrlService; private final DeviceCommandService deviceCommandService; private final DeviceState deviceState; @@ -48,7 +47,7 @@ public class ChannelCtrlService { List commandFutureList = new ArrayList<>(); for (ChannelState channelState : channelStateList) { Formulation formulation = formulationService.getOne(new LambdaQueryWrapper().eq(Formulation::getSolutionId, channelState.getSolutionId())); - DeviceCommand deviceCommand = channelCtrlService.getPumpMoveByCommandByChannel(channelState.getChannelCode(), formulation.getRevolutions()); + DeviceCommand deviceCommand = getPumpMoveByCommandByChannel(channelState.getChannelCode(), formulation.getRevolutions()); commandFutureList.add(deviceCommandService.sendCommand(deviceCommand)); } CommandUtil.wait(commandFutureList); @@ -58,7 +57,7 @@ public class ChannelCtrlService { List commandFutureList = new ArrayList<>(); for (ChannelState channelState : channelStateList) { Formulation formulation = formulationService.getOne(new LambdaQueryWrapper().eq(Formulation::getSolutionId, channelState.getSolutionId())); - DeviceCommand deviceCommand = channelCtrlService.getPumpMoveByCommandByChannel(channelState.getChannelCode(), formulation.getRevolutions()); + DeviceCommand deviceCommand = getPumpMoveByCommandByChannel(channelState.getChannelCode(), formulation.getRevolutions()); commandFutureList.add(deviceCommandService.sendCommand(deviceCommand)); } CommandUtil.wait(commandFutureList); @@ -86,7 +85,7 @@ public class ChannelCtrlService { } List commandFutureList = new ArrayList<>(); for (ChannelState channelState : channelStateList) { - DeviceCommand deviceCommand = channelCtrlService.getPumpForwardRotateCommandByChannel(channelState.getChannelCode()); + DeviceCommand deviceCommand = getPumpForwardRotateCommandByChannel(channelState.getChannelCode()); commandFutureList.add(deviceCommandService.sendCommand(deviceCommand)); } CommandUtil.wait(commandFutureList);