Commit Graph

80 Commits

Author SHA1 Message Date
Lorenz Meier 36ca62ece9 param lib: Provide used index lookup 2015-04-26 14:01:42 +02:00
Mark Charlebois f3b5076d70 Linux to posix conversion
Changed "linux" target to "posix". Most of the changes are shared with
QuRT and with OSX. The Linux specific parts are in for i2c which uses
<linux/i2c.h> and <linux/i2c-dev.h>.

There is also a check for __PX4_LINUX in mavlink for a tty ioctl that is
not supported.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-21 09:53:09 -07:00
Mark Charlebois ec1b77c9e1 Linux: GCC static data is 16byte aligned, messes up param
GCC 4.8 and higher implement 16 byte static data alignment on 64-bit.
This means that the 24-byte param_info_s variables are 16 byte aligned
by GCC and that messes up the assumption that the address of the second
parameter is at &param[0]+sizeof(param[0]).
When compiled with clang it is true, with gcc is is not true.

See https://llvm.org/bugs/show_bug.cgi?format=multiple&id=18006

The fix is needed for GCC >=4.8 only. Clang works fine without this.

Added __attribute__((aligned(16))) to first member of param_info_s.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:48 -07:00
Mark Charlebois 2cd44a24ea Linux: Added linker script support for param and added mc_att_control
Added linker script to resolve __param_start and __param_end.

Added mc_att_control to list of supported builtins.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois 7b0783a070 Added MuORB based on virtual CDev implementation
uORB module now compiles and runs for Linux using the
virtual CDev implementation.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:18 -07:00
Mark Charlebois 5084a61f0e Abstractions to compile systemlib for Linux and Nuttx
Modified uint32_t casts of pointers to unsigned long for portability.
It otherwise breaks on x86_64.

Added _PX4_IOC to handle the conflice between _IOC on Linux and NuttX.

Removed use of px4::ok() because it cannot be used in a thread based
implementation. Changed to use px4::AppMgr which uses ok() on ROS.

Removed up_cxxinitialize.c from Linux build.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:16 -07:00
Lorenz Meier d6f7c9b8b4 systemlib: Implement active param list fully 2015-03-28 13:07:01 -07:00
Lorenz Meier fe12bffefa param subsystem: Only send the instantiated parameters via telemetry 2015-03-28 13:07:01 -07:00
Lorenz Meier aef041e032 Syslib: Add support for setting parameters without global notification 2015-02-15 19:52:01 +01:00
Andreas Antener a7580a1eae added actual tests and fixed reset-exclude funtction 2015-02-10 08:39:46 +01:00
Andreas Antener 5cccc01cd4 added unit test directive to switch out parameter storage 2015-02-10 08:39:46 +01:00
Andreas Antener 13039f9e69 hard-code parameter array for verification 2015-02-10 08:39:46 +01:00
Andreas Antener a73a095c1d added test and stub 2015-02-10 08:39:46 +01:00
Andreas Antener f8ff5b617b updated comparison 2015-02-10 08:39:46 +01:00
Andreas Antener 7c63be7450 implemented reset with excludes 2015-02-10 08:38:13 +01:00
Lorenz Meier f7b79bfaf2 Param interface: Allow to check return value of param_reset. Reset test param prior to running test 2015-02-08 16:39:37 +01:00
Anthony Kenga 50f7e27d13 Fixed parameter storage to support struct parameters. 2014-09-15 12:24:11 +03:00
Don Gagne 92adbe9216 Fix compiler warnings 2014-06-29 17:47:24 -07:00
Lorenz Meier e4c0a224af Fix a param save issue where a state variable might preven the parameters from being saved (identified and fixed by ultrasystem) 2014-05-08 20:21:02 +02:00
Lorenz Meier ea8ab2793a More param command related improvements 2014-01-12 18:52:10 +01:00
Lorenz Meier 3387aa64d4 Enabled MTD partitions, successfully tested params 2014-01-12 16:33:23 +01:00
Anton Babushkin 2f66a8894f param_save_default() rewritten: don't try 10 times to do every operation but do it safe using temp file 2013-10-22 21:02:29 +02:00
Lorenz Meier cd8854e622 Hotfix: Make param saving relatively robust 2013-09-20 19:59:48 +02:00
Lorenz Meier fdc4521949 Hotfix: Disabling param lock, not operational yet 2013-09-19 07:51:37 +02:00
px4dev 978a234d29 Lock name should not equal locking function name. Urr. 2013-09-18 22:40:54 -07:00
px4dev 7e0da345f0 The parameter system is supposed to have a lock; implement one. 2013-09-18 21:47:29 -07:00
Lorenz Meier 210e7f9245 Make param save command tolerant of FS timing 2013-09-18 08:44:02 +02:00
Lorenz Meier aa785b0d2b Hotfix: Better error reporting, fixed sched param setup 2013-09-05 13:24:21 +02:00
Lorenz Meier 2d83c6f825 Closing all opened file descriptors, fixed param save issue, tests clean 2013-09-01 12:47:10 +02:00
Lorenz Meier 13fc670386 Moved last libs, drivers and headers, cleaned up IO build 2013-04-28 09:54:11 +02:00