Commit Graph

111 Commits

Author SHA1 Message Date
Daniel Agar 08bf71b73d
drivers/tone_alarm and tune_control small improvements/cleanup
- drivers/tone_alarm: move to ModuleBase and purge CDev (/dev/tone_alarm0)
 - drivers/tone_alarm: only run on tune_control publication (or scheduled note) rather than continuously
 - drivers/tone_alarm: use HRT to schedule tone stop (prevents potential disruption)
 - msg/tune_control: add tune_id numbering
 - systemcmds/tune_control: add "error" special case tune_id
 - move all tune_control publication to new uORB::PublicationQueued<>
 - start tone_alarm immediately after board defaults are loaded to fix potential startup issues
 - for SITL (or other boards with no TONE output) print common messages (startup, error, etc)
2020-10-05 21:39:26 -04:00
Beat Küng 5fdff6a0e4 i2c drivers: add '-k' flag for keep_running directly to BusCLIArguments 2020-09-18 09:45:06 -04:00
Beat Küng 2956aa340e module: increase max timeout for stopping modules from 2s to 5s
The gps module might take up to 4s to stop (if stopped during module
configuration).
2020-09-13 18:31:37 -04:00
Daniel Agar 023f6d3983
NuttX cpuload monitoring optimization
- Nuttx only process all suspend & resume scheduling notes when top is running, otherwise only track IDLE
 - convert cpuload and print load to c++
 - delete unused fields from print_load struct
 - update hrt_store_absolute_time (previous unused)
2020-09-05 14:35:50 -04:00
Beat Küng 787f9c1213 i2c: use board-specific bus numbering for '-X -b <bus>' CLI
As boards don't have their external buses labeled consistently, it was not
useful to use an abstraction.
2020-09-03 15:32:35 -04:00
Daniel Agar 668c16da83 px4_work_queue: reset statistics after each status print 2020-09-02 10:09:13 -04:00
Beat Küng 4088c2581f
i2c_spi_buses: add '-q' for quiet startup flag (#14969)
* [WIP] i2c_spi_buses: add '-q' for quiet startup flag

And enable for optional board sensors.

* ROMFS: rc.sensors try starting all optional I2C sensors quietly

Co-authored-by: Daniel Agar <daniel@agar.ca>
2020-08-26 08:46:35 +02:00
Daniel Agar ad3e6ee5dd
wq:attitude_ctrl increase stack by 16 bytes (again) 2020-08-16 18:16:16 -04:00
David Sidrane 13246bdb2c common/shutdown:All FMU's not stying in bootloader
Fixes bug, wehre reboot -b would not stay in bootloader.
   Call was passing bit mask (=4) not integer value of 1.
2020-08-14 14:11:45 +02:00
Daniel Agar 0c91a29c3f wq:attitude_ctrl increase stack 2020-08-13 13:32:07 -04:00
Daniel Agar b6a17a6538
new IntrusiveSortedList container used for uORB, WorkQueues, and WorkItems
- new intrusive linked list container (c++ template) that sorts on insertion
 - primarily for convenience inspecting things in the system like uORB or WorkQueues
 - uorb status or top sorted alphabetically 
 - work_queue status threads sorted by priority, then items sorted alphabetically within each
2020-08-04 11:09:41 -04:00
Daniel Agar b54dea0ccd wq:attitude_ctrl: small stack increase to silence warning 2020-07-17 19:51:48 -04:00
Daniel Agar fa44cd5cd5 px4_work_queue: rename navigation_and_controllers -> nav_and_controllers
- keep the thread within the current NuttX max length
2020-07-14 09:48:47 -04:00
Daniel Agar 0eea814ca1 decrease all wq:SPIx stack 2020-06-18 20:49:15 -04:00
Daniel Agar be2081a2a2 wq:attitude_ctrl small stack increase 2020-06-18 01:36:29 -04:00
Daniel Agar 13e34b32e6 new Bosch BMI088 IMU driver using FIFOs and DRDY 2020-06-11 12:25:13 -04:00
Daniel Agar ff3b040d3c imu/invensense/icm20608g: minor improvements and potential fixes
- perform full sensor signal path reset and wait for max time (100 ms)
 - issue full sensor reset on any error
 - always read FIFO count before transfersj
 - only allocate drdy perf counter if GPIO is available
2020-06-05 21:28:37 -04:00
Daniel Agar 31fe7af454 selectively increase optimization -Os -> -O2
- targetted at modules/libraries that benefit without drastically
increasing flash usage
 - ignored on boards with CONSTRAINED_FLASH set
2020-06-04 20:59:52 -04:00
Julian Oes 1cb706c411 px4_log: flush each line
Without this fix all PX4 output is buffered and presented at the very
end of a scripted MAVSDK test which makes the log hard to read.
2020-05-29 11:46:14 +02:00
Daniel Agar 8ee0a5d328 px4_work_queue: minor status changes
- only record start time on first run rather than init
 - increase name length
 - round average interval to nearest microsecond
 - basic formatting consistency (google style guide)
2020-05-23 11:51:23 -04:00
Matthias Grob a605444462 board_comnmon: indent BOARDBRICK_VALID_LIST to correct level
to avoid other people getting confused as well.
2020-05-18 10:52:26 -04:00
Matthias Grob 22cdf80293 i2c_spi_buses.h: work around astyle version inconsistency 2020-05-14 08:32:07 +02:00
Daniel Agar 746a8f5cf9 commander: reboot/shutdown usability fixes
- always check with state machine before reboot/shutdown
 - respect BOARD_HAS_POWER_CONTROL (shutdown from command, low battery, power button)
 - px4_shutdown_request add optional delay and always execute from HPWORK
 - px4_shutdown_request split out px4_reboot_request
2020-05-06 13:53:54 -04:00
Daniel Agar 682aa700bb px4_work_queue: increase wq:attitude_ctrl stack 2020-05-05 12:53:18 -04:00
Daniel Agar 326d8efc16 move attitude controllers to new wq:attitude_ctrl 2020-04-27 21:34:35 -04:00
Beat Küng d3dd5e9da1 i2c_spi_buses: improve info output for external buses 2020-04-24 12:59:50 +02:00
Daniel Agar a3ad710623
restore UAVCAN bootloader support
- essentially reverting #7878 minus the obsolete board support
2020-04-19 16:10:09 -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
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
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
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
Beat Küng 6ad5357d1a SPI+I2C: remove unused defines and printf's 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 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
Matthias Grob 2dccc0dcfc posix.h: remove duplicate stdint.h include 2020-03-12 17:49:37 +00:00
David Sidrane 82ab1413fc px4_fmu-v5:Add Manifest Entries for UAVCAN interfaces 2020-03-11 20:36:58 -04:00