64 Commits

Author SHA1 Message Date
Daniel Agar
a1418c56ad examples remove extra semicolons 2017-09-16 21:29:52 +01:00
Daniel Agar
742d0e53f9 examples NULL to nullptr 2017-03-11 11:40:14 +01:00
James Goppert
967e4dd127 Modified cmake to use STACK_MAX and STACK_MAIN 2016-04-14 13:36:36 -04:00
Daniel Agar
51cd8ce1ff subscriber example param @unit 2016-03-14 09:10:29 +01:00
Lorenz Meier
a1d6cfcfb7 Remove old module.mk files to not confuse new users 2015-10-08 10:58:34 +02: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
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
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
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
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
Daniel Agar
662ec3f62f examples fix code style 2015-03-19 23:49:36 +01:00
Thomas Gubler
69f5726d70 make subscriber example use the new param api 2015-02-08 17:53:25 +01:00
Thomas Gubler
abeae7b6f6 extend subscriber/publisher example 2015-01-26 19:01:07 +01:00
Thomas Gubler
4c3a24ddee tiny cleanup 2015-01-23 18:30:02 +01:00
Thomas Gubler
dfd078651f subscriber: move nuttx startup handling 2015-01-23 18:00:59 +01:00
Thomas Gubler
73f342616e add better accessor 2015-01-23 15:16:13 +01:00
Thomas Gubler
da7ad9a332 multiplatform: re-enable interval functionality (for uorb) 2015-01-23 09:02:04 +01:00
Thomas Gubler
49d41773fc ros wrapper port callback to methods and subscriber without callback 2015-01-22 16:47:28 +01:00
Thomas Gubler
f60e65b38f clean up subscriber example 2015-01-21 18:05:31 +01:00
Thomas Gubler
1f706eeb2f small cleanup 2015-01-21 14:34:34 +01:00
Thomas Gubler
cadcad6ffb messagelayer prototype for nuttx 2015-01-21 14:27:01 +01:00
Thomas Gubler
7c3223b860 added a messageplayer prototype for ros 2015-01-21 14:26:22 +01:00
Thomas Gubler
f37fdd95af add and use PX4_ROS preprocessor define 2015-01-06 19:45:57 +01:00
Thomas Gubler
5745189e7b fix some errors/warnings in multiplatform examples 2015-01-05 15:22:08 +01:00
Thomas Gubler
c0d386bce0 mc att: use multiplatform subscriptions type 2014-12-12 10:15:33 +01:00
Thomas Gubler
998646f03b add base class and template subscriber class as well to improve interface to get last msg value 2014-12-11 15:33:32 +01:00
Thomas Gubler
c68c277c94 subscription class for ros now stores last message to avoid manual copy and support subscription with no callbacks 2014-12-11 15:04:37 +01:00
Thomas Gubler
173b1b2a8b WIP, make class based and extended subscriber/publisher example compile for ros 2014-12-11 10:51:19 +01:00
Thomas Gubler
a1685ed6d0 change definition of px4 main function 2014-12-11 09:27:11 +01:00
Thomas Gubler
d04bbf11ec subscriber example: add comment 2014-12-10 18:34:41 +01:00
Thomas Gubler
1b6b6cd35c add no callback example to subscriber example 2014-12-10 17:03:24 +01:00
Thomas Gubler
da4cfad3c2 subscriber example: improve init 2014-12-10 16:25:10 +01:00
Thomas Gubler
8ae1c9763d write publisher example as class 2014-12-10 16:22:19 +01:00
Thomas Gubler
52c35a8e20 solve conflict for definiton of FILE 2014-12-06 15:36:58 +01:00
Thomas Gubler
83d97fd1c2 better support for param default values on ros and px4 2014-12-04 09:53:37 +01:00
Thomas Gubler
c2e2b3d52f make param wrapper macros compatible for px4 and ros, needs cleanup 2014-12-03 17:04:15 +01:00
Thomas Gubler
924350a5de bring up param wrapper for px4, moved global include file 2014-12-03 15:11:27 +01:00
Thomas Gubler
1c79f0cef1 improve param wrapper for ros, prepare for px4 2014-12-03 14:43:03 +01:00
Thomas Gubler
6a99b04fb7 add parameter wrapper macros for ros 2014-12-03 12:31:37 +01:00
Thomas Gubler
8d3d8a3358 subscriber example clean up 2014-12-02 15:22:21 +01:00
Thomas Gubler
5bb03f1c2d subscriber example increase stack size 2014-12-02 15:21:58 +01:00
Thomas Gubler
caa61a4fdc add support for subcription method callbacks for ros and nuttx 2014-11-28 23:09:45 +01:00
Thomas Gubler
9abc8e26b7 correctly handle interval, call callback only when topic updated, add example for 2 topics 2014-11-28 16:30:12 +01:00
Thomas Gubler
1b416a8e1f use interval setting correctly, improve px4::spin 2014-11-28 14:00:02 +01:00
Thomas Gubler
b351d67175 fix print for px4 2014-11-28 11:37:30 +01:00