Commit Graph

156 Commits

Author SHA1 Message Date
Lorenz Meier 2e9cec5b06 Simple app: Use enough stack 2016-01-05 19:01:16 +01:00
Lorenz Meier 669f8bf098 Matlab example: Use enough stack 2016-01-05 19:01:16 +01:00
Lorenz Meier 7c8a2a1e18 HW test example: Use enough stack 2016-01-05 19:01:16 +01:00
Lorenz Meier 977aee9f62 Simple app: fix code style 2015-12-23 09:38:21 +01:00
Lorenz Meier 8b76d5e941 Update simple app example to use multiplatform API 2015-12-23 09:12:29 +01:00
Lorenz Meier 7ce0cbd8cb Complete HW test instructions 2015-10-16 09:51:31 +02:00
Lorenz Meier a1d6cfcfb7 Remove old module.mk files to not confuse new users 2015-10-08 10:58:34 +02:00
Lorenz Meier 75dfa5a420 Remove outdated flow position estimator 2015-09-12 09:53:36 +02:00
James Goppert bf18c84652 Cleanup of module building. 2015-09-09 23:00:58 -04:00
James Goppert 1d6b31d196 Switch to cmake build system. 2015-09-07 20:37:45 -04:00
Daniel Agar 0a4a1fc991 format src/examples/subscriber 2015-09-05 12:21:10 -04:00
Daniel Agar 9dd8864a1b format src/examples/rover_steering_control 2015-09-05 12:21:10 -04:00
Daniel Agar 293739ce20 format src/examples/px4_daemon_app 2015-09-05 12:21:10 -04:00
Daniel Agar ad456bb7f2 format src/examples/publisher 2015-09-05 12:21:10 -04:00
Daniel Agar a7056892f3 format src/examples/matlab_csv_serial 2015-09-05 12:21:09 -04:00
Daniel Agar d2db6855ad format src/examples/flow_position_estimator 2015-09-05 12:21:09 -04:00
Daniel Agar 50d74e00ec format src/examples/fixedwing_control 2015-09-05 12:21:09 -04:00
Lorenz Meier 53d4c5473f Merge beta in master 2015-08-23 11:21:38 +02:00
Lorenz Meier 0d44510f67 Examples: Fix copyright 2015-08-23 10:12:40 +02:00
Mark Charlebois a734fc96d1 extensive orb_advert_t fixes
The calls to orb_advertise were being mishandled throughout the code.
There were ::close() calls on memory pointers, there were checks
against < 0 when it is a pointer to a object and values larger than
0x7ffffffff are valid. Some places orb_advert_t variables were
being initialized as 0 other places as -1.

The orb_advert_t type was changed to uintptr_t so the pointer value
would not be wrapped as a negative number. This was causing a failure
on ARM.

Tests for < 0 were changed to == 0 since a null pointer is the valid
representation for error, or uninitialized.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:41:33 -07:00
Mark Charlebois 95de7c2e94 ROS: Fixes for print of uint64_t type
Changed printf to use PRIu64

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-19 11:14:40 -07:00
Mark Charlebois ce96329f95 Resolve printing uint64 types
Using %llu or %lu will break one of the build targets. The "right way"
to print a uint64_t is via the PRIU64 macro defined in C99.

This wasn't defined for the NuttX compiler so it was added to px4_defines.h
for NuttX.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-19 11:04:39 -07:00
Mark Charlebois 0f5cb75692 ROS: Fixes for ROS build
The ROS build included some files that used isfinite vs PX4_ISFINITE.

The AppState class also needed to be supported for ROS.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-19 10:41:15 -07:00
Mark Charlebois 9f391b1867 NuttX: fixes for NuttX build
In the upstream tree ringbuffer.h includes the method implementations
in the header file which causes multiple definitions in the link for
other targets. Changed so ringbuffer.cpp is build separately for other
platforms and is included by ringbuffer.h on NuttX.

uORB changes do not link without uORBTest_UnitTest.cpp enabled for
the NuttX build.

px4_getopt was not exported and wasn't visible in NuttX build.

The makefiles were restored to be as close as possible to upstream
so the NuttX build builtin's work again. The code will have to be
refactored after the merge.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-15 12:56:18 -07:00
Mark Charlebois 0c1c58c418 Fixed overzealous px4_ prefixing
Some files had px4_px4_ prefixed functions.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 15:32:04 -07:00
Mark Charlebois c5237f7f6f Removed extra abstracton layer in systemlib
The calls to task_spawn_cmd, kill_all, and systemreset  were wrappers
around the px4_{task_spawn_cmd|kill_all|systemreset} implementations.

Removed the wrappers and changed all calls to the px4_ equivalents.

NuttX specific code was moved into px4_tasks.h

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 14:43:11 -07:00
Mark Charlebois 3654aec3a5 POSIX: ported px4_daemon_app
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 14:34:23 -07:00
Mark Charlebois fd7863270e Nuttx: fixed missing changes from AppMgr to AppState
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
Mark Charlebois 9758112e31 Use px4_config.h instead of nuttx/config.h
Modified code to use OS independent header file for config settings.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:55:41 -07:00
Mark Charlebois bf429188b4 Reverted: Use OS independent API for task creation/deletion
Keep existing API use in code. Bind the use of the OS independent
implementation in the systemlib layer.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:49:44 -07:00
Mark Charlebois ddb32742eb Use OS independent API for task creation/deletion
Calls to task_delete and task_spawn_cmd are now
px4_task_delete and px4_task_spawn_cmd respectively.

The px4_tasks.h header was added to the affected files
and incusions of nuttx/config.h were removed.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:49:44 -07:00
Daniel Agar 2e824bbeea fix incorrect argc < 1 check for no arguments
-requiring arguments should be argc < 2
2015-04-18 12:02:58 +02:00
Lorenz Meier 4f0f2b0329 Merge pull request #1875 from mstuettgen/master
Latest rover changes
2015-03-20 17:17:13 +01:00
Marcel Stüttgen 9130976d9e Update main.cpp
removed debug output code
2015-03-20 17:01:52 +01:00
Daniel Agar 662ec3f62f examples fix code style 2015-03-19 23:49:36 +01:00
Daniel Agar c2abb0f82a fix code style if trivial one line difference 2015-03-19 23:49:36 +01:00
Marcel Stuettgen d0c6636b7f added debug code to check if the values are really changing 2015-02-28 17:25:51 +01:00
Lorenz Meier 15f729ddd5 Rover: C++ify, minor cleanups 2015-02-19 22:14:50 +01:00
Lorenz Meier e59aaa771c Rover: Add simple steering controller. 2015-02-19 21:51:53 +01:00
James Goppert 017f3ead47 Flow example fix for divide by zero.
This prevented publishing and made the module unusable.
2015-02-11 21:05:40 -05:00
Thomas Gubler 69f5726d70 make subscriber example use the new param api 2015-02-08 17:53:25 +01:00
Thomas Gubler 84ff3c671d Merge remote-tracking branch 'upstream/master' into ros_messagelayer_merge2_attctrl_posctrl
Conflicts:
	src/drivers/px4fmu/fmu.cpp
2015-02-01 11:06:47 +01:00
Lorenz Meier 777eda1a89 Move MATLAB example to multi pub/sub API 2015-01-29 16:33:53 +01:00
Thomas Gubler abeae7b6f6 extend subscriber/publisher example 2015-01-26 19:01:07 +01:00
Thomas Gubler cd35ab2661 add another set of uorb headers 2015-01-25 15:32:40 +01:00
Thomas Gubler 4c3a24ddee tiny cleanup 2015-01-23 18:30:02 +01:00
Thomas Gubler aa7e5ddb38 move position of spin_once in publisher example 2015-01-23 18:11:44 +01:00
Thomas Gubler a36d0dce85 publisher: move nuttx startup handling 2015-01-23 18:01:16 +01:00
Thomas Gubler dfd078651f subscriber: move nuttx startup handling 2015-01-23 18:00:59 +01:00