Commit Graph

76 Commits

Author SHA1 Message Date
Daniel Agar 44bec269b0 boards: update all NuttX configs CONFIG_NSH_MAXARGUMENTS 12 -> 15 2020-03-25 17:59:22 -04:00
Beat Küng b156fe5787 boards: remove deprecated SPI + I2C defines from board_config.h
chip-selects are deselected in stm32_spiinitialize()
2020-03-24 09:46:20 -04:00
Beat Küng 04cffce992 refactor aerofc_adc: use driver base class 2020-03-24 09:46:20 -04: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
SalimTerryLi dc8e775d8f
ADC: replace ioctl with uorb message (#14087) 2020-03-20 11:23:32 +01:00
Beat Küng 1b1e1ba31f refactor ll40ls: 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 be0a205438 refactor ist8310: use driver base class 2020-03-17 23:31:17 -04:00
Daniel Agar 0ce9e113ff boards: stm32f4/f7 enable SPI_DMATHRESHOLD=32 2020-03-11 22:08:37 -04:00
Beat Küng 179c89b6bd board configs: extend board_dma_map.h with a table 2020-03-11 22:08:37 -04:00
Daniel Agar c8509892a6 intel_aerofc-v1: add board_dma_map.h and enable SPI1 DMA 2020-03-11 22:08:37 -04: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
Daniel Agar 505afc6063 boards: increase LPWORKSTACKSIZE 1536 -> 1600 2020-03-10 12:53:01 -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
Daniel Agar 4698a09b98 delete unmaintained outback challenge (OBC) bottle drop example 2020-03-05 14:09:31 -05:00
Beat Küng 93106836df intel/aerofc-v1: use hw description methods for timer configuration 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
Beat Küng b399698306 ist8310: remove calibration code
- it does nothing useful
- increases boot time by 2 seconds on pixhawk 4 due to a poll timeout:
IST8310 on I2C bus 3 at 0x0e (bus: 100 KHz, max: 400 KHz)
WARN  [ist8310] ERROR: TIMEOUT 2
2020-02-06 12:39:39 -05: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 2bbf73097b
aerfofc_adc: move to PX4 WQ and cleanup 2020-01-09 10:44:42 -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
Daniel Agar 7241eebd80
cmake merge linux cross compile targets (cross + native) and cleanup
- consolidate cross and native variants (only a single default is needed)
   - beaglebone_blue_cross + beaglebone_blue_native => beaglebone_blue_default
   - emlid_navio2_cross + emlid_navio2_native => emlid_navio2_default
   - px4_raspberrypi_cross + px4_raspberrypi_native => px4_raspberrypi_default
 - move upload helpers to cmake/upload.cmake
2020-01-05 14:03:57 -05:00
Timothy Scott 993fa5bd37 Refactored to work with new battery_status module 2019-12-05 16:38:04 +01:00
Daniel Agar bc182e94e6
sensors split rc_update into new standalone module 2019-11-24 13:25:11 -05:00
Daniel Agar 8c38176d77 boards: alphabetize and sync common drivers and modules 2019-11-21 18:56:24 -05: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 99aae8b891 NuttX use toolchain math.h and avoid empty drivers/Kconfig 2019-11-16 11:43:42 +01:00
David Sidrane f5fefee57f intel:aerofc-v1 BSP Updated to NuttX 8.1+ 2019-11-16 11:43:42 +01:00
Daniel Agar 668984b6b0 boards: start adc in rc.board_sensors 2019-11-11 17:08:24 -05:00
Beat Küng b30171ba8d board_common.h: move under platforms/common
Also move board_determine_hw_info and board_gpio_init under platforms/nuttx
2019-10-30 11:48:47 +01: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 4192414576 clang-tidy: partially fix cppcoreguidelines-pro-type-reinterpret-cast 2019-10-28 10:50:31 -04:00
Daniel Agar 6a0f5249f8
sensors: split out analog battery handling to new standalone battery_status module 2019-10-21 13:40:23 -04:00
Daniel Agar c639444ef9 intel aerofc-v1 disable sih module to save flash 2019-10-02 19:44:46 -04:00
Daniel Agar 26364d44c9
px4_work_queue: command line status output and shutdown empty queues
* adds a work_queue systemcmd that will bring a tree view of all active work queues and work items
 * WorkQueues now track attached WorkItems and will shutdown when the last WorkItem is detached
2019-10-02 12:23:17 -04:00
Daniel Agar 0486d69240 delete obsolete segway example 2019-09-28 15:05:50 -04:00
mcsauder 7b16c3482d Refactor the ll40ls namespace driver methods to more closely match the cm8jl65, mappydot, leddar_one, and other distance sensor driver implementations. 2019-09-27 07:55:53 +01:00
BazookaJoe1900 e3b60cd9e7 rc.sensors: moved common ms5611 start to rc.board_sensors per board 2019-09-01 12:55:50 -04:00
Beat Küng f3fccf53f6 src/drivers/{kinetis,stm32}: move to arch-specific directories 2019-08-30 07:59:44 +02:00
Silvan Fuhrer cedf14e2ba Airspeed Selector: repurpose wind estimator into an airspeed (selection, validation) module.
This new airspeed module does:
  -runns an airspeed validator for every airspeed sensor present, which checks measurement validity and estimates an airspeed scale
  -selects another airspeed sensor if for the current one a failure is detected
  -estimates airspeed with groundspeed-windspeed if no valid airspeed sensor is present
  -outputs airspeed_validated topic

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-09 10:55:05 +02:00
Daniel Agar 0955fd2d58
NuttX boards reduce CONFIG_NFILE_DESCRIPTORS 54 -> 20 2019-08-07 21:23:27 -04:00
Daniel Agar 5421ef5535 NuttX increase HPWORK and LPWORK stack by 256 bytes 2019-08-06 23:15:07 -04:00
Daniel Agar 9d701a077d
NuttX reduce stack for interrupts, HPWORK, LPWORK 2019-08-06 11:00:55 -04:00
Beat Küng a3c920db7d board_defaults: remove unnecessary 'set MIXER_AUX none'
On all of these boards '$USE_IO = no' will hold.
2019-07-16 08:09:22 +02:00
Timothy Scott 2ed00c9cb6 Rover: Rewrote gnd_pos_control and removed gnd_att_control (#12239) 2019-07-11 09:39:13 -04:00
Daniel Agar 321c2c0392 boards don't use px4_add_library for drivers_board
- this prevents low level board support from using PX4 logging, uORB, etc
2019-07-09 19:09:47 -04:00
Daniel Agar 15d1543f95 create systemcmds/i2cdetect tool to scan i2c bus 2019-07-06 10:28:16 -04:00
Beat Küng 223e3c6429 aerofc rc.board_defaults: remove wrong parameter settings
This was a regression.
2019-06-06 11:11:44 -04:00