From c31727c8ea12553f4acdc5f6ee60124295c3a724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=87=A4=E5=90=89?= Date: Thu, 5 Jun 2025 17:05:47 +0800 Subject: [PATCH] 1 --- .../com/iflytop/gd/app/controller/SystemController.java | 13 ------------- .../com/iflytop/gd/app/controller/TestController.java | 17 +++++++++++++++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/iflytop/gd/app/controller/SystemController.java b/src/main/java/com/iflytop/gd/app/controller/SystemController.java index 3a22bda..6c15f08 100644 --- a/src/main/java/com/iflytop/gd/app/controller/SystemController.java +++ b/src/main/java/com/iflytop/gd/app/controller/SystemController.java @@ -24,19 +24,6 @@ public class SystemController { private final SystemConfigService systemConfigService; private final DeviceStateService deviceStateService; - @Operation(summary = "是否启动虚拟模式") - @PostMapping("/virtual") - public Result changeVirtualMode(Boolean mode) { - deviceStateService.getDeviceState().setVirtual(mode); - return Result.success(); - } - - @Operation(summary = "模拟向硬件写入完毕") - @PostMapping("/initComplete") - public Result setInitComplete(Boolean initComplete) { - deviceStateService.getDeviceState().setInitComplete(initComplete); - return Result.success(); - } @Operation(summary = "系统状态") @GetMapping("/device-status") diff --git a/src/main/java/com/iflytop/gd/app/controller/TestController.java b/src/main/java/com/iflytop/gd/app/controller/TestController.java index cfce7fb..2e1cf68 100644 --- a/src/main/java/com/iflytop/gd/app/controller/TestController.java +++ b/src/main/java/com/iflytop/gd/app/controller/TestController.java @@ -36,6 +36,21 @@ public class TestController { private final OtherModuleService otherModuleService; private final DeviceEmergencyStopService deviceEmergencyStopService; + @Operation(summary = "启动虚拟模式") + @PostMapping("/virtual") + public Result changeVirtualMode() { + deviceStateService.getDeviceState().setVirtual(true); + deviceStateService.getDeviceState().setInitComplete(true); + return Result.success(); + } + + @Operation(summary = "模拟向硬件写入完毕") + @PostMapping("/initComplete") + public Result setInitComplete(Boolean initComplete) { + deviceStateService.getDeviceState().setInitComplete(initComplete); + return Result.success(); + } + @Operation(summary = "获取所有传感器读数") @GetMapping("/all-sensor") public Result> getAllSensor() throws HardwareException { @@ -57,7 +72,6 @@ public class TestController { return Result.success(); } - @Operation(summary = "获取指令互斥状态") @GetMapping("/mutex-state") public Result getCommandMutexState() throws HardwareException { @@ -71,7 +85,6 @@ public class TestController { return Result.success(); } - @Operation(summary = "触发急停") @PostMapping("/press-emergency-stop") public Result pressEmergencyStop() throws Exception {