Commit Graph

38183 Commits

Author SHA1 Message Date
Daniel Agar 52fccb1e75 github actions decrease ccache max_size selectively 2021-10-06 09:28:27 -04:00
Daniel Agar d002002ceb github actions increase ccache compression level 2021-10-06 09:28:27 -04:00
Daniel Agar ddd1dea4f0
ekf2: avoid uint64 timestamp conversion to float 2021-10-06 09:27:06 -04:00
Daniel Agar dc1b423721 drivers/imu: ensure timestamp_sample adjustment isn't done as float
- larger HRT timestamps can't be represented exactly when cast to float
2021-10-06 09:26:26 -04:00
Julian Oes 6b8840a01b commander: fix switch to ALTCTL when RC regained
This fixes the case where we sometimes switch to altitude control
instead of position control when RC is regained.

What happens is that we detect that the pilot wants to take over control
right when RC comes back. This means that we try to go in position
control in main_state_transition, however, we are already in position
control because we come back from the failsafe state. The result of
main_state_transition is then TRANSITION_NOT_CHANGED, and therefore we
"fall back" to altitude control even though being already in position
control would have been fine.

This fix checks the return result of main_state_transition correctly and
only reacts to TRANSITION_CHANGED and TRANSITION_DENIED but ignores
TRANSITION_NOT_CHANGED.
2021-10-06 10:30:08 +02:00
Daniel Agar 51758bd7e6
boards: delete unused variants 2021-10-05 23:14:04 -04:00
Daniel Agar 3570e5a4f0
boards: cuav_nora_test disable attitude_estimator_q to save flash 2021-10-05 20:43:43 -04:00
Silvan Fuhrer 2dca51216c vtol: change message for transition timeout warning
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-05 18:19:33 -04:00
Silvan Fuhrer bdc57178d4 Tailsitter: add add transition timeout (abort transition after VT_TRANS_TMEOUT, Quadchute)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-05 18:19:33 -04:00
Silvan Fuhrer 1a1bb2629d tiltrotor: add transition timeout (abort transition after VT_TRANS_TIMEOUT, Quadchute)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-05 18:19:33 -04:00
Daniel Agar 02aed782e3
boards: px4_fmu-v6x_default disable sd_stress to save flash 2021-10-05 18:17:22 -04:00
Daniel Agar beb358a344 px4_work_queue: adjust status formatting to accommodate longer names (eg mc_autotune_attitude_control) 2021-10-05 18:09:00 -04:00
Silvan Fuhrer 98c7f664c1 FW Position control: add roll slewrate also in manual Position flight mode
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-05 18:06:49 -04:00
Matthias Grob 2edd97102b Sticks/StickYaw: refactor to use constructor properly 2021-10-05 18:05:54 -04:00
Matthias Grob 0cc13f0799 FlightTaskAutoMapper: add horizontal and yaw nudging during final descent 2021-10-05 18:05:54 -04:00
Matthias Grob bb9f167d79 StickAccelerationXY: add reseting position to specified coordinates 2021-10-05 18:05:54 -04:00
Daniel Agar 578d57a060
Jenkins: hardware disable sd_stress temporarily
- currently failing intermittantly when run on the test rack
2021-10-05 17:55:52 -04:00
Daniel Agar b4d33a36f8
boards: px4_fmu-v6x_default disable examples/fake_gps to save flash 2021-10-05 17:11:47 -04:00
Daniel Agar 2b9ebb7ed6
boards: holybro_kakutef7 disable systemcmds/work_queue to save flash 2021-10-05 17:10:30 -04:00
Thomas Stauber 983dd4db29
don't switch to SETPOINT_TYPE_LOITER during transitions (#18350) 2021-10-05 14:40:14 +02:00
Julian Oes 75b8e11b90 commander: make LAND failsafe stick
By default we would leave the LAND failsafe as soon as a link comes
back. With this change, we switch to the LAND failsafe like a proper
mode change, immediately disabling the failsafe as such.
This is as the same that is done for RTL in fact.

This is not optimal but a workaround for the problem where we switch out
of failsafe right on landing and then discover takeoff again and start
looping through it again and again without ever disarming.
2021-10-05 14:02:22 +02:00
Daniel Agar 896ad3a627
cmake: fix find_program ozone 2021-10-04 18:27:50 -04:00
Daniel Agar a519916d79 systemcmds/sd_stress: return -1 on FAIL 2021-10-04 17:38:31 -04:00
Daniel Agar c271a9e3e6 add sd_stress to all boards and run on test rack 2021-10-04 17:38:31 -04:00
Julian Oes 397b1ed8d6 Add sd_stress command 2021-10-04 17:38:31 -04:00
Julian Oes 4701a513c2 mavlink: fix errno for rename 2021-10-04 17:38:31 -04:00
Julian Oes 59b56dd06f mavlink: add more error messages 2021-10-04 17:38:31 -04:00
Julian Oes 74b2fe326d mavlink: don't (mis)use errno as global variable
I think it was not the best idea to use errno as a global variable to
keep track of the error code. I saw the errno change from where it was
set to where it was actually used, maybe because part of it is called in
the receive thread and part in the regular update/send() thread.

To be safe, I just created a class variable instead.
2021-10-04 17:38:31 -04:00
Julian Oes 96388f07fd mavlink: improve debugging around MAVLink FTP
- Remove ifdefs with MAVLINK_FTP_DEBUG and use PX4_DEBUG instead
- Add a couple of more PX4_DEBUG lines
2021-10-04 17:38:31 -04:00
Daniel Agar c35f68b49d boards: px4_fmu-v5 sync UAVCAN_TIMER_OVERRIDE across all variants 2021-10-04 15:27:15 -04:00
Daniel Agar 00b15798da Tools/HIL/run_tests.py - temporarily disable flaky dataman test until it can be reviewed 2021-10-04 12:54:01 -04:00
Daniel Agar 1325b9c876 Jenkins: hardware retry checkout if necessary 2021-10-04 12:54:01 -04:00
benjinne 413e15d083 Add vscode cmake-variant for px4_sitl_rtps 2021-10-04 11:58:26 -04:00
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 1443f773da mbe: add module to targets 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 b99dbcc6a7 ModuleDocumentation: add autotune categorie 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 cd61065aea sitl: start MC autotune module 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