27 Commits

Author SHA1 Message Date
Beat Küng
05a3492174 commander: remove low priority thread, run tasks in a worker thread on demand
- removes race conditions
- removes dependencies on static data & methods
- reduces RAM usage by ~3.8KB
2020-11-30 11:53:22 -05: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
Daniel Agar
bc9fb26ccd commander esc_calibration move to uORB::Subscrition 2019-07-31 20:30:05 -04: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
48d9484ceb commander fix and enforce code style 2018-11-28 20:42:03 -05:00
Bob-F
2ece14bad1 Port PX4 to BeagleBone Blue Board using library librobotcontrol instead of a submodule 2018-08-06 13:32:36 +02:00
Roman
9d1fa8cee2 esc_calibration: adjust timeout when waiting for user to connect battery
to 20 seconds

Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-03 07:05:38 +00:00
Roman
5d87eed41c esc_calibration: use hrt_elapsed_time instead of manually calculating the diff
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-03 07:05:38 +00:00
Roman
73577df994 esc_calibration: use batter status connected flag instead of checking voltage
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-03 07:05:38 +00:00
Roman
beb8c3e152 esc_calibration: use predefined literals
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-03 07:05:38 +00:00
Roman
8b629454de esc_calibration: increase safety and initialise all data
- do not do calibration if not very sure that battery is not connected
- initialise all structs and variables

Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-03 07:05:38 +00:00
Julian Oes
6ff9fd2209 calibration: remove warning message
The calibration warning was only used in the ESC calibration and in all
cases it actually meant that the calibration failed. In order to keep
the API as small as possible, I've deprecated the warning string and
converted the warning messages to failed messages.
2018-06-29 16:07:32 +00:00
davidaroyer
99799d83b1 ocpoc support: update copyright dates 2017-06-04 04:24:50 +08:00
davidaroyer
dbbe3c0863 commander: add support for Aerotenna OcPoC-Zynq hardware 2017-06-04 04:24:50 +08:00
Beat Küng
241fd629ce ERROR macro: get rid of the many 'oddly, ERROR is not defined for c++', use PX4_ERROR 2016-09-30 13:50:51 +02:00
Sander Smeets
c4eb65862f Reduce esc calibration pwm timeout (#5011) 2016-07-27 01:52:20 -07:00
Lorenz Meier
d369a26db4 Fix ESC calibration 2016-05-09 08:44:50 +02:00
Lorenz Meier
32cd154d7c Revert "ESC cal: Increase timeouts"
This reverts commit d2575c25563d5731f6db0a1607d096198d32cabe.
2016-05-09 08:37:05 +02:00
Julian Oes
8707cfe9f2 commander: use macro with wait in all calibrations 2016-04-05 15:36:03 -07:00
Felix Hu
bd580e09bf supports MindPXv2 borad which is a product from AirMind. 2016-03-30 19:45:39 +02:00
Julian Oes
bba0d0384d drivers/modules: changes after mavlink_log change
The mavlink_log API changes lead to changes in all drivers/modules using
it.
2016-03-24 13:10:02 +01:00
Lorenz Meier
d2575c2556 ESC cal: Increase timeouts 2016-02-19 22:31:24 +01:00
Don Gagne
fe357a9a66 Separate timeouts for battery and high pwm 2015-05-22 11:24:07 -07:00
Don Gagne
25e7a1a49e ESC calibration re-work
- Uses standard QGC cal mavlink messaging
- Timeout if no battery connect
- Better error handling and cleanup
2015-05-22 09:29:59 -07:00
Mark Charlebois
0cea93a55c POSIX and QuRT: fixed calls needing px4_ prefix
There were some missed calls to open and ioctl that need to be
px4_open and px4_ioctl.

QuRT also does not provide usleep() so px4_time.h has to be included
in files calling usleep.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-05 12:13:39 -07:00
Roman Bapst
be03f98d64 added esc calibration routines 2015-04-28 15:15:46 +02:00