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)
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)
The check is unnecessary. In the worst case the semaphore gets unlocked
twice, but it's not an issue because the waiter is only interested in the
first sem_post(), and the semaphore is then not used anymore.
poll() is one of the heavily used methods and thus needs to be optimized
as much as possible.
Test on Pixracer: uorb_tests latency_test
Before:
uORB note: ---------------- LATENCY TEST ------------------
INFO [uorb_tests] mean: 40.4320 us
INFO [uorb_tests] std dev: 1.3466 us
INFO [uorb_tests] min: 39 us
INFO [uorb_tests] max: 57 us
INFO [uorb_tests] missed topic updates: 0
This Patch:
uORB note: ---------------- LATENCY TEST ------------------
INFO [uorb_tests] mean: 31.3480 us
INFO [uorb_tests] std dev: 1.4584 us
INFO [uorb_tests] min: 30 us
INFO [uorb_tests] max: 45 us
INFO [uorb_tests] missed topic updates: 0