补充 主动完成作业后和被动完成工作后发送工作完成的播报指令
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'dart:collection';
|
||||
|
||||
import 'package:isar_community/isar.dart';
|
||||
import 'package:maibu_satabot_v2/core/logging/i_logger_service.dart';
|
||||
import 'package:maibu_satabot_v2/features/devices/data/models/device_add_path_point_model.dart';
|
||||
import '../../../../core/di/injection.dart';
|
||||
@@ -229,6 +230,21 @@ class PathPlanner {
|
||||
);
|
||||
print("📡 发送停止指令到设备...");
|
||||
tcpClient.sendDeviceStateChange(entity);
|
||||
// 发送完成工作播报指令
|
||||
sendWorkCompleteBroadcast();
|
||||
}
|
||||
|
||||
//发送完成工作播报指令
|
||||
void sendWorkCompleteBroadcast() {
|
||||
var entity = new RoutePlanSendEntity(
|
||||
commandType: 0x01,
|
||||
pointCounts: 0xFF,
|
||||
targetLatitude: 0,
|
||||
targetLongitude: 0,
|
||||
speed: 0,
|
||||
);
|
||||
print("发送完成工作播报指令...");
|
||||
tcpClient.sendDeviceStateChange(entity);
|
||||
}
|
||||
|
||||
// 🔥 新增:ACK 握手机制的发送方法 (新模式)
|
||||
|
||||
Reference in New Issue
Block a user