38082 Commits

Author SHA1 Message Date
Jukka Laitinen
8497dbb2b5 Add a generic nuttx hrt driver userspace interface
This adds a nuttx userspace interface for hrt driver, communicating with
the actual hrt driver upper half via BOARDCTL IOCTLs

This is be used when running PX4 in NuttX protected or kernel builds

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-23 13:57:31 +03:00
Jukka Laitinen
8bb6cc07de hrt: Add interface functions for latency counters
Add interface functions for fetching latency buckets and counters and use
those in perf_counter.cpp. This cleans up the usage of perf counters and
enables implementing kernel-userspace interface for those for
nuttx protected/kernel build.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-23 13:57:31 +03:00
Jukka Laitinen
f43b9fe5d6 platforms/common/shutdown.cpp: Enable boardctl functions for shutdown and poweroff
Shutdown and poweroff must go through boardctl in NuttX protected build

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-23 13:57:31 +03:00
Jukka Laitinen
340c765a14 logger/watchdog: Disable watchdog for NuttX protected/kernel builds
It accesses kernel internal structures directly; this needs to be
worked out with some proper userspace-kernel interface

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-23 13:57:31 +03:00
Jukka Laitinen
fceb4eaa3f uORB: Change cpuload topic int vehicle_cpuload
This avoids clashes with NuttX cpuload_s datatype.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-23 13:57:31 +03:00
Jukka Laitinen
fc6b2d8122 loadmon: Stub away cpuload() for nuttx protected build
CPU load monitoring needs to be in kernel, and some proper interface
to be used in here

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-23 13:57:31 +03:00
Jukka Laitinen
d17fa568d0 px4 posix: print_load.cpp: Fix build error when building on nuttx
This could be further developed to work also on nuttx in protected/kernel builds

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-23 13:57:31 +03:00
Jukka Laitinen
68a4c31a76 Add nuttx userspace reset and reboot request functions
Add functions for reset and reboot, which can be called
from user space in nuttx kernel and protected build

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-23 13:57:31 +03:00
Jukka Laitinen
c3992634f1 Add a separate library for initializing px4 userspace in protected build
The px4_userspace_init function in this library is called from userspace
entrypoint before starting NSH

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-23 13:57:31 +03:00
Jukka Laitinen
df0b740710 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>
2021-09-23 13:57:31 +03:00
Jukka Laitinen
4def01178d Fix px4_impl_os for protected build
For NuttX protected or kernel build, the prebuilds can't contain libraries which are
different for kernel and user-space in protected/kerenl builds

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-23 13:57:31 +03:00
Jukka Laitinen
81f24b0a27 px4_fmuv5: Remove BOARD_INDICATE_EXTERNAL_LOCKOUT_STATE in protected/kernel build
Gpios are not directly accessible from userspace, so it should not be
controlled from within Commander directly

There is a need for a proper userspace interface via /dev/leds or such

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-23 13:57:31 +03:00
Jukka Laitinen
69fc3cbde0 NuttX Cmake changes to build combined kernel+userspace image in nuttx protected build
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-23 13:57:25 +03:00
Jukka Laitinen
08f83367ac Add linker scripts for kernel-userspace split
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-22 13:19:47 +03:00
Jukka Laitinen
7c94bc8f02 Add kernel/userspace and nuttx_syscall libraries to build
Build NuttX proxies, stubs and separate user space and kernel space libraries

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-22 13:19:47 +03:00
Jukka Laitinen
169eb616c6 Add px4_fmu-v5_protected target
Add a target for nuttx protected build development

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-22 13:19:42 +03:00
Hamish Willee
f41e5985e8 vehicle_local_position: clarify origin of system 2021-09-22 10:14:23 +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
Daniel Agar
cf5da66e9f Jenkins: hardware disable gyro auto cal and FFT before running tests 2021-09-21 19:13:30 -04:00
Daniel Agar
87db18c1a0 Jenkins: hardware don't allow board cleanup commands to fail build 2021-09-21 19:13:30 -04:00
Daniel Agar
a92e44c90e Tools/HIL/run_nsh_cmd.py: echo success cmd twice to avoid missing dropouts 2021-09-21 19:13:30 -04:00
Julian Oes
faca2b17d0 camera_trigger: only get param if available 2021-09-17 12:23:30 +02:00
Daniel Agar
7af5a33ff3 commander: don't play failsafe tune if disarmed 2021-09-16 09:17:00 -04:00
Matthias Grob
ecb1264832 vscode: do not disable autocomplete on enter 2021-09-16 09:11:52 -04:00
Julian Oes
c779946e05 setup: Use available Java version for Ubuntu 20.04
14 was not available for me, 16 would have been.
2021-09-16 13:59:27 +02:00
Julian Oes
addb978364 setup: Let's not ignore errors
Otherwise the script finishes and you don't know if it worked.
2021-09-16 13:59:27 +02:00
Daniel Agar
3d56836850
boards: nxp_fmurt1062-v1 disable extra barometers to save flash 2021-09-15 12:59:36 -04:00
Thomas Stauber
2b80a6958a
fix disable airspeed check with negative ASPD_FS_INTEG (#18186)
* fix disable airspeed check with negative ASPD_FS_INTEG

* improve logic when nav velocity data is not good

* simplify logic. Reset integrator state when the check is not run.
2021-09-14 12:13:56 +02:00
Matthias Grob
e7a90bf367 PositionControl: correct horizontal margin calculation
It was using the already reduced vertical thrust to do
the horizontal limitation resulting in no margin.
2021-09-14 10:57:38 +02:00
Matthias Grob
d1f1e02afb Refactor mode button changes 2021-09-14 09:52:32 +02:00
Claudio Micheli
05d40f40d4 Handle rc toggle mode buttons to initialize flight modes
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-09-14 09:52:32 +02:00
Claudio Micheli
c50daae4a3 rc_update: introduce support for toggle buttons via RC channels
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-09-14 09:52:32 +02:00
Daniel Agar
ca2d8f6de2
Update submodule simulation-ignition to latest Tue Sep 14 00:39:01 UTC 2021 2021-09-13 21:09:50 -04:00
Daniel Agar
e6552370ab imu/invensense: adjust scheduling dynamically if not using data ready interrupt 2021-09-12 17:34:35 -04:00
Claudio Micheli
fa4fc5f347 esc_report: change esc_temperature field to allow negative values
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-09-11 15:14:49 -04:00
David Jablonski
7d7200cf2f Added yaw to CMD_DO_SET_HOME 2021-09-11 15:14:01 -04:00
Hamish Willee
ce206d992b
RC_FAILS_THR and RC_MAP_FAILSAFE improve parameter description 2021-09-11 15:12:54 -04:00
Daniel Agar
212898ff42
Makefile: fix submodulesupdate 2021-09-11 15:10:56 -04:00
Beat Küng
810d2e9497 ModuleParams: remove parent in destructor
This allows for dynamic deletion of children objects (in most cases this
is not used).

Uses ~100B memory.
2021-09-11 15:07:49 -04:00
bresch
f09b34007e CA: reload CA matrix to newly created CA class properly
Also remove the dependency of ActuatorEffectivenessMultirotor
to param update uORB topic; the CA module
sends a "force" parameter when needed
2021-09-11 15:07:49 -04:00
bresch
cf5917d188 control_allocator: restructure param update
recompute effectiveness on param change
clear update at the end
2021-09-11 15:07:49 -04:00
David Jablonski
9d974062d0 replay: improved logging for format mismatchs 2021-09-11 14:37:52 -04:00
Beat Küng
bf48057090 px4/fmu-v2_test: disable modules to reduce flash 2021-09-11 14:08:41 -04:00
Beat Küng
946857ddf7 px4/fmu-v6x: disable modules to reduce flash 2021-09-11 14:08:41 -04:00
Beat Küng
673de86553 cubepilot/cubeorange: disable system_time and motor_ramp to reduce flash 2021-09-11 14:08:41 -04:00
Beat Küng
759d03e5f9 nxp/fmurt1062-v1: disable modules to reduce flash 2021-09-11 14:08:41 -04:00
Beat Küng
ce747fac62 cuav/x7pro: disable modules to reduce flash 2021-09-11 14:08:41 -04:00
Beat Küng
3e899564d4 cuav/nora: disable some modules to reduce flash 2021-09-11 14:08:41 -04:00
Beat Küng
c49e78cbac holybro/durandal-v1: disable modules to reduce flash 2021-09-11 14:08:41 -04:00