Commit Graph

39876 Commits

Author SHA1 Message Date
mcsauder e554f0174d Format whitespace and group checkall() methods together in geofence class. 2022-01-31 21:01:03 -05:00
Matthias Grob ae0bb8371d Commander: message planned battery action with warning together 2022-01-31 20:27:06 -05:00
Matthias Grob 973116c7a4 commander_params: clarify failsafe delay procedure description 2022-01-31 20:27:06 -05:00
Matthias Grob cd560da57c Commander: correct battery failsafe message severity level 2022-01-31 20:27:06 -05:00
Matthias Grob 405852b5c8 Commander: only disallow RC override during battery failsafe delay 2022-01-31 20:27:06 -05:00
Matthias Grob 5ec21835a4 Commander: ensure low battery failsafe flying unatended without GPS 2022-01-31 20:27:06 -05:00
Matthias Grob 1911ec0085 Commander: fix user messageing for low battery failsafe delay 2022-01-31 20:27:06 -05:00
Matthias Grob 52a9040c62 BatterySimulator: recharge battery upon disarming 2022-01-31 20:27:06 -05:00
Matthias Grob 955aad0dfb Commander: consistent hysteresis initialization 2022-01-31 20:27:06 -05:00
Matthias Grob d10f9030ad Commander: add delay before executing low battery failsafe action 2022-01-31 20:27:06 -05:00
Matthias Grob 3af315f2c3 Commander: change battery failsafe to return action instead of executing 2022-01-31 20:27:06 -05:00
Matthias Grob 8eed43b515 Commander: put battery warning and failsafe action in separate functions 2022-01-31 20:27:06 -05:00
Matthias Grob 367b6123e1 state_machine_helper: change main state directly also for low battery RTL 2022-01-31 20:27:06 -05:00
Matthias Grob f49bd9956b state_machine_helper: reuse battery action conditions 2022-01-31 20:27:06 -05:00
Matthias Grob 95b5bc0d84 state_machine_helper: separate low battery warning from action 2022-01-31 20:27:06 -05:00
Jukka Laitinen 70872d94c8 Split px4_layer into kernel and userspace parts for nuttx protected build
Split the px4_layer into user and kernel space libraries. Add some stubs for
user-space (e.g. version) where an interface to the kernel needs to be added

Use posix-versions for cpuload.cpp and print_load.cpp for userspace; these link to nuttx internals. This functinality could be built on top of posix (e.g. procfs) interfaces

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-31 20:26:08 -05:00
Jukka Laitinen 3a6ebe5fc1 NuttX Cmake changes to build combined kernel+userspace image in nuttx protected build
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-31 20:26:08 -05:00
Jukka Laitinen 1f9ace3901 boards/px4/fmu-v5: Add linker scripts for kernel-userspace split
These scripts are used in protected build configuration

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-31 20:26:08 -05:00
Daniel Agar 999737ddd5
ekf2: refactor mag control
- remove class _mag_sample_delayed
 - update mag fusion call graph to use mag sample delayed functionally
 - Ekf::resetMagHeading()
   - use low pass mag directly, but check if valid (magnitude)
   - MAG_FUSE_TYPE_INDOOR treat like auto if heading required
2022-01-31 11:47:10 -05:00
Daniel Agar ad447ab223 commander: respect control mode for prearm requirements
- preflight tolerate ekf2 warnings if not in an attitude/velocity/position mode (eg manual or acro)
2022-01-31 09:48:37 -05:00
Daniel Agar 90358f078f add odometry reset counter (ekf2, mavlink, etc) 2022-01-31 09:19:36 -05:00
mcsauder 463ac8e8a1 Standardize method name style in navigator_main.cpp and whitespace formatting in navigator.h 2022-01-29 21:36:11 -05:00
PX4 BuildBot 3862a24b8e Update submodule sitl_gazebo to latest Sat Jan 29 00:39:00 UTC 2022
- sitl_gazebo in PX4/Firmware (3b277667ff): 831aa36fea
    - sitl_gazebo current upstream: 2750fe233c
    - Changes: 831aa36fea...2750fe233c

    2750fe2 2022-01-24 Jaeyoung-Lim - Improve realtime factor for standard_vtol
2022-01-28 22:56:51 -05:00
murata 3b277667ff tfmini: If the distance is 0xFFFF, a negative value is returned 2022-01-28 17:31:12 -05:00
Daniel Agar 274d0d65c6 lib/cdev/posix: increase max FDs 256->512 2022-01-28 17:30:53 -05:00
Jukka Laitinen 058302ecdb Link px4iofirmware against nuttx_mm
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-28 17:30:13 -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 91b812fc42

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-28 17:30:13 -05:00
Jukka Laitinen a2dc6e63cf Fix sdcard logging when crypto is used but algorithm is set to NONE
If the board supports encrypting logfiles, but the parameter SDCARD_ALGORITHM is set to NONE,
the log should be written to the sdcard in plaintext format. This fixes a bug which caused
logger to hang in mutex instead.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-28 17:29:51 -05:00
Daniel Agar 0104b84289 logger: PX4_SITL log all ekf2 publications at full rate for replay 2022-01-28 07:46:54 +01:00
Daniel Agar d2ce9a8560 ROMFS: rc.replay fix ulog_params argument 2022-01-28 07:46:54 +01:00
Jukka Laitinen 70704ff9d6 platforms/nuttx/src/px4/common/CMakeLists.txt: Link px4_layer to nuttx_mm for gran allocators
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 4c75f1d505 platforms/nuttx/CMakeLists.txt: fixes to accommodate other linker changes
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -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 705171eb53 Fix linking for posix targets
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 138f584e70 fw_pos_control_l1: Add a missing dependency to motion_planning
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 4c3234af38 mavlink: fix linking
- link to nuttx_apps if CONFIG_NET is defined for "netlib_get_ipv4netmask"
- link to tunes

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen e959fcf9d1 bootloader: link stm bootloaders to nuttx_arch for flash functions
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen fe5059b0e8 s32k1xx/led_pwm: link to arch_io_pins
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 1326c51a1c esc_battery: Link to battery library
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 03c0a2d56c Fix some cmake / linker depenencies for boards
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 700c13cdff Remove linking of arch_io_pins into drivers_board
This goes the other way around; arch_io_pins is using the pin
definitions from drivers_board, so the drivers_board needs to be linked
into arch_io_pins

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 68729e8ec0 nuttx/rpi io_pins: link to drivers_board for timer_io_channels dependency
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen d181fe0cee nuttx/stm io_pins: link to drivers_board for timer_io_channels dependency
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 76d4b6c7d0 arch_board_reset: link to nuttx_arch / nuttx_karch for up_systemreset dependency
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 7bb33e65ae Remove px4_work_queue linking to px4_platform
Remove linking to px4_plaform in here; this breaks linking for nuttx protected build

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 98906c224b Don't link px4_platform directly to uORB
Since uORB is split into kernel and userspace parts, it is no longer possible to just
link uORB into px4_platform, which is used in both kernel and user side.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 54f1e12684 Link arch_spi with drivers_board
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Jukka Laitinen 51ceb9a85e Add support for compiling modules into kernel side
Define __KERNEL__ macro during compilation and place the module in separate library

Remove default library linking to m or libc on NuttX. Add these in platform layer instead, since
they are different on kernel and user side

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00