Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #63

Merged
merged 14 commits into from
Mar 31, 2024
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
Loading