feat(drone-dock): 添加安全控制接口本地模拟调试
接入 command 请求合同与底部暂停、继续、返航、取消返航交互;支持同任务单次回查、防重复提交及未知结果锁。保留真实指令禁飞拦截,补充隔离测试、模拟回执与截图。
This commit is contained in:
@@ -189,6 +189,26 @@ struct DroneDockShootingUI: Decodable, Equatable, Sendable {
|
||||
let title: String?
|
||||
/// 服务端阶段说明,不由 GET 请求成功拼造飞行进度。
|
||||
let message: String?
|
||||
/// 服务端实际提供的安全指令;缺失时保持未知,不据阶段文案自行补齐。
|
||||
let commands: [DroneDockShootingCommand]?
|
||||
|
||||
/// 保留既有展示构造方式,新增动作列表默认为未知。
|
||||
init(phase: String?, title: String?, message: String?, commands: [DroneDockShootingCommand]? = nil) {
|
||||
self.phase = phase
|
||||
self.title = title
|
||||
self.message = message
|
||||
self.commands = commands
|
||||
}
|
||||
}
|
||||
|
||||
/// shooting 或 start-shoot 的指令展示项;原始字符串保留,执行时另作白名单校验。
|
||||
struct DroneDockShootingCommand: Decodable, Equatable, Sendable {
|
||||
/// 服务端指令码,未知值不应开放动作。
|
||||
let command: String?
|
||||
/// 服务端按钮标题。
|
||||
let label: String?
|
||||
/// 服务端按钮副标题。
|
||||
let sub: String?
|
||||
}
|
||||
|
||||
/// 将现有 JSON 值解码结果重新格式化,完整保留 shooting 的未建模字段。
|
||||
|
||||
Reference in New Issue
Block a user