Commit Graph

34 Commits

Author SHA1 Message Date
Daniel Agar 9ce83f2208 fix all sign-compare warnings 2018-07-01 09:36:55 +00:00
Daniel Agar cf74166801 double promotion warning fix or ignore per module 2018-07-01 09:36:55 +00:00
Beat Küng 473fa15026 BlockParam: : ensure result of strncpy is null-terminated 2018-05-09 07:59:46 +02:00
Daniel Agar ea3acb7121 cmake remove circular linking and reorganize
- px4_add_module now requires MAIN
 - px4_add_library doesn't automatically link
2018-04-29 21:48:54 -04: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
Daniel Agar a9bbbdce82 controllib add BlockParamBool (int32 wrapper) 2018-01-09 09:11:39 +01:00
ChristophTobler 791e420d42 increase max num params per block because of ekf2 2017-10-09 08:58:01 +02:00
Daniel Agar 08fbd022af lib remove extra semicolons 2017-09-16 21:29:52 +01:00
Daniel Agar 5fedab7531 controllib fix sign-compare 2017-09-07 10:27:36 +02:00
Daniel Agar b620da8f01 BlockParam update() and commit() add returns 2017-08-20 20:42:42 +02:00
Daniel Agar 846435cd97 BlockParam<int> -> BlockParam<int32_t> for qurt 2017-06-12 12:18:53 -04:00
Daniel Agar 69ba69f30c controllib split blocks into separate files 2017-06-04 18:22:42 +08:00
Daniel Agar 3d6792c019 Block and SuperBlock minor cleanup 2017-06-04 18:22:42 +08:00
Daniel Agar 1671c32238 BlockParamExt replace with BlockParam reference types 2017-06-04 18:22:42 +08:00
Daniel Agar b03818cd0e controllib move old blocks to segway 2017-06-04 18:22:42 +08:00
Daniel Agar db816982cd px4params don't search recursively for params
- move controllib_test under controllib
2017-06-04 18:22:42 +08:00
Daniel Agar 5d626bd940 clang-tidy remove redundant init 2017-06-02 19:35:18 -04:00
Daniel Agar e112161a04 clang-tidy fix mathlib headers and format 2017-06-02 19:35:18 -04:00
Beat Küng b4178e0388 BlockParam: add BlockParam::commit_no_notification() 2017-05-03 08:37:14 +02:00
Nate Weibley 9618b9417b Inline block param getter 2017-03-24 22:51:38 +01:00
Daniel Agar 0611677ee2 segway move to examples 2017-03-11 11:40:14 +01:00
Daniel Agar e927f3e040 clang-tidy modernize-use-nullptr 2017-02-01 22:15:50 -05:00
Lorenz Meier 36ba5eb741 Control lib: Fix string handling corner cases
strncpy() does not enforce NUL-termination, but snprintf() does. So we need to ensure all strings are terminated. Another issue was the use of the wrong length parameter for these functions, resulting in the limiting arguments not being applied to the right length.
2017-01-04 10:14:25 +01:00
Daniel Agar d5082251d9 controllib decrease blockNameLengthMax to 40 2017-01-04 10:04:30 +01:00
Daniel Agar b3c741715a controllib block use consistent name length
- coverity CID 12524, 12542, 12548, 12550
2017-01-04 10:04:30 +01:00
David Sidrane dec46927f7 RAND_MAX properly defined in upstream NuttX 2016-12-21 08:34:21 +01:00
Carlo Wood 04aa2bb3a4 Add missing header files.
These headers files were missing from the header files that
I added them to; the fact that they were missing didn't
lead to compile errors because by coincidence the missing
headers are included in the source files before including
these headers. But, after the reordering of header inclusions
by Tools/fix_headers.sh, these cases will give rise to compiler
errors.
2016-11-13 19:36:27 +01:00
Beat Küng 7c6d99d30f BlockParam: remove _extern_address and create a new class BlockParamExt for this
In most cases, _extern_address was unused, thus wasting cycles & RAM. This
adds a separate class BlockParamExt with the field and uses it in ekf2_main

Frees roughly 0.5KB of RAM on Pixracer
2016-10-23 15:25:20 +02:00
Julian Oes 8ff237c69f Remove size optimization for individual modules
It makes more sense to set the optimization flags on a platform basis
instead of individually for each module. This allows for different
optimization options for SITL, NuttX, Snapdragon, etc.
2016-09-30 08:11:51 +02:00
Daniel Agar de14418e93 fw_pos_ctrl_l1 var naming consistency and effc++ 2016-07-12 23:40:39 +02:00
Lucas De Marchi 18330f7ab7 Move __STDC_FORMAT_MACROS to build system
__STDC_FORMAT_MACROS changes the behavior of inttypes.h to allow
defining format macros for printf-like functions. It needs to be defined
before any include is done, otherwise due to include chains and header
guards it may not take effect.

Instead of having to define it everywhere it is used, move the define to the
build system. Also update ecl and DriverFramework submodules to deal with the
changed definitions.
2016-07-10 16:31:36 +02:00
James Goppert 00dfc99e08 LPE Variance Dependent Publication (#4914)
* Use variance to control publishing for LPE.

* Don't stop publishing if we have gps/ baro.

* LPE tuning and cleanup.

* Added bias saturation to LPE.

* Added vector enabled low pass filter block.

* Added rk4 integration and pub lowpass to LPE.

* Fix std::abs issue on mac/ reset lowpass on state reset.

* Don't estimate gyro bias when rotating at high speed  att_est_q.

* Lowered low pass on position to 5 Hz for LPE.

* Streamline state space update for LPE.

* Added health flags to est2 log.

* Revert to old tuning, more conservative, less faults.

* Formatting.

* Fix for fault message on LPE.

* Added subscription throttling to LPE.

* Formatting.
2016-07-01 11:43:09 -04:00
Daniel Agar 76387b1693 uorb autogeneration 2016-05-14 11:27:07 +02:00
James Goppert afcc5b4695 Moved control library. 2016-04-14 14:28:32 -04:00