10 Commits

Author SHA1 Message Date
xdwgood
802c68a62e Do not run transition flight task when not enable altitude control 2021-01-08 10:28:00 +01:00
Daniel Agar
de59d6c788 flight_tasks: pass previous setpoint as const reference
- perform setpoint checks in place to simplify and avoid copy
2020-08-05 10:50:15 -04:00
Mathieu Bresciani
be2bb4a479
FlightTask: Fix ekf2 reset race condition during task switch (#14692)
* FlightTask: Fix ekf2 reset race condition during task switch

During a loss of GPS data when using GPS as primary height source,
the height is reset to baro and the local position gets invalid at the
same time. This triggers a switch to altitude flight task and a setpoint
reset.
This combination of events had the effect to ignore the height reset,
the large sudden height error could create an abrupt change of altitude
or even a crash.
The ekf2 reset is now done at the beginning of each update call.
2020-04-22 13:18:35 +02:00
Roman Bapst
47f0e91076 Apply suggestions from code review
Co-Authored-By: Mathieu Bresciani <brescianimathieu@gmail.com>
2020-04-02 13:45:52 +03:00
RomanBapst
a916cc2a26 better comments
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-04-02 13:45:52 +03:00
RomanBapst
baf5e86f81 transition flighttask: don't control yaw and altitude during trans
Signed-off-by: RomanBapst <bapstroman@gmail.com>

# Conflicts:
#	src/lib/flight_tasks/tasks/Transition/FlightTaskTransition.cpp
2020-04-02 13:45:52 +03:00
Matthias Grob
f6ceb08522 FlightTaskTransition: don't overwrite setpoints with estimates
Previously acceleration setpoints were not executed and just used
to pass a possible rough initialization value for the next task. Now
they get executed by the multicopter controller and hence
overwriting them with rough estimates doesn't work anymore.
2020-03-30 09:58:39 +02:00
Matthias Grob
b79b095ce7 FlightTasks: adapt to acceleration based control 2020-03-30 09:58:39 +02:00
Matthias Grob
1a5b06d0cf FlightTasks: refactor NAN initializations, spacing 2019-12-18 15:57:48 +01:00
Daniel Agar
7996ee496c lib: name folders consistently 2019-11-13 09:29:21 -05:00