From 2085257fdbb2d99f7ea64649bf1011f76cc14f75 Mon Sep 17 00:00:00 2001 From: liyixin135 <421159734@qq.com> Date: Sat, 1 Jun 2024 20:56:49 +0800 Subject: [PATCH 1/2] Moving chassis to remain a slow gimbal-state during hanging-shoot. --- src/chassis_gimbal_shooter_manual.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/chassis_gimbal_shooter_manual.cpp b/src/chassis_gimbal_shooter_manual.cpp index 2fcffb68..0eeea578 100644 --- a/src/chassis_gimbal_shooter_manual.cpp +++ b/src/chassis_gimbal_shooter_manual.cpp @@ -438,7 +438,7 @@ void ChassisGimbalShooterManual::wPress() { ChassisGimbalManual::wPress(); if ((robot_id_ == rm_msgs::GameRobotStatus::BLUE_HERO || robot_id_ == rm_msgs::GameRobotStatus::RED_HERO) && - gimbal_cmd_sender_->getEject()) + (gimbal_cmd_sender_->getEject() && !use_scope_)) { gimbal_cmd_sender_->setEject(false); manual_to_referee_pub_data_.hero_eject_flag = gimbal_cmd_sender_->getEject(); @@ -451,7 +451,7 @@ void ChassisGimbalShooterManual::aPress() { ChassisGimbalManual::aPress(); if ((robot_id_ == rm_msgs::GameRobotStatus::BLUE_HERO || robot_id_ == rm_msgs::GameRobotStatus::RED_HERO) && - gimbal_cmd_sender_->getEject()) + (gimbal_cmd_sender_->getEject() && !use_scope_)) { gimbal_cmd_sender_->setEject(false); manual_to_referee_pub_data_.hero_eject_flag = gimbal_cmd_sender_->getEject(); @@ -464,7 +464,7 @@ void ChassisGimbalShooterManual::sPress() { ChassisGimbalManual::sPress(); if ((robot_id_ == rm_msgs::GameRobotStatus::BLUE_HERO || robot_id_ == rm_msgs::GameRobotStatus::RED_HERO) && - gimbal_cmd_sender_->getEject()) + (gimbal_cmd_sender_->getEject() && !use_scope_)) { gimbal_cmd_sender_->setEject(false); manual_to_referee_pub_data_.hero_eject_flag = gimbal_cmd_sender_->getEject(); @@ -477,7 +477,7 @@ void ChassisGimbalShooterManual::dPress() { ChassisGimbalManual::dPress(); if ((robot_id_ == rm_msgs::GameRobotStatus::BLUE_HERO || robot_id_ == rm_msgs::GameRobotStatus::RED_HERO) && - gimbal_cmd_sender_->getEject()) + (gimbal_cmd_sender_->getEject() && !use_scope_)) { gimbal_cmd_sender_->setEject(false); manual_to_referee_pub_data_.hero_eject_flag = gimbal_cmd_sender_->getEject(); From 8f3c569834fb417ef2bdba2e360d33921e55b5fa Mon Sep 17 00:00:00 2001 From: liyixin135 <421159734@qq.com> Date: Sun, 2 Jun 2024 17:20:43 +0800 Subject: [PATCH 2/2] Add one line. --- src/chassis_gimbal_shooter_manual.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/chassis_gimbal_shooter_manual.cpp b/src/chassis_gimbal_shooter_manual.cpp index 0eeea578..4ef5db5e 100644 --- a/src/chassis_gimbal_shooter_manual.cpp +++ b/src/chassis_gimbal_shooter_manual.cpp @@ -618,4 +618,5 @@ void ChassisGimbalShooterManual::ctrlQPress() shooter_calibration_->reset(); gimbal_calibration_->reset(); } + } // namespace rm_manual