fix(设备中心):设备一键起飞接口逻辑优化

This commit is contained in:
2025-08-26 00:55:51 +08:00
parent c4d74f9d21
commit fcfa905a22
2 changed files with 2 additions and 1 deletions
@@ -264,7 +264,7 @@ public class ApiDeviceController {
*/ */
private JsonObject buildCommandMessage(String orderNo, String deviceId, Map<String, Object> qrcodeResult) { private JsonObject buildCommandMessage(String orderNo, String deviceId, Map<String, Object> qrcodeResult) {
// 使用默认的control参数,这里可以根据需要修改 // 使用默认的control参数,这里可以根据需要修改
String control = "camera_photo_take"; // 默认使用拍照指令 String control = "flighttask_prepare"; // 使用飞行任务准备指令
if (!ControlEnum.contains(ControlEnum.valueOf(control.toUpperCase()))) { if (!ControlEnum.contains(ControlEnum.valueOf(control.toUpperCase()))) {
return null; return null;
@@ -84,6 +84,7 @@ public class ControlMessageConstant {
CONTROL_MESSAGE_MAP.put("flighttask_prepare", FLIGHTTASK_PREPARE); CONTROL_MESSAGE_MAP.put("flighttask_prepare", FLIGHTTASK_PREPARE);
CONTROL_MESSAGE_MAP.put("return_home", RETURN_HOME); CONTROL_MESSAGE_MAP.put("return_home", RETURN_HOME);
CONTROL_MESSAGE_MAP.put("flighttask_recovery", FLIGHTTASK_RECOVERY); CONTROL_MESSAGE_MAP.put("flighttask_recovery", FLIGHTTASK_RECOVERY);
CONTROL_MESSAGE_MAP.put("takeoff_to_point", TAKEOFF_TO_POINT);
} }