Files
flutterApp/lib/core/env/path_planning_config.dart
2026-03-17 14:19:41 +08:00

21 lines
832 B
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/// 路径规划配置类
/// 用于控制路径规划功能的各种开关和配置
class PathPlanningConfig {
/// 🔥 全局开关:控制使用哪套路径规划逻辑
/// - `false`: 使用现有逻辑(不等待 ACK 确认)
/// - `true`: 使用新的 ACK 握手机制(等待 0x02 和 0x01 确认)
static bool useAckHandshake = false;
/// 切换路径规划模式
/// [useAck] true = 使用 ACK 握手机制,false = 使用现有逻辑
static void setMode(bool useAck) {
useAckHandshake = useAck;
print('🔧 [PathPlanningConfig] 路径规划模式已切换:${useAck ? "ACK 握手机制" : "现有逻辑"}');
}
/// 获取当前模式描述
static String getModeDescription() {
return useAckHandshake ? "ACK 握手机制 (等待 0x02 + 0x01)" : "现有逻辑 (仅等待 0x01)";
}
}