23908 Commits

Author SHA1 Message Date
Matthias Grob
da2fdf923e battery parameters: allow usage of 1S battery 2021-12-07 21:06:51 +01:00
Daniel Agar
7185bb3243 vmount: output rc simple protections 2021-12-07 13:11:22 +01:00
bresch
c947562183 ekf: get rid of intermediate variable "fuse_height" 2021-12-07 09:16:21 +01:00
bresch
9651f78b0a ekf: centralize the height fusion decision 2021-12-07 09:16:21 +01:00
bresch
d583ef6b79 ekf2: move height fusion code to separate source file 2021-12-07 09:16:21 +01:00
Daniel Agar
01e60e853e navigator: increase stack slightly 2021-12-06 15:10:50 -05:00
Daniel Agar
41378fcef9 ms5611: lower SPI clock 20 MHz -> 16 MHz
- this was necessary to get the secondary ms5611 working reliably on a
particular CubeOrange
 - the sensor is transferring very little data, so lowering the speed by
default everywhere is harmless
2021-12-06 12:51:52 -05:00
Daniel Agar
8cd517f533 dataman: PX4_ERR on create_work_item failure 2021-12-06 10:23:42 -05:00
Daniel Agar
9ab633c18f drivers/imu/invensense: check register bank during probe if necessary
- the WHO_AM_I is only accessible in register bank 0, which might not
be currently selected if the sensor didn't have a clean reset
2021-12-06 10:22:54 -05:00
Daniel Agar
4bf1b46e47 boards: free up flash on crazyflie and omnibus 2021-12-06 09:37:08 -05:00
Daniel Agar
1f6acd0171 parameters: add simple backup and restore mechanism 2021-12-06 09:37:08 -05:00
Daniel Agar
674b92df18 parameters: sleep 10 ms before retrying a failed import/export 2021-12-06 09:37:08 -05:00
Daniel Agar
7bfebf5289 parameters: add param dump to read and decode bson to console 2021-12-06 09:37:08 -05:00
Daniel Agar
7560d45c61 parameters: import tolerate unhanlded BSON types 2021-12-06 09:37:08 -05:00
Daniel Agar
1af068179e parameters: tinybson print errors and count imported types 2021-12-06 09:37:08 -05:00
Silvan Fuhrer
ba1526896d Navigator: VTOL: remove generate_waypoint_from_heading()
The FW Position controller sets the wp to be tracked during a
VTOL front transition, the coordinates sp set here weren't used.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-12-06 16:30:59 +03:00
Matthias Grob
10ceea2fe6 geo: refactoring on comments and usage 2021-12-06 14:30:14 +01:00
Thomas Debrunner
8db7a6225b geo: Moved the map_projection_* functions and state into a self-contained C++ class 2021-12-06 14:30:14 +01:00
Daniel Agar
fe23718e2c drivers/gps: require valid device to start 2021-12-06 08:44:50 +01:00
Daniel Agar
58421f2edc
Update submodule GPS drivers to latest Fri Dec 3 12:38:58 UTC 2021
- GPSDrivers in PX4/Firmware (3e0d06c65167c0bd79c193ea75ca5c7959053ff7): bd72eb6794
    - GPSDrivers current upstream: d6940d9c8c
    - Changes: bd72eb6794...d6940d9c8c

    d6940d9 2021-12-02 alexklimaj - Update F9P moving base with direct UART2 connection
    eb0cb58 2021-11-25 sebastian - always using groundspeed for vel_m_s in ubx driver
    0408160 2021-11-18 alexklimaj - Remove extra UART1 baudrate set
2021-12-05 19:23:07 -05:00
Daniel Agar
10f2564ae8 systemcmds/tests: dataman test use proper signed type for dm_read() return 2021-12-05 18:08:54 -05:00
Daniel Agar
37c1598f38 boards: cubepilot_cubeorange enable calib_udelay and run on test rack 2021-12-05 14:50:03 -05:00
PX4BuildBot
aae794965a [AUTO COMMIT] update change indication 2021-12-05 11:03:58 -05:00
PX4 BuildBot
4478877820 Update world_magnetic_model to latest Sun Dec 5 11:14:12 UTC 2021 2021-12-05 11:03:58 -05:00
Matthias Grob
4e3d944f58 mixer_module: typo con(s)tructor 2021-12-03 07:40:23 +01:00
Daniel Agar
2190f66096 sensors/vehicle_magnetometer: add SENS_MAG_AUTOCAL to enable initial auto cal 2021-12-01 20:24:56 -05:00
Daniel Agar
8fbf79527f magnetometer allow setting initial calibration from bias if available and stable 2021-12-01 20:24:56 -05:00
Daniel Agar
b7efd4f947
ekf2: selector treat combined test ratio > 1 as a warning
* ekf2: selector treat combined test ratio > 1 as a warning
* ekf2: wait for 1s of constant warning to trigger an instance switch

Co-authored-by: bresch <brescianimathieu@gmail.com>
2021-12-01 20:22:34 -05:00
Matthias Grob
89892d0d17 px4io: discover PWM_MAIN_TRIMx parameters right away 2021-12-01 20:21:26 -05:00
Julian Oes
a9b9362fea commander: handle system broadcast commands
This changes the command handling logic to accept commands which are
targeted at any system, signaled by target_system set to 0.
2021-12-01 20:17:35 -05:00
Peter van der Perk
ce10dd90e7 Remove ucannode_gps_demo since it's superseded by uavcan_v1 2021-12-01 09:29:15 -05:00
Peter van der Perk
ce909b23b1 UAVCANv1 Node implementation work, PNP, Registers and uORB publisher 2021-12-01 09:29:15 -05:00
Jukka Laitinen
79aa8ee587 src/drivers/sw_crypto: Fix a function call argument type mismatch
Fix one function call argument from unsigned -> size_t

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-12-01 09:28:02 -05:00
Jukka Laitinen
9c94e4c5ef crypto: define XMALLOC & XFREE for sw_crypto
Use the same memory allocation in sw_crypto driver as what is used in
src/lib/crypto libraries

In addition, in nuttx protected build, allocate all memory from kernel heap

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-12-01 09:28:02 -05:00
alexklimaj
2571860ff8 Prevent uavcannode from republishing RTCM data received over uavcan 2021-12-01 09:27:11 -05:00
David Lechner
a29820bdf8 gps: fix compiling on mac
This fixes the following compile error on Mac:

    src/drivers/gps/gps.cpp:562:23: fatal error: use of undeclared identifier 'B921600'
            case 921600: speed = B921600; break;
                                ^
2021-12-01 09:25:40 -05:00
alexklimaj
bfd5a90a5d UAVCAN Moving Baseline Working
Set uavcan publisher priorities

Switch to ardupilot rtcm message and add heading accuracy
2021-11-30 15:59:08 -05:00
Matthias Grob
b59db7dac2 rtl_params: change default and max rtl time margin 2021-11-30 19:46:22 +01:00
Matthias Grob
55dfbdc6a6 Commander: fix remaining flight time user messaging 2021-11-30 19:46:22 +01:00
David Jablonski
4f88c200ec vmount: fix gimbal_manager_status 2021-11-30 19:35:22 +01:00
Thomas
9345f68a93 reapply PR 18614 to refactored FlightTaskAuto 2021-11-30 14:52:16 +01:00
Julian Oes
01db98fccf vmount: fix RC pitch input scale
When scaling manual input, we should only use pitch -90 to +90 instead
of -180 to 180 degrees which leads to weird behavior as it gets passed
on by a quaternion.
2021-11-30 07:50:20 +01:00
David Sidrane
ade7315e9b sd_bench:Missing free 2021-11-29 16:01:08 -05:00
Jukka Laitinen
c2cbab1e98 Improve stub_keystore configuration
It is possible to either set the keyfile locations in board configuration or
with the same environment variables as before.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-29 11:09:51 -05:00
Jukka Laitinen
929820136a Move sw_crypto and stub_keystore under src/drivers
This is more logical place for the "backend" implementation than
directly under platform.

This also allows making other implementations as "real" drivers, as well as proper configuration via Kconfigs

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-29 11:09:51 -05:00
Daniel Agar
bb562a6d10 mavlink: unify find_broadcast_address logic
- remove NuttX special handling
2021-11-29 09:08:42 -05:00
PX4 BuildBot
5440802aae Update submodule libcanard to latest Sat Nov 27 12:38:19 UTC 2021
- libcanard in PX4/Firmware (748cbbe79a4f91f472207b8d12e1d01e486a82ab): 2a11617028
    - libcanard current upstream: 2d449453fc
    - Changes: 2a11617028...2d449453fc

    2d44945 2021-09-18 Kalyan Sriram - Fix sonarcloud issues (#181)
d64f82f 2021-09-13 Kalyan Sriram - WIP: Migrate to Github Actions (#174)
2021-11-27 11:11:29 -05:00
Julian Oes
7ddf43b443 mavlink_ftp: fix tests on Nuttx
On Nuttx we have an additional check whether the directory is accessible
to check if we are trying to write to storage that is not on the SD
card. This returns the FileProtected error whereas on Linux this just
ends up being a FileNotFound.

The ifdefs around this issue are not pretty but the alternatives of
either removing the tests for /bogus folders, or removing the additional
check on the NuttX side don't seem better either.
2021-11-26 15:50:28 -05:00
Julian Oes
7c90b06628 mavlink_ftp: fix tests after implementation fix
In commit 462b5721721122c94bc7a3c43ae7f37c41ee625d the reading operation
on the PX4 side was changed to only read as many bytes as requested
rather than however many fit in the payload data.

This caused the unit tests to fail which this commit here aims to fix.

What is confusing about MAVLink FTP is that there is a size field which
generally signals how many bytes of the payload data are used/set.

However, in the case of a read requst, the size field is used to
indicate how many bytes should be read. The payload data is empty in
that case though.

This case was, from how I understand it, not implemented/tested in the
unit tests and now failed. In order to implement it I had to change a
few things:
- Change _setup_ftp_msg and _send_receive_msg so that the params contain
  a data length rather than the size field. The size field itself needs
  to be set outside of these methods using payload->size.
- Since we test files smaller, equal, and bigger than one payload data
  length, I implemented that we send multiple read requests until we
  have the whole file and not just the first part.
- Additionally, I saw a lot of uninitialized warnings in valgrind, and
  got rid of them by adding a few zero initializations.
2021-11-26 15:50:28 -05:00
Silvan Fuhrer
3a9eef658c Commander: remove preflight check for transition switch
This check enforced setting a VTOL transition switch if an RC as used on a VTOL.
It comes from a time when the only way to transtion was through the RC switch,
whereas now we have also a mavlink message in place for it, so enforcing it is
no longer needed.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-26 11:37:40 +01:00