Commit Graph

24100 Commits

Author SHA1 Message Date
Beat Küng f5d9155ab2 mc_att_control params: reduce default max acro rates from 360 to 120 deg/s
360 is too fast if you just want to hover. Next step is to add expo(),
so that we still have fine-grained control at the center and high rates
at the edges.
2017-10-01 15:36:21 +02:00
Beat Küng 55da07d3c4 mc_att_control: fix computation of yaw weight for attitude control
Previously, the yaw weight was based on the tilt angle of the attitude
setpoint (R_sp(2, 2) == cos(tilt angle)). This makes no sense, it means
the weight is low for high tilt angles even if there is no roll-pitch error
at all.

This patch changes the weight computation to be based on the tilt angle
error: the yaw weight is 1 if there is no roll-pitch error (independent
from current tilt angle), and is reduced for higher tilt angle errors.

The weight was added in 05e9a30573, without any explanation or
derivation of how and why the weight is chosen that way.

However this patch works much better in practice. The yaw control is
improved, though it can be a bit slow to converge if you do continuous &
fast roll-pitch motions (which is expected).
2017-10-01 15:36:21 +02:00
Beat Küng 2f1ca409b7 mc_att_control: add more comments to the code, better explaining what it does
No semantic changes.
2017-10-01 15:36:21 +02:00
Beat Küng 69b1bfca6c mc_att_control: fix yaw feedforwarding
The feedforwarding was applied in the wrong frame: the term is given in
global coordinates, but was directly applied to body coordinates. This
patch adds the missing transformation from global to body frame.

In addition, it moves the feedforwarding before the rate limitation, so
that we cannot exceed the configured rates.
2017-10-01 15:36:21 +02:00
Beat Küng 2cc18d2d52 mc_att_control: move the board_rotation computation to the parameters_update
It's not necessary to do this computation in each loop iteration.
2017-10-01 15:36:21 +02:00
Beat Küng 27f020af05 mc_att_control: remove the hardcoded max throttle limit of 0.9 for ACRO 2017-10-01 15:36:21 +02:00
José Roberto de Souza 0d5480e540 driver: ll40ls: Correctly instantiate with the right parameters (#8032)
It was setting the rotation value to the I2C slave address
causing it to not be successfully probe.

Changing the constructor paramters order instead of
just fix line instantiating to keep consistency with
the other lidars and sonars.
2017-09-29 20:25:09 -04:00
Lucas De Marchi fa458cdf0e build: get rid of annoying CMake warning (#8033)
Depending on the CMake version when we are configuring it emits a
warning about deprecation of CMAKE_FORCE_CXX_COMPILER. However we
rely on this macro and don't want to do what CMAKE_CXX_COMPILER
is doing. Here is what I get with CMake 3.9.1:

	CMake Deprecation Warning at /usr/share/cmake/Modules/CMakeForceCompiler.cmake:83 (message):
	  The CMAKE_FORCE_CXX_COMPILER macro is deprecated.  Instead just set
	  CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
	Call Stack (most recent call first):
	  cmake/toolchains/Toolchain-arm-none-eabi.cmake:37 (cmake_force_cxx_compiler)
	  /usr/share/cmake/Modules/CMakeDetermineSystem.cmake:94 (include)
	  CMakeLists.txt:263 (project)

Avoid the warning by passing -Wno-deprecated to cmake.
2017-09-29 20:24:14 -04:00
David Sidrane a9bd3aeb85 Fixed typo usb_vaild -> usb_valid 2017-09-29 10:46:50 -10:00
Daniel Agar 9ce3412a93 NuttX board build not needed (#8029) 2017-09-29 06:48:25 -10:00
Daniel Agar 352d65a14a navigator delete unused attitude setpoint (#8028) 2017-09-29 11:51:00 -04:00
Daniel Agar 3ac6d1aa27 px4fmu-v2 and px4fmu-v3 boards cleanup 2017-09-29 10:13:51 -04:00
David Sidrane 95cea13090 Updated nuttx and apps submodules for 1.7 Release
Tied to nuttx, apps  px4_firmware_nuttx-master
     rebased on upstream nuttx master @ 3647ace55958c094cfe93f07092d308a768f5ca3
     rebased on upstream apps master @ 21c9b793e2ca6f4e86388c80d7af5c466de5e71c
2017-09-29 10:13:51 -04:00
Daniel Agar 2113772443 improve nuttx verbose build 2017-09-29 10:13:51 -04:00
Daniel Agar 48f1e3ed1c uORB generation move to msg/ 2017-09-29 10:13:51 -04:00
Daniel Agar 03784c6b01 nuttx fix px4 builtin generation dependency 2017-09-29 10:13:51 -04:00
Daniel Agar e38136fc9f NuttX build re-enable hard link copy and improve builtin_list 2017-09-29 10:13:51 -04:00
Lorenz Meier f9c9890a49 EKF2: Add minimal stack for M7 targets 2017-09-29 10:13:51 -04:00
David Sidrane bb71e47ddf Updated nuttx submoulde 7.22+ w/i2c fix ==px4_firmware_nuttx-master
Latest nuttx 7.22+ with PX4 contrib for stm32 f4 I2C hang.
2017-09-29 10:13:51 -04:00
David Sidrane 0f028fda3b Update nuttx and apps submodule to 7.22+ ==px4_firmware_nuttx-master
Prep for Nuttx Upgrade - still needs i2c fix
2017-09-29 10:13:51 -04:00
David Sidrane f79d06dae4 px4-same70xplained-v1:Update to master rename trone to teraranger 2017-09-29 10:13:51 -04:00
David Sidrane 8f78f57f14 nxphlite-v3:Update to master rename trone to teraranger 2017-09-29 10:13:51 -04:00
David Sidrane 986607b37d PX4_SAME70XPLAINED_V1:Remove unnesasary conditional for FMU mode 2017-09-29 10:13:51 -04:00
David Sidrane e967e02c4d HW Rev & Ver:0 for no value, -1 for not supported 2017-09-29 10:13:51 -04:00
David Sidrane 7698c08eb7 HW Rev & Ver:0 for no value, -1 for not supported 2017-09-29 10:13:51 -04:00
David Sidrane 7ae999ecb3 HW Rev & Ver:0 for no value, -1 for not supported 2017-09-29 10:13:51 -04:00
David Sidrane 13c4a6cced HW Rev & Ver:0 for no value, -1 for not supported 2017-09-29 10:13:51 -04:00
David Sidrane 0b70a8cc44 px4fmu-v5:Add FMUv5 HW revision and version 2017-09-29 10:13:51 -04:00
David Sidrane 8451cb324e board_common: Add BOARD_HAS_HW_VERSIONING control 2017-09-29 10:13:51 -04:00
David Sidrane 04f7a7a47a stm32:Add board Revision and version API for FMUv5 HW detection 2017-09-29 10:13:51 -04:00
David Sidrane d4892bf179 stm32 adc:Create board accessible API for using the ADC prior to boot
board_adc_init()    - initalise the ADC HW once.
   board_adc_sample()  - read a given channel dn
2017-09-29 10:13:51 -04:00
David Sidrane f3e925497d board_common:Break into internal and public api.
Internal functions are public functions that should realy only
   be called by the board config.
2017-09-29 10:13:51 -04:00
David Sidrane 9cc7148211 board_common:Documentation clean up merged 2017-09-29 10:13:51 -04:00
David Sidrane 3c384f1890 Updated nuttx and apps submudule 7.22+ ==px4_firmware_nuttx-master 2017-09-29 10:13:51 -04:00
David Sidrane 7dc8f215f6 samv7 board identity:fix sign-compare 2017-09-29 10:13:51 -04:00
David Sidrane 83d870900c kinetis board identity:fix sign-compare 2017-09-29 10:13:51 -04:00
David Sidrane 7c5f3ea623 kinetis io timer:fix sign-compare 2017-09-29 10:13:51 -04:00
David Sidrane c44cfbf87e nxphlite-v3 spi:fix sign-compare 2017-09-29 10:13:51 -04:00
David Sidrane f83df2a9a6 Updated nuttx submodule 7.22+
Updated to latest upstream with PX4 contrib for STM32 I2C that
  fixes an hang in driver.
2017-09-29 10:13:51 -04:00
David Sidrane 1c6dc4b84c Updated nuttx and apps submodules to Nuttx 7.22+ ==px4_firmware_nuttx-master 2017-09-29 10:13:51 -04:00
David Sidrane c6eec29dec sensors:Rework battery connected logic
A battery is considered connected when a) V > BOARD_ADC_OPEN_CIRCUIT_V
   and if BOARD_ADC_OPEN_CIRCUIT_V > BOARD_VALID_UV connected
   is further qualifed by the Valid signal.
2017-09-29 10:13:51 -04:00
David Sidrane d95e985f59 px4fmu-v5:Set non default BOARD_ADC_OPEN_CIRCUIT_V
Due to higher bias, V open circuit on the ADC is high with a 1M
   termination. This override the default connected threshold on
   V5 HW. Revist once lowe termination is chosen.
2017-09-29 10:13:51 -04:00
David Sidrane ef5d808f6d px4fmu-v4pro:Override default BOARD_VALID_UV
Based on the R values on the LTC4411 the px4fmu-v4pro has a
   UV of 4.01 Volts.
2017-09-29 10:13:51 -04:00
David Sidrane 5018723eb2 board_common:Define defaults for Open circuit max and UV min
BOARD_ADC_OPEN_CIRCUIT_V is the voltage present on an ADC due
   to the bias current on the terminition resistor.

   BOARD_VALID_UV is the under voltage min set by resistors on a
   board's Power selector.

   A battery is considered connected when the Voltage measures is
   greater than BOARD_ADC_OPEN_CIRCUIT_V.

   In the case where BOARD_ADC_OPEN_CIRCUIT_V is greater then
   BOARD_VALID_UV we can use the HW to qualify connected.
2017-09-29 10:13:51 -04:00
David Sidrane 25fef84f98 px4fmu-v5:board.h fixed typo in comment 2017-09-29 10:13:51 -04:00
David Sidrane 24eb56aa27 battery:Only change the warning level on a connected battery.
Connected is assumed when the battery voltages is greater than
   a predefined level.
2017-09-29 10:13:51 -04:00
David Sidrane 63ac56aeb0 smt32 adc:Ensure the the ADC clock is not out of spec
The data sheet for the F4, F7 indicate a maximum of 36 Mhz
   in the 2.4-3.3 volt Soc operating range. This change sets
   the clock based on the STM32_PCLK2_FREQUENCY.
2017-09-29 10:13:51 -04:00
David Sidrane dcf8d82f8c px4fmu-v5:Update to use CONFIG_STM32F7_FLASH_ART_ACCELERATOR
Upstream change on F7 CONFIG_STM32F7_FLASH_PREFETCH and
   CONFIG_ARMV7M_ITCM are now contorled by
   CONFIG_STM32F7_FLASH_ART_ACCELERATOR
2017-09-29 10:13:51 -04:00
David Sidrane 822b390420 Update nuttx and apps submodule 7.21+==px4_firmware_nuttx-master 2017-09-29 10:13:51 -04:00
Daniel Agar 474f216a0a UAVCAN bootloaders split into separate repository (#7878) 2017-09-29 10:13:51 -04:00