-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
add throttle_ramp_time parameter #13154
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just remove those overly protective brackets, priority of operations isn't ambiguous here.
@@ -195,7 +194,7 @@ float RunwayTakeoff::getThrottle(float tecsThrottle) | |||
{ | |||
switch (_state) { | |||
case RunwayTakeoffState::THROTTLE_RAMP: { | |||
float throttle = hrt_elapsed_time(&_initialized_time) / (float)_throttle_ramp_time * | |||
float throttle = (hrt_elapsed_time(&_initialized_time) / ((float)_param_rwto_ramp_time.get() * 1e6f)) * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
float throttle = (hrt_elapsed_time(&_initialized_time) / ((float)_param_rwto_ramp_time.get() * 1e6f)) * | |
float throttle = hrt_elapsed_time(&_initialized_time) / (float)_param_rwto_ramp_time.get() * 1e6f * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I will
@@ -79,7 +78,7 @@ void RunwayTakeoff::update(float airspeed, float alt_agl, | |||
|
|||
switch (_state) { | |||
case RunwayTakeoffState::THROTTLE_RAMP: | |||
if (hrt_elapsed_time(&_initialized_time) > _throttle_ramp_time) { | |||
if (hrt_elapsed_time(&_initialized_time) > (_param_rwto_ramp_time.get() * 1e6f)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (hrt_elapsed_time(&_initialized_time) > (_param_rwto_ramp_time.get() * 1e6f)) { | |
if (hrt_elapsed_time(&_initialized_time) > _param_rwto_ramp_time.get() * 1e6f) { |
ef43a8c
to
3bc88b1
Compare
add throttle_ramp_time parameter support fixed wing runway takeoff PX4#13146 remove overly protective brackets
3bc88b1
to
7ef3985
Compare
add throttle_ramp_time parameter support fixed wing runway takeoff #13146