Skip to content

Commit

Permalink
Avoid the rotating chassis going into CHARGE mode when the shift key …
Browse files Browse the repository at this point in the history
…is pressed.
  • Loading branch information
YoujianWu committed Mar 25, 2024
1 parent 0dd508f commit a89c2e6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/chassis_gimbal_shooter_manual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit a89c2e6

Please sign in to comment.