2934 Commits

Author SHA1 Message Date
wangwwno1
746c16400a Typo Fix: ChangeWorkQeue
Fix the typo of 'WorkItem::ChangeWorkQeue' to 'WorkItem::ChangeWorkQueue'
2022-03-15 13:31:52 -04:00
KonradRudin
5f43be9d60 preflight checks: add check for distance sensor (via parameter) 2022-03-15 10:44:27 +01:00
Jukka Laitinen
0d31aadcc3 src/lib/paramters: Add a new interface library for protected build user side
Implement an interface for protected build to access parameters.

The implementation only does IOCTL calls to the kernel, where the parameters
live.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-03-15 07:52:26 +01:00
Jukka Laitinen
41a7ae3db2 src/lib/parameters: Refactor common functions to an own file
Put all functions which are commont to flat build and protected kernel and
userspace to an own source file

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-03-15 07:52:26 +01:00
Daniel Agar
3d54d25867
sensor calibration delete temperature (CAL_ACCx_TEMP, CAL_GYROx_TEMP, CAL_MAGx_TEMP)
- this was an experiment to casually monitor sensor offsets relative to temperature, but now that all calibration offsets can be adjusted post-flight the stored temperature can be misleading
 - deleting to save a little bit of flash (and storing the temperature wasn't useful)
2022-03-12 11:38:49 -05:00
Matthias Grob
c4bc062714 helper_functions: generalize unwrapping function 2022-03-08 10:56:32 +01:00
Matthias Grob
c86c2db07f helper_functions: simplify unwrap function 2022-03-08 10:56:32 +01:00
Thomas Stastny
5a3aba9c21 matrix: add angle unwrapping method 2022-03-08 10:56:32 +01:00
Matthias Grob
68a0414622 Quaternion: rename function to rotate vectors 2022-03-07 20:03:54 -05:00
Beat Küng
591c95ce2f mixer_module: print actual failsafe value 2022-03-04 08:02:11 -05:00
Daniel Agar
49df00c319
lib/mixer_module: check thrust factor range valid and minor optimization (#19272) 2022-03-03 08:10:09 +01:00
Daniel Agar
6224e11463
Update world_magnetic_model to latest Sat Feb 26 16:47:08 UTC 2022 (#19262)
* Update world_magnetic_model to latest Sat Feb 26 16:47:08 UTC 2022
* [AUTO COMMIT] update change indication

Co-authored-by: PX4 BuildBot <bot@px4.io>
2022-02-26 15:39:37 -05:00
Daniel Agar
1d7791dad6 commander: monitor GPS validity and EKF2 dead reckoning
- ekf2: expose dead reckoning as control status flags
 - commander:
    - add GPS validity check
    - in AUTO MISSION if dependent on GPS then a loss of GPS will
2022-02-22 09:46:21 -05:00
Jaeyoung-Lim
b0f9611eb9 NPFG: use cross product for matrix library
This removes the use of cross products from NPFG and takes advantage of the matrix library
2022-02-17 09:52:47 +01:00
Roman Bapst
6de5d24e00
Added VTOL Takeoff navigation mode (#19027)
* Commander: added support for MAIN_STATE_AUTO_VTOL_TAKEOFF
* navigator: added support for vtol_takeoff navigation mode
2022-02-15 14:56:57 +01:00
Jaeyoung Lim
e2741f988a Add interface for passing path tangent and closest point directly
This commit adds an interface to pass the path tangent and closest point directly to NPFG using the offboard interface
2022-02-02 17:16:19 +01:00
Daniel Agar
274d0d65c6 lib/cdev/posix: increase max FDs 256->512 2022-01-28 17:30:53 -05:00
Jukka Laitinen
32c53ff2dd Link rc against nuttx_fs in nuttx builds
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-28 17:30:13 -05:00
Jukka Laitinen
9e999a39be Revert erroneous linking of drivers__device to px4_work_queue
This was a mistake in commit 91b812fc4265e6e7d342c0d878de3a4dcaf5137d

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-28 17:30:13 -05:00
Jukka Laitinen
e1f2bff9be Fix parameters building for nuttx protected/kernel builds
- Don't link to px4_layer
- Don't link to flashparams; flashparams would work only in kernel side
- Add missing link to px4_platform

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen
91b812fc42 link drivers__device to nuttx_karch instead of nuttx_arch in protected build
On protected/kernel build the library would be karch.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen
714df398eb lib/version: Don't link to drivers_board
The needed version specific things come from px4 layer. Since version
is used both in kernel an user sides in protected build, it can't directly
link to drivers_board

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Thomas Stastny
19c98b8841 npfg: fix typo in Vector2f indexing 2022-01-19 11:17:44 -05:00
Daniel Agar
dd6b7fa98f sensors: switch status PX4_INFO -> PX4_INFO_RAW 2022-01-18 15:00:18 -05:00
Daniel Agar
ece09064c4 parameters: perform verification pass twice
- on NuttX with MTD storage this is to ensure we are verifying what's
actually stored on ramtron or eeprom, not just what's cached by bchlib
2022-01-18 09:47:28 -05:00
Daniel Agar
2fb82789fe lib/wind_estimator: pass q_att as const reference 2022-01-17 16:59:28 -05:00
Silvan Fuhrer
0ce44cebb7 WindEstimator: use vehicle heading instead of ground course for initialisation
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-14 17:42:01 -05:00
Thomas Stastny
082e320191 integrate optional NPFG library for wind-aware fixed-wing guidance 2022-01-14 22:05:53 +01:00
Beat Küng
9ca58f5e97 actuator outputs: always add reverse range param
and remove the possibility to set min > max to reverse.

Initially the idea was to add the checkbox on the UI side, to avoid adding
another param, but I don't think I'll go through the extra effort on the
QGC side.
2022-01-14 12:18:29 -05:00
Claudio Micheli
d122513197 extend support for Battery status message
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2022-01-13 08:40:34 +01:00
Daniel Agar
bb1177d504 sensor_calibration: refactor and centralize calibration slot logic
- centralize logic for selecting a preferred calibration slot
   - automatically use existing calibration slot if it exists, otherwise
find first available slot, with a preference for a requested index
 - existing commander calibration methods rewrite all calibration slots
to match current sensor ordering
2022-01-12 16:16:26 -05:00
Julian Oes
860b23dd17 tunes: add tune to power off
This is used by the ATL Mantis EDU to help the user realize when the
drone is powered off.
2022-01-10 23:04:10 -05:00
Daniel Agar
cc1fee525a lib/sensor_calibration: handle calibration slot change on parameter update 2022-01-10 17:16:50 -05:00
Daniel Agar
ab547bb982 sensors/vehicle_angular_velocity: RPM notch don't fully disable if first harmonic frequency drops below minimum frequency
- keep higher frequency harmonics enabled per ESC
 - cleanup timestamp handling (timeouts, etc)
2022-01-10 14:51:29 -05:00
Daniel Agar
b58922a5d7 sensors/vehicle_angular_velocity: notch filters automatically reset on sufficient parameter change 2022-01-10 14:51:29 -05:00
Daniel Agar
7d632254be NotchFilter push initialization/reset into filter
- this simplifies the reset by allowing a notch filter to reset as
needed
 - improves cascade initialization, on reset each filter will reset
properly from the previous
2022-01-10 14:51:29 -05:00
Daniel Agar
e731fcdbc0
sensors (accel/gyro/mag) determine if external with device id 2022-01-10 10:31:07 -05:00
Daniel Agar
78b3d22471 lib/mixer_module: consume output_limit library 2022-01-10 11:59:55 +01:00
Daniel Agar
aec97e0020 sensors: minor IMU bias saving updates
- sensors/vehicle_imu: reset learned cal on any calibration change
during parameter update
 - sensors/vehicle_imu: cleanup logic estimated bias -> calibration offset
saving
   - don't invalidate saved calibration (the point is to keep the last valid)
   - remove old debug code, etc
 - sensors/vehicle_imu: notify parameter changes if accel or gyro
calibration has changed
 - lib/sensor_calibration: add calibrated() and calibration_index()
getters, keep Accelerometer/Gyroscope/Magnetometer in sync
2022-01-07 09:40:51 -05:00
PX4 BuildBot
a89f21d566 Update world_magnetic_model to latest Tue Jan 4 11:14:11 UTC 2022 2022-01-04 09:12:45 -05:00
Daniel Agar
673d4544d1 parameters: verify param backup after export 2022-01-02 10:46:34 -05:00
Daniel Agar
8e26b33009 tinybson: file write error add more detail 2022-01-02 10:46:34 -05:00
Daniel Agar
80ef6e19df tinybson: explicitly append int32 or int64 2022-01-02 10:46:34 -05:00
Daniel Agar
9cbb5c9920 parameters: fix export shutdown locking
- in NuttX bchlib keeps a sector sized buffer that might not be written
out to RAMTRON until the file is closed
2022-01-02 10:46:34 -05:00
Daniel Agar
1b6700592b parameters: require valid BSON document size 2021-12-30 16:36:23 -05:00
Daniel Agar
236794235a parameters: export empty BSON document even if there are no parameters to save
- otherwise a 'param reset_all' won't be saved until a parameter is changed
2021-12-27 09:17:00 -05:00
Daniel Agar
33d7b42040 parameters: import quietly retry if there's no data (as a precuation) 2021-12-27 09:17:00 -05:00
Daniel Agar
20d3e6f4e1 parameters: add simple BSON verification pass after export 2021-12-27 09:17:00 -05:00
Beat Küng
28c4d0b7df mixer_module: add unit tests 2021-12-24 20:06:13 -05:00
Beat Küng
4c80adfaf1 control_allocator: implement trim + slew rate limits configuration 2021-12-24 20:06:13 -05:00