9 Commits

Author SHA1 Message Date
Beat Küng
74990cadc8 uorb: avoid printf while DeviceMaster is locked
This fixes a potential dead-lock when 'uorb status' was used via MAVLink
shell.
The dead-lock chain is: DeviceMaster::lock() -> printf -> output to a pipe,
which blocks until a reader reads the data. In that case it's mavlink.
If mavlink makes a call that requires DeviceMaster::lock() (such as
orb_exists), it dead-locks.

This patch moves all printf's out of the locked state.
2019-05-02 10:26:41 +02: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
e2bf4b1894 List container improvements and testing
- support range based for loops
 - add remove() method to remove a node
 - add clear() to empty entire list and delete nodes
 - add empty() helper
2019-03-01 21:01:04 -05:00
Julian Oes
5b9dea5604 Replacing usleep with px4_usleep
This is a step towards isolating time from the system.
2018-12-22 10:32:18 +01:00
Daniel Agar
023e267e9b uORB replace ORBMap with linked list 2018-11-23 08:15:48 +01:00
Mara Bos
10c20b38ad Fix many format strings.
Fixes these invalid format strings:
- A `%d` for a pointer (replaced it by `%p`)
- A 0x%08x (and a 0x%0x8!) for a pointer (replaced by %p)
- 2 cases of `%d` for a `ssize_t` (replaced it by `%zi`)
- 1 case of a %u for an `int` (replaced by %i)
- 3 cases of %d for a `long` (replaced by %ld)
- 19 cases of `%d`, `%i`, `%u` or `%lu` for a `size_t` (replaced it by `%zu`)
- An unused formatting argument (removed it)
- A missing `%d` (added it)
- A missing `%s` (added it)
- 2 cases of `%llu` for a `uint64_t` (replaced it by `"%" PRIu64`)
- 6 cases of giving a string directly as format string (replaced it by `("%s", string)`)
- 2 cases of %*-s, which should probably have been %-*s.
  (Looks like NuttX accepts (the invalid) %*-s, but other platforms don't.)
- A %04x for a `uint32_t` (replaced by "%04" PRIx32)
2018-10-27 12:44:51 +02:00
Daniel Agar
cfac2cc38e uORB advertise through uORBDeviceMaster directly 2018-09-19 10:00:45 +02:00
Daniel Agar
dbf2d25e2f uORB move to standalone CDev
- uORB topics should not be Devices with bus, address, device id
2018-08-27 13:14:15 -04:00
Daniel Agar
7d389a35ce
uORB: split uORBDevices into uORBDeviceNode and uORBDeviceMaster 2018-08-17 22:25:29 -04:00