mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-16 12:07:34 +08:00
Updated motor RAMP timing to match slew rate limiter
This commit is contained in:
@@ -119,6 +119,7 @@ usage(const char *reason)
|
||||
"Example:\n"
|
||||
"sdlog2 on\n"
|
||||
"mc_att_control stop\n"
|
||||
"fw_att_control stop\n"
|
||||
"motor_ramp sine 1100 0.5\n");
|
||||
}
|
||||
|
||||
@@ -359,7 +360,7 @@ int motor_ramp_thread_main(int argc, char *argv[])
|
||||
|
||||
case RAMP_RAMP: {
|
||||
if (_mode == RAMP) {
|
||||
output += dt / _ramp_time;
|
||||
output += 1000.0f * dt / (_max_pwm - _min_pwm) / _ramp_time;
|
||||
|
||||
} else if (_mode == SINE) {
|
||||
// sine outpout with period T = _ramp_time and magnitude between [0,1]
|
||||
@@ -385,6 +386,7 @@ int motor_ramp_thread_main(int argc, char *argv[])
|
||||
case RAMP_WAIT: {
|
||||
if (timer > 1.0f) {
|
||||
_thread_should_exit = true;
|
||||
PX4_WARN("stopping");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user