Browse Source

fix:开启定时任务

master
白凤吉 6 hours ago
parent
commit
98776903d3
  1. 4
      src/main/java/com/iflytop/handacid/HandAcidApplication.java
  2. 1
      src/main/java/com/iflytop/handacid/app/scheduled/BleGamepadStateScheduledTask.java

4
src/main/java/com/iflytop/handacid/HandAcidApplication.java

@ -1,13 +1,13 @@
package com.iflytop.handacid;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication
@MapperScan("com.iflytop.handacid.common.mapper")
@EnableScheduling
public class HandAcidApplication {
public static void main(String[] args) {

1
src/main/java/com/iflytop/handacid/app/scheduled/BleGamepadStateScheduledTask.java

@ -30,7 +30,6 @@ public class BleGamepadStateScheduledTask {
if (!deviceState.isVirtual()) {
DeviceCommand getHardWareBoardCommand = DeviceCommandGenerator.getHardWareBoard();
CommandFuture getHardWareBoardCommandFuture = deviceCommandService.sendCommand(getHardWareBoardCommand);
CommandUtil.wait(getHardWareBoardCommandFuture);
DeviceCommand getBleGamepadCommand = DeviceCommandGenerator.getBleGamepad();
CommandFuture getBleGamepadCommandFuture = deviceCommandService.sendCommand(getBleGamepadCommand);
CommandUtil.wait(getHardWareBoardCommandFuture, getBleGamepadCommandFuture);

Loading…
Cancel
Save