Thomas
7e2da11d67
reenable WV after FT alignment
2020-12-09 17:36:20 +01:00
Julian Oes
a1b54eb655
mavlink: check index for out-of-bounds
...
If a MAP_RC_PARAM message is sent with an index > 2, this would lead
to undefined behaviour or a segfault/hardfault.
2020-12-09 08:59:57 +01:00
Mark Sauder
dd4ee5c48c
dshot: breakout driver header file, use static_casts, add const specifiers ( #15908 )
...
* Break out dshot.h from dshot.cpp and rename files to reflect the class name.
Move DShot class specific #defines from drv_pwm_output.h to dshot.h.
Replace c-style casts with static_casts, standardize method naming, single line comment styles, and formatting.
Rename update_dshot_out_state() to enable_dshot_outputs().
2020-12-09 08:51:47 +01:00
Daniel Agar
cd1ffa63cd
commander: auto transition to LOITER if disarmed with no RC only requires a valid global position
2020-12-08 18:26:03 -05:00
Daniel Agar
82746af07a
ekf2: use new IMU and mag bias and variance getters in ecl/EKF
...
- reset IMU bias on calibration change (only works with multi-ekf)
- standardize PX4_INFO/PX4_WARN/PX4_ERR output for multi-ekf with instance number
- https://github.com/PX4/PX4-ECL/pull/924
2020-12-08 16:06:18 -05:00
Daniel Agar
8f5f564c05
commander: preflightcheck only report failure once per sensor type
...
- either way the user action is to recalibrate, so we might as well try
to minimize the noise/annoyance
2020-12-08 13:18:22 -05:00
Silvan Fuhrer
edaf9f2bb6
FW Position Controller: consolidate mission throttle adaptions for position and loiter waypoints
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com >
2020-12-08 12:08:36 -05:00
Silvan Fuhrer
6d255df0a8
airspeed selector: disable beta fusion when not in fixed-wing mode
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com >
2020-12-08 11:43:27 -05:00
Silvan Fuhrer
59564af860
wind_estimate message: add identifier for source
...
Signed-off-by: Silvan Fuhrer <silvan@auterion.com >
2020-12-08 11:43:27 -05:00
Roman Dvořák
bc1c8fb73a
GPS_DUMP_COMM: dump all gps instances
2020-12-08 11:45:24 +01:00
Julian Oes
fd261b590c
battery: don't init uint16_t with -1.0f
...
This was flagged as undefined behaviour by fuzz testing.
2020-12-08 09:58:29 +01:00
Daniel Agar
681590c510
ekf2: multi-ekf force initial selection (and sensor_selection publication)
...
- depending on the particular sensor configuration and startup timing we were getting an initial sensor_selection publication without valid accel & gyro device ids (only applies to Multi-EKF)
- fix faulty accel and gyro device ids
- initialize unused test ratio fields to NAN for logging clarity
2020-12-07 21:37:24 -05:00
bresch
3276916df9
HomePos: check corresponding validity before using data
2020-12-07 10:24:23 -05:00
bresch
711bd2ce87
Commander: use helper to set home position
2020-12-07 10:24:23 -05:00
bresch
f3e5b86b06
Commander: set home position in air
...
en/dis-able in-air home position via parameter COM_HOME_IN_AIR
2020-12-07 10:24:23 -05:00
Julian Oes
a2ff53b018
mavlink: remove typedef of anonymous struct
...
Clang doesn't seem to like these.
2020-12-06 23:55:59 -05:00
Julian Oes
8900c6200d
commander: remove typedef of anonymous struct
...
Clang doesn't seem to like these.
2020-12-06 23:55:59 -05:00
JaeyoungLim
e6992db1ca
Use enums for set attitude setpoint typemasks for offboard mode ( #16327 )
...
This commit switches the typemask comaparision to enums for better readability
2020-12-04 17:44:33 +01:00
Daniel Agar
cc979d2249
Update submodule GPSDrivers to latest Fri Dec 4 00:39:25 UTC 2020
...
- devices in PX4/Firmware (1303a8f17c5174a02b1c3ed22acd88da499e5a53): https://github/commit/0bf63c9820f4af997d0a48743dcc1008d119e49c
- devices current upstream: https://github/commit/5afc11588b2b6ec0861ecf9ef673c7a9e2109129
- Changes: https://github/compare/0bf63c9820f4af997d0a48743dcc1008d119e49c...5afc11588b2b6ec0861ecf9ef673c7a9e2109129
5afc115 2020-11-30 Beat Küng - gps_helper: define M_PI_F if not defined (was missing for ubx)
2020-12-03 23:48:29 -05:00
Daniel Agar
01620420fa
ekf2: update to latest ecl with RingBuffer minor improvements
...
- includes https://github.com/PX4/PX4-ECL/pull/938
2020-12-03 21:17:22 -05:00
Matthias Grob
25c113a527
StickAccelerationXY: boost low speed brake
2020-12-03 18:19:42 +01:00
Matthias Grob
badaf1eae0
Functions: add squareroot linear function
2020-12-03 18:19:42 +01:00
Matthias Grob
3f3a82e034
FlightTaskManualAcceleration: reset position lock on reactivation
...
to prevent having a fixed position lock while moving the vehicle
on the ground before flying.
2020-12-03 18:19:42 +01:00
Matthias Grob
66f8fc08c0
FlightTasks: refactor to use isAnyTaskActive()
2020-12-03 18:19:42 +01:00
David Sidrane
229f02a4f9
mtd:Reduce functionality on memory constrained systems
2020-12-02 20:40:23 -05:00
David Sidrane
e83a00c604
px4_manifest:Add Queries
2020-12-02 20:40:23 -05:00
David Sidrane
68ab736b16
Refactor mtd to make available to board startup
2020-12-02 20:40:23 -05:00
Daniel Agar
378c0b5093
parameters: find and get perf counters aren't threadsafe
2020-12-02 10:11:42 -05:00
Daniel Agar
e69aea0a9b
parameters: don't keep in memory if set to default
2020-12-02 10:11:42 -05:00
Daniel Agar
c305774fae
commander: move vehicle_status into class
2020-12-02 10:20:50 +01:00
Daniel Agar
b7de10fca3
commander: move vehicle_status_flags to class
2020-12-02 10:20:50 +01:00
Daniel Agar
dc435c4c90
commander: control_status_leds() use _armed directly
2020-12-02 10:20:50 +01:00
Daniel Agar
8ac2581d7b
commander: handle_command() use _armed directly
2020-12-02 10:20:50 +01:00
Daniel Agar
741a0b43e8
commander: move mavlink_log_pub into class
2020-12-02 10:20:50 +01:00
Daniel Agar
a03b91c01e
commander: move answer_command() to class
2020-12-02 10:20:50 +01:00
Daniel Agar
d5dc7e2873
commander: move actuator_armed state into class
2020-12-02 10:20:50 +01:00
Matthias Grob
de66616341
MulticopterPositionControl: don't switch out of Orbit task
...
when it got started via vehicle_command
2020-12-01 10:00:46 -05:00
Matthias Grob
8f40558f41
MulticopterPositionControl: reset task when switching mode
...
to make sure the state is clean between auto mode switches.
2020-12-01 10:00:46 -05:00
Daniel Agar
85f3ab1960
rc_update: only decode if RC input is stable (channel count and source)
2020-12-01 09:40:24 -05:00
Daniel Agar
d654be761c
ms4525: remove old voltage corrections
...
- this isn't correct for all boards and we now have airspeed scale
factor estimation
2020-12-01 09:34:47 -05:00
Alex Mikhalev
378b41af6a
tunes: Improve logic for interrupting tunes
...
src/lib/tunes already knows which tunes are interruptable, so add
return values to expose than and use than in tone_alarm.
This fixes the issue that repeating tunes cannot be interrupted without
tune_override set to true.
Signed-off-by: Alex Mikhalev <alex@corvus-robotics.com >
2020-11-30 16:56:13 -05:00
JaeyoungLim
bd943d872c
Use explicit typemasks for offboard position setpoints ( #16296 )
...
This uses enums of the POSITION_TARGET_TYPEMASK in order to separate typemasks that are part of the mavlink specs more explicitly
2020-11-30 22:12:06 +01:00
Beat Küng
a63e8cc149
fix mavlink: ensure vehicle_command topic exists
...
If the first publisher publishes multiple commands right after each other
(e.g. on 'commander takeoff'), mavlink would miss the first and print an
error like 'vehicle_command lost, generation 0 -> 2'.
This is due to a recent uORB behavior change.
2020-11-30 11:53:22 -05:00
Beat Küng
05a3492174
commander: remove low priority thread, run tasks in a worker thread on demand
...
- removes race conditions
- removes dependencies on static data & methods
- reduces RAM usage by ~3.8KB
2020-11-30 11:53:22 -05:00
Beat Küng
419b336a15
commander: fix ModuleBase usage, remove volatile flag
2020-11-30 11:53:22 -05:00
Antonio Sanjurjo Cortés
aa80167b47
mavlink: rename OPTICAL_FLOW header and defines to OPTICAL_FLOW_RAD
...
Signed-off-by: Antonio Sanjurjo Cortés <74329840+antonio-sc66@users.noreply.github.com >
2020-11-29 20:26:07 -05:00
Antonio Sanjurjo Cortés
7dde298664
mavlink: move COLLISION to streams hpp
...
Signed-off-by: Antonio Sanjurjo Cortés <74329840+antonio-sc66@users.noreply.github.com >
2020-11-29 20:26:07 -05:00
Antonio Sanjurjo Cortés
2243931abd
mavlink: move ATTITUDE_TARGET to streams hpp
...
Signed-off-by: Antonio Sanjurjo Cortés <74329840+antonio-sc66@users.noreply.github.com >
2020-11-29 20:26:07 -05:00
Antonio Sanjurjo Cortés
ce28aa089b
mavlink: move ATTITUDE_QUATERNION to streams hpp
...
Signed-off-by: Antonio Sanjurjo Cortés <74329840+antonio-sc66@users.noreply.github.com >
2020-11-29 20:26:07 -05:00
Antonio Sanjurjo Cortés
8ac2ada0e6
mavlink: move ATTITUDE to streams hpp
...
Signed-off-by: Antonio Sanjurjo Cortés <74329840+antonio-sc66@users.noreply.github.com >
2020-11-29 20:26:07 -05:00