37 Commits

Author SHA1 Message Date
Daniel Agar
27f23ac290 move initial sensor priority to parameters and purge ORB_PRIORITY
- CAL_ACCx_EN -> CAL_ACCx_PRIO
 - CAL_GYROx_EN -> CAL_GYROx_PRIO
 - CAL_MAGx_EN -> CAL_MAGx_PRIO
2020-08-21 10:12:13 -04:00
Daniel Agar
466b5db36f
uORB::Publication improvements and cleanup (#14784)
- create common uORB::PublicationBase
 - uORB::PublicationQueued types are now type aliases
 - ORB_PRIO use enum type everywhere to avoid accidental misuse
 - PX4Accelerometer/PX4Gyroscope/etc driver libs explicitly advertise on construction, unadvertise on destruction. This is a workaround for any potential issues that might appear when accel/gyro cdev and uORB indexing doesn't align.
2020-05-04 11:09:30 -04:00
Daniel Agar
5fcd7932e9
mavlink: replace MavlinkOrbSubscription with uORB::Subscription
* uORB orb_stat() and update(uint64_t *time, void *dst) are now obsolete and have been deleted
 * mavlink messages add more advertised checks in streams get_size() check to improve data rate calculation across different scenarios
2020-03-14 12:52:46 -04:00
Beat Küng
7753dd4b4e refactor uorb: inline orb_publish_auto
It is a very small core function that needs to be fast.
2018-07-23 22:32:17 +02:00
Beat Küng
e709048fb8 orb: add orb_get_interval to API 2016-06-06 23:27:16 +02:00
Beat Küng
43d734ef43 orb: consistently use unsigned int for queue_size 2016-06-02 07:24:44 +02:00
Beat Küng
5b1273e334 orb: add optional queuing of messages
This adds two uORB API calls:
- orb_advertise_queue
- orb_advertise_multi_queue

Both add a queue_size parameter to define a maximum number of buffered
item. The existing orb calls use all a queue size of one and thus their
behavior is unchanged. If a writer publishes too fast, the oldest elements
from the queue are silently dropped.
The returned timestamp is always the one from the latest message in the
queue.

Queue size can be set via ioctl during advertisement phase. After that it
cannot be changed anymore.
2016-06-02 07:24:44 +02:00
Beat Küng
9da537c092 uorb: add uorb_unadvertise method
This is necessary when using multiple instances of a topic. However it does
not free the underlying resources, as it is assumed they will be used again
at a later point.
2016-04-29 09:31:08 +02:00
Beat Küng
c598429547 uORB doc: remove redundant doc & update existing one (describe the _multi methods) 2016-04-19 11:12:35 +02:00
Julian Oes
e8402f0f78 uORB: fix off-by-one bug in topic count 2016-02-19 16:59:47 +01:00
Lorenz Meier
73394acc68 Fix uORB auto publication 2015-12-24 15:46:00 +01:00
Lorenz Meier
fd01d565fe Fix code style / typos in uORB 2015-12-24 10:31:06 +01:00
Lorenz Meier
36a556d107 Modify uORB API to allow cleaner in-app use 2015-12-24 10:30:48 +01:00
Lorenz Meier
c19c8a35b2 uORB: Update code style 2015-10-19 13:51:18 +02:00
Mark Charlebois
54bae34a2c Build fixes for qurt after rebase on PX4 master
Removed the re-definitions of the usage method in the posix/main.cpp file.
Added qurt_external_hook interface to call externally linked module.
Fixed code format to comply with PX4 style.
Added usage information to main app and handled cases for unknown arguments.
Fixed the orb_priority interface to use int32_t instead of int.
Fixes to get hil working with led changes.
Added the config_eagle_adsp.mk file and update the make files to to use new
include/lib paths

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-09-04 11:09:29 -07:00
Lorenz Meier
fbe5ef6087 uORB: Provide used group count 2015-08-30 00:12:45 +02:00
Mark Charlebois
6763039980 Code cleanup - Whitespace changes
These are only whitespace changes

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 09:10:30 -07:00
Mark Charlebois
e33a164ddb uORB: Major refactoring
uORB was refactored in order to support the MuORB changes required
for QURT. Those changes wil be added in a subsequent commit.

The files are split out by posix and nuttx so the changes are visible.
When this has been tested, the files can be re-merged and re-tested.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-05 10:52:15 -07:00
Mark Charlebois
190814bc97 Merge remote-tracking branch 'upstream/master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>

Conflicts:
	src/drivers/rgbled/rgbled.cpp
	src/modules/commander/PreflightCheck.cpp
	src/modules/commander/airspeed_calibration.cpp
	src/modules/commander/calibration_routines.cpp
	src/modules/commander/gyro_calibration.cpp
	src/modules/commander/mag_calibration.cpp
	src/modules/mc_att_control/mc_att_control_main.cpp
2015-04-28 11:48:26 -07:00
Lorenz Meier
28dfb8983a uORB: Add API to check if a topic exists yet 2015-04-26 14:33:56 +02:00
Mark Charlebois
4016ad2ff5 Revert uORB to previous version
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:17 -07:00
Mark Charlebois
aeb65702a2 Fixed support for clang 3.5
"clang-3.5 -dumpversion" returns 4.2.1 as the GCC version.

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
Lorenz Meier
19811bc73f Better timing tests 2015-02-28 14:42:28 +01:00
Lorenz Meier
677bfddcb6 uORB: More timing tests. 2015-02-28 14:42:28 +01:00
Lorenz Meier
5d56a1c6a9 Test latency of publication. 2015-02-01 14:13:10 +01:00
Lorenz Meier
50a58db7e6 uORB: Ensure correct instance initialization, port complete mag API to new interface 2015-01-29 16:33:52 +01:00
Lorenz Meier
4f9a6273cb uORB: correct pub creation for multi-topics 2015-01-29 16:33:52 +01:00
Lorenz Meier
7932e2eda2 Add top to test build 2015-01-29 16:33:52 +01:00
Lorenz Meier
8de411619a Initial stab at supporting multiple publications on the same base name and auto-enumeration of additional publications. 2015-01-29 16:33:52 +01:00
Lorenz Meier
87aaf2a959 uORB: Remove unused function 2015-01-21 11:01:25 +01:00
Lorenz Meier
a1a5a65dfa Fixed Coverity CID #12412 2015-01-19 13:38:50 +01:00
Lorenz Meier
4865814f92 Fixed typo, added testing - previous corner case now cleanly prevented 2013-11-03 17:58:28 +01:00
Lorenz Meier
98f5a77574 Fix to cancel pending callbacks for closing ORB topics 2013-11-03 17:52:27 +01:00
Lorenz Meier
13fc670386 Moved last libs, drivers and headers, cleaned up IO build 2013-04-28 09:54:11 +02:00