Commit Graph

18165 Commits

Author SHA1 Message Date
Phillip Kocmoud
27a2b8a350 AP_Compass: Increase default MAX compass offset
After discussing the @tridge and @rmackay9 it was suggested that raising the maximum allowable compass offset value would allow users of the LIS3MDL and possibly others with larger compass offsets to fly with the default setting. 

This has been deemed a fairly safe change that still allows for sufficient overhead to prevent saturation.
2018-10-30 09:25:51 +09:00
murata
c8f93a3ddc RangeFinder: Added statement FALLTHROUGH 2018-10-30 09:13:29 +09:00
ChrisBird
d8281f3171 AP_Camera: Adding ability to control the Black Magic Micro Cinema Camera
via SBUS from the flight controller directly.  Handles the flipping of
certain channels.  Relies on change to SRV_Channel to add additional functions.
2018-10-30 11:12:01 +11:00
ChrisBird
a2c7d124cb SRV_Channel: Updated to include additional camera functions 2018-10-30 11:12:01 +11:00
Peter Barker
c73beffe1b AP_Mount: factor out a rate_input_rad, const various functions 2018-10-30 11:07:53 +11:00
Peter Barker
dcd930497a AC_AttitudeControl: AC_PosControl: avoid calling norm()
The result of this won't be used as often as this loop is called
2018-10-30 09:00:23 +09:00
Andrew Tridgell
6dd44a6d35 HAL_ChibiOS: fixed LED mapping for fmuv4 2018-10-29 14:04:32 +11:00
Nghia Nguyen
513eb1f5db AP_Rangefinder: Add support for Garmin LidarLite-V3HP 2018-10-27 11:22:57 +01:00
Randy Mackay
06aa29eb2a AC_Fence: get_polygon_points does not include return point 2018-10-26 14:38:04 +09:00
Randy Mackay
7aae970ae7 AC_Avoid: constify a few local variables 2018-10-26 14:38:04 +09:00
Randy Mackay
b7f3140441 AC_Avoid: stop includes margin for intersection calc
the simpler stop feature (as opposed to slide) was not including the margin when looking for intersections with the boundary meaning it could slow too late
2018-10-26 14:38:04 +09:00
Randy Mackay
7fa592e673 AP_Proximity: increase MAV driver timeout to 500ms
this comes after testing with ROS/mavros and discovering the update rate is only 4hz
2018-10-26 14:38:04 +09:00
Randy Mackay
82a28dc0fc AP_RangeFinder: check I2C dev during detect 2018-10-26 13:33:27 +09:00
Lucas De Marchi
9d95579b2d AP_Compass: update TYPEMASK documentation
Add missing drivers IST8308 and MAG3110.
2018-10-25 20:19:30 -07:00
Lucas De Marchi
34fb98b1e0 AP_Compass: probe for IST8308 on external buses 2018-10-25 20:19:30 -07:00
Lucas De Marchi
c3d87f91fc AP_Compass: add support to IST8308 2018-10-25 20:19:30 -07:00
Michael du Breuil
5846a54c17 AC_AttitudeControl: Fix copy paste param doc error 2018-10-25 09:50:00 +11:00
ebethon
f67a9af339 AP_GPS: fix SBAS mode in the SBP2 driver 2018-10-24 13:12:34 -07:00
chobitsfan
1e56ad4837 AP_NavEKF2: add external nav system to POSNE_M_NSE description 2018-10-24 19:14:54 +09:00
chobits
08b9bf4a89 AP_NavEKF2: fix extNav position noise 2018-10-24 19:14:54 +09:00
JIMWAR
97b5af60f8 AC_Avoid: fix adjust_velocity_polygon
adjust_velocity_polygon function ignoring boundary[0]
2018-10-24 15:37:14 +09:00
vierfuffzig
895cc0713b ChibiOS: fix F35Lightning default BATT_CURR_SCALE 2018-10-24 07:45:10 +10:00
Andrew Tridgell
70246cf954 AP_Compass: added notify events (LEDs and buzzer) for learning 2018-10-24 07:25:42 +10:00
Andrew Tridgell
5fe9334a18 RC_Channel: allow compass learning to be triggered on option
this allows for RCn_OPTION=62 to trigger compass learning, so you can
enable in-flight without using the GCS
2018-10-24 07:25:42 +10:00
Andrew Tridgell
23ddd994ec AP_Compass: allow multiple COMPASS_LEARN runs per boot 2018-10-24 07:25:42 +10:00
Andrew Tridgell
026089747d AP_Compass: use LEARN_NONE on learn completion
master doesn't yet have the statistical EKF learning
2018-10-24 07:25:42 +10:00
Andrew Tridgell
de58fb4637 AP_NavEKF3: support in-flight compass learning 2018-10-24 07:25:42 +10:00
Andrew Tridgell
0a7170774a AP_Compass: allow learning of all compasses
slave secondary compasses to primary
2018-10-24 07:25:42 +10:00
Andrew Tridgell
5ac6309848 AP_Compass: enable in-flight compass learning system
using COMPASS_LEARN=3
2018-10-24 07:25:42 +10:00
Andrew Tridgell
7e790a04d2 HAL_SITL: increase max timer procs
needed for compass learning
2018-10-24 07:25:42 +10:00
Andrew Tridgell
805647df85 AP_NavEKF2: enable use of in-flight compass learning 2018-10-24 07:25:42 +10:00
Peter Barker
c7d052eec8 RC_Channel: add const keyword to many methods 2018-10-23 12:30:35 +11:00
Peter Barker
537a7e0727 SITL: correct comment on sending gimbal messages 2018-10-23 11:58:04 +11:00
Peter Barker
ea426a3d45 RC_Channel: fix erroneous comment on RC relay options 2018-10-23 11:42:47 +11:00
Peter Barker
04e4484d96 AC_AttitudeControl: correct old and misleading comments 2018-10-23 09:40:21 +11:00
Peter Barker
41b6f30450 AP_OSD: add include for WITH_SEMAPHORE 2018-10-22 11:15:47 +11:00
Andrew Tridgell
d644150871 HAL_ChibiOS: fixes for DrotekP3Pro 2018-10-21 09:59:44 +11:00
Kevin Lopez Alvarez
9f97172cce AP_BoardConfig: add ChibiOS FMUv4pro defines 2018-10-21 09:59:44 +11:00
Kevin Lopez Alvarez
ab7c7afd1d AP_HAL: add ChibiOS FMUv4pro 2018-10-21 09:59:44 +11:00
Kevin Lopez Alvarez
6f99c706d6 HAL_ChibiOS: add MCU tables for STM32F469 2018-10-21 09:59:44 +11:00
Kevin Lopez Alvarez
bf745d1960 HAL_ChibiOS: add DrotekP3Pro hardware definitions 2018-10-21 09:59:44 +11:00
Peter Barker
1c1d651979 AP_NavEKF2: add space for null-termination
This is simply to preserve existing behaviour when snprintf starts to
null-terminate strings
2018-10-21 07:54:30 +11:00
Peter Barker
f90dd0c156 AP_HAL: add simple tests for null-termination 2018-10-21 07:54:30 +11:00
Peter Barker
9923bd1fd2 AP_BattMonitor: use sizeof(array) in place of constant 2018-10-21 07:54:30 +11:00
Peter Barker
21eacc5e31 AP_Arming: account for snprintf now null-terminating strings 2018-10-21 07:54:30 +11:00
Peter Barker
96b5be0e7d GCS_MAVLink: account for snprintf now null-terminating strings 2018-10-21 07:54:30 +11:00
Peter Barker
4c794ebba3 DataFlash: account for snprintf now null-terminating strings 2018-10-21 07:54:30 +11:00
Peter Barker
de3244e26c AP_OSD: account for snprintf now null-terminating strings 2018-10-21 07:54:30 +11:00
Peter Barker
33e3d6e254 AP_HAL: Util: make vsnprintf and snprintf always null-terminate
The C++ standard indicates these functions always return a
null-terminated string.  We should rename these functions if we're not
going to conform to the standards.

From https://en.cppreference.com/w/cpp/io/c/vfprintf :

"Writes the results to a character string buffer. At most buf_size-1
characters are written. The resulting character string will be
terminated with a null character"

We are still not standards-compliant in the case a length of 0 is passed
in, returning 0 where we should return the space that would be required
to store the formatted string.
2018-10-21 07:54:30 +11:00
Phillip Kocmoud
44fb61da37 HAL_ChibiOS: mRo X2.1-777 / hwdef.dat
Set proper sensor orientation.
2018-10-21 07:50:44 +11:00
Peter Barker
0142265f67 AP_Mount: make a copy of ID for mavlink_msg_param_set_send
The send function is expecting an array of the full length, so passing i
na null-terminated char* may result in uninitialised data (or
information leak)
2018-10-20 10:17:50 +11:00
vierfuffzig
83f4f5c347 AP_BLHeli: add motor pole parameter 2018-10-20 10:15:34 +11:00
Andrew Tridgell
84d7160128 AP_Compass: use new accumulate functions for UAVCAN 2018-10-19 16:03:45 +11:00
Andrew Tridgell
579a84b53e AP_Compass: use new accumulate functions for AK8963 2018-10-19 16:03:45 +11:00
Andrew Tridgell
55e4b64755 AP_Compass: don't apply offsets twice in SITL 2018-10-19 16:03:45 +11:00
vierfuffzig
5b955333ce AP_OSD: fix BLHAMPS current divisor 2018-10-19 15:05:53 +11:00
Peter Barker
b276034c60 APM_Control: correct use of incorrect abs functions 2018-10-19 08:46:43 +11:00
Peter Barker
560f17a570 AP_NavEKF3: use union to alias array and struct access to states
This avoids creating two pointers of different types to the same memory.

Having two pointers to the same memory can lead to the compiler
optimising code such that a write to one pointer is rearranged to be
either before or after a read from the other pointer depending on
which is deemed faster - not a good outcome.
2018-10-19 08:46:43 +11:00
Peter Barker
3a79ae4eca AP_NavEKF2: use union to alias array and struct access to states
This avoids creating two pointers of different types to the same memory.

Having two pointers to the same memory can lead to the compiler
optimising code such that a write to one pointer is rearranged to be
either before or after a read from the other pointer depending on which
is deemed faster - not a good outcome.
2018-10-19 08:46:43 +11:00
Peter Barker
154d771e6c AP_Math: correct compilation when running MATH_CHECK_INDEXES 2018-10-19 08:46:43 +11:00
Peter Barker
27e3a89158 AP_NavEKF3: correct compilation when running MATH_CHECK_INDEXES 2018-10-19 08:46:43 +11:00
Peter Barker
fb176b544f AP_NavEKF2: correct compilation when running MATH_CHECK_INDEXES 2018-10-19 08:46:43 +11:00
Andrew Tridgell
c622a4c4d6 HAL_ChibiOS: fixed output pins on F100 iomcu 2018-10-17 16:45:37 +11:00
Andrew Tridgell
6ec87528db AP_IOMCU: fixed RCIN failsafe 2018-10-17 15:11:28 +11:00
Andrew Tridgell
7b67146bc4 HAL_ChibiOS: use less memory in SoftSigReader 2018-10-17 15:11:28 +11:00
Andrew Tridgell
d083cd87d6 HAL_ChibiOS: disable debug code by default for iomcu
use --enable-asserts instead
2018-10-17 15:11:28 +11:00
Andrew Tridgell
d7aaaa35bd HAL_ChibiOS: disable RCIN and timer threads for iomcu 2018-10-17 15:11:28 +11:00
Andrew Tridgell
92d8ef0e76 AP_IOMCU: run the rcin timer tick in main loop
we no longer run a separate RCIN thread
2018-10-17 15:11:28 +11:00
Andrew Tridgell
8a4e0bd58c HAL_ChibiOS: fixed RCIN for iomcu
we need to disable/re-enable DMA on each IRQ for the STM32F10x
2018-10-17 15:11:28 +11:00
Andrew Tridgell
15141a6a5a HAL_ChibiOS: allow for no RCIN or TIMER thread
saves memory on iomcu
2018-10-17 15:11:28 +11:00
Andrew Tridgell
4674a1c68d HAL_ChibiOS: fixed system time for clocks other than 1MHz
needed for IOMCU
2018-10-17 15:11:28 +11:00
Andrew Tridgell
298a91ac7c HAL_ChibiOS: allow reduction of memory for SoftSigReader
for IOMCU
2018-10-17 15:11:28 +11:00
Andrew Tridgell
cd9179e733 AP_BoardConfig: fixed for 8 PWM outputs in IOMCU 2018-10-17 15:11:28 +11:00
rain-er
565b370330 UART4 added for BLHeli ESC telemetry 2018-10-17 13:57:19 +11:00
Andrew Tridgell
9b3788c83c AP_RPM: treat RPM_TYPE 1 as type 2 on non-PX4
makes upgrades easier
2018-10-17 13:55:01 +11:00
Andrew Tridgell
925555c995 AP_Compass: move accum fields to frontend
this is needed to ensure they are per-instance. Without this the SITL
backend produces zero for all but the first instance. The same would
be true for any multi-instance backend
2018-10-17 12:54:22 +11:00
Andrew Tridgell
83065d5e88 AP_Compass: convert SITL to new accumulate approach 2018-10-17 12:54:22 +11:00
Andrew Tridgell
6af709e617 SRV_Channel: fixed build warnings 2018-10-17 12:54:22 +11:00
Andrew Tridgell
93dbcf88b8 AP_Volz_Protocol: fixed build warnings 2018-10-17 12:54:22 +11:00
Andrew Tridgell
6f480c98cc AP_SBusOut: fixed build warnings 2018-10-17 12:54:22 +11:00
Andrew Tridgell
672b4be3d2 AP_RSSI: fixed build warnings 2018-10-17 12:54:22 +11:00
Andrew Tridgell
9e17275488 AP_BattMonitor: fixed build warnings 2018-10-17 12:54:22 +11:00
Andrew Tridgell
b1928d959b AP_Arming: fixed build warnings 2018-10-17 12:54:22 +11:00
Andrew Tridgell
feea73ee1a SITL: use WITH_SEMAPHORE()
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
1d6b58f9ca DataFlash: use WITH_SEMAPHORE()
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
f662cf55e5 AP_UAVCAN: use WITH_SEMAPHORE()
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
046bcfa0a9 AP_SmartRTL: use WITH_SEMAPHORE()
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
b1e4434332 AP_RangeFinder: use WITH_SEMAPHORE()
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
530138ded4 AP_RAMTRON: use WITH_SEMAPHORE()
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
68f463b29d AP_Radio: use WITH_SEMAPHORE()
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
17049ff5f5 AP_OSD: use WITH_SEMAPHORE()
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
a1f1e7e435 AP_OpticalFlow: use WITH_SEMAPHORE()
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
bf829cd792 AP_Notify: use WITH_SEMAPHORE()
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
dedfa54d5a AP_IRLock: use WITH_SEMAPHORE()
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
755dc8dc5d AP_InertialSensor: use WITH_SEMAPHORE()
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
249291eac0 AP_GPS: use WITH_SEMAPHORE()
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
a260792e9e AP_Compass: use WITH_SEMAPHORE()
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
e4e793b295 AP_Baro: use WITH_SEMAPHORE()
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
fe064a2d4e AP_Airspeed: use WITH_SEMAPHORE()
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
725899080e HAL_VRBRAIN: removed hal.util->new_semaphore()
replaced with HAL_Semaphore
2018-10-17 12:54:22 +11:00
Andrew Tridgell
44009c5459 HAL_SITL: removed hal.util->new_semaphore()
replaced with HAL_Semaphore
2018-10-17 12:54:22 +11:00
Andrew Tridgell
a9fbe106c9 HAL_PX4: removed hal.util->new_semaphore()
replaced with HAL_Semaphore
2018-10-17 12:54:22 +11:00
Andrew Tridgell
63556b9804 HAL_Linux: removed hal.util->new_semaphore()
replaced with HAL_Semaphore
2018-10-17 12:54:22 +11:00
Andrew Tridgell
5924816bbe AP_HAL: removed hal.util->new_semaphore()
replaced with HAL_Semaphore
2018-10-17 12:54:22 +11:00
Andrew Tridgell
9ac7f8333b HAL_F4Light: removed hal.util->new_semaphore()
replaced with HAL_Semaphore
2018-10-17 12:54:22 +11:00
Andrew Tridgell
4416404137 HAL_ChibiOS: removed hal.util->new_semaphore()
replaced with HAL_Semaphore
2018-10-17 12:54:22 +11:00
vierfuffzig
b455c7a769 AP_Compass: add rotation option for AK8963_MPU9250
allows using non-neutrally rotated AK8963 compass on MPU9250 as internal
reference: https://github.com/ArduPilot/ardupilot/pull/9459
2018-10-17 09:35:49 +11:00
Andrew Tridgell
0b9d0a4559 AP_Compass: removed incorrect semaphore take() in QMC5883L driver 2018-10-16 10:47:26 -07:00
Peter Barker
e29dbbf158 AP_AHRS: notify and log home changes 2018-10-16 10:55:13 +11:00
Peter Barker
dc14d7bce4 AP_Math: add another test for wrap_360_cd 2018-10-16 10:29:24 +11:00
Peter Barker
e0f63ca7f1 AP_Gripper: stop cheating on simulated servo state 2018-10-16 10:17:12 +11:00
Peter Barker
a8d8e5c0ef AP_RPM: remove unused variable 2018-10-16 10:17:12 +11:00
Peter Barker
1b6ec1d5ad AP_AccelCal: use mavlink define for field length
Also remove special-case handling for carriage return; no user of this
function has this problem.
2018-10-16 10:11:28 +11:00
Peter Barker
902bd7dda6 AP_Frsky_Telem: use mavlink definition to get statustext size
Also, add one for null-termination
2018-10-16 10:11:28 +11:00
Peter Barker
40daa8e15f AP_GPS: use mavlink definition to get statustext size
Also, add one for null-termination
2018-10-16 10:11:28 +11:00
Peter Barker
c0e03522c6 DataFlash: change unit ID of PWM to Y to remove conflict with deglongitude
Closes #9554 (thanks @wbrueg)
2018-10-16 10:02:19 +11:00
Peter Barker
b177554f61 DataFlash: add sanity check for duplicate units/multipliers 2018-10-16 10:02:19 +11:00
Phillip Kocmoud
f1d223a32a HAL_ChibiOS: Add support for the mRo X2.1-777
a new flight controller from Mayan Robotics based on the x2.1 upgraded to a STM32F777 MCU
2018-10-16 09:37:39 +11:00
Lucas De Marchi
1a9c386df2 AP_Compass: MMC3416: use common method to accumulate samples 2018-10-15 14:41:09 -07:00
Lucas De Marchi
e83b345cbb AP_Compass: MAG3110: use common method to accumulate samples 2018-10-15 14:41:09 -07:00
Lucas De Marchi
ac2771b311 AP_Compass: LSM9DS1: use common method to accumulate samples 2018-10-15 14:41:09 -07:00
Lucas De Marchi
2324a28e39 AP_Compass: LSM303D: use common method to accumulate samples 2018-10-15 14:41:09 -07:00
Lucas De Marchi
38d1f8705f AP_Compass: LIS3MDL: use common method to accumulate samples 2018-10-15 14:41:09 -07:00
Lucas De Marchi
b05b3b9932 AP_Compass: IST8310: use common method to accumulate samples 2018-10-15 14:41:09 -07:00
Lucas De Marchi
8d54276263 AP_Compass: BMM150: use common method to accumulate samples 2018-10-15 14:41:09 -07:00
Lucas De Marchi
565df5ec94 AP_Compass: AK09916: use common method to accumulate samples 2018-10-15 14:41:09 -07:00
Lucas De Marchi
e769c6932f AP_Compass: QMC5883L: use common method to accumulate samples 2018-10-15 14:41:09 -07:00
Lucas De Marchi
c0bccdaed6 AP_Compass: HMC5843: use common method to accumulate samples 2018-10-15 14:41:09 -07:00
Lucas De Marchi
329516373c AP_Compass: add common method to accumulate and drain samples
Instead of repeating on each driver the same sequence of steps,
let's move them to the common parent class. This only implements
it, but no driver was ported yet.
2018-10-15 14:41:09 -07:00
Lucas De Marchi
5521fce676 AP_Math: add non-uniform Vector3f scaling 2018-10-15 14:41:09 -07:00
Leonard Hall
2f87d8808f AP_Motors: handle boost in spool up and down the same way 2018-10-16 00:44:50 +09:00
Randy Mackay
853a56dc9b AP_MotorsMatrix: formatting fixes 2018-10-16 00:44:50 +09:00
Leonard Hall
4774cb8daf AP_Motors: improved motor loss redundancy
This detects a failed motor on copters with at least 6 motors
and recalculates the mixer to compensate
2018-10-16 00:44:50 +09:00
Leonard Hall
96a8bcf641 AC_AttitudeControl: limit gyro correction to 45 degrees error 2018-10-16 00:44:50 +09:00
Leonard Hall
acaefe9316 AC_AttitudeControl: remove output limits 2018-10-16 00:44:50 +09:00
Peter Barker
e503df48ff AP_Baro: emit calibrated messages for each connected baro
Thanks to OlliW for pointing this out
2018-10-15 08:13:50 +11:00
chobits
7fa7c8f403 AC_WPNav: add set_speed_z 2018-10-13 13:16:26 +09:00
Eugene Shamaev
95ea3d8726 AP_Baro: fix temperature 2018-10-12 21:53:08 +01:00
vierfuffzig
2243c524db Chibios: Add board FuriousFPV F35Lightning 2018-10-12 20:28:50 +11:00
murata
2d4dd1643d AP_Baro: Delete the total temperature process.
AP_Baro: Delete the total temperature process.
2018-10-12 12:05:17 +11:00
mirkix
0c9fd0ae93 AC_WPNav: fix typo 2018-10-12 00:53:42 +01:00
murata
820f9bd260 AP_RTC: Delete unused variables
AP_RTC: Delete unused variables
2018-10-11 13:23:29 +11:00
Peter Barker
d05ab1b983 AP_Baro: notify GCS of all barometer ground pressures 2018-10-11 08:05:05 +11:00
Andrew Tridgell
38616e6bee AP_Notify: ensure we can't skip a step in RGBLed timing 2018-10-09 20:25:49 +09:00
Andrew Tridgell
6489166996 AP_Notify: fixed PixracerLED on NuttX
led_dim must be a positive number, and is not related to the led off
value
2018-10-09 20:25:49 +09:00
Andrew Tridgell
ed71790945 AP_HAL: fixed PX4 LED polarity 2018-10-09 20:25:49 +09:00
Andrew Tridgell
927105cd25 AP_Notify: init gpio state for LEDs 2018-10-09 20:25:49 +09:00
Andrew Tridgell
36aa666786 AP_Notify: fixed px4-v4 to use pixracer LED driver 2018-10-09 20:25:49 +09:00
IamPete1
67d698fda3 AP_Windvane: add wind direction note 2018-10-09 16:27:10 +09:00
IamPete1
e31f98157b SITL: sailboat add matlab VPP tool 2018-10-09 16:27:10 +09:00