694 Commits

Author SHA1 Message Date
Beat Küng
f962e9826b param_export: reduce bson buffer size from 512 to 256
Some modules call this (and maybe in rare circumstances), which could lead
to stack overflows. With our current headroom of >= 300bytes, 256 should
be ok.

This increases the export time from ~28ms to ~34ms in my case (on a
Pixracer)
2018-01-10 22:03:14 +01:00
Lorenz Meier
3d9cd5c0bc Params: Ignore volatile 2018-01-08 17:01:02 +01:00
Lorenz Meier
48af6b6d61 System: Mark reset state param as volatile 2018-01-08 09:27:22 +01:00
Lorenz Meier
501dd82aaf Systemlib: Move circuit breaker into Developer category 2018-01-08 09:27:22 +01:00
Lorenz Meier
7f12f4ae9b Params: Switch level to category and move it to attribute along with volatile
This makes it easier for QGC to parse.
2018-01-08 09:27:22 +01:00
Lorenz Meier
55e0588661 Eagle: Update to latest param message 2018-01-08 09:27:22 +01:00
Lorenz Meier
ac5f856d2d Param parser and XML output: Add support for volatile attribute
This allows to mark parameters as volatile.
2018-01-08 09:27:22 +01:00
Lorenz Meier
7695f79239 Parameters: Add support for volatile parameters
Volatile parameters are ones that do not represent a fundamental configuration change but rather than incrementally changing settings. These include logged flight hours or sensor offsets. Marking them as volatile avoids these parameters forcing time-consuming telemetry updates.
2018-01-08 09:27:22 +01:00
Lorenz Meier
fb3c58d85f Param interface: Publish instance count
This helps subscribers to understand if they should update their parameters or not. We will extend this with other flags such as the current save status and alike.
2018-01-08 09:27:22 +01:00
Lorenz Meier
bf48a35882 Systemlib: Introduce volatile and level tags for parameters 2018-01-08 09:27:22 +01:00
Matthias Grob
70de169f15 Cygwin: Enable build of SITL jMAVsim under Windows using the Cygwin Unix-like environment
Most of the incompatitbilities are luckily similar to the darwin build.
- New target OS __PX4_CYGWIN added because in other build environments on Windows defines will very likely be completely different
- added all necessary exeptions to the defines
- disabled priorities completely because on Windows they are defined 1-32 and with all the arbitrary +40 -40 priority settings there were a lot of problems
  not only did some threads/"virtual tasks" not start because of out of bound priorities but also the resulting scheduling was totally random and inadequate
  with default priorities it ran toally fine during my first tests, should be rethought when windows is used onboard in the future
2018-01-05 14:47:33 -05:00
Daniel Agar
430cdada60 param_export use bson encoder buffer 2018-01-04 09:21:17 +01:00
Daniel Agar
08443c0bfc params add param_find perf counter 2018-01-04 09:21:17 +01:00
Daniel Agar
641129ad4e param add perf counters 2018-01-04 09:21:17 +01:00
Hamish Willee
6bb3e65d23 Make non-wrapping/scrolling table 2017-12-03 14:10:50 +00:00
Hamish Willee
c551496a41 Stop parameter names from wrapping in markdown table 2017-12-03 14:10:50 +00:00
Florian Achermann
a5cc4bcd08 Update SDP3x Airspeed Correction (#8242)
Update the model for the standard configuration based on the model from Sensirion and add also an option to do the tube pressure loss correction from Sensirion for other configurations.
2017-11-22 22:03:26 -05:00
Daniel Agar
85a7a0a86a parameters.xml sort parameters by name, sort enums by value 2017-11-22 13:42:54 -05:00
Daniel Agar
fc80846825 simplify param scoping and centralize dependencies 2017-11-22 10:36:51 +01:00
Julien Lecoeur
89642a9203 Move src/module/systemlib/mixer to src/lib/mixer 2017-11-15 09:56:10 +01:00
Julien Lecoeur
d46c37be79 Mixers: raise exception when geom file is incomplete
pylint format
2017-11-15 09:56:10 +01:00
Julien Lecoeur
cb8d951a7e Mixers: add geoms quad_vtail (tilted props) and quad_y (rear coax props)
quad_vtail: reverse prop direction (same quad_h) to combine yaw torque induced by propellers and yaw torque induced by tilted rotors.
2017-11-15 09:56:10 +01:00
Julien Lecoeur
3e35dcb7dd Mixers: Use geometry of SK450 deadcat for both quad_wide (centered CG) and quad_deadcat (off-centered CG) 2017-11-15 09:56:10 +01:00
Julien Lecoeur
758d214dd1 Mixers: Add geometries
Mixers: add quad_x, quad_h, quad_plus

Mixers: add quad_deadcat

Set quad_deadcat.toml according to dimensions of SK450 deadcat

Mixers: add hex_x, hex_plus, hex_cox and hex_t

Mixers: add geoms octa_x, octa_plus, octa_cox

Mixers: add wide geoms

Mixers: add tri_y and twin_engine geoms

Mixers: add dodeca geoms

Mixers: Add geom quad_x_pusher
2017-11-15 09:56:10 +01:00
Julien Lecoeur
2c4228ce98 Mixers: generate all versions (new,normalized,6dof,legacy) 2017-11-15 09:56:10 +01:00
Julien Lecoeur
99f6c4dbc3 Mixers: Generate from geometry description files
Mixers: List geom files in CMakeLists.txt

Mixers: add option to normalize like legacy script

Fix py2 compatibility
2017-11-15 09:56:10 +01:00
Julien Lecoeur
4991ab5362 Mixers: use key list to select multirotor mixer 2017-11-15 09:56:10 +01:00
Beat Küng
8a693fa13d param: undefine CHECK_PARAM_TYPE after it's used 2017-10-27 10:43:15 +02:00
Beat Küng
c35b0aa270 param: redefine type-safe versions for param_get() when used in C++ code 2017-10-27 10:43:15 +02:00
Beat Küng
30bc248138 rc_check: cleanup mavlink log messages 2017-10-13 15:50:37 +02:00
acfloria
9d2da611f6 Fix mixer issue with undefined return in callback and non value initialized variables. 2017-10-12 12:03:22 +02:00
Dennis Mannhart
8a0a8e20e1 mc_pos_control: use correct altitude as limit
fadfdasf
2017-10-10 10:28:07 +02:00
Dennis Mannhart
115e7246b0 battery: only propagate warning state in upwards 2017-10-10 10:28:07 +02:00
Bart Slinger
adba797323 Helicopter mixer scale throttle to -1 .. +1
Not sure why it worked for me without this change. I cannot test it myself. Should fix https://github.com/PX4/Firmware/issues/8013
2017-10-07 10:59:18 +02:00
Daniel Agar
2113772443 improve nuttx verbose build 2017-09-29 10:13:51 -04:00
David Sidrane
24eb56aa27 battery:Only change the warning level on a connected battery.
Connected is assumed when the battery voltages is greater than
   a predefined level.
2017-09-29 10:13:51 -04:00
Daniel Agar
474f216a0a UAVCAN bootloaders split into separate repository (#7878) 2017-09-29 10:13:51 -04:00
Daniel Agar
01b3e6fd25 NuttX upgrade cmake wrapper (#7873)
* NuttX cmake

* px4_macros:Pass the stringified predicate as second arg to static assert

   CC_ASSERT mapes to the c++ static_assert or provides the same
   funtionality for c via the other macros. The c++ static assert
   takes 2 argumants the prdicate and a message. This fixes the
   lacking second argument.

* Updated nuttx and apps submodule to upstream nuttx 7.21+==master

   This is the latest uptake of upstream nuttx and apps.

* ROMFS generate with xxd instead of objcopy

* delete nuttx-patches

* NuttX update submodules to latest px4_nuttx-master

* fix nuttx apps and board dependency

* docker_run update to latest container 2017-08-29

* cmake ROMFS portable sed usage

* NuttX update submodules to latest px4_nuttx-master
2017-09-29 10:13:51 -04:00
David Sidrane
906d7e7acd Using Upstream NuttX up_cxxinitialize from app/platform/gnu
was:<nuttx/arch.h> is:platform/cxxinitialize.h
   Removed PX4 version:src/modules/systemlib/up_cxxinitialize.c
   in favor of nuttx platform/gnu/gnu_cxxinitialize.c
2017-09-29 10:13:51 -04:00
David Sidrane
187482c1ba flashfs uses Upstream NuttX's new struct packing 2017-09-29 10:13:51 -04:00
David Sidrane
6669aa058d hardfault_log should has hal
remove stm32_bbsram.h and use px4_config.h
2017-09-29 10:13:51 -04:00
Andreas Antener
4ea49242d3 SDP3x pitot compensation: fixed the compensation and protect agains negative compensation values 2017-09-19 09:01:11 -07:00
Lorenz Meier
b59aefc989 Airspeed measurement: Add accurate models for dynamic pressure
This allows to get very accurate readings from the SDP3x sensor series from Sensirion using a complete sensor model.
2017-09-19 09:01:11 -07:00
Daniel Agar
26f00609ac multirotor_motor_limits only publish for MC 2017-09-19 02:25:30 +01:00
Daniel Agar
545ce9ae24 modules remove extra semicolons 2017-09-16 21:29:52 +01:00
Beat Küng
19e7ba63ee param: use separate param save lock
param save is an expensive operation that can take several 100ms. And
previously it was possible that a param_get() caller was blocked on a
save operation. If this happened due to a param change notification,
important modules, such as sensors, could have been blocked for a longer
period (and affecting the flight performance).
With this patch, this situation is not possible anymore, because a param
save now uses the reader lock and a separate file lock.

However it is still possible that a param_set() needs to wait for a save
operation, thus blocking for a longer time. param_set() thus needs to be
avoided in important modules when the system is armed.
In the case of mavlink it works, since it does not affect the flight if
the mavlink receiver is blocked over a longer time. It is only problematic
if a joystick is used as input or in offboard control.
2017-09-12 08:46:10 +02:00
Daniel Agar
9b5fe8c476 ignore -Wsign-compare per module 2017-09-07 10:27:36 +02:00
Beat Küng
ca24c8e2b6 printload: add a column for the number of used file descriptors
And the maximum number of configured file descriptors.

Note that this is per group, not per thread, so that e.g. logger and
log_writer_file show the same number.
2017-08-23 08:11:44 +02:00
Daniel Agar
353f637e92 move SYS_FMU_TASK to px4fmu 2017-08-09 22:28:05 +02:00
Peter Duerr
453937a89a Fix va_arg calls (always call va_end)
From the manpage: "Each invocation of va_start() must be matched by a
corresponding invocation of va_end() in the same function."
2017-08-07 22:05:54 +02:00