完成远程控制页面中点火和熄火的长按选中类别的业务层-待测试

完成远程控制页面中割刀的长按选中类别的操作业务层-待测试
完成远程控制页面中地盘的长按选中类别的操作-待测试
This commit is contained in:
2026-03-18 09:53:04 +08:00
parent 68a45ee487
commit 14dd6bd292
4 changed files with 31 additions and 19 deletions

View File

@@ -256,25 +256,25 @@ class TopStatusBar extends StatelessWidget {
_handleChassisAction(action, context);
}
// 🔥 底盘的业务逻辑(左滑块)
// 🔥 点火的业务逻辑(左滑块)
void _handleChassisAction(String action, BuildContext context) {
final cubit = context.read<RemoteControlCubit>();
switch (action) {
case "start":
debugPrint('⬆️ 底盘 - 向上(例如:前进)');
// TODO: 发送底盘前进指令
// cubit.sendChassisCommand(ChassisCommand.forward);
debugPrint('⬆点火啊');
// TODO: 发送 🔥点火指令
cubit.sendFireCommand(1);
break;
case "center":
debugPrint('️ 底盘 - 中间(例如:停止)');
// TODO: 发送底盘停止指令
// cubit.sendChassisCommand(ChassisCommand.stop);
debugPrint('️熄火');
// TODO: 发送点火停止指令
cubit.sendFireCommand(0);
break;
case "end":
debugPrint('⬇️ 底盘 - 向下(例如:后退)');
// TODO: 发送底盘后退指令
// cubit.sendChassisCommand(ChassisCommand.backward);
debugPrint('⬇熄火)');
// TODO: 发送熄火后退指令
cubit.sendFireCommand(2);
break;
}
}