Skip to content

Commit

Permalink
Merge pull request #101 from liyixin135/reduction_gimbal_after_using_…
Browse files Browse the repository at this point in the history
…scope

Moving chassis to remain a slow gimbal-state during hanging-shoot
  • Loading branch information
d0h0s authored Jul 24, 2024
2 parents 77425cc + 8f3c569 commit c973193
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/chassis_gimbal_shooter_manual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,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();
Expand All @@ -461,7 +461,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();
Expand All @@ -474,7 +474,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();
Expand All @@ -487,7 +487,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();
Expand Down Expand Up @@ -627,4 +627,5 @@ void ChassisGimbalShooterManual::ctrlQPress()
shooter_calibration_->reset();
gimbal_calibration_->reset();
}

} // namespace rm_manual

0 comments on commit c973193

Please sign in to comment.