Commit Graph

718 Commits

Author SHA1 Message Date
Matthias Grob d39a8b5a48 Battery: Switch thrust based load compensation back to linear
To account for the parameter definition.
My tests if quadratic is actually better in practise were anyways not conclusive.
2018-03-02 21:07:09 +01:00
Matthias Grob 611ab577d8 Battery: Fix estimate initialization
On the Intel Aero and probably also other specific platforms
the first measured voltage values despite connected battery are unuasable.
The solution here is to start filtering and determining warning
only after a measurement above 2.1V was received.
2018-02-24 16:27:44 +01:00
Matthias Grob 83ac74367c Battery: move member initialization values to class declaration 2018-02-24 16:27:44 +01:00
Matthias Grob df7364d2e2 Battery: Correct unit for capacity parameter 2018-02-23 15:30:17 +01:00
Roman 10bf6a4b59 params cmd: be less verbose
Signed-off-by: Roman <bapstroman@gmail.com>
2018-02-22 15:10:22 -05:00
Beat Küng 2517d3854c printload: fix buffer overflow on NuttX
The NuttX config variable CONFIG_TASK_NAME_SIZE does not include the
null terminator byte, thus the buffer needs to be longer by 1 byte.
2018-02-14 11:17:44 +01:00
nanthony21 a637063965 fix formattting 2018-02-11 14:08:02 +01:00
nanthony21 53b4f6406f cell_voltage is no longer constant 2018-02-11 14:08:02 +01:00
nanthony21 9c7de38b75 battery compensation is now performed on the cell voltage rather than the total voltage 2018-02-11 14:08:02 +01:00
Daniel Agar e04d30c9cf param markdown metadata handle float enums 2018-02-10 20:37:47 -05:00
Daniel Agar f73f95965a parameter culling include subdirectories of modules 2018-02-04 18:15:57 +01:00
Daniel Agar 4c5b42f256 parameters move bson buffered file support into tinybson 2018-01-30 09:17:56 -05:00
Daniel Agar a25ca0c37d param include px4_config.h for FLASH_BASED_PARAMS
- fixes #8585
2018-01-12 23:46:15 +01:00
Matthias Grob 8c998c1309 Battery: enhanced voltage, capacity estimate fusion, set empty voltage to a useful value for reasonable lipo usage 2018-01-11 08:36:03 +01:00
Matthias Grob 919b6ae239 Battery added proper initialization for the capacity voltage fusion and doubled the time constant 2018-01-11 08:36:03 +01:00
Matthias Grob 663913a1dc Battery: added simple fusion of capacity based estimate and voltage based estimate 2018-01-11 08:36:03 +01:00
Matthias Grob 823d423456 Battery: refactor current integration to be easier understandable 2018-01-11 08:36:03 +01:00
Matthias Grob 9fbd6b912d Battery: adapt output constraints to possible values, only calculate remaining capacity if capacity is configured 2018-01-11 08:36:03 +01:00
Matthias Grob 60cc132c8a Battery: refactor _param out of the variable names and use 0.f for zero floats to make code more readable 2018-01-11 08:36:03 +01:00
Matthias Grob 90b326f3b5 Battery: get rid of the duplicate filtering, just use the already existing methods 2018-01-11 08:36:03 +01:00
Matthias Grob 101aeadf03 Battery: revised voltage drop calculation to fit the new simpler easier to verify estimation 2018-01-11 08:36:03 +01:00
Matthias Grob 52e2aecaf1 Battery: simplify linear voltage relation, currently neglecting the real world voltage drop under load 2018-01-11 08:36:03 +01:00
Beat Küng f561d16334 fix param_export: off-by-one buffer size
In rare circumstances, the buffer size was too small by 1 byte, leading
to a param export failure. And leading to a reset of all params!
This could only happen when the last saved param was a float.

Also the realloc_ok initialization is not needed.
2018-01-10 22:03:14 +01:00
Beat Küng f8ceee0cf2 fix param: need to use fsync() and not px4_fsync()
It's used with real OS FD's.
2018-01-10 22:03:14 +01:00
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