Updated motor RAMP timing to match slew rate limiter

This commit is contained in:
Andreas Antener
2016-09-21 08:24:50 +02:00
parent 69ae0091b8
commit 3b58caa32a
+3 -1
View File
@@ -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;
}