23894 Commits

Author SHA1 Message Date
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
Daniel Agar
fc1aaa58b2
sensors/vehicle_angular_velocity: fallback sensor selection improvements
- avoid unnecessary filter reset on parameter update
 - additional minor optimizations (precomputing dt inverse, etc)
 - moving filter reset check and dynamic notch filter update checks out of the update loops
     - this were necessary previously when the scale factor wasn't applied prior to filtering the otherwise raw data
2021-11-25 22:44:05 -05:00
PX4 BuildBot
2dffb04d61 Update submodule libevents to latest Fri Nov 26 00:39:17 UTC 2021
- libevents in PX4/Firmware (239f1c4eadc57f12b43b57d704bb80bc07a07841): 5fd19be22d
    - libevents current upstream: 6329c909a7
    - Changes: 5fd19be22d...6329c909a7

    6329c90 2021-11-16 Beat Küng - python: pylint fixes
6251f65 2021-11-16 Beat Küng - events_generated.h.jinja: add '_max' field to generated enums
2021-11-25 21:37:59 -05:00
PX4 BuildBot
ffc52cc2fc Update submodule mavlink to latest Fri Nov 26 00:39:19 UTC 2021
- mavlink in PX4/Firmware (2328402f99b8f8931e4148d033e0b9361407d485): 5309ba449a
    - mavlink current upstream: 28163a3b39
    - Changes: 5309ba449a...28163a3b39

    28163a3b 2021-11-25 Julian Oes - dev: add new message for component capability (#1724)
5534f76b 2021-11-24 olliw42 - adding some missing MAV_TYPEs (#1679)
2021-11-25 21:37:14 -05:00
David Sidrane
58a9bf0b2e sd_bench:Add verify and keep options 2021-11-25 13:11:45 -05:00
Thomas Stastny
8defbc8829 update correct airsp scale param string in ekf2 2021-11-25 11:01:04 -05:00
Matthias Grob
c5fb68b7a1 Commander: force disabling the arm stick gesture when arm switch is in use 2021-11-25 07:56:35 +01:00
David Sidrane
e76dda545c hardfault_log:Fix formatting 2021-11-24 15:00:38 -05:00
Sander Swart
462b572172 Fixed mavlink_ftp read
Instead of always reading the max data length, it now properly respects the requested amount of bytes (as per documentation)
2021-11-24 17:51:29 +01:00
Matthias Grob
ea3b99e964 navigator: Remove deprecated RangeRTL unit tests 2021-11-24 14:10:24 +01:00
Matthias Grob
c522a8b15a Compute RTL time and react if lower than flight time
- Compute RTL time also during RTL
- Calculate correct altitude when finding destination
2021-11-24 14:10:24 +01:00
Matthias Grob
5489005e0b Commander: call battery_status_check on update instead of early return 2021-11-24 14:10:24 +01:00
Jukka Laitinen
5dbbddb13f EKF2: Use _distance_sensor_subs vector directly
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-24 09:11:45 +01:00
Jukka Laitinen
d9498ade32 EKF2: Allocate distance sensor subscriptions as member variables
Just create the subscriptions and keep them, instead of
re-creating them continuously

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-24 09:11:45 +01:00
Beat Küng
312d84ca23 metadata: run json schema validation for actuators + parameter metadata 2021-11-23 12:40:22 -05:00