Commit Graph

31817 Commits

Author SHA1 Message Date
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 22a38453ab refactor bmi055: use driver base class 2020-03-17 23:31:17 -04:00
Beat Küng 969a77f889 refactor mpu6000: use driver base class 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
Beat Küng 3e71914fae refactor lsm9ds1+lsm9ds1_mag: use driver base class 2020-03-17 23:31:17 -04:00
Beat Küng 58f386a81c refactor pmw3910: use driver base class 2020-03-17 23:31:17 -04:00
Beat Küng 2f4080f47b i2cdetect: remove use of PX4_I2C_BUS_EXPANSION 2020-03-17 23:31:17 -04:00
Beat Küng 971897b9ed mtd: switch to c++ and use px4_find_spi_bus 2020-03-17 23:31:17 -04:00
Beat Küng f555fe309c fmu-v5: change external i2c bus ordering to match with the label 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 87cd20180c i2c spi: add unittests for BusCLIArguments 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
Matthias Grob fb1b6a0ab9 mc_pos_control: hotfix for takeoff ramp stuck with NAN
Reported by @dusan19 in #13973.
2020-03-17 16:19:35 +01:00
Matthias Grob eb3b0f6b55 mathlib: get rid of now duplicate sign() function
Instead use the one that was copied to the matrix library in
https://github.com/PX4/Matrix/pull/116/
2020-03-17 10:01:42 +01:00
Matthias Grob d313b0417a AttitudeControl: Take advantage of Quaternion.canonical()
Introduced by @kamilritz in
https://github.com/PX4/Matrix/pull/116/
2020-03-17 10:01:42 +01:00
Lorenz Meier 9275937b44 Commander: Exclude shell commands for constrained flash
These are convenience commands for developers and are not required for flash constrained targets.
2020-03-17 00:17:11 +01:00
Lorenz Meier 9119f13ff7 Commander: Do not print health flags on constrained flash
Boards with constrained flash are not classic development targets and do not need this.
2020-03-17 00:17:11 +01:00
Lorenz Meier e951123cff Health Flags: Optimize flash usage
Changing from a define to a function for reporting to safe space.
2020-03-17 00:17:11 +01:00
Lorenz Meier aea68f06f9 Commander: Streamline preflight and arming checks
The checks did previously only report the first failure (to not overload the radio link). As we are moving to buffered messages and higher bandwidth links this design choice is not any more in the best interest of the drone operator. We are now reporting all detected failures. To ensure architectural consistency more checks have been moved from the commander mainloop into the respective classes.
2020-03-17 00:17:11 +01:00
Lorenz Meier bf3b55cac7 Commander: Add function to print health flags consistently
This enables us to have better situational awareness during development and when inspecting a system in the field as to which subsystem is currently faulty. These flags are from standard MAVLink and are not sufficient nor do they match well the actual critical path to a safe flight. This will be addressed in a second step with the addition of a new MAVLink message and new flags.
2020-03-17 00:17:11 +01:00
Lorenz Meier 9d5aebd235 Commander: Run continuous pre-flight checks silently
As we are checking the current pre-flight state and validate wether the system could be armed, we do not want to spam the console or user with continously failing checks. These checks are reported to the GCS separately and are processed and displayed there.
2020-03-17 00:17:11 +01:00
Lorenz Meier 21435bd32b Report preflight and pre-arm checks from period checks
With this change we are reporting any issues we find with the periodic check.

Co-Authored-By: Beat Küng <beat-kueng@gmx.net>
2020-03-17 00:17:11 +01:00
Lorenz Meier ed0a01d5da Commander: Add reporting of preflight and prearming state
This is essential for the operator to know if the system is ready to fly.
2020-03-17 00:17:11 +01:00
Lorenz Meier 4f1749541c ROMFS: Exclude uncommon board configs (Generic 250) 2020-03-16 23:40:29 +01:00
Lorenz Meier cff36315c4 ROMFS: Exclude uncommon board configs (Beta75x) 2020-03-16 23:40:29 +01:00
Lorenz Meier f7455db20c ROMFS: Exclude uncommon board configs (Reaper) 2020-03-16 23:40:29 +01:00
Lorenz Meier 98c9e558ca ROMFS: Exclude uncommon board configs (3DR Quad) 2020-03-16 23:40:29 +01:00
Lorenz Meier 48d1c355c3 ROMFS: Exclude uncommon board configs (Solo) 2020-03-16 23:40:29 +01:00
Lorenz Meier 4c8866059d ROMFS: Exclude uncommon board configs (HK Micro) 2020-03-16 23:40:29 +01:00
Lorenz Meier ebf52a988a ROMFS: Exclude uncommon board configs (HB PX4 Vision) 2020-03-16 23:40:29 +01:00
Lorenz Meier 2e63a43ea1 ROMFS: Exclude uncommon board configs (HB S500) 2020-03-16 23:40:29 +01:00
Lorenz Meier f2037876a4 ROMFS: Exclude uncommon board configs (S500) 2020-03-16 23:40:29 +01:00
Lorenz Meier bf02b8cc72 ROMFS: Exclude uncommon board configs (QAV250) 2020-03-16 23:40:29 +01:00
Lorenz Meier 0808bc7243 ROMFS: Exclude uncommon board configs (QAVR5) 2020-03-16 23:40:29 +01:00
Lorenz Meier f660c495cb ROMFS: Exclude uncommon board configs (TBS Caipi) 2020-03-16 23:40:29 +01:00
Lorenz Meier 992adfed58 ROMFS: Exclude uncommon board configs (Parrot Disco) 2020-03-16 23:40:29 +01:00
Lorenz Meier 23bf4d5e1b ROMFS: Exclude uncommon board configs (Pigeon Airframe) 2020-03-16 23:40:29 +01:00
Lorenz Meier d397543262 ROMFS: Exclude uncommon board configs (Viper) 2020-03-16 23:40:29 +01:00
Lorenz Meier a304ce0d59 ROMFS: Exclude uncommon board configs (FX79) 2020-03-16 23:40:29 +01:00
Lorenz Meier c08128e917 ROMFS: Exclude uncommon board configs (Wing Wing) 2020-03-16 23:40:29 +01:00
Lorenz Meier 5f64efb87d ROMFS: Exclude uncommon board configs (Skywalker) 2020-03-16 23:40:29 +01:00
Lorenz Meier dd22b51606 ROMFS: Exclude uncommon board configs (Phantom) 2020-03-16 23:40:29 +01:00
Lorenz Meier 72cb9f2c1b ROMFS: Exclude uncommon board configs (Camflyer) 2020-03-16 23:40:29 +01:00
Lorenz Meier 936f93eb3a ROMFS: Exclude uncommon board configs (Generic Wing) 2020-03-16 23:40:29 +01:00
Lorenz Meier a2e2e4069b ROMFS: Exclude uncommon board configs (Dodeca Cox) 2020-03-16 23:40:29 +01:00