Commit Graph

729 Commits

Author SHA1 Message Date
alessandro a05bf390c1 rc_check: typos in mavlink error 2018-04-18 13:15:16 +02:00
nanthony21 0c2b9dc0b8 Fix formatting 2018-04-10 14:03:06 +02:00
nanthony21 d3e9ee88a0 Use filtered throttle for battery estimation instead of raw. 2018-04-10 14:03:06 +02:00
Daniel Agar 29b3950747 move geo and geo_lookup to PX4/ecl 2018-03-26 23:16:55 -04:00
Beat Küng 7937f9e82c refactor Battery: replace BlockParam* with Param* classes 2018-03-22 08:19:08 +01:00
Beat Küng 408cfd6ce1 err.h: remove unused declarations 2018-03-22 08:19:08 +01:00
Beat Küng f7ee3c2015 cmake configs: add vtol_att_control for required parameters VT_B_DEC_MSS & VT_B_REV_DEL
Required by Navigator.
2018-03-13 17:35:15 +01:00
Beat Küng 32eaf278ad Battery: remove unnecessary updateParams() call in constructor 2018-03-13 17:35:15 +01:00
Beat Küng fca99cf775 param: refactor BlockParam classes
- make the selected parameter a template argument. This
  enables type-checking at compile-time.
- move things to src/platforms.
  This provides consistent includes with ModuleBase
- add ModuleParams base class (replaces Block & SuperBlock)
- drop the Block* prefix from the class names
2018-03-13 17:35:15 +01:00
Beat Küng 0e4034d01e param: add a px4_parameters_public.h.jinja template
Generates an enum with all params & additional type information for static
type checking

The generated public param header is required to build the modules using
the new BlockParam classes.
2018-03-13 17:35:15 +01:00
Daniel Agar 5ef27c5425 mavlink add minimal mode (#8947) 2018-03-04 17:50:28 -05:00
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