-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
In flight routine update #468
Conversation
static inline void autopilot_check_in_flight( bool_t motors_on ) { | ||
static int32_t accel_filter; |
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.
this variable is never set anywhere....
Also this should probably be better integrated with the new autopilot_check_in_flight_no_rc Or we make a proper state machine for this right away.... but probably better to merge something that improves the situation if no one will work on a state machine for this soonish... |
if (autopilot_in_flight_counter > 0) { | ||
if (THROTTLE_STICK_DOWN()) { | ||
if (THROTTLE_STICK_DOWN() && ((autopilot_mode == AP_MODE_HOVER_Z_HOLD | ||
&& (abs(ins_ltp_speed.z) < AP_IN_FLIGHT_MIN_SPEED) |
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.
maybe it is better to use the state interface rather than ins
do you continue to look only at the RC, or should be take the throttle command instead ? |
I guess it would make sense only look at the final throttle command and not the RC throttle. But I'm not quite sure how often this check should be called... I don't think it should be called from autopilot_periodic, as that runs with the main freq. I guess the failsafe_check task with 20Hz would be a sensible choice. |
I agree that failsafe task is a good choice for this |
Simply checks if thrust, speed and acceleration are above a threshold. Does not rely on RC thrust command anymore, but only on actual thrust command. Not tested on real vehicle at all so far... Attempt to improve issue paparazzi#201 and replaces paparazzi#468
closing in favour of #469, please test that one and propose improvements if not satisfactory |
No description provided.