Commit Graph

22336 Commits

Author SHA1 Message Date
Lorenz Meier 65baf99832 Logger hotfix: Allocate buffer on logging
This enables to use the RAM normally consumed by the log buffer to be used for calibration and other memory-intense tasks.
These run typically only disarmed when logging is not enabled.
2017-05-03 21:52:04 +02:00
ChristophTobler dce28454c8 use current local position for land and not GPS -> e.g. flow 2017-05-03 16:52:37 +02:00
Paul Riseborough 5bfe6d7fec ekf2: Fix failure to save mag declination 2017-05-03 08:37:14 +02:00
Paul Riseborough 0d7f475bd0 ecl: minor updates
Initialisation changes to address valgrind errors
Change to default GPS and Airspeed time delay (these are overwritten by ekf2_main parameter settings)
Increase sensitivity of bad accelerometer checks
2017-05-03 08:37:14 +02:00
Paul Riseborough b64e40b5da ekf2: format fixes 2017-05-03 08:37:14 +02:00
Paul Riseborough 1a2ef45a4b commander: remove unused pos vel validity check functions 2017-05-03 08:37:14 +02:00
Paul Riseborough 625cc4aa83 commander: Use generic function for checking position and velocity validity 2017-05-03 08:37:14 +02:00
Paul Riseborough 46ece548cd ekf2: Changes following code review 2017-05-03 08:37:14 +02:00
Paul Riseborough 8421ad3dfd commander: Changes following code review 2017-05-03 08:37:14 +02:00
Paul Riseborough 57de9eccf5 msg: Code review recommendations for estimator_status 2017-05-03 08:37:14 +02:00
Paul Riseborough 6473f1458f commander: reset learned ekf2 mag biases when performing a mag cal
The learned ekf2 mag bias values are invalidated when the sensor calibration is updated and must be reset.
2017-05-03 08:37:14 +02:00
Paul Riseborough 6474922224 ekf2: Save learned magnetometer biases 2017-05-03 08:37:14 +02:00
Beat Küng b4178e0388 BlockParam: add BlockParam::commit_no_notification() 2017-05-03 08:37:14 +02:00
Paul Riseborough 3bcb710da9 voted_sensors_update: publish sensor selections (+3 squashed commits)
Squashed commits:
[290660d] voted_sensors_update: revert the new_accel_data check (and others)

The check removed the ability to detect sensor timeouts.
[c8dc7ad] sensors: publish changes to sensor selection
[dd90dec] sensors: ensure all sensor selections published first time
2017-05-03 08:37:14 +02:00
Paul Riseborough 3d3e04cb48 msg: create uORB topic for sensor selection data 2017-05-03 08:37:14 +02:00
priseborough 8ea0b2d3c5 commander: rework posvel validity checks
Move into functions.
Reset probation time and recalculate checks if a mode change is demanded to give the operator ability to regain control as soon as possible after nav performance is regained. (+11 squashed commits)
Squashed commits:
[a4bb800] commander: enable pilot to quickly recover from loss of position accuracy
[19e16a0] commander: rework postal probation time
[f96284e] commander: rework bad pos and vel test probation time
[00d5f0c] commander: Allow EKF preflight checks to pass with moving vehicle

Separates the 'is using GPS' and the GPS quality checks.
Uses a reasonable subset of the GPS quality checks which allows checks to pass if the vehicle is moving.
[4cdfb5c] commander: remove unused variable
[349385a] commander: add EKF GPS quality checks to pre-arm checking

Only perform check if GPs checking is activated by parameter setting.
Display fault messages that makes it clear if EKF quality checks are failing or the EKF is not using GPS for another reason. We do not want to confuse this with GPS lock.
[340ae29] commander: make position invalid fail-safe more sticky

Require check to pass for 7 seconds before exiting failsafe. This is required because if GPs is failing innovation tests for a prolonged period, the EKF will periodically reset to the GPS and report good accuracy at the time of reset.
Adding this delay gives time for an underlying error condition (eg bad IMU or compass) to be re-detected.
[b04ac95] commander: Increase RAM allocation to eliminate low stack warnings
[9dca12f] commander: add missing position invalid fail-safe responses
[69f264d] commander: Update position invalid fail-safe responses

Replace separate logic for each case with a generic function
Add velocity checks.
[8e8cef1] commander: rework position validity checks

Consolidate existing checks for global and local position validity and add checking of velocity accuracy.
Enable checks to be bypassed using the CBRK_VELPOSERR parameter.
2017-05-03 08:37:14 +02:00
Paul Riseborough 40160c4488 integrationtests: add wait time before arming to allow checks to pass 2017-05-03 08:37:14 +02:00
priseborough 519e903347 systemlib: Add circuit breaker parameter for position error checks 2017-05-03 08:37:14 +02:00
priseborough e61e733d1d local_position_estimator: publish placeholder values for velocity accuracy 2017-05-03 08:37:14 +02:00
priseborough 3680057e6d ekf_att_pos_estimator: publish placeholder values for accuracy reporting 2017-05-03 08:37:14 +02:00
priseborough 68c1ffd3e5 position_estimator_inav: publish placeholder values for velocity accuracy 2017-05-03 08:37:14 +02:00
priseborough 1f5908786e ekf2: don't publish estimator status and innovations unless updated 2017-05-03 08:37:14 +02:00
priseborough fb6e050b06 ekf2: Improve error reporting
Add missing velocity accuracy reporting
Add missing dead reckoning reporting
2017-05-03 08:37:14 +02:00
Lorenz Meier 9efb1a59f2 msg: Add GPS check fail definitions to estimator_status 2017-05-03 08:37:14 +02:00
priseborough e9a3eca751 msg: add velocity accuracy reporting to local position topic 2017-05-03 08:37:14 +02:00
priseborough d0d2c9dcba msg: add velocity accuracy reporting to global position topic 2017-05-03 08:37:14 +02:00
David Sidrane e86d9adb93 px4fmu-v4:Implement board_on_reset API
Added board_on_reset, to force timer GPIO to output low on reset
   This will stop the motors.
2017-05-03 08:33:05 +02:00
David Sidrane e967c2b340 board_common:Added new API point board_on_reset
This optionally provided function called on entry to
  board_system_reset. It should perform any house keeping
  prior to retunring to do the rest.
2017-05-03 08:33:05 +02:00
David Sidrane 33f2897f00 px4fmu-v4:Configure timer IO pins with pull downs
When the CCER is cleared the IO pin tends to float. The FMUV4
  HW has no TXS0108 and if cut off while high will decay.

  By adding the pull down the pins will seek the low state faster.
  13.8 us from off to decabe below threshold.
2017-05-03 08:33:05 +02:00
Lorenz Meier be375e25d3 Update GPS driver submodule. Fixes #7173 2017-05-03 08:30:29 +02:00
David Sidrane 95fd2cd184 Create NuttX git hash and tag 2017-05-03 08:18:47 +02:00
David Sidrane f66f024e3a ver:Print vMM.mm.pp format 2017-05-03 08:18:47 +02:00
David Sidrane bf570dee2f Added use of SPI_LOCK in the ms5611 driver on any HW where the
PX4_SPI_BUS_BARO == PX4_SPI_BUS_RAMTRON
2017-05-03 08:17:12 +02:00
David Sidrane 6aadc75d18 Removed interrupt based locking on FMUv4 HW
The ramtron driver already calls SPI_LOCK when accessing the
  FRAM.

  Removed the interrupt lockout and anabled the SPI_LOCK
  in the ms5611 driver on any HW where the
  PX4_SPI_BUS_BARO == PX4_SPI_BUS_RAMTRON
2017-05-03 08:17:12 +02:00
Lorenz Meier 00efbc8049 ROMFS: Start EKF2 if no vehicle config is loaded
This allows to at least have a look at the attitude and check that the board is functional on a basic level.
2017-05-02 11:56:45 +02:00
David Sidrane 5d70f74e36 px4fmu-v4:SPI and init clean up 2017-05-02 11:55:11 +02:00
Henry Zhang 92fc82da33 MindPX: Remove MPU6500 driver, use MPU9K driver instead 2017-05-02 11:52:12 +02:00
Lorenz Meier 40eb5df8de UAVCANCAN: Better param documentation and reboot requirements where appropriate 2017-05-02 07:42:14 +02:00
Lorenz Meier dbf754eab1 ROMFS: If UAVCAN is enabled, reduce log buffer size
This is necessary to make the space for UAVCAN in memory and doing it this way avoids negatively impacting users who do not use UAVCAN.
2017-05-02 07:42:14 +02:00
David Sidrane 3ecb07f5db px4io-v1:Sync with px4io-v1 CONFIG_USERMAIN_STACKSIZE 2017-05-02 07:40:50 +02:00
David Sidrane f77a9bb897 px4io-v1:Limit CONFIG_USART1_TXBUFSIZE to max debug size 2017-05-02 07:40:50 +02:00
David Sidrane 0d7c290f89 px4io-v1:Reduce Number of tasks and name 2017-05-02 07:40:50 +02:00
David Sidrane de9e63d506 px4io-v1:Refreshed defconfig (no changes) 2017-05-02 07:40:50 +02:00
David Sidrane 8cce1bd078 px4io-v2:Reduce Number of tasks and name 2017-05-02 07:40:50 +02:00
David Sidrane 3eb909823e px4io-v2:Limit CONFIG_USART1_TXBUFSIZE to max debug size 2017-05-02 07:40:50 +02:00
David Sidrane 85973f69d7 px4io-v2:Refreshed defconfig (no changes) 2017-05-02 07:40:50 +02:00
David Sidrane 05ceeec1ba piofirmware:Base the debug message buffer size on the defconfig
Recover 16 bytes. Size of debug max message is 40 so limit
  the usart tx buffer to same size.
2017-05-02 07:40:50 +02:00
David Sidrane f7835a8677 io_timer driver:Only support capture if DIRECT_INPUT_TIMER_CHANNELS > 0
This removes the unused input capture capabilities from the px4io
   and saves 128 bytes of ram.
2017-05-02 07:40:50 +02:00
Lorenz Meier d1dd6a16f2 IO v2: disable interrupt stack
This avoids burning significant memory in a configuration that is not actually using parallel tasks
2017-05-02 07:40:50 +02:00
Lorenz Meier 60a022329f IO Firmware: Use new RC lib format 2017-05-02 07:40:50 +02:00