From a89c2e6e8900bb95939da90af9e3e5bbad15172d Mon Sep 17 00:00:00 2001 From: youjian <1124895509@qq.com> Date: Mon, 25 Mar 2024 19:39:49 +0800 Subject: [PATCH] Avoid the rotating chassis going into CHARGE mode when the shift key is pressed. --- src/chassis_gimbal_shooter_manual.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/chassis_gimbal_shooter_manual.cpp b/src/chassis_gimbal_shooter_manual.cpp index 183c8eea..ca591080 100644 --- a/src/chassis_gimbal_shooter_manual.cpp +++ b/src/chassis_gimbal_shooter_manual.cpp @@ -567,10 +567,11 @@ void ChassisGimbalShooterManual::vPress() void ChassisGimbalShooterManual::shiftPress() { - if (chassis_cmd_sender_->getMsg()->mode != rm_msgs::ChassisCmd::FOLLOW) + if (chassis_cmd_sender_->getMsg()->mode != rm_msgs::ChassisCmd::FOLLOW || is_gyro_) { chassis_cmd_sender_->setMode(rm_msgs::ChassisCmd::FOLLOW); - vel_cmd_sender_->setAngularZVel(0.); + vel_cmd_sender_->setAngularZVel(1.0); + is_gyro_ = false; } chassis_cmd_sender_->power_limit_->updateState(rm_common::PowerLimit::BURST); }