Andrew Tridgell
216cf53922
AP_InertialSensor: handle FIFO overflow for MPU6k and 9250
...
this prevents temporary corruption of INS data on FIFO overflow
2016-11-19 12:54:22 +11:00
Lucas De Marchi
c6b0a71c47
AP_Compass: Calibrator: use inplace initializer on array
2016-11-18 20:03:30 -02:00
Siddharth Bharat Purohit
b36ee10e7c
AP_Compass: fix wrong memset in compass calibrator
2016-11-18 20:03:30 -02:00
Siddharth Bharat Purohit
451c2f146d
AP_AccelCal: fix bug preventing accel cal fit to run more than one iteration
...
The check for fitness being smaller than the last value should use the
absolute value, to mean the fitness isn't changing since last iteration.
It's currently always quiting the function after the first iteration.
However for Gauss Newton we anyway want to run as many iterations as we
can, because there are ups and downs along the iteration so we might get
say best result where before and after iterations were bad. The lines
above takes care that sane and the best is selected.
2016-11-18 20:03:30 -02:00
Tom Pittenger
11229d2588
SITL: fix whitespace
2016-11-18 10:42:10 -08:00
ori ganoni
631b5c3ebc
adding turbulance to SITL
2016-11-17 20:06:35 -08:00
Andrew Tridgell
18d4286166
AP_InertialSensor: fixed pixfalcon 9250 detection
2016-11-18 14:24:39 +11:00
Peter Barker
fd5f79b238
AC_PrecLand: a pure-ArduPilot simulated SITL precision land backend
2016-11-18 09:41:56 +09:00
Peter Barker
4df4ba1956
AC_PrecLand: make SITL_Gazebo an alternate backend
...
Preprocessor directives were used to hack in the use
of AP_IRLock_SITL. Instead, make it a full backend itself.
2016-11-18 09:41:56 +09:00
Peter Barker
d2285ace6c
AC_PrecLand: remove unneeded empty handle_msg
2016-11-18 09:41:56 +09:00
Peter Barker
03710beb18
AC_PrecLand: make handle_msg impure and do nothing
2016-11-18 09:41:56 +09:00
Peter Barker
1eca4e128d
AC_WPNav: method to retrieve current desired pilot accels
2016-11-18 09:41:56 +09:00
Andrew Tridgell
cb1a5d4c74
AP_InertialSensor: take semaphore for update of accumulators
...
this fixes a race in update of delta angle and delta velocity between
backend and frontend
2016-11-18 06:32:17 +11:00
Pierre Kancir
84aaca7c6e
SITL: add missing break
2016-11-17 13:46:10 +00:00
Peter Barker
cf5ed25c9e
AP_HAL_Linux: do not attempt realtime when compiling Replay
2016-11-16 22:25:18 -02:00
Julien Beraud
ac3f49b06f
RPIOUART_Driver: fix warning
...
cast PKT_MAX_REGS to uint32_t to be able to compare without a warning
2016-11-16 17:37:15 -02:00
Julien Beraud
dc86a53862
OpticalFlow: move onboard alloc to init()
...
No reason to keep it in the constructor
2016-11-16 20:38:00 +11:00
Andrew Tridgell
f3f1f6b0b6
AP_InertialSensor: fixed gyro orientation on l3gd20H on pixhawk
2016-11-16 20:33:56 +11:00
Michael Oborne
fbeafa0d0a
Update AP_BoardConfig.cpp
2016-11-16 16:00:12 +11:00
Michael Oborne
e7e3478a58
AP_BoardConfig: add extra uavcan options
...
this enables the display of dynamic id assignment, which prevents the need for a serial connection to the esc, for first config.
2016-11-16 16:00:12 +11:00
Peter Barker
37c2c0a822
AP_Stats: fix variable reset time bug
...
Use Jan 1st 2016 as epoch time rather than Unix epoch.
PixHawk's 32-bit floats can't store a 32-bit timestamp.
2016-11-16 09:14:01 +09:00
Andrew Tridgell
6af00027ab
AP_InertialSensor: removed unused variables
...
thanks to Francisco for noticing
2016-11-16 08:41:06 +11:00
Pierre Kancir
86c8145bd9
SITL: Change Flighgear port with instance number
2016-11-16 08:27:48 +11:00
Pierre Kancir
c4b5bd4bd9
SITL: revert fg view to activate by default and use flag to disable it
2016-11-16 08:27:48 +11:00
Pierre Kancir
e2b939df39
SITL: rename simin to rcin for better readability
2016-11-16 08:27:48 +11:00
Pierre Kancir
59c84c637e
SITL: make fg view optional
2016-11-16 08:27:48 +11:00
Francisco Ferreira
bfbb275577
AP_InertialSensor: on accel cal failure don't save values to zero
...
When the accel calibration fails leave the previous values saved but set them to defaults (scale default is ones, not zeros) and notify the GCS
This fixes an arithmetic exception when doing a second accel cal after the first one failed
2016-11-15 11:42:54 -08:00
Francisco Ferreira
a3fcebc501
AP_Param: add set_and_notify to vectors
2016-11-15 11:42:54 -08:00
Francisco Ferreira
e763896b6a
AP_AccelCal: send and receive MAV_CMD_ACCELCAL_VEHICLE_POS
...
Message is sent at a maximum of 1Hz
Status text is sent, but if command is received it stops and only uses commands
2016-11-15 11:42:54 -08:00
Francisco Ferreira
7463d4c8f7
GCS_MAVLink: add function to send command requesting vehicle position during accel cal
2016-11-15 11:42:54 -08:00
Francisco Ferreira
bc661f013e
AP_AccelCal: use vehicle position values from MAVLink enum
2016-11-15 11:42:54 -08:00
Francisco Ferreira
c07f377eb1
AP_AccelCal: make collect_sample responsible for state changes
...
Also only set the snoop if the step has changed
2016-11-15 11:42:54 -08:00
Andrew Tridgell
624178f3be
AP_InertialSensor: added INS_FAST_SAMPLE parameter
...
this allows enable/disable of fast sampling per IMU, making
experimentation easier.
It also fixes the fast sampling to always average over 8 samples, and
fixes the 9250 to use the correct accumulator when not doing fast
sampling
2016-11-15 21:16:40 +11:00
Andrew Tridgell
c0303ffe8a
AP_InertialSensor: temporarily disable fast sampling
...
a problem has been found with the filtering with fast sampling on
ICM-20608 and MPU9250. Disable until it is solved.
2016-11-14 18:18:17 +11:00
Andrew Tridgell
ae2dc5570e
AP_Proximity: added SITL proximity backend
...
using fence points for avoidance
2016-11-14 15:53:43 +09:00
Andrew Tridgell
b16226dddf
AP_Baro: fixed a bug with corrupted conversions in MS5611 driver
...
the datasheet says that if you get back zero in an ADC read that the
next value can be corrupt. I have seen this happen on the FMUv1,
leading to bad altitude readings
2016-11-13 17:08:06 +11:00
Andrew Tridgell
ac4b100ae4
AP_BoardConfig: use in-tree drivers for FMUv1
2016-11-13 16:21:17 +11:00
Andrew Tridgell
14a26bee6c
AP_HAL: fixed ms5611 address on FMUv1
2016-11-13 16:21:05 +11:00
Andrew Tridgell
00938f7dbb
HAL_PX4: fixed enabled channels in init
...
now this is called from AP_BoardConfig we need to not clear enabled
channels
2016-11-13 13:16:22 +11:00
Andrew Tridgell
0502eca7fc
HAL_PX4: removed unused variable
2016-11-13 13:16:22 +11:00
Andrew Tridgell
c794ad9ee8
AP_InertialSensor: use smaller FIFO buffers
...
this allows for reading multiple chunks from the fifo per callback
2016-11-13 13:16:22 +11:00
Michael Oborne
c62050dc1b
AP_GPS_SBF: fix accuracy reported by driver
2016-11-12 16:42:35 +09:00
Andrew Tridgell
5f3c14ea01
AP_RangeFinder: fixed tabs -> spaces
2016-11-12 14:18:15 +11:00
Andrew Tridgell
41018feb3a
HAL_PX4: split I2C transfers
...
this avoids SCL low with a stop condition, which doesn't work with
some devices
2016-11-12 14:18:14 +11:00
Andrew Tridgell
0c7dd99d7e
AP_RangeFinder: support LidarLite V2 using in-tree driver
...
needs to run in continuous mode
2016-11-12 14:18:14 +11:00
Andrew Tridgell
fd7b313e34
AP_RangeFinder: removed pwm_input_main
...
thanks to Francisco
2016-11-11 15:49:53 +11:00
Andrew Tridgell
a69ff34c80
AP_RangeFinder: try bus 0 and 1 for PulsedLightI2C rangefinder
2016-11-11 15:49:53 +11:00
Andrew Tridgell
516141edf3
AP_RangeFinder: start PX4 rangefinder drivers on demand
2016-11-11 15:49:53 +11:00
Andrew Tridgell
0fb959a309
AP_RPM: make pwm_input driver start on demand
2016-11-11 15:49:53 +11:00
Andrew Tridgell
08f770125e
AP_BoardConfig: moved optional sensor startup out of AP_BoardConfig
2016-11-11 15:49:53 +11:00
Andrew Tridgell
8d19808152
AP_InertialSensor: fixed missing checked register goto
...
thanks to Francisco for spotting
2016-11-11 08:08:56 +11:00
Andrew Tridgell
49856c37f2
AP_InertialSensor: reduce checked register count
...
thanks to Francisco for spotting this
2016-11-11 08:08:56 +11:00
Andrew Tridgell
4be8f05ad4
AP_InertialSensor: added register checking for LSM9DS0
2016-11-11 08:08:56 +11:00
Andrew Tridgell
77a83c091a
AP_InertialSensor: added register checking for MPU6000/ICM20608
2016-11-11 08:08:56 +11:00
Andrew Tridgell
95a849f472
AP_InertialSensor: added register checking for MPU9250
2016-11-11 08:08:56 +11:00
Andrew Tridgell
3289e90134
AP_InertialSensor: added error count increments in drivers
2016-11-11 08:08:55 +11:00
Andrew Tridgell
bc614de4b3
AP_HAL: added checked registers interface
...
allow drivers to easily monitor and correct critical registers
2016-11-11 08:08:55 +11:00
Andrew Tridgell
4ebf3309f7
AP_InertialSensor: auto-handle invensense sensor changes
...
some boards swap out MPU6000 for MPU9250 or ICM20608
2016-11-11 08:08:55 +11:00
Andrew Tridgell
8e61b15384
HAL_PX4: added ICM20608_EXT SPI device
2016-11-11 08:08:55 +11:00
Andrew Tridgell
e4454c5056
AP_Compass: setup for new PX4 board IDs
2016-11-11 08:08:55 +11:00
Andrew Tridgell
41b132e576
AP_Baro: setup for new board PX4 IDs
2016-11-11 08:08:55 +11:00
Andrew Tridgell
4f50d67790
AP_BoardConfig: added board type auto-detection
...
using SPI probing
2016-11-11 08:08:55 +11:00
Andrew Tridgell
c565c9df35
AP_HAL: added ICM20608 external SPI name
2016-11-11 08:08:55 +11:00
Andrew Tridgell
af0ec41652
AP_InertialSensor: fixed accel clip detection with fast sampling
...
we need to check on every sample at the full rate
2016-11-10 13:39:17 +11:00
Andrew Tridgell
0eac781559
AP_Compass: don't run the AK8963 on the external MPU9250
...
this saves us one mag slot for another external mag, and leaves the
primary MPU9250 undisturbed by the mag traffic on the bus
2016-11-10 13:05:22 +11:00
Andrew Tridgell
70c27a85de
AP_InertialSensor: on PH2 run the first MPU9250 at 8kHz
2016-11-10 13:04:15 +11:00
Andrew Tridgell
73122adb78
AP_BoardConfig: removed unused startup functions for Pixracer
2016-11-10 12:55:22 +11:00
Andrew Tridgell
3d5c57c5dc
AP_Compass: fixed orientation of PH2 in-tree compass drivers
2016-11-10 11:44:52 +11:00
Andrew Tridgell
4ba00720aa
AP_Compass: make init() private
...
not called from frontend
2016-11-10 11:44:52 +11:00
Andrew Tridgell
1ea4c6938c
AP_InertialSensor: allow auxiliary bus with fast sampling
2016-11-10 11:44:52 +11:00
Andrew Tridgell
8da42b7a8b
AP_InertialSensor: fixed temperature for fast sampling case
2016-11-10 11:44:52 +11:00
Andrew Tridgell
cb70bae167
AP_InertialSensor: use in-tree drivers for PH2SLIM
2016-11-10 11:44:52 +11:00
Andrew Tridgell
c68a6451cb
AP_Compass: use in-tree drivers for PH2SLIM
2016-11-10 11:44:52 +11:00
Andrew Tridgell
d716bbedee
AP_Baro: use in-tree drivers for PH2SLIM
2016-11-10 11:44:52 +11:00
Andrew Tridgell
e7a9de9b41
AP_BoardConfig: use in-tree drivers for PH2SLIM
2016-11-10 11:44:52 +11:00
Andrew Tridgell
fea7040aff
AP_Baro: don't panic when we can't find MS5611
...
this makes booting a PH2 without its sensor hat on much easier
2016-11-10 11:44:51 +11:00
Andrew Tridgell
e27a76e460
AP_InertialSensor: fixed auxiliary bus with FIFO enabled
...
make sure fifo reset doesn't check I2C master enable
2016-11-10 11:44:51 +11:00
Andrew Tridgell
46785e8ecf
AP_InertialSensor: improved method for FIFO integrity checking
...
check temperature every 255 samples against FIFO data
2016-11-10 11:44:51 +11:00
Andrew Tridgell
8a3f6a8902
AP_InertialSensor: use FIFO and implement fast sampling for MPU9250
2016-11-10 11:44:51 +11:00
Andrew Tridgell
f94e4b4375
Filter: allow 1P LowPassFilter to work without alpha recalc per sample
...
this makes the 1P filter optionally syntax compatible with the 2P
filter and much more CPU efficient.
2016-11-10 11:43:29 +11:00
murata
f9add59b58
Global: Aggregate the same definitions.
...
Global: Aggregate the same definitions.
2016-11-09 11:46:55 -03:00
Lucas De Marchi
c1647b13eb
AP_HAL_Linux: fix leaking strings
2016-11-09 11:44:05 -03:00
Andrew Tridgell
e25a391a8f
AP_InertialSensor: fixed typo
2016-11-09 17:08:15 +11:00
Andrew Tridgell
d2f6a514b9
AP_InertialSensor: catch FIFO alignment errors using temperature reading
...
Two cases of what seems to be FIFO alignment errors have been seen on
a Pixracer-beta board with a ICM-20608. At a cost of 2 extra bytes per
transfer we can catch these by looking for sudden temperature changes
caused by bad data in the temperature registers.
2016-11-09 17:08:15 +11:00
Andrew Tridgell
4602b4d679
AP_Compass: improve init and calibration of hmc5843
2016-11-09 17:08:15 +11:00
Andrew Tridgell
d248b33104
AP_InertialSensor: simplify config of MPU6000
...
use zero sample rate divider on both MPU6000 and ICM20608
2016-11-09 17:08:14 +11:00
Andrew Tridgell
7137d5c6f2
AP_InertialSensor: switch pixracer to always use in-tree drivers
2016-11-09 17:08:14 +11:00
Andrew Tridgell
3d48a72f59
AP_C0mpass: switch pixracer to always use in-tree drivers
2016-11-09 17:08:14 +11:00
Andrew Tridgell
b8c789cf35
AP_Baro: switch pixracer to always use in-tree drivers
2016-11-09 17:08:14 +11:00
Andrew Tridgell
b0b93f8928
AP_BoardConfig: switch pixracer to always use in-tree drivers
2016-11-09 17:08:14 +11:00
Andrew Tridgell
84c3e29891
AP_InertialSensor: use AP_HAL rotations for MPU6000
2016-11-09 17:08:14 +11:00
Andrew Tridgell
fd8955a737
AP_HAL: define default rotations for mpu6000 based boards
2016-11-09 17:08:14 +11:00
Andrew Tridgell
2f01dfe81c
AP_InertialSensor: fixed from review by Lucas
2016-11-09 17:08:13 +11:00
Andrew Tridgell
81b933d9d0
AP_InertialSensor: use int32_t summation for fast sampling
...
very slightly faster
2016-11-09 17:08:13 +11:00
Andrew Tridgell
b00fd95725
AP_Math: define Vector3l for += op
2016-11-09 17:08:13 +11:00
Andrew Tridgell
565f1986e0
AP_Baro: fixed FMUv1 baro and enable in-tree driver for PHMINI
2016-11-09 17:08:13 +11:00
Andrew Tridgell
fcf0a4ea59
AP_BoardConfig: use in-tree drivers for PHMINI
2016-11-09 17:08:13 +11:00
Andrew Tridgell
b363a65c2e
AP_Compass: enable in-tree drivers for PHMINI
2016-11-09 17:08:13 +11:00
Andrew Tridgell
03b7bc9e65
AP_InertialSensor: use internal drivers for PHMINI
...
this gets us fast sampling
2016-11-09 17:08:12 +11:00
Andrew Tridgell
af1c5fd6d3
AP_InertialSensor: always use FIFO on MPU6000
...
and enable fast sampling on ICM20608 if on SPI
2016-11-09 17:08:12 +11:00