Commit Graph

697 Commits

Author SHA1 Message Date
Jakub Kákona dfa5ca1710
FlightGear simulator support (#14539)
- Add flightgear_bridge submodule.
- Add traget px4_sitl_nolockstep with disabled  LOCKSTEP simulation.
- Add flightgear viewer targets and startup scripts
- Add a few possible vehicles plane (rascal), autogyro (tf-g1), and rover (tf-r1))

Co-authored-by: Vit Hanousek <vithanousek@seznam.cz>
2020-04-29 08:46:59 +02:00
Daniel Agar 326d8efc16 move attitude controllers to new wq:attitude_ctrl 2020-04-27 21:34:35 -04:00
PX4 BuildBot 70329ce396 Update submodule nuttx to latest Sat Apr 25 12:38:14 UTC 2020
- nuttx in PX4/Firmware (2c938af28051250f90baf7c411179b9b01dc5d0c): 7fffab1610
    - nuttx current upstream: 66b4f2c4f2
    - Changes: 7fffab1610...66b4f2c4f2

    66b4f2c4f2 2020-04-21 Peter van der Perk - [Backport] Added S32K1XX progmem driver to use the FlexNVM memory
1b3fc1c668 2020-04-10 Peter van der Perk - Added net_trylock so we can call can_input while being in a interrupt handler
2020-04-25 09:14:39 -04:00
Beat Küng d3dd5e9da1 i2c_spi_buses: improve info output for external buses 2020-04-24 12:59:50 +02:00
JaeyoungLim 75054f11df
Add px4vision sitl target
- Use px4vision parameters
2020-04-20 18:08:41 -04:00
Beat Küng 3177b8d763 fix nuttx submodule: point to px4_firmware_nuttx-8.2 branch 2020-04-20 10:07:45 +02:00
JaeyoungLim 6e18cb85b1 Add plane lidar model
Add model that can test terrain estimated landing
2020-04-19 17:09:42 -04:00
Daniel Agar a3ad710623
restore UAVCAN bootloader support
- essentially reverting #7878 minus the obsolete board support
2020-04-19 16:10:09 -04:00
Beat Küng 4817e299f1 nuttx: update submodule 2020-04-16 14:39:16 -04:00
mcsauder 6548fde024 Whitespace cleanup to quiet new blank line at EOF git hook. 2020-04-15 23:00:39 -04:00
Daniel Agar 66eacd24bc
px4_fmu-v5_stackcheck: update stack sizes and add to Jenkins
- increase stack sizes to run cleanly under stackcheck
     - this is likely overkill for most boards, but using stackcheck to set our minimum ensures we have a very safe margin on regular builds and it's something we can currently afford
 - remove holybro_durandal-v1_stackcheck from test rack (there's only one unit)
2020-04-11 21:16:10 -04:00
Julian Oes 474c3c45f0 platforms: don't catch floating point errors
When this triggered it actually just kept printing
"floating point exception" and never recovered. By removing this we can
at least catch it with a core dump, in CI as well as locally.
2020-04-10 14:55:18 +02:00
Daniel Agar b64a5783bb
Update submodule NuttX-apps to latest Thu Apr 9 20:22:38 UTC 2020
- NuttX-apps in PX4/Firmware (cf2b0a47ce64ea50e9539689b1b704cd536b9558): 91b6ad6a0d
    - NuttX-apps current upstream: 95e105548a
    - Changes: 91b6ad6a0d...95e105548a

95e10554 2020-03-30 Peter van der Perk - [Backport] Add CONFIG_NET_CAN support to netinit.c
e17eeb31 2020-03-28 Peter van der Perk - [Backport] netutils SocketCAN suport & candump, cansend tool
2020-04-09 17:18:33 -04:00
PX4 BuildBot 3d27c7313c Update submodule nuttx to latest Tue Apr 7 03:33:04 UTC 2020
- nuttx in PX4/Firmware (3cee71918ad35d155fcdd5f32770dad98619eb84): 09f0aee352
    - nuttx current upstream: ec417d7466
    - Changes: 09f0aee352...ec417d7466

    ec417d7466 2020-04-06 Peter van der Perk - [Backport] FMUK66 SocketCAN driver & Configurable Bitrate support
a3132cf3b7 2020-03-30 Peter van der Perk - [Backport] SocketCAN support
2020-04-07 00:16:52 -04:00
Jacob Dahl d682ddb510
UAVCAN differential pressure sensor support
* added airspeed handling (differential pressure) to uavcan and uavcannode

Co-authored-by: Jacob Crabill <jacob@flyvoly.com>
2020-04-07 00:15:31 -04:00
Daniel Agar da383064c6 NuttX update with STM32H7 SPI DMA support
- holybro durdandal enable SPI DMA
2020-04-06 22:08:45 -04:00
AlexKlimaj d8c140be04
UAVCAN Smart Battery Improvements 2020-04-06 21:09:02 -04:00
Daniel Agar ad559a66a1 examples: add simple work_item example module 2020-04-06 09:43:55 -04:00
Daniel Agar 1d164c0dbd px4_work_queue: sem_wait add loop as the wait may be interrupted by a signal 2020-04-06 10:30:35 +02:00
Beat Küng a556a44a57 i2c_spi_buses: print an error if a driver does not pass the I2C address 2020-03-30 15:55:24 -04:00
JaeyoungLim a938410c15 Add world targets and update submodules
Add world names as make targets and include the worlds by updating the submodules
2020-03-29 13:29:07 +01:00
Matthias Grob 6602e8d16b Support python3 only systems
Ubuntu 20.04 and latest Cygwin come with no Python 2 and no link
from python to python3. To not mess with the system we detect
python3 for seamless support.
2020-03-28 17:02:24 +00:00
Peter van der Perk 9490f41f85 rddrone-uavcan146 removed shared clock between hrt & rtc
Removed non-existing SW2 button
Fixed SW3 button pinmux
Added FlexCAN pin definition
hrt use external sirc clock
rtc use 32khz lpo clock
2020-03-28 06:31:11 -07:00
Peter van der Perk a4e6f96365
rddrone-uavcan146: HRT & RTC timer support 2020-03-25 16:37:28 -04:00
Hyon Lim 0b3624ab5f To make UVify device compatible with upload script, we changed device name to be more generalized. 2020-03-25 16:16:45 -04:00
Daniel Agar efceccd91d posix: micro_hal.h add empty px4_arch_gpiosetevent to build new Invensense drivers on linux 2020-03-25 01:05:38 -04:00
Daniel Agar 404e781cd9 px4_work_queue: increase SPI stack uniformly to silence warnings 2020-03-25 01:05:38 -04:00
JaeyoungLim e2d2ae29a9 Add sonoma raceway world 2020-03-24 19:32:12 +00:00
Beat Küng 7ea8dff8db spi: do not deselect other chip-selects
And make sure on reset & init everything is deselected.

Reduces CPU load on a pixhawk cube by almost 1%.
2020-03-24 09:46:20 -04:00
Beat Küng 1612f4c2ed SPI: disable SPI locking where possible
It's not possible for buses that run both NuttX and PX4 drivers, e.g.
Pixracer.

Reduces CPU load:
- v5x: 2.5%
- v3 (pixhawk cube): 4.4%
2020-03-24 09:46:20 -04:00
Beat Küng 6ad5357d1a SPI+I2C: remove unused defines and printf's 2020-03-24 09:46:20 -04:00
JaeyoungLim 2ef37cd065 Spawn models separately from gazebo models
Detach model spawning process from the world description file, so that the same model can be used with different worlds
2020-03-23 10:55:13 +01:00
Daniel Agar 8738c26426
boards: enable NuttX SPI DMA buffers
- update to NuttX with stm32f4 and stm32f7 SPI DMA internal buffers
 - remove explicit DMA buffer allocations from new IMU drivers
 - restore original BOARD_DMA_ALLOC_POOL_SIZE
 - decrease SPI DMA thresholds based on fmu-v2/v3/v4/v5 bench testing
2020-03-22 19:24:26 -04:00
Daniel Agar b73ec18abb
boards: add px4_fmu-v4 and px4_fmu-v5 optimized (-O3) build variants 2020-03-22 17:50:17 -04:00
SalimTerryLi dc8e775d8f
ADC: replace ioctl with uorb message (#14087) 2020-03-20 11:23:32 +01:00
Beat Küng d6bb5b3b9e i2c spi buses: enforce drivers to set default SPI/I2C bus frequency
Not a lot of drivers use the global default, which is somewhat arbitrary.
2020-03-17 23:31:17 -04:00
Beat Küng a6ddf0e4b9 refactor sf1xx: use driver base class 2020-03-17 23:31:17 -04:00
Beat Küng dbb53044ce refactor ms5611: use driver base class
Also: remove device type auto-detection as it will not work with
together with the new SPI board config (which specifies a specific
device type)
2020-03-17 23:31:17 -04:00
Beat Küng 83b6f6456b refactor I2CSPIInstance: store running instances in a global linked list
instead of a static per-driver array.

Reduces BSS RAM usage by a couple of 100 Bytes (linear increase with num
drivers).

Downsides:
- a bit more runtime overhead
- less isolation, locking required
- a bit more complex
2020-03-17 23:31:17 -04:00
Beat Küng e7f04109d9 i2c spi init + custom methods: use WorkItemSingleShot
Use it for custom methods as well (like reset), and run by default on the
work queue, since they typically access the bus.
2020-03-17 23:31:17 -04:00
Beat Küng 8c41025565 px4_work_queue: add WorkItemSingleShot
To run a specific method on a work queue and wait for it to return.
2020-03-17 23:31:17 -04:00
Beat Küng 134413233a i2c spi: extend BusCLIArguments to handle common driver arguments 2020-03-17 23:31:17 -04:00
Beat Küng d1f5b23a5a module docs: add PRINT_MODULE_USAGE_PARAMS_I2C_{SPI_DRIVER,ADDRESS}
For SPI/I2C driver default options
2020-03-17 23:31:17 -04:00
Beat Küng f851f65f8d i2c spi: add type to I2CSPIInstance
Needed to distinguish runtime instance types of the same driver (e.g.
bmi055 accel vs gyro).
2020-03-17 23:31:17 -04:00
SalimTerryLi b70289c536 move __PX4_LINUX out of px4_impl_os.cmake 2020-03-17 13:20:32 -04:00
PX4 BuildBot 20a8a0231b Update submodule nuttx to latest Sun Mar 15 12:39:29 UTC 2020
- nuttx in PX4/Firmware (048c47d7e2cc686fdd4037cb33bb86ca0ac62c17): db7fb6b6c0
    - nuttx current upstream: befe53e7f1
    - Changes: db7fb6b6c0...befe53e7f1

    befe53e7f1 2020-03-12 Jari van Ewijk - [BACKPORT] NXP RDDRONE-UAVCAN boards (S32K1XX) - Clean up clock config (#557)
09a23ebf7f 2020-03-12 Jari van Ewijk - [BACKPORT] NXP S32K1XX EVB boards - clock config cleanup (#556)
6c95d5fc33 2020-03-12 Jari van Ewijk - [BACKPORT] NXP S32K1XX peripheral clock fixes (#555)
2020-03-15 13:42:45 -04:00
Lorenz Meier 8a6d444467 Enable Gazebo mock optical flow 2020-03-14 17:50:40 +01:00
Lorenz Meier 76b3c18625 Add dedicated survey camera plane model
This is to allow us to test triggering properly in SITL
2020-03-14 17:50:40 +01:00
Matthias Grob 2dccc0dcfc posix.h: remove duplicate stdint.h include 2020-03-12 17:49:37 +00:00
Daniel Agar f9794e99f8
move hover_thrust_estimator to new module (mc_hover_thrust_estimator)
* MC_HTE: unitialize with hover_thrust parameter
* MC_HTE: constrain hover thrust setter between 0.1 and 0.9
* MC_HTE: integrate with land detector and velocity controller
* MCHoverThrustEstimator: Always publish an estimate even when not fusing measurements. This is required as the land detector and the position controller need to receive a hover thrust value.

* MC_HTE: use altitude agl threshold to start the estimator
local_position.z is relative to the origin of the EKF while dist_bottom
is above ground

Co-authored-by: bresch <brescianimathieu@gmail.com>
2020-03-11 21:20:54 -04:00
David Sidrane 82ab1413fc px4_fmu-v5:Add Manifest Entries for UAVCAN interfaces 2020-03-11 20:36:58 -04:00
Daniel Agar 9cd8bb4f88
sensors: move to WQ
Running the sensors module out of the same WQ thread as the estimator, position, and attitude controllers is a bit safer and prevents potential priority and starvation issues. There is a very small increase in latency (~50 us) between sensors and ekf2 execution (on average). This also saves a little bit of memory (~ 3 kB) and cpu (~1-1.5% depending on the board).
2020-03-11 11:34:04 -04:00
PX4 BuildBot 249ad0ced1 Update submodule nuttx to latest Wed Mar 11 12:38:18 UTC 2020
- nuttx in PX4/Firmware (ac11b36e74e27ef7054d6386f0fce62108b5f614): bf646dcf46
    - nuttx current upstream: db7fb6b6c0
    - Changes: bf646dcf46...db7fb6b6c0

    db7fb6b6c0 2020-03-05 Jari van Ewijk - [BACKPORT] S32K1xx boards - Remove unused files (should have been renamed)
2020-03-11 09:45:00 -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
Beat Küng 335623e11d SPI config: use enum to specify bus 2020-03-10 10:11:43 -04:00
Beat Küng 1851665fab boards: add new spi+i2c config
Chip-select and SPI initialization uses the new config, whereas the drivers
still use the existing defines.

The configuration in board_config.h can be removed after all drivers are
updated.
2020-03-10 10:11:43 -04:00
Beat Küng 06712450a7 i2c+spi: add module base class and bus iterators 2020-03-10 10:11:43 -04:00
Beat Küng af15c7d945 i2c+spi: extend hw_description for I2C + SPI 2020-03-10 10:11:43 -04:00
Beat Küng 18bc6cf872 ScheduledWorkItem::ScheduleClear: remove item from runnable queue
The existing behavior is unexpected: if the work item is already on the
runnable queue, it will still be triggered after a call to ScheduleClear().
This can lead to race conditions.
2020-03-09 08:06:00 -04:00
Daniel Agar fca7700746
Update submodule nuttx to latest Wed Mar 4 01:36:16 UTC 2020
- nuttx in PX4/Firmware (b7a83e23c5e50896bb137266cf89ff928dfaae42): d509b1edd7
    - nuttx current upstream: bf646dcf46
    - Changes: d509b1edd7...bf646dcf46

    bf646dcf46 2020-03-03 Daniel Agar - [BACKPORT] stm32h7: spi_exchange (no dma) available with CONFIG_STM32H7_SPI_DMATHRESHOLD
    f2a7ef0ade 2020-03-03 Daniel Agar - [BACKPORT] stm32f7: spi_exchange (no dma) available with CONFIG_STM32F7_SPI_DMATHRESHOLD
    7ffc59ba3d 2020-03-03 Daniel Agar - [BACKPORT] stm32: spi_exchange (no dma) available with CONFIG_STM32_SPI_DMATHRESHOLD
    d1c8fdb5fb 2020-03-02 Daniel Agar - [BACKPORT] arm/stm32h7 add STM32H7_SPI_DMATHRESHOLD
    fa8d636118 2020-03-02 Daniel Agar - [BACKPORT] stm32f76xx77xx_dma.h fix DMAMAP_SPI2_RX_2/DMAMAP_SPI2_TX_2
    762d80b217 2020-03-02 Daniel Agar - [BACKPORT] arm/stm32f7 add STM32F7_SPI_DMATHRESHOLD
    4f4bbbbf1c 2020-03-02 Daniel Agar - [BACKPORT] arm/stm32 add STM32_SPI_DMATHRESHOLD

Co-authored-by: PX4 Build Bot <bot@px4.io>
2020-03-03 20:56:48 -05:00
David Sidrane ee220a5086 px4_fmuv5x:Update manifest for USB not present 2020-03-02 19:59:36 -05:00
David Sidrane 431f7c16c8 NuttX with PX4 Contrib backported imxrt:Call out to board to set up FlexRAM 2020-03-02 10:20:33 -08:00
David Sidrane cad3a811d2 nxp_fmurt1062-v1:Run from OCRAM 2020-03-02 10:20:33 -08:00
David Sidrane e12bce3a20 px4_add_board:Add Optional LINKER_PREFIX 2020-03-02 10:20:33 -08:00
TSC21 993755b24b bitmask.h: compile only if in POSIX/LINUX platforms 2020-02-28 10:59:50 +00:00
TSC21 f5000a9691 px4_platform_common: add bitmask.h for templated type safe bitmask operations 2020-02-28 10:59:50 +00:00
SalimTerryLi 77a9135036
ADC driver report back vref alone with sample count (#14136)
* Introduce "px4_arch_adc_reference_v"

* Revert "Introduce "px4_arch_adc_reference_v""

This reverts commit 93691fbbd55a1b8da8c190e225b318067d90399b.

* use structure to return sample count and vref at the same time

* Revert "use structure to return sample count and vref at the same time"

This reverts commit 9cfd1c173cda51495f766a3f678c2202d67725fd.

* Revert "Revert "Introduce "px4_arch_adc_reference_v"""

This reverts commit edb7f7603e4471163ffb0fc6fc62ad2e30336e91.

* fix missed reference

* remove unecessary channel specific vref

* Update src/drivers/drv_adc.h

Co-Authored-By: David Sidrane <David.Sidrane@Nscdg.com>

* Update src/drivers/drv_adc.h

Co-Authored-By: David Sidrane <David.Sidrane@Nscdg.com>

* Introduce BOARD_ADC_POS_REF_V

Co-authored-by: David Sidrane <David.Sidrane@Nscdg.com>
2020-02-21 06:52:45 -08:00
JaeyoungLim e0d6f94318 Add boat(usv) sitl target 2020-02-21 00:30:15 -08:00
Daniel Agar 22499effb9 invensense icm20602 improvements
- checked register mechanism and simple watchdog
    - driver checks for errors gradually and can reconfigure itself
 - respect IMU_GYRO_RATEMAX at the driver level
 - fixed sensor INT16_MIN and INT16_MAX handling (y & z axis are flipped before publishing)
 - increased sensor_gyro_fifo max size (enables running the driver much slower, but still transferring all raw data)
 - PX4Accelerometer/PX4Gyroscope remove unnecessary memsets
2020-02-18 19:21:20 -05:00
Julian Oes cf47c2155f
platforms: prevent stackoverflow for ekf2 sideslip
It turns out that ekf2 needs more stack when sideslip fusion fails.
Sideslip fusion is currently only enabled for fixedwing by default and
not executed in testing.
2020-02-18 16:42:16 -05:00
Daniel Agar d7c3e1066a
uavcannode updates and px4_fmu-v4_cannode example
- drivers/uavcannode add baro, mag, gps publications
 - delete old px4_cannode-v1 board
 - add stripped down simple rcS for CAN nodes
2020-02-16 12:11:54 -05:00
Beat Küng 6b1ee7bbe2 io_timer_init.h: avoid using timer_channel, as imxrt does not have it 2020-02-13 03:49:16 -08:00
Beat Küng ef36d70cb4 px4_arch imxrt: add hw description constexpr util methods 2020-02-13 03:49:16 -08:00
Beat Küng 8cd9afc19a imxrt io_timer: remove some fields from io_timers_t and split out channel indexes
IOMUX uses different enumeration from GPIO pin + port, so we cannot use
.gpio_out, and add a .gpio_portpin.
2020-02-13 03:49:16 -08:00
Beat Küng d74d094940 nuttx configs: disable nuttx timers which are used for PWM output
These are not required, and to be consistent we enforce disabling them now.
2020-02-13 03:49:16 -08:00
Beat Küng 6cdf368776 stm32 io_timer: add support for 16 PWM outputs 2020-02-13 03:49:16 -08:00
Beat Küng 3217b539c6 px4_arch: add hw description constexpr util methods
These will be used in the board configurations.
2020-02-13 03:49:16 -08:00
Beat Küng 418262a131 px4_micro_hal: add PX4_MAKE_GPIO_INPUT and PX4_MAKE_GPIO_OUTPUT
Instead of using macros defined in the board config.
2020-02-13 03:49:16 -08:00
Beat Küng 685be9b3d1 io pins: avoid using GPIO_GPIOx_OUTPUT, use timer_io_channels instead
The whole system now uses timer_io_channels, which will allow the redundant
GPIO_GPIOx_OUTPUT definitions to be removed.
2020-02-13 03:49:16 -08:00
Beat Küng 62b4f3487a io timer: remove some fields from io_timers_t and split out channel indexes
- reduces amount of board configuration required
- removes the cyclic dependency between io_timers_t and timer_io_channels_t

Fixes a bug in the fmuk66-v3 config: the 2. timer has 3 channels associated
not 2.
Fixes a bug in the modelai config: the 2. timer has 4 channels associated.
2020-02-13 03:49:16 -08:00
David Sidrane 80ac80b5e4 s32k1xx:Add stubbed out chip and arch 2020-02-12 10:29:27 -05:00
Daniel Agar 0d36e5094b px4_io-v2 add to vscode variants and fix SVD file find 2020-02-10 09:40:39 +01:00
Daniel Agar 8cdbc4c593 px4iofirmware: add PX4IO_PERF define to completely disable perf counters 2020-02-10 09:40:39 +01:00
Daniel Agar e6d7612997 cmake jlink add path hints for macos 2020-02-09 23:24:44 -05:00
PX4 BuildBot c6c7f963ac Update submodule nuttx to latest Sat Feb 8 12:38:09 UTC 2020
- nuttx in PX4/Firmware (4b356c91f2be41dfdadb38270fab01ddb337d3c7): 7b36108b54
    - nuttx current upstream: fdf1837077
    - Changes: 7b36108b54...fdf1837077

    fdf1837077 2020-02-07 Peter van der Perk - [BACKPORT] S32K add support for Nxp drone boards (#224)
f479b26c98 2020-02-07 Peter van der Perk - [BACKPORT] imxrt added missing i2c prescale mask
26dd187034 2020-02-07 Peter van der Perk - [BACKPORT] Kinetis renamed TJA1100 to TJA110X registers
2020-02-08 13:59:26 -05:00
Daniel Duecker 36f836be79
add support for unmanned underwater vehicles (#14079)
* add support for unmanned underwater vehicles:
* airframe uuv_generic + uuv_hippocammpus including mav_type = 12 for submarines
* mixer for UUVs with X-shaped thruster setup similar to quadcopter
* add module  uuv_att_control for underwater robot attitude control
* add rc.uuv_defaults/apps for autostarting e.g. ekf2 and uuv_att_control app
2020-02-04 23:24:37 -05:00
SalimTerryLi e0abe7090e
SBUS on Linux: replace termios with termios2 and add UNKNOWN UART WQ 2020-02-02 14:06:27 -05:00
JaeyoungLim 6dc3cbbd95
SITL add catapult plane target for new gazebo model (plane_catapult) 2020-02-02 11:59:17 -05:00
David Sidrane 22c422d017 Update platforms/nuttx/NuttX/nuttx: imxrt backports merged 2020-01-29 13:54:20 -05:00
David Sidrane 2f1bc6676e imxrt:Add critmon 2020-01-29 13:54:20 -05:00
David Sidrane eb30041958 nxp_fmurt1062-v1:PROBES:carry includes and path needed 2020-01-29 13:54:20 -05:00
David Sidrane 37995793f4 Updateded NuttX with backports of PX4 imxrt contrib 2020-01-29 13:54:20 -05:00
David Sidrane 304bef3554 iimxr:Needed more margin on minimum reload. 2020-01-29 13:54:20 -05:00
David Sidrane a223899e3e imxrt:ToneAlarmInterface Reset mode is dependant on Chan 1 2020-01-29 13:54:20 -05:00
David Sidrane 51f0bc9788 fmurt1062-v1:Remove EVK build options 2020-01-29 13:54:20 -05:00
David Sidrane 490fe8256f Add nxp imxrt device support 2020-01-29 13:54:20 -05:00
kritz 92e75452f5
Flow mockup (#14054)
* Add optical flow mockup model

* Update Tools.sitl_gazebo
2020-01-29 14:06:46 +01:00
Daniel Agar 24f0c2d72a
sensors: move gyro filtering to sensors/vehicle_angular_velocity
- gyro filtering (low-pass and notch) only performed on primary gyro in `sensors/vehicle_angular_velocity` instead of every gyro in `PX4Gyroscope`
 - sample rate is calculated from actual updates (the fixed value was slightly wrong in many cases, and very wrong in a few)
 - In the FIFO case the array is now averaged and published in `sensor_gyro` for filtering downstream. I'll update this in the future to use the full FIFO array (if available), but right now it should be fine.
2020-01-27 10:05:33 -05:00
Julian Oes 30188d2884 Revert "Simulation: Set scheduling policy RR for lockstep"
This reverts commit 742b1839d5.
2020-01-24 12:04:47 +01:00
Daniel Agar 693d532bba
mRo x2.1 777 board support 2020-01-22 15:02:55 -05:00
Daniel Agar 21a8d7db7f WorkItem modules: Run() shouldn't be public 2020-01-22 12:03:03 -05:00
Daniel Agar b47eaa6061
update C++ standard (c++11 -> c++14)
- temporarily disable snapdragon builds until toolchain is updated
2020-01-21 21:49:10 -05:00
Daniel Agar fcbf8b6bcd platforms/nuttx: fix fmu-v4pro jlink debug device helper 2020-01-21 22:24:58 +01:00
Daniel Agar dc05ceaad2
create temperature_compensation module
- this is a new module for temperature compensation that consolidates the functionality previously handled in the sensors module (calculating runtime thermal corrections) and the events module (online thermal calibration)
 - by collecting this functionality into a single module we can optionally disable it on systems where it's not used and save some flash (if disabled at build time) or memory (disabled at run time)
2020-01-20 21:42:42 -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
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