23370 Commits

Author SHA1 Message Date
Beat Küng
540c024cbb parameters: avoid printing errors for erased flash devices
Errors:
ERROR [parameters] param import failed (-1) attempt 1, retrying
ERROR [parameters] param import failed (-1) attempt 2, retrying
ERROR [parameters] param import failed (-1) attempt 3, retrying
ERROR [parameters] param import failed (-1) attempt 4, retrying
ERROR [param] importing from '/fs/mtd_caldata' failed (-1)
2021-10-04 10:25:32 -04:00
Daniel Agar
cc4152e10d gyro_fft: require higher SNR for initially tracking a peak
- initial frequency peak tracking SNR increased from 10->15 db
 - after initial detection the threshold decreases to SNR 5db
 - gyro_fft large method refactored into smaller pieces
 - sensors/vehicle_angular_velocity: dynamic notch FFT make sample rate
check a percentage and relax lower bound safety threshold
2021-10-04 10:17:16 -04:00
Daniel Agar
6d78054f50
mavlink USB auto start/stop on boards with VBUS
- no longer start sercon or mavlink usb by default
 - on USB connection (VBUS) monitor serial USB at low rate and start Mavlink if there's a HEARTBEAT or nshterm on 3 consecutive carriage returns
 - the mavlink USB instance is automatically stopped and serdis executed if USB is disconnected
 - skipping Mavlink USB (and sercon) saves a considerable amount of memory on older boards
2021-10-03 15:32:54 -04:00
bresch
07e307b074 FieldSensorBiasEst: fix bias learning equation
Also compensate the tuned learning gains for the new equation to keep
the same tuning
2021-10-02 21:25:21 -04:00
bresch
e0bcc17f5b mbe: integrate pre-takeoff mag bias estimate in VehicleMagnetometer 2021-10-02 21:25:21 -04:00
bresch
ec178c8745 create new mag_bias_estimator module
Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-10-02 21:25:21 -04:00
bresch
d858835fd0 mbe: initialize estimator with current measurement 2021-10-02 21:25:21 -04:00
bresch
9067d9cae9 mbe: improve algorithm and fix unit test 2021-10-02 21:25:21 -04:00
Matthias Grob
24dc627e8a Add MagnetometerBiasEstimator for online magnetometer calibration 2021-10-02 21:25:21 -04:00
bresch
5874b1f87c mc atune: add module to all targets
- adjust flash constrianed targets to fit
2021-10-02 18:12:05 -04:00
bresch
61dabca4c8 mavlink_receiver: Add mavlink handler with progress report 2021-10-02 18:12:05 -04:00
bresch
d463dfe2d8 mavlink_receiver: handle auto-tuning command 2021-10-02 18:12:05 -04:00
bresch
9681f819a8 mc_att: inject identification signal in att control output 2021-10-02 18:12:05 -04:00
bresch
0498ee92d0 mc atune: add multicopter attitude auto-tuner module 2021-10-02 18:12:05 -04:00
bresch
d3cb806627 pid_design: add model-based PID tuning law based on GMVC 2021-10-02 18:12:05 -04:00
bresch
404145c655 sysID: add system identification library 2021-10-02 18:12:05 -04:00
bresch
d504b49695 mc_rate: compute control energy and publish to status msg 2021-10-02 18:12:05 -04:00
Alex Klimaj
0a662ef22c
Add uavcannode RTCM subscriber 2021-10-01 20:43:49 -04:00
Daniel Agar
a53946649a sensors/vehicle_magnetometer: only check if sensor enabled after parameters loaded 2021-10-01 20:30:46 -04:00
marcojob
68a13326f0
mavlink: remove unused strncpy (#18300) 2021-10-01 10:58:25 +02:00
David Sidrane
25a27d26e0 logger:log_writer_file Do not try to store ulog name on systems without hardfault logging 2021-09-29 23:51:25 -04:00
David Sidrane
f4e9672fde make_can_boot_descriptor:Add padding argument 2021-09-29 14:34:42 -04:00
Daniel Agar
c39a21aa54 ekf2: selector remove special timeout condition
- this mainly produces false positives when disarmed and bench testing
2021-09-29 09:59:08 -04:00
Paul Riseborough
ed7c5991eb ekf2: Fix dimensional error in gyro and accel bias variance conversions 2021-09-29 09:58:41 -04:00
Hyungsub
5677ab042b
tap_esc: fix resource leak (#18296) 2021-09-29 14:51:31 +02:00
Daniel Agar
03bd5e0f48 lib/led: move drivers/lights/rgbled LED_RGB_MAXBRT -> SYS_RGB_MAXBRT 2021-09-28 10:09:55 -04:00
Nicolas Martin
b24e5fc0af clean remaining offboard_control_signal_found_once
offboard_control_signal_found_once is not used any more
2021-09-28 09:25:04 -04:00
Nicolas Martin
417a50b2cc fix typo in comment 2021-09-28 09:24:47 -04:00
Jukka Laitinen
6cae4c92e7 Add a header to logfile encryption key exchange file
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen
9a4ef709ca Add parameters for configuring the logfile encryption
SDLOG_ALGORITHM for selecting the crypto algorithm
SDLOG_KEY for selecting the key in keystore to use with the algorithm.
  for symmetric algorithms which are currently supported, this is just a free
  slot to be used, the key is generated at logging start
SDLOG_EXCH_KEY for selecting an RSA2048 key for encrypting the SDLOG_KEY

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen
9472f79307 Take crypto interfaces into use in logger, to encrypt ulog data
- Generate a symmetric encryption key and a nonce value
- Use a public key in keystore to encrypt the symmteric key
- Write the encrypted key and the nonce value to disk into .ulgk, name matching with the encrypted log file
- use quick stream encryption to crypt the .ulg file contents

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Jukka Laitinen
40063bd54b Add libtomcrypt and libtommath submodules
These provide e.g. rsa_oaep, which can be used for sw crypto

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-27 17:45:07 +02:00
Julian Oes
9290ea974e commander: allow force disarming
Allows to do commander disarm -f to disarm no matter what.
2021-09-27 09:58:03 -04:00
Daniel Agar
333f539900 mavlink: add simple incoming message stats to status 2021-09-27 09:48:00 -04:00
Julian Oes
e81214a22f mavlink: avoid double trigger using sequence
By adding the sequence number we can avoid double triggering due to
command retransmissions. This is according to the mavlink spec for
MAV_CMD_IMAGE_START_CAPTURE.
2021-09-25 20:18:07 -04:00
bresch
904ed57aba HTE: decrease sensitivity with speed
VTOL planes are getting lift from the wing when flying in MC mode at
high speed. They (and some other drones) also get extra drag when
climbing and descending at high speed, corrupting the hover thrust
estimate.

To avoid this, two speed thresholds (vertical and horizontal) are defined
above which the sensitivity of the estimator is decreased by linearly
increasing the observation noise.
2021-09-25 20:07:28 -04:00
Beat Küng
1b0bfd6381 dataman: remove nonexisting SYS_RESTART_TYPE param 2021-09-25 19:15:05 -04:00
Daniel Agar
089c962d92 px4io: moving mixing to FMU side
Using mixers on the IO side had a remote benefit of being able to
override all control surfaces with a radio remote on a fixed wing.
This ended up not being used that much and since the original design
10 years ago (2011) we have been able to convince ourselves that the
overall system stability is at a level where this marginal benefit,
which is not present on multicopters, is not worth the hazzle.

Co-authored-by: Beat Küng <beat-kueng@gmx.net>
Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-09-25 19:15:05 -04:00
David Sidrane
f01cab3be1 px4io:Ensure proper lifecycle of registration of cdev 2021-09-24 19:01:54 -04:00
Igor Mišić
9ad0e5b357 mavlink_receiver: updated sens flow parameters to be dynamically handle 2021-09-23 09:23:22 +02:00
Beat Küng
e73172b537 hrt: remove hrt_elapsed_time_atomic
There's no protection on posix
2021-09-23 09:23:08 +02:00
Beat Küng
6f902e54f9 mavlink: correctly lock radio status
- hrt_elapsed_time_atomic is not atomic on posix
- other fields like _radio_status_mult need protection as well
2021-09-23 09:23:08 +02:00
Beat Küng
0bfb1a983b px4iofirmware: avoid using hrt_elapsed_time_atomic
It's only ever read and written in controls_tick() after startup
2021-09-23 09:23:08 +02:00
Igor Mišić
682db4b8ac dshot: timeout if commands are not processed 2021-09-23 09:22:49 +02:00
bresch
e53d2907d7 AutoSmoothVel: adjust controller constraints in emergency braking
When engaging auto mode at high vertical speed, we don't want to cut the velocity
trajectory setpoint in order to create a smooth deceleration.
2021-09-23 09:22:32 +02:00
bresch
316e0dfeb5 AutoLineSmoothVel: add emergency braking mode
Currently only for the Z axis. If the current downward velocity is more
than twice the maximum allowed value, the emergency braking mode is
activated. In this mode, a higher vertical acceleration and jerk is used
until the vehicle stops moving.
2021-09-23 09:22:32 +02:00
Igor Mišić
92696b589f sdp3x: stop continuous measurement while reconfig 2021-09-23 09:22:09 +02:00
Igor Mišić
3a148bc777 camera_trigger: remove camera trigger secondary
camera_trigger: publish trigger when capture feedback is not enabled
2021-09-23 09:21:56 +02:00
Thomas Debrunner
43ece74fa0 ina238: Do not expose raw adc config to user, make specific to ina238 2021-09-22 10:02:17 +02:00
Thomas Debrunner
b8d0bb44c4 ina23X: Support for ina23X power monitors 2021-09-22 10:02:17 +02:00