#连接库初步完成
This commit is contained in:
18
lib/core/protocol/protocol_constants.dart
Normal file
18
lib/core/protocol/protocol_constants.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
class ProtocolConstants {
|
||||
// 固定字节
|
||||
static const int header1 = 0xAB;
|
||||
static const int header2 = 0xAA;
|
||||
static const int endFlag1 = 0xAA;
|
||||
static const int endFlag2 = 0xAB;
|
||||
|
||||
// 指令类型 (根据你的 CSV 文件)
|
||||
static const int cmdRemoteControl = 0x00; // 远程遥控
|
||||
static const int cmdPathPlanning = 0x01; // 路径规划
|
||||
static const int cmdStatusInfo = 0x02; // 状态信息
|
||||
static const int cmdGetId = 0x03; // 连接请求/查询ID
|
||||
static const int cmdGetAuth = 0x04; // 获取授权
|
||||
static const int cmdReadConfig = 0x05; // 读配置
|
||||
static const int cmdWriteConfig = 0x06; // 写配置
|
||||
static const int cmdObstacleAvoid = 0x07; // 避障
|
||||
static const int cmdHeartbeat = 0xFF; // 心跳包
|
||||
}
|
||||
Reference in New Issue
Block a user