25 Commits

Author SHA1 Message Date
Daniel Agar
c40cf9a626
uORB: remove lost message count per DeviceNode
- update 'uorb status' to print basic info for all advertised DeviceNodes
 - report vehicle_command gaps in commander, navigator, mavlink
2020-08-04 10:34:11 -04:00
Daniel Agar
a2d170d850 uORB: top output improvements
- sleep slightly longer than 1s to capture 1 Hz topics
 - round msg rate calculation
 - add topic size to outpu
 - by default only print topics with subscribers
 - clear previous output (past cursor)
2020-05-07 09:31:15 +02:00
Daniel Agar
de4f594937 DriverFramework purge
The bulk of this change was tightly coupled and needed to be deleted in one pass. Some of the smaller changes were things that broke as a result of the initial purge and subsequently fixed by further eradicating unnecessary platform differences. Finally, I deleted any dead code I came across in the related files I touched while going through everything.

 - DriverFramework (src/lib/DriverFramework submodule) completely removed
 - added dspal submodule in qurt platform (was brought in via DriverFramework)
 - all df wrapper drivers removed
 - all boards using df wrapper drivers updated to use in tree equivalents
 - unused empty arch/board.h on posix and qurt removed
 - unused IOCTLs removed (pub block, priv, etc)
 - Integrator delete methods only used from df wrapper drivers
 - commander: sensor calibration use "NuttX version" everywhere for now
 - sensors: update to px4_{open, read, close} instead of DevMgr wrapper (adc open for analog differential pressure)
 - battery_status: update to px4_{open, read, close} instead of DevMgr wrapper (adc open for analog differential pressure)
 - cdev cleanup conflicting typedefs and names with actual OS (pollevent_t, etc)
 - load_mon and top remove from linux boards (unused)
 - delete unused PX4_MAIN_FUNCTION
 - delete unused getreg32 macro
 - delete unused SIOCDEVPRIVATE define
 - named each platform tasks consistently
 - posix list_devices and list_topics removed (list_files now shows all virtual files)
2020-01-13 14:07:03 -05:00
Beat Küng
3198610f85 src/platforms: move all headers to platforms/common/include/px4_platform_common
and remove the px4_ prefix, except for px4_config.h.

command to update includes:
for k in app.h atomic.h cli.h console_buffer.h defines.h getopt.h i2c.h init.h log.h micro_hal.h module.h module_params.h param.h param_macros.h posix.h sem.h sem.hpp shmem.h shutdown.h tasks.h time.h workqueue.h; do for i in $(grep -rl 'include <px4_'$k src platforms boards); do sed -i 's/#include <px4_'$k'/#include <px4_platform_common\/'$k/ $i; done; done
for in $(grep -rl 'include <px4_config.h' src platforms boards); do sed -i 's/#include <px4_config.h/#include <px4_platform_common\/px4_config.h'/ $i; done

Transitional headers for submodules are added (px4_{defines,log,time}.h)
2019-10-30 11:48:47 +01:00
Beat Küng
509189ea95 uorb top: add 'uorb top -1' to run only once 2019-03-12 12:33:23 -04:00
Daniel Agar
7d389a35ce
uORB: split uORBDevices into uORBDeviceNode and uORBDeviceMaster 2018-08-17 22:25:29 -04:00
Daniel Agar
edea1b65cd uORB delete unused Flavor 2018-05-02 00:48:46 -04:00
Beat Küng
3f6769d41e uorb: add module documentation 2017-07-14 11:57:11 +02:00
Beat Küng
317c8bf557 uorb: update usage 2017-07-14 11:57:11 +02:00
wangxdflight
b693e29d64 enable px4 flight for excelsior(legacy) 2017-01-16 08:25:58 -08:00
Beat Küng
fbd7aac4b5 uorb: add 'top' command for a live view of topic updates 2016-09-28 15:31:52 +02:00
Beat Küng
33fdb072df uORBMain: disable message logging to the ulog on Snapdragon 2016-09-01 09:59:17 +02:00
Beat Küng
df53fb0fde logging: publish a message for PX4_{WARN,ERR} & store them to the ulog file
- ulog file message rate limited to 50Hz
- queuing with size 2
- this replaces the mavlink log message in the ulog
  (but the mavlink warnings & errors still go to the ulog)
2016-08-24 21:24:35 +02:00
Beat Küng
b86cf2b017 orb status: print information about lost messages 2016-08-06 20:44:23 +02:00
Beat Küng
45a0a7c5ab refactor orb: uORB::Manager is responsible for the DeviceMaster objects
This has the following benefits:
- Manager can ensure that there is at most one instance of DeviceMaster
  per Flavor
- The Manager needs access to (static) data of DeviceMaster already.
  This will make it easier to access this data in a non-static way, and
  does not introduce new dependencies.
2016-08-06 20:44:23 +02:00
Daniel Agar
12165ba5a4 uORB separate tests 2016-05-13 13:01:41 +02:00
Beat Küng
1a57488ac6 orb: add a separate uORB::Manager::initialize() method
This fixes a race condition: uORB::Manager::get_instance() is used in a
multi-thread context, but the singleton initialization was not thread-safe.
Further, this avoids having to check for nullptr every time the singleton
is accessed.

uORB::Manager::initialize() is called when uorb is started. No one else
accesses the singleton before that point, because it is only used in the
orb_* methods, and in muorb. Both require uorb to be started already when
they are used.
2016-04-29 11:15:15 +02:00
Beat Küng
9041b7e16d fix formatting style for uORB 2016-04-19 11:12:35 +02:00
Beat Küng
9c360e9f88 uORB: fix node_open: *instance is read even though it's an output parameter
This fixes a subtle bug: the instance parameter of orb_advertise is an output
parameter and thus its value can be random. However in node_open this value
is accessed and thus the open(...) call could succeed even though it should
not. This can happen for example if a second advertiser of a topic calls
orb_advertise_multi with *instance=0.

The existing implementation worked only because *instance was initialized
with -1 in most cases.
2016-04-19 11:12:35 +02:00
Julian Oes
2dd2c9143a uORB: astyle 2016-02-19 16:59:48 +01:00
Julian Oes
8fd4b80eed uORB: improve console output and status 2016-02-19 16:59:46 +01:00
Lorenz Meier
c19c8a35b2 uORB: Update code style 2015-10-19 13:51:18 +02:00
Mark Charlebois
6cb26de74c Multi-uORB support changes - part 1
This adds support for a dynamic build for QuRT and initial
Multi-uORB changes to enable communication between the DSP and
the application processor.

This part of the changes do not affect the POSIX build. This is
enablement for the QuRT build using Multi-uORB. The second part
of the changes will be added in a new module under src/modules.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-08 22:21:59 -07:00
Mark Charlebois
7ebee7ca6f uORB: Unit test fix
The latency_test used to pass an object pointer as argv which
won't work in the posix port because it expects argv to be a
null terminated array of character pointers (which it makes a
copy of).

The test was refactored to use a singleton pattern and avoid
having to pass the object pointer to the thread.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 13:19:52 -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