Skip to content

Commit

Permalink
Merge pull request #63 from MY-L-2003/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Jiu-xiao authored Mar 31, 2024
2 parents d224065 + cc020d1 commit 61872e4
Show file tree
Hide file tree
Showing 5 changed files with 1,197 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/module/chassis/mod_chassis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ void Chassis<Motor, MotorParam>::Control() {
if (cap_.online_) {
percentage = cap_.percentage_;
} else if (ref_.status == Device::Referee::RUNNING) {
percentage = this->ref_.chassis_pwr_buff / 30.0f;
percentage = this->ref_.chassis_pwr_buff / 60.0f;
} else {
percentage = 1.0f;
}
Expand Down Expand Up @@ -253,7 +253,9 @@ void Chassis<Motor, MotorParam>::PraseRef() {

template <typename Motor, typename MotorParam>
float Chassis<Motor, MotorParam>::CalcWz(const float LO, const float HI) {
float wz_vary = fabsf(0.2f * sinf(ROTOR_OMEGA * this->now_)) + LO;
float wz_vary = fabsf(0.2f * sinf(ROTOR_OMEGA *
(static_cast<float>(bsp_time_get_ms())))) +
LO;
clampf(&wz_vary, LO, HI);
return wz_vary;
}
Expand Down
Loading

0 comments on commit 61872e4

Please sign in to comment.