Commit Graph

35 Commits

Author SHA1 Message Date
Daniel Agar
ba5ef28f23 uORB_tests: add uORB::SubscriptionMultiArray tests 2020-11-03 09:10:54 -05:00
FengShun
d19b54481a fix: uORB topics lost messages when publications overflow 2020-10-19 08:52:55 +02:00
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
9585055e9e uORB: add bitset for faster orb_exists check and remove uORB::Subscription lazy subscribe hack/optimization
- add PX4 bitset and atomic_bitset with testing
 - add uORB::Subscription constructor to take ORB_ID enum
 - move orb test messages into msg/
2020-03-11 09:06:33 -04:00
Daniel Agar
d7e502ec72 uORB_tests increase stack 2020-02-27 21:12:49 +01: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
Daniel Agar
0f3bb94ff7 uORB_test: initialize timings storage
- fixes Coverity CID 341740
2020-01-05 22:59:49 -05:00
Daniel Agar
b4fa915c86 uORB_tests: fix queue simulation and cleanup initializations 2019-12-09 16:50:33 -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
Daniel Agar
184aa2861a PX4_ISFINITE use builtin everywhere 2019-02-21 14:56:08 -05:00
Lorenz Meier
ec0a9806a8 uORB test: Retain atomic operation 2019-01-22 23:52:57 +01: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
ea73284a1f uORB tests increase stack sizes 2018-09-02 15:31:54 -04:00
Daniel Agar
99ed46949e uORB_tests print pointer correctly 2018-08-30 19:04:13 +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
Beat Küng
c0cac0594e file paths: add PX4_STORAGEDIR & use it where appropriate 2018-08-08 21:09:39 +02:00
Beat Küng
fbd553c528 uorb tests: improve & extend latency test output
- min/max
- std dev
- number of missed updates
2018-07-30 23:06:32 +02:00
Daniel Agar
9ce83f2208 fix all sign-compare warnings 2018-07-01 09:36:55 +00:00
Beat Küng
13ab5ed0d0 px4_main_t: fix method declaration throughout the code base
px4_main_t is defined as:
typedef int (*px4_main_t)(int argc, char *argv[]);
which matches with the definition in NuttX, given to task_create
2018-05-09 07:59:46 +02:00
Daniel Agar
edea1b65cd uORB delete unused Flavor 2018-05-02 00:48:46 -04:00
Peter Duerr
40dff737c5 Fix uninitialized values identified by cppcheck
* Replace `malloc` by `calloc` for c-string initialization
* Add initializer braces for structs
2017-08-07 22:05:17 +02:00
Peter Duerr
cc1b766824 Fix memory leaks identified by cppcheck
* Add `free` / `delete`
* Add comment explaining the (presumed) motivation for the use of new instead of
  allocating on the stack
2017-08-07 22:05:17 +02:00
Daniel Agar
6631e72d6f clang-tidy modernize-redundant-void-arg 2017-02-01 22:15:50 -05:00
Daniel Agar
e927f3e040 clang-tidy modernize-use-nullptr 2017-02-01 22:15:50 -05:00
Daniel Agar
cbc9680800 relax uorb test required avg 2017-01-02 10:14:41 +01:00
Beat Küng
76733ce54b uorb tests: move orb metadata struct definition into cpp file
If they're in the header and the header is used in multiple .cpp, there
are multiple definitions. Oddly it did not lead to an error, but there
were multiple structs of the same topic but with different adresses.
This lead to a metadata mismatch, when running eg:
uorb_tests
uorb_tests latency_test
2016-09-30 13:50:51 +02:00
Lorenz Meier
630cebeabc Relax uORB test for Darwin CI system 2016-08-07 14:05:03 +02:00
Lorenz Meier
207a04bba0 Fix uORB tests for Mac OS 2016-08-07 14:05:03 +02:00
Lorenz Meier
6ab9dc0acf Testing cleanup from Daniel Agar 2016-07-29 13:49:14 +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
392c32d316 uORBTest_UnitTest.cpp: fix style 2016-06-02 07:24:44 +02:00
Beat Küng
79b3766544 orb: add unit tests for queuing, including tests with poll & notify interface
Both succeed under Posix & NuttX (Pixracer)
2016-06-02 07:24:44 +02:00
Daniel Agar
008354f935 testing cleanup 2016-05-13 13:01:41 +02:00
Daniel Agar
12165ba5a4 uORB separate tests 2016-05-13 13:01:41 +02:00