完成远程控制页面中点火和熄火的长按选中类别的业务层-待测试
完成远程控制页面中割刀的长按选中类别的操作业务层-待测试 完成远程控制页面中地盘的长按选中类别的操作-待测试
This commit is contained in:
@@ -172,9 +172,6 @@ class RemoteControlCubit extends Cubit<RemoteControlState> {
|
||||
void requestControlPermission() {
|
||||
// 1. 关闭弹窗
|
||||
emit(state.copyWith(showPermissionRequestDialog: false));
|
||||
|
||||
// 2. 这里执行你发送 0x12 指令的逻辑
|
||||
// _sendProtocolData(0x12, ...);
|
||||
}
|
||||
|
||||
void toggleLeftPip() => emit(state.copyWith(showLeftPip: !state.showLeftPip));
|
||||
@@ -244,6 +241,20 @@ class RemoteControlCubit extends Cubit<RemoteControlState> {
|
||||
},
|
||||
);
|
||||
}
|
||||
/// 发送底盘指令
|
||||
void sendChassisCommand(int i) {
|
||||
updateFunction(lift: i);
|
||||
}
|
||||
/// 发送割刀指令
|
||||
void sendMowerCommand(int i) {
|
||||
updateFunction(mower: i);
|
||||
}
|
||||
/// 发送点火指令
|
||||
void sendFireCommand(int i) {
|
||||
//void updateFunction({int? mower, int? lift, int? ignition, bool? emergency})
|
||||
// updateFunction(mower:0, lift: 0, ignition: i, emergency: false);
|
||||
updateFunction(ignition: i);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user