Skip to content

Commit

Permalink
Modify switch_camera method.
Browse files Browse the repository at this point in the history
  • Loading branch information
liyixin135 committed May 11, 2024
1 parent 780b5bc commit a76825b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/chassis_gimbal_shooter_manual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,17 @@ void ChassisGimbalShooterManual::mouseRightPress()

void ChassisGimbalShooterManual::ePress()
{
if (camera_switch_cmd_sender_)
camera_switch_cmd_sender_->switchCamera();
switch_armor_target_srv_->setArmorTargetType(rm_msgs::StatusChangeRequest::ARMOR_OUTPOST_BASE);
switch_armor_target_srv_->callService();
shooter_cmd_sender_->setArmorType(switch_armor_target_srv_->getArmorTarget());
}

void ChassisGimbalShooterManual::eRelease()
{
if (camera_switch_cmd_sender_)
camera_switch_cmd_sender_->switchCamera();
switch_armor_target_srv_->setArmorTargetType(rm_msgs::StatusChangeRequest::ARMOR_ALL);
switch_armor_target_srv_->callService();
shooter_cmd_sender_->setArmorType(switch_armor_target_srv_->getArmorTarget());
Expand Down Expand Up @@ -414,8 +418,6 @@ void ChassisGimbalShooterManual::bRelease()

void ChassisGimbalShooterManual::rPress()
{
if (camera_switch_cmd_sender_)
camera_switch_cmd_sender_->switchCamera();
if (scope_cmd_sender_)
{
use_scope_ = !scope_cmd_sender_->getState();
Expand Down

0 comments on commit a76825b

Please sign in to comment.