Commit Graph

493 Commits

Author SHA1 Message Date
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 756b0148d6
platforms: split posix hrt for qurt
- this keeps the per platform libraries contained to their respective directories and minimizes the ifdef mess
2020-01-12 22:09:34 -05:00
Daniel Agar 98c5c31aa1
Update submodule nuttx to latest Mon Jan 13 00:39:44 UTC 2020
- nuttx in PX4/Firmware (3459f0a99de671e03a894e5bb44f615c9184d702): 4c2da29353
    - nuttx current upstream: c6ba2c13c7
    - Changes: 4c2da29353...c6ba2c13c7

c6ba2c13c7 2019-12-24 David Sidrane - [BACKPORT] STM32F7 and STM32H7 SDMMC internal pull up usage fixed
a14d2cec3b 2019-12-22 David Sidrane - [REJECTED] Add check_format tooling
30e1808bc3 2019-12-22 David Sidrane - [REJECTED] nxstyle - output compiler like error format
2020-01-12 21:20:41 -05:00
Daniel Agar d1e3ff553b platforms: remove unnecessary i2c platform abstraction 2020-01-11 11:55:06 -05:00
Daniel Agar bd111c9f42
px4_work_queue: revert inherited sched attr and run wq:manager and max priority
Setting PTHREAD_EXPLICIT_SCHED was necessary on linux to create WQ threads with priorities relative to max, but unfortunately we can't rely pthread_attr_setinheritsched as it's dependent on system ulimit configuration or running privileged. Instead we can create the wq:manager at the maximum desired priority and allow each WQ thread to have a relative priority.
2020-01-10 17:57:51 -05:00
Daniel Agar a08b54b8e1
px4_work_queue: don't inherit pthread attributes from creating thread
- this is necessary on linux so that the WQ threads priorities are set relative to max, and not relative to the wq:manager thread
2020-01-10 11:02:49 -05:00
Daniel Agar 23e17aec42
atlflight/eagle: minor fixes to get it running again
- fixed df_ltc2946_wrapper battery dependency
 - fixed px4::atomic fetch_add for QuRT
 - updated PX4 QuRT SPI wrapper to set bus frequency
 - renamed "qurt-default" configs to just "qurt"
2020-01-09 18:09:06 -05:00
David Sidrane 9c1543c33f Nuttx with PX4 Contrib for SDIO PU fix 2020-01-08 12:23:01 -05:00
Daniel Agar d19f18d40b linux boards (ocpoc, bbblue, navio2) replace custom adc drivers with simple px4_arch implementation 2020-01-07 14:04:13 -05:00
Julian Oes fc9df31653 platforms: link libatomic only on emlid navio2 (raspberry pi)
Linking to libatomic is only required for targets such as Raspberry Pi but not on for normal x86/x86_64 Linux builds.
2020-01-06 20:15:39 -05:00
Daniel Agar 7166b867e1
NuttX stackcheck exclude PX4 Matrix and Param
- instrumenting PX4 Matrix and Param methods is too burdensome
 - partially restore px4_fmu-v5_stackcheck and holybro_durandal-v1_stackcheck to match default configs
2020-01-06 18:15:55 -05:00
Daniel Agar e29acea509 posix hrt add latency buckets 2020-01-06 16:26:56 +01:00
Daniel Agar 738b57c945 pxh: initialize all fields
- fixes Coverity CID 309151
2020-01-05 22:59:49 -05:00
Daniel Agar 44f9de5e37
delete parrot bebop board support
This target was never fully supported and is heavily dependent on a number of DriverFramework drivers that have no in tree equivalents (bebop bus, flow, rangefinder, etc). Deleting this will make it easier to fully drop DriverFramework shortly.
2020-01-05 19:46:51 -05:00
Daniel Agar aaf5670e7d
deprecate df_bmp280_wrapper and replace with in tree bmp280
- deprecate DriverFramework bmp280 driver (df_bmp280_wrapper)
 - update beaglebone blue and snapdragon flight eagle boards to use in tree bmp280
 - update posix (really just linux) and qurt I2C wrappers
 - tested on beaglebone blue
2020-01-05 13:33:12 -05:00
Daniel Agar b292b04ac1 platforms posix link atomic 2020-01-04 22:03:43 -05:00
Daniel Agar 1edfee4fdd mavsdk_tests: build should be independant of px4 2020-01-01 22:05:29 -05:00
Daniel Agar 9df06ffdea posix main wait_to_exit() fix and catch SIGTERM
- wait_to_exist() shouldn't depend on lockstep (px4_usleep)
2020-01-01 21:55:42 +01:00
Daniel Agar cc7a0cd69d beaglebone blue: build librobotcontrol with cmake 2019-12-29 17:32:06 -05:00
Daniel Agar 30a73416dc mavsdk SITL testing code coverage and upload to codecov.io 2019-12-26 14:31:33 -05:00
Lorenz Meier 742b1839d5 Simulation: Set scheduling policy RR for lockstep
This should ensure that all processes do still run at full load.
2019-12-26 10:16:58 +01:00
Julian Oes 16da8466e3 posix: exit if the startup script is not ok
In general, if anything goes wrong in the startup script, we
should fail entirely because things might not work as expected.

In particular, this prevents that we have to press Ctrl+C twice if the
simulator start call is hung waiting for the simulator to appear and
start communicating. We now press Ctrl+C once and exit straightaway
whereas before we would press it once to get the warning:
"Startup script returned with return value: 2",
and then finally exit on the second press.
2019-12-26 10:16:58 +01:00
Julian Oes a9ca16cafe
Fix a couple of flake8 Python warnings (#13763)
* Tools: fix flake8 error

* platforms: fix flake8 error

This is just guessed.
2019-12-19 07:36:16 -08:00
Christian Clauss 6dc55f97d4 More fixes for Python 3 compatibility (#13008)
* More fixes for Python 3 compatibility

* Workaround if the six module is not pip installed

* Lose the semicolons
2019-12-19 02:05:55 -08:00
Chris Lovett 01818b505f posix server: switch from fcntl(..., F_SETLK, ...) to flock(...) (#13718)
- Required for Windows
- Add better diagnostic output in some places.
- close the lock file descriptor where we don't need to keep it open
2019-12-18 09:53:07 +01:00
Daniel Agar 3d56f37606 vscode debug and ekf2 replay improvements
- create new px4_sitl_replay config specifically for replay
 - ekf2 replay don't launch gazebo
 - add px4_sitl_test cmake variant
 - px4_sitl_test bring into sync with px4_sitl_default
 - vscode replace hard coded build path with cmake setting
2019-12-17 10:19:56 -08:00
kamilritz 2a707cf669 Debug log replays with gdb in vscode 2019-12-15 10:28:04 -05:00
PX4 BuildBot 6f4b9f93fd Update submodule nuttx to latest Thu Dec 12 14:57:56 UTC 2019
- nuttx in PX4/Firmware (327c7f3672ee5f066ec53dfe1554a02d1aa610da): 2e55ce8ec9
    - nuttx current upstream: 9331fda0d7
    - Changes: 2e55ce8ec9...9331fda0d7

    9331fda0d7 2019-12-10 David Sidrane - [BACKPORT] IMXRT106x USDHC: Support regular GPIO for CD and inversion.
91c80c708b 2019-12-05 David Sidrane - [BACKPORT] imxrt106x:pinout add ALT 8 GPIO_GPT1_CAPTURE[1|2]
32f758f0e9 2019-12-03 David Sidrane - [BACKPORT] stm32f7:Add Serial Tx DMA
2019-12-12 10:23:29 -05:00
David Sidrane 74b6cc5bce px4_fmu-v5:Use Serial TX DMA on Telem 2 2019-12-09 16:23:16 -05:00
Daniel Agar 1d3f722201
px4_work_queue: increase hp_default stack 1800 -> 1900 bytes 2019-12-09 12:41:11 -05:00
Matthias Grob 904ab16558 Fix trailing whitespace, EOF newline, indentation 2019-12-09 13:22:19 +01:00
David Sidrane cada41f027 WorkQueueManager:Fix low stack warning introduced by stism330 2019-12-03 16:16:49 -05:00
Daniel Agar 1a395fb6d9 ST ISM330DLC IMU driver 2019-12-03 16:16:49 -05:00
Daniel Agar a859a6b57c
VSCode SITL debug improvements
- added gazebo VTOL tailsitter debug target
 - improved jmavsim debug target and helper tasks to work properly (build and launch directly instead of through the jmavsim_run.sh script)
 - improved output console handling for helper tasks (eg gazebo and jmavsim build and run, followed by cleanup after debug)
 - added miniterm.py as a task
2019-12-01 15:47:29 -05:00
PX4 BuildBot 5e95820e14 Update submodule nuttx to latest Sun Dec 1 00:38:57 UTC 2019
- nuttx in PX4/Firmware (22a005c9f4): 2d7920055f
    - nuttx current upstream: 398a59aaa4
    - Changes: 2d7920055f...398a59aaa4

    398a59aaa4 2019-11-29 David Sidrane - [BACKPORT] stm32f7:ethernet: Add some delays so that ifup() does not hog the CPU.
2019-11-30 21:16:33 -05:00
David Sidrane 44c7b90a7b stm32h7:Bootloader fix assertion caused by USB running
USB was still running in transition to Firmware. This
   resets the USB
2019-11-30 19:05:22 +01:00
Beat Küng 0f42ecc5c7 durandal-v1: enable dshot 2019-11-29 07:39:08 +01:00
Daniel Agar 071f159794 PX4 work queue: extend to UARTs 2019-11-27 20:44:32 -05:00
Daniel Agar a7fbaefd83 NuttX cmake small debug helper improvements 2019-11-26 15:39:02 -05:00
Daniel Agar a8ea55d9b6
remove all <cmath> usage
* the NuttX c++ library is incomplete, let's avoid including it until we have a real standard library in place
2019-11-25 10:04:04 -05:00
Daniel Agar bc182e94e6
sensors split rc_update into new standalone module 2019-11-24 13:25:11 -05:00
Daniel Agar 2811307293 px4_work_queue: increase wq:hp_default stack 1500->1800 bytes (found by stackcheck) 2019-11-23 17:23:30 -05:00
David Sidrane bbd37ada41 holybro_durandal-v1: update cdcacm product id 2019-11-22 09:39:15 -05:00
David Sidrane 7ca8a8dbaa durandal-v1:Bootloader
Change PID to 0x4b:
     Holybro obtained their own PID and VID but APM did not follow
     the PX4 convention of makeing the board_id (0x8b) match the PID)

   Incorporated the Upstream Bootloader state sequencing checking change.

   Change the usb cout to send all chars in 1 write.
2019-11-22 14:32:56 +01:00
Beat Küng 1371887578 board config: add define for adc voltage scaling 2019-11-21 08:19:59 +01:00
Beat Küng 4b290c4903 voltage & current scaling: use px4_arch_adc_dn_fullcount() instead of 4096
Fixes the scaling on h7 boards (the ADC has 16 bits resolution).
2019-11-21 08:19:59 +01:00
Daniel Agar 84fe64b1c2
create new multicopter rate controller module (mc_rate_control) split out of mc_att_control 2019-11-19 17:03:11 -05:00
Daniel Agar 1c4a8e7c11 cmake NuttX fix generated launch.json (vscode debug) 2019-11-18 13:21:33 -05:00
Daniel Agar 82fac4a0a7 cmake NuttX linker print memory usage 2019-11-18 12:36:29 -05:00
David Sidrane 67f27eb26c NuttX @ Offical release of 8.2 2019-11-17 04:06:49 -08:00