Commit Graph

21512 Commits

Author SHA1 Message Date
Andrew Tridgell
66b4e92444 AP_Math: make fill_nanf() use a signalling NaN
we want use of these values to trigger a FPE
2019-10-01 17:35:26 +10:00
Andrew Tridgell
f79907bd1e AP_NavEKF: fixed build with vector index checking 2019-10-01 15:39:03 +10:00
Andrew Tridgell
3995db49a4 AP_NavEKF3: use parent class for intermediate static variables
this makes the code faster as well as using less memory when both EK2
and EK3 are enabled
2019-10-01 15:39:03 +10:00
Andrew Tridgell
f7e138bddd AP_NavEKF2: use parent class for intermediate static variables
this makes the code faster as well as using less memory when both EK2
and EK3 are enabled
2019-10-01 15:39:03 +10:00
Andrew Tridgell
688b01c6c6 AP_NavEKF: added a common parent class for EKF2 and EKF3 core classes
this provides a common location for static intermediate variables in
EK2 and EK3. This has a few benefits:

 - the compiler can determine the address of the frequently accessed
   variables at compile time, making them faster

 - by sharing between EK2 and EK3 we save a lot of memory if both EK2
   and EK3 are enabled

 - we can fill all these with NaN in SITL on every loop, which allows
   us to catch cases where the variables are ever re-used between
   loops, which guarantees we aren't mixing data between EKF lanes or
   between EK2 and EK3
2019-10-01 15:39:03 +10:00
IamPete1
3b9a35da27 AP_Motors: add reversed tricopter option 2019-10-01 09:39:08 +10:00
vierfuffzig
2af0be3947 AP_AHRS: fix custom orientation ToRad conversion 2019-10-01 09:35:09 +10:00
Andrew Tridgell
0deef76875 GCS_MAVLink: use HAL_MEM_CLASS for status sizes 2019-10-01 09:29:55 +10:00
Andrew Tridgell
889b18022b AP_Logger: use HAL_MEM_CLASS for logging buffer size 2019-10-01 09:29:55 +10:00
Andrew Tridgell
3bf3ebb703 AP_Logger: try harder to use close to user buffer size
this stops us drastically reducing buffer size when low on memory
2019-10-01 09:29:55 +10:00
Andrew Tridgell
2d00298070 AP_HAL: added HAL_MEM_CLASS for amount of memory 2019-10-01 09:29:55 +10:00
Andrew Tridgell
47f2f1764d HAL_ChibiOS: generate HAL_MEMORY_TOTAL_KB for each board 2019-10-01 09:29:55 +10:00
Peter Barker
13352a4ca7 AP_ADSB: move is_valid_octal to is_valid_callsign and add tests for it 2019-10-01 09:18:15 +10:00
Peter Barker
6fe09b6120 AP_Math: move is_valid_octal into adsb
This doesn't ensure the value is octal digits - there's more magic in
it.
2019-10-01 09:18:15 +10:00
Andrew Tridgell
1a34fccc71 AP_Proximity: fixed incorrect use of fabs() 2019-10-01 08:12:07 +09:00
Andrew Tridgell
e3a965272c HAL_ChibiOS: added Pixhawk1-1M
this is for 1M versions of the Pixhawk1. It is smaller than fmuv2 as
it only links the specific sensors needed for Pixhawk1
2019-10-01 09:08:25 +10:00
Andrew Tridgell
b5217412f9 AP_GPS: fixed a bug in handling corrupt u-blox packets
when we have corrupt input due to loss of bytes on a UART we can end
up with a u-blox packet with zero payload bytes. When that happens we
need to bypass payload reading as otherwise we will end up keeping
reading bytes until the driver resets at 4 seconds, causing a GPS
outage.

This was causing GPS outages every few hours in copters running 3.6.7,
and was also reproduced in SITL using SIM_GPS_BYTELOSS.
2019-09-30 15:20:30 -06:00
Mark Whitehorn
0a6ae60c89 AP_IOMCU: fix IO fast channel mask 2019-10-01 07:13:33 +10:00
Mark Whitehorn
d8a07b6c44 HAL_ChibiOS: fix FMU fast_channel_mask
fix IO fast channel mask
use IOMCU chmask to only set right channels
remove unused variable
2019-10-01 07:13:33 +10:00
Andrew Tridgell
748cf39116 HAL_ChibiOS: disable DMA for RCIN on Pixracer
this frees up DMA for USART1_RX, which gives DMA for input over the
SERIAL5 WiFi port, which is important for applications where a
pixracer is being fed vision data over WiFi
2019-09-30 07:58:40 +10:00
mhefny
92d55fa126 SITL: removed unnecessary files of webots 2019-09-30 04:46:38 +10:00
Peter Barker
04ee459e8c AP_Baro: exclude Sub pressure transducers from non-sub builds 2019-09-28 16:41:06 +10:00
Andrew Tridgell
c29867ecad AP_Common: removed fcntl overrides
not needed with AP_Filesystem, and fixes lots of warnings with newer
compilers
2019-09-28 14:19:46 +10:00
Andrew Tridgell
81711eb28e AP_HAL: fixed build on g++ 7.3 for stm32
the system maths headers don't like our maths defines, but are happy
if we include math.h first
2019-09-28 14:19:46 +10:00
Henry Wurzburg
cf3bd2487b AP_OSD: add current averaging filter to reduce jitter (~5 sample timeconstant) 2019-09-28 14:17:59 +10:00
Randy Mackay
0d032ecd86 AC_Avoidance: add enabled and margin accessors 2019-09-28 11:13:14 +09:00
Randy Mackay
6be4adbe02 RC_Channels: define surface tracking auxiliary function 2019-09-28 11:13:14 +09:00
Randy Mackay
9aeac012d2 AC_Avoid: add support for complex fence types
AP_OABendyRuler: support exclusion polygons

AP_OADijkstra: support exclusion polygons

AC_Avoid: adjust_velocity supports exclusion polygons

AC_Avoidance: handle fence::get_boundary_points returning nullptr instead of setting num_points to zero

AC_Avoidance: Dijkstra's works with only exclusion polygons

AC_Avoidance: Dijkstra: check for fence counts instead of polyfence validity

We really only care whether fences can be returned - and they won't be
returned unless they are valid

AC_Avoidance: BendyRuler: just try to get inclusion fence rather than checking validity

AC_Avoidance: BendyRuler supports exclusion circles

AC_Avoid: Dijkstra support for exclusion circles

AC_Avoid: BendyRuler support for inclusion circles

AC_Avoid: stop an inclusion/exclusion circular fences

AC_Avoid: stop at inclusion/exclusion circular fences

AC_Avoid: fixes to Dijkstra's use of inclusion/exclusion circles and polygons

AP_Avoidance: take semaphores when interacting with AHRS and polyfence

AC_Avoid: Dijkstra's fix for some_fences_enabled inclusion circles
2019-09-28 07:58:48 +09:00
Randy Mackay
3431938bce AP_Logger: add error code to Write_OADijkstra 2019-09-28 07:58:48 +09:00
Peter Barker
a0c6ff95e4 AP_Proximity: polyfence valid() has been renamed 2019-09-28 07:58:48 +09:00
Peter Barker
714a3e2462 AC_Fence: support for multiple polygon fences
AC_Fence: add interface for retrieving exclusion polygons

AC_Fence: add interface to get exlusion polygons to polyfence loader

AC_Fence: add suport for inclusion circles

AC_Fence: add option for compiling-out FENCE_POINT protocol support

AC_Fence: get_exclusion_polygon and get_boundary_points set num_points to zero on failure

AC_Fence: use Debug(...) to hide debug messages

AC_PolyFence_loader: add methods to retrieve all inclusion zones

AC_PolyFence_loader: valid simply returns true if a polygon boundary can be returned

AC_Fence: add get_exclusion_circle

AC_Fence: add get_exclusion_circle_update_ms accessor

AC_Fence: PolyFence_loader gets inclusion circle accessors

AC_PolyFence_loader: add and use semaphore to protect loaded fence

AC_Fence: move fence breach check below fence type checks

This allows us to provide more information to the user about why they
are breached.

For example, if the radius is negative you are considered in breach of
it - but we'd tell you you were breached, not that your radius was
invalid

AC_Fence: clear the fence if we discover the user has set the fence count to zero
2019-09-28 07:58:48 +09:00
Peter Barker
6d0c5da84a GCS_MAVLink: allow upload of fence using mission item protocol
GCS_MAVLink: add support for fence inclusion circles

GCS_MAVLink: factor out a transfer_is_complete; start commenting properly
2019-09-28 07:58:48 +09:00
Peter Barker
f3b0148719 AP_OADijkstra: cope with polyfence holding boundary points 2019-09-28 07:58:48 +09:00
Peter Barker
dfca32a2af AP_OABendyRuler: cope with polyfence holding boundary points 2019-09-28 07:58:48 +09:00
Peter Barker
3a7f1b882e AC_Avoidance: cope with polyfence holding boundary points 2019-09-28 07:58:48 +09:00
Peter Barker
74aed5aef8 GCS_MAVLink: cope with polyfence holding boundary points 2019-09-28 07:58:48 +09:00
Peter Barker
5fe16d5250 AP_Proximity: cope with polyfence holding boundary points 2019-09-28 07:58:48 +09:00
Peter Barker
ff37590776 AC_Fence: move polygon points into AC_Fence_Polygon 2019-09-28 07:58:48 +09:00
Peter Barker
189ef5f1e7 AP_Math: define != for Vector2<int> 2019-09-28 07:58:48 +09:00
Peter Barker
f1e5c72ee9 StorageManager: add write_uint8 alias for write_byte 2019-09-28 07:58:48 +09:00
Peter Barker
f090f35afa AP_InternalError: add a general should-not-be-here bit 2019-09-28 07:58:48 +09:00
Peter Barker
bc8e56966f GCS_MAVLink: squelched rally-points-received message 2019-09-28 07:58:48 +09:00
Andrew Tridgell
8dd2119b14 AP_NavEKF2: make it easy to do EK2 timing tests
for future benchmarking
2019-09-28 08:57:26 +10:00
Andrew Tridgell
e820219202 HAL_ChibiOS: changed optimisation of higher end boards to -O2
-O3 does not seem to be a win, and takes up a lot more flash
2019-09-28 08:57:26 +10:00
Andrew Tridgell
0e3a27f74f AP_NavEKF3: change optimisation from -O3 to -O2 2019-09-28 08:57:26 +10:00
Andrew Tridgell
163efd0df5 AP_NavEKF2: change optimisation from -O3 to -O2 2019-09-28 08:57:26 +10:00
Andrew Tridgell
5f90afa71e AP_Mount: change optimisation from -O3 to -O2 2019-09-28 08:57:26 +10:00
Andrew Tridgell
13a2367278 AP_Math: change optimisation from -O3 to -O2 2019-09-28 08:57:26 +10:00
Andrew Tridgell
7c3df18ea3 AP_IOMCU: change optimisation from -O3 to -O2 2019-09-28 08:57:26 +10:00
Willian Galvani
0c5753112a AP_TemperatureSensor: Update TSYS01 for Pixhawk2 2019-09-27 13:08:26 -07:00
Peter Barker
06df44c184 AP_Relay: change parameter name from relay to instance 2019-09-27 12:02:38 +10:00
Peter Barker
1c3b2f9699 AP_Relay: tidy, reduce flash usage 2019-09-27 12:02:38 +10:00
Peter Hall
b6efcbcf3b AR_WPNav: make get_stopping_location public 2019-09-27 09:09:47 +09:00
Henry Wurzburg
11c633be32 AP_OSD: distance total fix for slow vehicles 2019-09-27 07:19:55 +10:00
Willian Galvani
dd97eedde3 APMotors_6DOF: Implement motor_is_enabled(), get_motor_angular_factors() and set_reversed(); 2019-09-26 09:39:50 -07:00
Peter Hall
4c62fe6c72 AP_Windvane: caculate vehicles current tack 2019-09-26 18:23:03 +09:00
Willian Galvani
d56c490b18 AP_Motors_6DOF: Add missing 'break' 2019-09-25 20:17:41 -07:00
Henry Wurzburg
59ce3f1007 AP_OSD: scale xtrack, add precision for distances <10 units 2019-09-26 12:56:12 +10:00
Patrick José Pereira
29fadc2417 AP_HAL_Linux: PCA9685: Check for device before accessing it
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2019-09-26 12:42:12 +10:00
mhefny
8310058c8c SITL: adding Tricopter model in Webots 2019-09-25 13:34:47 +01:00
Randy Mackay
5e3c6b4d3a GCS_MAVLink: allow proximity to send only upward facing distances
this removes the requirement that a horizontal proximity sensor be enabled
2019-09-25 15:22:13 +09:00
Henry Wurzburg
f592806184 AP_OSD: formatting fixes 2019-09-25 15:01:59 +09:00
bnsgeyer
d4fec221c3 AP_Motor: tradheli align swash params btwn frames and fix metadata 2019-09-25 14:59:02 +09:00
Peter Barker
975804fa35 AP_Math: remove unit_mod concept from wrap functions
devcall decided it would be clearer to have non-shared implementation
for the _cd variants
2019-09-25 13:19:44 +10:00
Peter Barker
952d4d2cbc AP_NavEKF2: initialise Kfusion stack variable to fix compilation
This fixes the compilation, as previous patches have done.
2019-09-25 12:54:55 +10:00
Peter Barker
9fb715692e AP_HAL_ChibiOS: correct include of mavlink header for analog debug 2019-09-25 12:22:27 +10:00
liang
d890203f73 AP_Baro: LPS22H: correct formatting 2019-09-24 09:50:56 -07:00
Andrew Tridgell
d40d812ea4 AP_NavEKF2: fixed build with g++ 9.1
this is a false positive, but the cost of clearing this array is low,
and it saves a much more complex fix
2019-09-24 14:59:17 +10:00
murata
6d7c2301f2 AP_Radio: Change direct value to define name 2019-09-24 13:23:24 +10:00
murata
ec0c49315f AP_Compass: Change direct value to define name 2019-09-24 13:23:24 +10:00
Andrew Tridgell
9226899c6f AP_NavEKF2: added comment (review request) 2019-09-24 12:51:54 +10:00
Andrew Tridgell
255981c60c AP_NavEKF2: moved some of the intermediate vars to the stack
this keeps stack frames below 1k, while giving faster access to the
variables and saving more memory
2019-09-24 12:51:54 +10:00
Andrew Tridgell
96c6544997 AP_NavEKF3: moved intermediate variables to common memory
this moves intermediate variables from being per-core to being common
between cores. This saves memory on systems with more than one core by
avoiding allocating this memory on every core.

This is an alternative to #11717 which moves memory onto the stack. It
doesn't save as much memory as #11717, but avoids creating large stack
frames
2019-09-24 12:51:54 +10:00
Andrew Tridgell
0041874826 AP_NavEKF2: moved intermediate variables to common memory
this moves intermediate variables from being per-core to being common
between cores. This saves memory on systems with more than one core by
avoiding allocating this memory on every core.

This is an alternative to #11717 which moves memory onto the stack. It
doesn't save as much memory as #11717, but avoids creating large stack
frames
2019-09-24 12:51:54 +10:00
Andrew Tridgell
9b746b89db AP_Math: added fill_nanf()
used in SITL to invalidate memory
2019-09-24 12:51:54 +10:00
Peter Barker
08623c1712 AP_ADSB: use ObjectBuffer in place of AP_Buffer 2019-09-24 09:36:33 +10:00
Peter Barker
c043f315de AP_Buffer: remove as it is replaced with ObjectBuffer 2019-09-24 09:36:33 +10:00
Willian Galvani
5a9e5e937a APMotors6DOF: add roll factor for motors 4 and 5 for SIMPLEROV_4 and SIMPLEROV_5 2019-09-23 10:41:57 -07:00
Willian Galvani
948a5bf9c3 APMotors6DOF: add case for SIMPLEROV_3 2019-09-23 10:41:57 -07:00
Peter Barker
045960fe57 AP_HAL_SITL: catch SIGTERM and exit with zero exit status 2019-09-23 19:36:38 +10:00
Andrew Tridgell
85332d49a2 HAL_SITL: added MotorBoat 2019-09-23 17:22:01 +10:00
Andrew Tridgell
d2e75717b8 SITL: added a MotorBoat class
a sailboat with zero sail area
2019-09-23 17:22:01 +10:00
Lucas De Marchi
7520cdef2f AP_RangeFinder: update minimum fw version of TFMiniPlus
Version 2.0.3 has important fixes to avoid having the sensor to lock up.
Let's make sure we check for it and warn on console.
2019-09-23 12:56:13 +09:00
Peter Hall
c71cbe2729 APM_Control: AR_AttitudeControl: add description for new PID params 2019-09-23 09:45:46 +09:00
Andrew Tridgell
05d62c62bb AP_NavEKF3: fixed use of uninitialised variable in EKF3 mag fusion
not all elements of H_MAG are initialised, but they are used, as found
by valgrind
2019-09-22 21:06:36 +10:00
Andrew Tridgell
386e7dc3e8 HAL_ChibiOS: fixed delay for OneShot125 channels
we were delaying output for OneShot125 by 8x as much as we need to,
which reduced our max loop rate
2019-09-22 19:43:35 +10:00
Andrew Tridgell
850892c3d9 HAL_ChibiOS: fixes from LGTM errors 2019-09-22 18:35:15 +10:00
Andrew Tridgell
c6f43e9700 AP_NavEKF3: fixed use of old irqsave() API 2019-09-21 15:36:47 +10:00
Andrew Tridgell
1d47f9186e AP_NavEKF2: fixed use of old irqsave() API 2019-09-21 15:36:47 +10:00
Andrew Tridgell
d7ee622edc AP_Logger: fixed use of old irqsave() API 2019-09-21 15:36:47 +10:00
Lucas De Marchi
5f65033511 AP_RangeFinder: add missing overrides 2019-09-21 08:01:08 +10:00
Lucas De Marchi
ce877ba40a AP_RangeFinder: fix build 2019-09-21 08:01:08 +10:00
Andrew Tridgell
108d7fa024 AP_Logger: added logging of extra loop time from the scheduler 2019-09-19 18:25:20 +10:00
Andrew Tridgell
79acaeaef1 AP_Scheduler: cope with high CPU load by stretching loop times
this adds an extra budget of time per loop when we are not achieving
scheduled tasks at a rate of at least 1/8 of the desired rate. This
fixes an issue where a vehicle can become uncontrollable if the user
asks for a SCHED_LOOP_RATE which is not achievable. As these events
happen we add extra loop budget until we are able to run all tasks. We
drop the extra time when the CPU pressure eases.
2019-09-19 18:25:20 +10:00
Andrew Tridgell
3d9f393f4b SITL: added SIM_LOOP_DELAY parameter
this allows us to test high CPU load conditions by adding a delay to
each loop
2019-09-19 18:25:20 +10:00
Michael du Breuil
95bca05322 AP_HAL_ChibiOS: Only include MAVLink when using the MAVLink debugging 2019-09-19 10:48:25 +09:00
Michael du Breuil
5000891a76 GCS_MAVLink: remove some unused includes 2019-09-19 10:48:25 +09:00
Peter Barker
1c187d8feb AP_NavEKF3: correct return of empty prearm string 2019-09-19 08:47:47 +09:00
Peter Barker
3619856fc9 AP_NavEKF2: correct return of empty prearm string 2019-09-19 08:47:47 +09:00
Randy Mackay
398f427830 AP_Proximity: fix rangefinder backends cm to m conversion 2019-09-19 08:43:11 +09:00
Peter Barker
9cd30083a4 AC_AutoTune: correct abs to fabsf for roll_cd and pitch_cd 2019-09-18 12:57:02 +10:00
Peter Barker
8ee411e998 AP_L1_Control: wrap_180_cd no longer solely returns floats 2019-09-18 12:57:02 +10:00
Peter Barker
7fbaea7971 APM_Control: wrap_180_cd no longer solely returns floats 2019-09-18 12:57:02 +10:00
Peter Barker
5692f3d79e AP_Math: stop returning float for integer wrap_180/wrap_360 etc 2019-09-18 12:57:02 +10:00
Peter Barker
84d999142f AP_Math: add more tests for wrap functions 2019-09-18 12:57:02 +10:00
Peter Barker
56de1f2eed AC_WPNav: do not calculate NEU vector from invalid location 2019-09-17 09:05:23 +09:00
Michael du Breuil
819d1b5246 AP_Common: Include altitude in the init check for a location 2019-09-17 09:30:56 +10:00
Andrew Tridgell
9eb6c1be64 AP_GPS: use jitter correction on GPS_INPUT data
this allows for more accurate timing when using GPS_INPUT for indoor
positioning systems
2019-09-17 09:17:04 +10:00
Peter Barker
2f60b230cd GCS_MAVLink: use singleton to get AP_AdvancedFailsafe pointer 2019-09-17 09:13:43 +10:00
Peter Barker
9f8553d422 AP_AdvancedFailSafe: add singleton getter 2019-09-17 09:13:43 +10:00
Henry Wurzburg
57dc253be8 AP_OSD: Add autoranging to current and speed displays 2019-09-17 07:34:46 +10:00
Andrew Tridgell
3c058851b2 HAL_ChibiOS: fixed undef for define lines
this fixes IMU heater enable for CubeBlack+
2019-09-16 12:53:44 +10:00
Andrew Tridgell
255e769171 HAL_ChibiOS: fixed IMU order and board ID for CubeBlack+ 2019-09-16 12:53:44 +10:00
bugobliterator
e82da992c9 HAL_ChibiOS: hwdef: add hwdef for CubeBlack+ 2019-09-16 12:53:44 +10:00
bugobliterator
ee6f912217 AP_BoardConfig: add support for CubeBlackPlus 2019-09-16 12:53:44 +10:00
Andrew Tridgell
f86a7d347d Revert "AP_HAL_SITL: set initial PWM values to a flag value"
This reverts commit 1735563bb7.

This commit broke RC input on high channels with sim_vehicle.py, plane
getc RC failsafe immediately
2019-09-15 18:26:50 +10:00
Peter Barker
6193d6cf69 AP_Compass: fix example by instantiating Baro
Baro is required to get location, and Compass tries to get the declination based on current location
2019-09-13 08:54:21 +09:00
bnsgeyer
e91402aeb6 AP_Motors: tradheli-make all RSC params part of library
AP_Motors: Tradheli-fix RSC mode change while armed

AP_Motors: tradheli - improve RSC param metadata

AP_Motors: tradheli-put all throttle param settings in percent
2019-09-13 08:53:54 +09:00
Peter Barker
1735563bb7 AP_HAL_SITL: set initial PWM values to a flag value
These should never be used.  Setting them to a flag value may give a
hint to someone trying to debug a problem in the future.
2019-09-13 08:58:43 +10:00
Peter Barker
8da978b913 GCS_MAVLink: use sending_mavlink1 method in send_rc_channels_raw 2019-09-12 16:10:23 +10:00
Peter Barker
5dad0e5410 AP_HAL: a few more simple tests for snprintf 2019-09-12 16:08:59 +10:00
Andrew Tridgell
28cca004f2 HAL_ChibiOS: added default params for skyviper-journey 2019-09-12 14:02:36 +10:00
Andrew Tridgell
1dca0a16f5 HAL_ChibiOS: rename skyviper-f412 to skyviper-journey 2019-09-12 14:02:36 +10:00
Andrew Tridgell
dcbbc86f34 AP_Radio: added support for Skyviper 2018 model radios
fixes #12273
2019-09-12 14:02:36 +10:00
mhefny
375510ecc2 SITL: adding wind simulation in Webots 2019-09-12 13:22:26 +10:00
mhefny
bfb7e3af3b SITL: sending wind data to Webots controller 2019-09-12 13:22:26 +10:00
Andrew Tridgell
8bb6a67b36 GCS_MAVLink: refuse set of read-only parameters 2019-09-12 10:50:30 +10:00
Andrew Tridgell
6573857a90 AP_Param: support @READONLY marker in param files
allows for read-only parameters embedded in firmware
2019-09-12 10:50:30 +10:00
Andrew Tridgell
4a6fdc00c9 AP_AdvancedFailsafe: added AFS_MAX_RANGE option
this allows a maximum range since first arm to be set in
AFS_MAX_RANGE. This value (in km) will trigger the configured
termination type if the GPS location shows that it has been breached.

This feature, in combination with the @READONLY apj parameter feature,
is intended to be used to meet regulatory restrictions on a vehicles
maximum range
2019-09-12 09:59:17 +10:00
Andrew Tridgell
6af9d55e70 AP_OSD: fixed vsnprintf return assumption 2019-09-12 08:43:31 +10:00
Andrew Tridgell
98c2606c0a GCS_MAVLink: fixed assumption on return of snprintf 2019-09-12 08:43:31 +10:00
Peter Barker
412bf24b9a AP_HAL: add gtests for snprintf 2019-09-12 07:42:40 +10:00
Andrew Tridgell
54b9524c0b AP_RangeFinder: make LightWare I2C native work with more hw versions
this allows the native i2c lightware driver to work with a wide range
of lidars from LightWare, removing the specific version check, and the
version specific config commands
2019-09-12 07:40:32 +10:00
Andy Piper
8e385d7453 AP_InertialSensor: correct formatting 2019-09-11 18:41:05 +10:00
Leonard Hall
6f3be90147 Filter: Alter Notch filter formula to remove /0 and allow perfect notch.
This formulation of the notch equations lets the user specify the depth of the Notch. The presence of a diveide by A prevents the gain going to zero and therefore achieving a perfect notch. It also provides the risk that a user may attempt to do this and cause a divide by zero error. This change adds the ability to achive a perfect notch and removes the possibility of a divide by zero.

Add Notch Filter parameter checking
2019-09-11 18:41:05 +10:00
Andy Piper
9b9fb0d593 Filter: sanity check the harmonic notch sample rate on initialization. do not allow harmonics to go above the nyquist frequency 2019-09-11 18:41:05 +10:00
Andy Piper
5b7f9f6bea AP_InertialSensor: while sensors are converging update the filters sample rates. if gyro filtering produces invalid output, keep the previous value 2019-09-11 18:41:05 +10:00
Andy Piper
bc5916ebc9 Filter: comment on reserved config. cope with notch allocation failure. 2019-09-11 18:41:05 +10:00
Andy Piper
a9a7fe3ea5 AP_InertialSensor: ensure harmonic notch gets appropriate defaults 2019-09-11 18:41:05 +10:00
Andy Piper
3261677e01 AP_InertialSensor: remove _ prefix from methods. use changed filter methods. 2019-09-11 18:41:05 +10:00
Andy Piper
334ebadd5a Filter: add comments and address review comments for harmonic notch 2019-09-11 18:41:05 +10:00
Andy Piper
50f7e50634 AP_InertialSensor: add harmonic notch filter to gyro filter chain
Allow dynamic updates to the calculated frequency. Convert bandwidth and frequency to floats.
backend variables do not need to be indexed per-backed
2019-09-11 18:41:05 +10:00
Andy Piper
366bc06089 Filter: New HarmonicNotchFilter
This delegates updates to a bank of NotchFilters located at an rpm frequency and harmonics. Center frequency can be updated dynamically. Notch parameters are configurable, including the number of harmonics to filter on. Updates to the filter parameters are optimized across the notch bank. Convert notch bandwidth and frequency to floats.

allow all filter harmonics to be controlled.

add destructor to harmonic notch.

don't allocate sub-filters for harmonic notch if no harmonics set.
2019-09-11 18:41:05 +10:00
Andrew Tridgell
fae2e44eac AP_NavEKF3: reset inhibitMagStates on in-flight yaw reset
this is needed to prevent the next ConstrainVariances() from zeroing
the variances, which leads to very slow learning of mag states
2019-09-11 14:22:18 +10:00
Andrew Tridgell
71ad90819e AP_Compass: don't reset SITL compass offsets if set by user
makes for easier EKF compass bias learning testing
2019-09-11 14:22:18 +10:00
Peter Barker
10675ab5c4 AP_HAL: correct include ordering in srxl.h
The header needs stdint.h which it was only getting because it was
included after stdint.h in the cpp file.

Stop including standard headers before other ArduPilot headers
2019-09-11 14:19:14 +10:00
Andrew Tridgell
4197fdeb2a AP_HAL: fixed bug in vsnprintf()
we need to return the number of bytes that would have been printed if
the buffer was big enough to support use cases such as vasprintf()
which needs to know how many bytes to allocate
2019-09-11 13:41:03 +10:00
Peter Hall
102a231c3f AP_WindVane: rename abs to true wind 2019-09-11 11:22:12 +09:00
Rajat Singhal
5147b607c0 SITL: Correct Airsim params 2019-09-11 08:28:28 +10:00
Randy Mackay
246bfcf4a1 AP_Common: expanding array checks memory before allocating 2019-09-11 06:56:35 +10:00
Peter Barker
15308af230 AP_HAL_SITL: avoid lockstep scheduling issue with semaphores
If there is another thread holding a lock that the main thread wants to
take while pretending to be the IO thread, we will wait forever as we do
not move SITL time forward while pretending to be the IO thread.

This patch simply allows time to move forward if we've failed to take a
semaphore immediately and need to wait.
2019-09-10 21:01:37 +10:00
Andy Piper
dde6dec145 AP_InertialSensor: correct reboot documentation for batch logger and filters 2019-09-10 20:29:56 +10:00
Randy Mackay
0e1a2efb7c EKF3: RNG_USE_HGT param only used when ALT_SOURCE = rangefinder 2019-09-10 18:44:52 +10:00
Randy Mackay
94a52b3525 EKF2: RNG_USE_HGT param only used when ALT_SOURCE = rangefinder 2019-09-10 18:44:52 +10:00
Andrew Tridgell
b33afde884 HAL_ChibiOS: allow safety button on CUAV_GPS to be used for "stay in bootloader"
allows for recovery of bad CAN firmware
2019-09-10 16:22:33 +10:00
Andrew Tridgell
c6a9f067e2 HAL_ChibiOS: enable LEDs on CUAV_GPS 2019-09-10 16:22:33 +10:00
Andrew Tridgell
3dfe15443d HAL_ChibiOS: fixed orientation of CUAV_GPS compass 2019-09-10 16:22:33 +10:00
Andrew Tridgell
21cce1385a AP_UAVCAN: support safety buttons on UAVCAN
the button works in parallel with any button attached by IOMCU or by a
pin, and obeys all the same BRD_SAFETY* options
2019-09-10 16:22:33 +10:00
Andrew Tridgell
03c1a8bfd9 HAL_ChibiOS: use safety button logic from AP_BoardConfig 2019-09-10 16:22:33 +10:00
Andrew Tridgell
5a96e374ba AP_BoardConfig: moved logic for safety button press to AP_BoardConfig
this allows for common code between CAN and pin safety switches, as
well as making the code neater as most of the logic is related to
AP_BoardConfig options
2019-09-10 16:22:33 +10:00
Andrew Tridgell
82a98ef95d AP_Notify: added NTZ_BUZZ_VOLUME parameter
it is fairly non-linear, but does work
2019-09-10 16:22:33 +10:00
Andrew Tridgell
39f4f7c208 AP_UAVCAN: added safety LED and button messages 2019-09-10 16:22:33 +10:00
Andrew Tridgell
0ea67943b9 HAL_ChibiOS: enable safety button on CUAV_GPS 2019-09-10 16:22:33 +10:00
Andrew Tridgell
c6c1c4bc31 AP_UAVCAN: support safety LEDs on UAVCAN 2019-09-10 16:22:33 +10:00
Andrew Tridgell
186eedf838 HAL_ChibiOS: enable safety LED 2019-09-10 16:22:33 +10:00
Andrew Tridgell
75696997cc HAL_ChibiOS: added buzzer support to CUAV_GPS 2019-09-10 16:22:33 +10:00
Andrew Tridgell
7c57546eb1 AP_Notify: support UAVCAN buzzers 2019-09-10 16:22:33 +10:00
Andrew Tridgell
d55f76c88e AP_UAVCAN: added buzzer support 2019-09-10 16:22:33 +10:00
Peter Barker
8fc55b9678 GCS_MAVLink: remove comm_get_available
available returns an unsigned integer, so this was just weird
2019-09-10 15:45:27 +10:00
Andrew Tridgell
cbe0af2463 HAL_ChibiOS: setup for LEDs on KakuteF4
this makes Kopis1 display LEDs properly
2019-09-10 13:03:28 +10:00
Andrew Tridgell
a4924e1c0b AP_Notify: allow setting of LED count in hwdef.dat 2019-09-10 13:03:28 +10:00
Andrew Tridgell
28b5f2b021 AP_Notify: simplify NeoPixel driver
use new API to avoid complexities
2019-09-10 13:03:28 +10:00
Andrew Tridgell
f441223b55 HAL_ChibiOS: implement updated NeoPixel API
allow for N leds per chain, and setting separate colours per led in
each chain
2019-09-10 13:03:28 +10:00
Andrew Tridgell
1cb608a9f4 AP_HAL: allow neopixel LEDs to be set more flexibly
allow for N leds per chain, with RGB control of each
2019-09-10 13:03:28 +10:00
Tom Pittenger
aa602b5e1b AP_Notify: add NeoPixel driver 2019-09-10 13:03:28 +10:00
Tom Pittenger
e3416b66dc AP_HAL_ChibiOS: add Neopixel output type, similar to dshot 2019-09-10 13:03:28 +10:00
Tom Pittenger
52be3903c0 SRV_Channel: add neopixel as an output type 2019-09-10 13:03:28 +10:00
Randy Mackay
aba4a1fdc8 AC_Avoidance: remove OADatabase check that can never be true 2019-09-10 09:15:56 +10:00
Randy Mackay
0dd8525c99 AP_HAL_SITL: resolve compiler warning in sitl_airspeed by using fabsf 2019-09-10 09:15:56 +10:00
Randy Mackay
2d128e0079 AP_Proximity: remove unused var from AriSimSITL 2019-09-10 09:15:56 +10:00
Randy Mackay
d4b047fc1f SITL: Gripper_EPM compiler warning resolved by using float and fabsf 2019-09-10 09:15:56 +10:00
Randy Mackay
1fd7618238 SITL: remove unused time_diff member 2019-09-10 09:15:56 +10:00
Michael du Breuil
9a7d64e8fc AP_NavEKF3: Allow the GPS to be responsible for logging 2019-09-10 09:09:17 +10:00
Michael du Breuil
a4d10b2e86 AP_NavEKF2: Allow the GPS to be responsible for logging 2019-09-10 09:09:17 +10:00
Michael du Breuil
f857eb4640 AP_GPS: Take responsibility for logging the GPS if the EKF wants logging 2019-09-10 09:09:17 +10:00
Willian Galvani
b92473111c AP_LeakDetector: Mark Leak pins RebootRequired 2019-09-09 09:53:28 -07:00
Andy Piper
6f3334b460 AP_Filesystem: build fixes for SITL on macOS 2019-09-09 20:18:00 +10:00
Andrew Tridgell
91e8752c17 HAL_ChibiOS: wrap more libc functions
this saves a few k of flash as it avoids linking libc versions of some
functions
2019-09-09 13:31:30 +10:00
Andrew Tridgell
3166f84954 HAL_ChibiOS: added vsnprintf wrapper
this allows us to use a common snprintf implementation
2019-09-09 13:31:30 +10:00
Michael du Breuil
ba3cfbfb54 AP_RTC: Don't allow RTC times before 2019 2019-09-09 04:43:29 +10:00
Andrew Tridgell
aa20be4270 AP_RCProtocol: fixed SUMD with 16 channels
with 16 channels it is more than 3ms per frame
2019-09-07 10:02:26 +10:00
Andrew Tridgell
df387dc396 AP_Compass: allow rotation of BMM150 compass 2019-09-07 09:53:21 +10:00
Andrew Tridgell
1cb775e2c2 AP_Compass: probe more addresses for IST8310
IST8310 can be on 4 possible i2c addresses
2019-09-07 07:35:54 +10:00
Andrew Tridgell
5e5c30efe8 HAL_SITL: allow SITL to use SERIALn_PROTOCOL=23
this allows for testing of RC input protocol parsing in SITL
2019-09-06 08:51:45 +10:00
Andrew Tridgell
c8de2ec9c7 AP_RCProtocol: added update() method for use by SITL 2019-09-06 08:51:45 +10:00
Andrew Tridgell
4b48e80c26 AP_SerialManager: fixed AP_Periph build 2019-09-06 08:51:45 +10:00
Andrew Tridgell
83872c23e5 HAL_ChibiOS: fixed AP_Periph build 2019-09-06 08:51:45 +10:00
Andrew Tridgell
fd80220d3e HAL_ChibiOS: setup PH4-mini RCIN port by default 2019-09-06 08:51:45 +10:00
Andrew Tridgell
54649a0e4f HAL_ChibiOS: fixed KakuteF4 define for SERIAL2 2019-09-06 08:51:45 +10:00
Andrew Tridgell
06b272705e HAL_ChibiOS: run RCIN thread at 1kHz
this gives fast enough response for SBUS parsing on a UART
2019-09-06 08:51:45 +10:00
Andrew Tridgell
6983186210 AP_HAL: added get_options() method on UARTs 2019-09-06 08:51:45 +10:00
Andrew Tridgell
c841b39ea2 HAL_ChibiOS: switch to AP::RC() for AP_RCProtocol 2019-09-06 08:51:45 +10:00
Andrew Tridgell
bf2cf7834d HAL_ChibiOS: fixed a bug in parity/stop-bit setting on STM32F7 and H7
and add get_options() method
2019-09-06 08:51:45 +10:00
Andrew Tridgell
312018898f HAL_Linux: use AP::RC() 2019-09-06 08:51:45 +10:00
Andrew Tridgell
672d09c965 AP_IOMCU: use AP::RC() for AP_RCProtocol 2019-09-06 08:51:45 +10:00
Andrew Tridgell
cbdb23afb5 AP_SerialManager: support SERIALn_PROTOCOL=23 for RC input
sets up an extra RC input port
2019-09-06 08:51:45 +10:00
Andrew Tridgell
2b856abdd1 AP_RCProtocol: support an additional uart on RC input
this will allow for any UART to be configured as an additional RC
input source
2019-09-06 08:51:45 +10:00
Andrew Tridgell
ad2890dc5a HAL_ChibiOS: added connector pinouts for PH4-mini 2019-09-06 08:51:45 +10:00
Andrew Tridgell
b72dcf6478 AP_Filesystem: use a recursive semaphore
this is needed to cope with the mkdir("/APM") in sdcard_retry()
2019-09-06 08:51:04 +10:00
Andrew Tridgell
7afd51d03e AP_Frsky_Telem: move FrSky handling to it's own thread
we are getting timing issues sharing with the other users of the IO
thread. The FrSky protocols are quite timing sensitive, so this should
help
2019-09-05 10:50:17 +10:00
Randy Mackay
fb38db6640 AP_AHRS: resolve compile warning in AP_AHRS_DCM::use_compass 2019-09-05 08:39:10 +10:00
Andrew Tridgell
b344946300 HAL_ChibiOS: prevent duplicate sensors in hwdef.dat
throw an error on configure if there is a duplicate
2019-09-05 06:37:35 +10:00
Andrew Tridgell
2c5c8106a5 HAL_ChibiOS: removed duplicate barometer from fmuv5 2019-09-04 21:24:01 +10:00
Peter Barker
df5921a87c GCS_MAVLink: gate AP_DEVO_Telem behind !HAL_MINIMIZE_FEATURES 2019-09-04 17:47:33 +10:00
Andrew Tridgell
708ee47c03 HAL_ChibiOS: fixed f103 rm3100 2019-09-04 16:27:47 +10:00
Andrew Tridgell
c2c8702329 HAL_ChibiOS: convert remaining boards to use COMPASS specifier 2019-09-04 16:27:47 +10:00
Andrew Tridgell
3aa01448ff HAL_ChibiOS: use COMPASS specifier for f103-periph 2019-09-04 16:27:47 +10:00
Andrew Tridgell
f18a18c0ee AP_Baro: use GET_I2C_DEVICE() for i2c probes
for consistency with compass and INS
2019-09-04 16:27:47 +10:00
Andrew Tridgell
2bc7db4cca AP_HAL: removed old HAL_COMPASS_ defines (no longer used) 2019-09-04 16:27:47 +10:00
Andrew Tridgell
bd0760f9d4 AP_Compass: removed unusued compass probes
now only use probe lists
2019-09-04 16:27:47 +10:00
Andrew Tridgell
43e011c7a8 AP_HAL: convert Linux compass specification to new probe list
this avoids the special handling in AP_Compass library
2019-09-04 16:27:47 +10:00
Andrew Tridgell
3bc8522b54 AP_Compass: added ROTATION_NONE to probes
we no longer use defaults in the headers
2019-09-04 16:27:47 +10:00
Andrew Tridgell
f877def909 AP_Compass: removed default rotations for compass probe
this prevents bugs where the force_external and rotation are mixed up
in hwdef.dat causing incorrect rotations
2019-09-04 16:27:47 +10:00
Andrew Tridgell
2a48241ebb AP_Compass: fixed naming of QMC5883L driver
needed for probe using COMPASS macro in hwdef.dat
2019-09-04 16:27:47 +10:00
Andrew Tridgell
316e7cf7e6 HAL_ChibiOS: fixed mini-pix compass and baro probing
removed dup baro and fixed compass probe
2019-09-04 16:27:47 +10:00
Andrew Tridgell
2509b50852 AP_Baro: define GET_I2C_DEVICE() 2019-09-04 16:27:47 +10:00
Andrew Tridgell
15e15e0b9d AP_InertialSensor: define GET_I2C_DEVICE() 2019-09-04 16:27:47 +10:00
Andrew Tridgell
beca17c638 HAL_ChibiOS: use GET_I2C_DEVICE() for i2c probing
this allows for the driver probing to use a macro to prevent loading
of duplicate i2c devices (AP_Compass does this)
2019-09-04 16:27:47 +10:00
Michael du Breuil
e19f0ef238 AP_HAL_ChibiOS: Remove set_stop_pin from AnalogSource 2019-09-04 09:54:50 +10:00
Michael du Breuil
75b241622f AP_HAL_Empty: Remove set_stop_pin from AnalogSource 2019-09-04 09:54:50 +10:00
Michael du Breuil
979a431e4a AP_HAL_Linux: Remove set_stop_pin from AnalogSource 2019-09-04 09:54:50 +10:00
Michael du Breuil
69d3e97533 AP_HAL_SITL: Remove set_stop_pin from AnalogSource 2019-09-04 09:54:50 +10:00
Michael du Breuil
c12652b325 AP_Rangefinder: Remove stop pin usage 2019-09-04 09:54:50 +10:00
Michael du Breuil
927a0521e3 AP_HAL: Remove the empty force_safety_no_wait 2019-09-04 07:14:50 +10:00
Michael du Breuil
e5eeb6181d GCS_MAVLink: Remove the usage of force_safety_no_wait 2019-09-04 07:14:50 +10:00
Michael du Breuil
5711c2cbac AP_UAVCAN: Remove the usage of force_safety_no_wait 2019-09-04 07:14:50 +10:00
Michael du Breuil
53860b53ac AP_BoardConfig: Remove the usage of force_safety_no_wait 2019-09-04 07:14:50 +10:00
Michael du Breuil
a74f00d045 GCS_MAVLink: Remove single use method 2019-09-03 14:35:17 +10:00
Michael du Breuil
8adc6ba3ad AP_Notify: Add an alternate LED scheme 2019-09-03 11:50:52 +10:00
E Thomas
c09d6908ed Enabled active buzzer output on OmnibusNanoV6 2019-09-03 09:59:53 +10:00
Peter Barker
7ea449076f AP_NavEKF3: use timing logging from AP_NavEKF 2019-09-03 09:28:37 +10:00
Peter Barker
c8fac758ee AP_NavEKF2: use timing logging from AP_NavEKF 2019-09-03 09:28:37 +10:00
Peter Barker
6d71ef5cf8 AP_Logger: move EKF timing logging out to EKF 2019-09-03 09:28:37 +10:00
Peter Barker
9e0f525f69 AP_NavEKF: move logging in from AP_Logger 2019-09-03 09:28:37 +10:00
Peter Barker
9da0efaaef GCS_MAVLink: fill SYS_STATUS bits from AC_Fence 2019-09-03 09:12:24 +10:00
Andrew Tridgell
9c900c7176 AP_RangeFinder: added driver for Lanbao CM8JL65 2019-09-03 09:10:48 +10:00
Peter Hall
2f3c0447eb RC_Channel: add fence and value for rover 2019-09-02 11:03:27 +09:00
Andrew Tridgell
172c802ffa AP_RangeFinder: support native I2C protocol on LightWare Lidars
this supports both the native and the legacy I2C protocol for
LightWare Lidars. The native protocol is a string based protocol that
is enabled by default on new Lidars. By supporting both protocols we
avoid the need for users to re-configure their new lidar using a
serial cable before using it on I2C.

This driver was originally written by Mitch Koch and Jonathan
Challinger, and ported to master by me (it required only minor
changes)
2019-09-02 07:20:22 +10:00
Peter Hall
fdb6da0793 RC_Channel: define sailboat mainsail and motor input channels
The unusual use of 207 is in preparation for Peter Barker's RCMAP replacement PR which uses 200 to 206
2019-09-01 09:11:25 +09:00
Peter Hall
3dd0ebaf0d AP_WindVane: add wind_speed_enabled method 2019-09-01 09:11:25 +09:00
Peter Barker
ca5ee2bfbc AP_Param: correct fetching of flags for parameters
This was sending through the flags for the group the parameter was in,
rather than the parameter itself.
2019-08-30 06:57:30 +10:00
Andrew Tridgell
bcb139f02f AP_Compass: fixed uninitialised CAN device ID bits 2019-08-29 18:37:03 +10:00
Rajat Singhal
80bbadf9ca SITL: AirSim: Store last timestamp only
Also change the datatype of deltat
2019-08-29 08:32:19 +10:00
Rajat Singhal
86a70e5797 SITL: Remove redundant timestep in Airsim backend 2019-08-29 08:32:19 +10:00
Rajat Singhal
c056548f0d SITL: Enable Arming Checks in airsim-copter params 2019-08-29 08:32:19 +10:00
Michael du Breuil
fa6e43be77 AP_Logger: Forward declare AHRS
This reduces the number of places this is implicitly included, and helps
to reduce the scope of files that get rebuilt
2019-08-28 13:13:03 +10:00
Michael du Breuil
fe279b03b6 SITL: Directly include needed headers 2019-08-28 13:13:03 +10:00
Michael du Breuil
c85c9faa6d GCS_MAVLink: Directly include needed headers 2019-08-28 13:13:03 +10:00
Michael du Breuil
1a5627ae54 AP_VisualOdom: Directly include needed headers 2019-08-28 13:13:03 +10:00
Michael du Breuil
04863f858d AP_Terrain: Directly include needed headers 2019-08-28 13:13:03 +10:00
Michael du Breuil
17cec7cf2b AP_Landing: Directly include needed headers 2019-08-28 13:13:03 +10:00
Michael du Breuil
ca0dad9a7f AP_GPS: Directly include needed headers 2019-08-28 13:13:03 +10:00
Michael du Breuil
5d888abfec AP_Baro: Directly include needed headers 2019-08-28 13:13:03 +10:00
Michael du Breuil
d8bce8295e AP_Arming: Directly include needed headers 2019-08-28 13:13:03 +10:00
Peter Barker
78af091869 AP_Logger: log parameter space used as part of log open 2019-08-28 11:51:09 +10:00
Peter Barker
b493805fb4 AP_Param: methods to provide amount of parameter space used
AP_Param: provide method for storage size
2019-08-28 11:51:09 +10:00
Peter Barker
2d1357b44c AP_Mount: stop passing serial manager through to init() 2019-08-28 06:55:28 +10:00
Andrew Tridgell
6cecf15e6a AP_Baro: remove unused baro probe lines 2019-08-28 06:54:11 +10:00
Andrew Tridgell
7fa6eeaaed AP_HAL: remove unused HAL_BARO_ defines 2019-08-28 06:54:11 +10:00
Andrew Tridgell
9d94598235 AP_HAL: convert linux boards to use baro probe list 2019-08-28 06:54:11 +10:00
Andrew Tridgell
72494788f7 HAL_ChibiOS: convert more boards to use BARO specifier 2019-08-28 06:54:11 +10:00
Andrew Tridgell
60a6f1b04a AP_HAL: removed most HAL_INS_* defines
not used any more
2019-08-28 06:54:11 +10:00
Andrew Tridgell
1c92ecc89f AP_InertialSensor: removed old method of specifying most IMUs
and removed dangerous default values for rotations
2019-08-28 06:54:11 +10:00
Andrew Tridgell
0667747506 HAL_ChibiOS: convert some more boards to new IMU specifiers 2019-08-28 06:54:11 +10:00
Andrew Tridgell
96180018fb AP_HAL: convert HAL_Linux to use HAL_INS_PROBE_LIST
makes for much simpler addition of new boards, especially with more
than one IMU
2019-08-28 06:54:11 +10:00
Jaaaky
d7abd636ac AP_HAL_SITL: Fix build with --sitl-flash-storage option 2019-08-28 06:23:04 +10:00
Andrew Tridgell
dcd9003831 Revert "AP_Mission: Better AUTO watchdog restore"
This reverts commit d774bf3ea5.
2019-08-27 13:18:12 -06:00
Andrew Tridgell
5ce4ff916e HAL_ChibiOS: fixed Pixhawk1 gyro orientation
this was broken by the recent switch to hwdef.dat for orientations
2019-08-27 19:29:37 +10:00
Andrew Tridgell
c99923d500 AP_InertialSensor: require gyro orientations in LSM9DS probe
this prevents a bug where they are missing in hwdef.dat
2019-08-27 19:29:37 +10:00
Andrew Tridgell
d40835c666 AP_Logger: use AP::FS().set_mtime() 2019-08-27 15:40:43 +10:00
Andrew Tridgell
b489e8a655 AP_Filesystem: added set_mtime() call 2019-08-27 15:40:43 +10:00
Andrew Tridgell
0ffe2e75be HAL_ChibiOS: fixed warnings 2019-08-27 15:40:43 +10:00
Andrew Tridgell
df4cb00970 AP_Logger: added LOG_FILE_TIMEOUT parameter
this allows for cards to be removed and re-inserted while continuing
logging
2019-08-27 15:40:43 +10:00
Andrew Tridgell
b577787f68 AP_Scripting: use AP_Filesystem API 2019-08-27 15:40:43 +10:00
Andrew Tridgell
667b4e045a AP_Logger: convert to use AP_Filesystem 2019-08-27 15:40:43 +10:00
Andrew Tridgell
fb50ec2a1d AP_Notify: convert to use AP_Filesystem 2019-08-27 15:40:43 +10:00
Andrew Tridgell
d160f14856 AP_UAVCAN: convert to use AP_Filesystem 2019-08-27 15:40:43 +10:00
Andrew Tridgell
a4860afd32 AP_Terrain: convert to use AP_Filesystem 2019-08-27 15:40:43 +10:00
Andrew Tridgell
a4258639c8 AP_Proximity: use strtol instead of sscanf 2019-08-27 15:40:43 +10:00
Andrew Tridgell
9d760a2956 HAL_ChibiOS: disable re-entrancy in FATFS
not needed now we have a semaphore in AP_Filesystem
2019-08-27 15:40:43 +10:00
Andrew Tridgell
bf79b65e07 HAL_ChibiOS: simplify stubs code 2019-08-27 15:40:43 +10:00
Andrew Tridgell
d1565a96c5 HAL_ChibiOS: wrap cacheBuffer functions
needed to avoid problem with end() method in UARTDriver shadowing with
F7 implementation of cache macros
2019-08-27 15:40:43 +10:00
Andrew Tridgell
b867ef35c0 HAL_ChibiOS: use AP_Filesystem API 2019-08-27 15:40:43 +10:00
Andrew Tridgell
692abb11fa AP_Filesystem: define new filesystem API 2019-08-27 15:40:43 +10:00
Michael du Breuil
7fdc9fef12 AP_Scripting: Garbage collect after each run of a script
For some reason this resolves a memory leak in a tight loop of file
open, close. This also extends the memory debug printing to be a bit
more useful.
2019-08-27 13:54:54 +10:00
Michael du Breuil
1484a12f4b AP_HAL_Linux: Fix bad check order on heap_realloc 2019-08-27 13:54:54 +10:00
Michael du Breuil
2d40250f9b AP_HAL_SITL: Fix bad check order on heap_realloc 2019-08-27 13:54:54 +10:00
Andrew Tridgell
b30f3697d2 HAL_ChibiOS: fixed build without ISR limit 2019-08-27 10:29:56 +10:00
Andrew Tridgell
97c56c068e HAL_ChibiOS: update board IDs for AP_Periph firmwares 2019-08-27 10:29:56 +10:00
Andrew Tridgell
63f39c2bd6 HAL_ChibiOS: fixed build of iomcu firmware 2019-08-27 10:29:56 +10:00
Andrew Tridgell
444af9e638 AP_BoardConfig: fixed AP_Periph build error 2019-08-27 10:29:56 +10:00
Andrew Tridgell
e8e18959f7 AP_Baro: fixed baro build with AP_Periph
no GCS available
2019-08-27 10:29:56 +10:00
Andrew Tridgell
a19e55e83c AP_Baro: added BMP388 driver 2019-08-27 10:29:56 +10:00
Andrew Tridgell
64921b64f5 HAL_ChibiOS: enable sensors in peripheral firmwares 2019-08-27 10:29:56 +10:00
Andrew Tridgell
fa76d1fbe6 HAL_ChibiOS: disable watchdog save in bootloader 2019-08-27 10:29:56 +10:00
Andrew Tridgell
5cbe85ee19 HAL_ChibiOS: allow for ADC and clock overrides 2019-08-27 10:29:56 +10:00
Andrew Tridgell
dc89d10ccf HAL_ChibiOS: added hwdef.dat for CUAV_GPS 2019-08-27 10:29:56 +10:00
Andrew Tridgell
c8806acaf5 HAL_ChibiOS: use AP_PERIPH env var 2019-08-27 10:29:56 +10:00
Andrew Tridgell
cbc83d68cd HAL_ChibiOS: allow for CAN enable override on F4 2019-08-27 10:29:56 +10:00
Andrew Tridgell
fb68fa8bc9 HAL_ChibiOS: fixed typo for 512k F4 parts 2019-08-27 10:29:56 +10:00
Andrew Tridgell
e51a1a88df HAL_ChibiOS: initial hwdef-bl.dat for CUAV CAN GPS 2019-08-27 10:29:56 +10:00
Andrew Tridgell
66ab585a24 HAL_ChibiOS: setup defaults for CAN app versions 2019-08-27 10:29:56 +10:00
Andrew Tridgell
d711bed405 HAL_ChibiOS: set default node ID of 117
this allows for flight controllers without DNA support
2019-08-27 10:29:56 +10:00
Andrew Tridgell
ababe1e81d HAL_ChibiOS: disable UART support in f103-periph bootloader 2019-08-27 10:29:56 +10:00
Andrew Tridgell
2facfe0baa HAL_ChibiOS: support empty UART_ORDER
for CAN bootloader without uart support
2019-08-27 10:29:56 +10:00
Andrew Tridgell
f4576ec8f3 AP_Compass: reduce firmware size for AP_Periph 2019-08-27 10:29:56 +10:00
Andrew Tridgell
0ec3f80bbe AP_Compass: enable LIS3MDL on I2C and RM3100 on SPI 2019-08-27 10:29:56 +10:00
Andrew Tridgell
9a7b52fd15 HAL_ChibiOS: added hwdef.dat for f103-periph 2019-08-27 10:29:56 +10:00
Andrew Tridgell
16bdaaa1af HAL_ChibiOS: added support for STM31F10x for AP_Periph 2019-08-27 10:29:56 +10:00
Andrew Tridgell
24e05e96e7 AP_HAL: define support for LIS3MDL_I2C and RM3100_SPI 2019-08-27 10:29:56 +10:00
Andrew Tridgell
01472aa795 AP_FlashStorage: added support for STM32F1xx 2019-08-27 10:29:56 +10:00
Andrew Tridgell
291d72601b AP_GPS: enabled reduced size for AP_Periph support 2019-08-27 10:29:56 +10:00
Andrew Tridgell
f897eae89d AP_Param: enable reduced size support for AP_Periph 2019-08-27 10:29:56 +10:00
Andrew Tridgell
88fbbfba09 AP_Vehicle: added AP_Periph vehicle type 2019-08-27 10:29:56 +10:00
Andrew Tridgell
d005f066a9 StorageManager: enable use of a single storage region 2019-08-27 10:29:56 +10:00
Michael du Breuil
1e66457755 AP_Scripting: Allow the bindings to descirbe any build dependencies needed
Scripting has a hard requirement on AP_Terrain being available, this
allows us to emit a cleaner error message if you have disabled terrain
but not scripting
2019-08-27 09:45:35 +10:00
Peter Barker
5d9b332bcb GCS_MAVLink: log exectuted COMMAND_LONG and COMMAND_INT packets 2019-08-27 09:32:00 +10:00
Peter Barker
631725f817 AP_Logger: add Write_Command for writing out received mavlink commands 2019-08-27 09:32:00 +10:00
Peter Barker
5010de9560 AP_Notify: add static asserts for array size
We index into these arrays so ensuring their size is worthwhile
2019-08-27 09:29:11 +10:00
Michael du Breuil
ee3fcf49c6 AP_BattMonitor: Detect bad configuration of failsafes 2019-08-26 18:57:59 +01:00
Michael du Breuil
e47f97c5d3 AP_HAL: Fix bad buffer termination 2019-08-26 18:57:59 +01:00
Stone white
ec911710c9 hwdef: Enable Spektrum 3.3V VDD Power on fmuv5 2019-08-26 17:27:02 +10:00
Michael du Breuil
56e35e0712 AP_HAL_ChibiOS: Remove almost redundant code duplication from the HAL 2019-08-26 17:24:09 +10:00
Andrew Tridgell
66dc36ef88 AP_Logger: ifdef out _need_rtc_update 2019-08-26 15:41:44 +10:00
Andrew Tridgell
4418495c99 AP_Logger: use UNUSED_RESULT
Co-Authored-By: Francisco Ferreira <OXINARF@users.noreply.github.com>
2019-08-26 15:41:44 +10:00
Andrew Tridgell
8e58cb993d AP_Logger: fix timestamp on log files opened before GPS lock 2019-08-26 15:41:44 +10:00
Andrew Tridgell
ffe0f338d3 HAL_ChibiOS: enable utime() API 2019-08-26 15:41:44 +10:00
murata
1a8e644437 AP_Logger: GPA/GPA2 Change the unit of DELTA. 2019-08-26 14:22:47 +10:00
Andrew Tridgell
4ca48f225d SITL: send vicon data at 70ms intervals
this matches the max rate that EK2 will accept this data
2019-08-26 12:27:31 +10:00
Andrew Tridgell
cfc37f2089 GCS_MAVLink: log corrected timestamp for vision data
this allows for debugging of link lag issues
2019-08-26 12:27:31 +10:00
Andrew Tridgell
414d3eb670 AP_NavEKF2: don't fuse GPS when EK2_GPS_TYPE=3
when using a vision position system, the user may have vision derived
GPS data coming in using GPS_INPUT msgs. We should not fuse these when
EK2_GPS_TYPE=3 as we end up fusing both vision data and GPS data,
which does not work with the current EK2 code

This change makes it possible to run EK2 and EK3 in parallel in a
Vicon, wityh EK2 using VISION_POSITION_ESTIMATE data and EK3 using
GPS_INPUT (with yaw) data.
2019-08-26 12:27:31 +10:00
Jaaaky
fee3136b44 AP_Baro: Fix floating point exception with watchdog reset
Fixes #12132
2019-08-26 12:24:21 +10:00
Henry Wurzburg
00c111651a ChiBios: Omnibusf4pro hwdef tweak to allow active or passive buzzer 2019-08-26 12:22:53 +10:00
Andrew Tridgell
aeb58cede1 HAL_ChibiOS: I2C timeout should be send+recv, not MAX(send,recv)
MAX() is right for SPI, not I2C
2019-08-26 09:13:39 +10:00
Andrew Tridgell
4027d61e17 AP_Scheduler: log I2C ISR count 2019-08-26 09:13:39 +10:00
Andrew Tridgell
7d5c0e92ae AP_Logger: added logging of I2C ISR count 2019-08-26 09:13:39 +10:00
Andrew Tridgell
578e5dfdaa HAL_ChibiOS: add up i2c ISR count 2019-08-26 09:13:39 +10:00
Andrew Tridgell
9741ac0b64 AP_HAL: added I2C ISR count to PersistentData 2019-08-26 09:13:39 +10:00
Jaaaky
d774bf3ea5 AP_Mission: Better AUTO watchdog restore
This allows to run any commands following the last nav_waypoint
that may be required or change flight behavior for following wps
2019-08-25 06:40:34 -06:00
Andrew Tridgell
f8cfbb8062 HAL_ChibiOS: added ISR limit on I2C
this will prevent any possibility of an I2C interrupt storm. This is
designed to address the most likely cause of #11642
2019-08-25 17:12:16 +10:00
Andrew Tridgell
b8602abdeb AP_InternalError: added error for i2c isr error 2019-08-25 17:12:16 +10:00
Peter Barker
2acc53ec17 GCS_MAVLink: break out of loop statement once we have a result 2019-08-24 15:33:50 +10:00
Peter Barker
052e721622 GCS_MAVLink: tweak timings debug messages 2019-08-24 15:33:50 +10:00
Peter Hall
db87285153 AR_WPNav: add oa_wp_bearing_cd function 2019-08-24 09:05:29 +09:00
Peter Hall
c445362fae AR_WPNav: fix wp_bearing_cd calc 2019-08-23 14:44:37 +09:00
murata
4754710e60 RangeFinder: Change to coding style (NFC)
RangeFinder: RangeFinder: Change to coding style (NFC)
2019-08-23 10:11:30 +09:00
Peter Barker
2049e86dda AP_Param: optionally return parameter flags in AP_Param::find(...) 2019-08-22 09:23:56 +10:00
Peter Barker
70daf0010b AP_Param: add param flag bit indicating internal-use-only 2019-08-22 09:23:56 +10:00
Peter Barker
9cf9497552 AP_Mission: mark MIS_TOTAL as internal-use-only 2019-08-22 09:23:56 +10:00
Peter Barker
4f9d1ada33 GCS_MAVLink: deny setting MIS_TOTAL parameter
Closes #11413

GCS_MAVLink: conform to parameter protocol requirements while ignoring sets

GCS_MAVLink: use internal-use-only param bit
2019-08-22 09:23:56 +10:00
Randy Mackay
257152aa55 SITL: sailboat motor enabled only for sailboat-motor frame 2019-08-21 19:34:13 +09:00
Randy Mackay
0ce1ce9c4f SITL: minor format changes for sailboat 2019-08-21 19:34:13 +09:00
Peter Barker
592c7acc4c AP_RTC: add clarifying comment on get_time_utc 2019-08-21 09:38:41 +10:00
Peter Barker
46c880089c AP_RTC: tighten types on get_system_clock_utc
None of these components should ever be negative - given its source is
only ever seconds-since-epoch.
2019-08-21 09:38:41 +10:00
Peter Hall
4492c09b3b AP_HAL_SITL: Scheduler skip set stack on Cygwin 2019-08-20 15:59:32 -07:00
murata
851ee24c99 AP_RangeFinder: Clarify the purpose of input registers 2019-08-20 14:36:29 +01:00
Gone4Dirt
5239d86d13 AP_RPM: Added Arduino RPM Sensor Debug Tool
This debug tool has been created to help users correctly impliment
and debug various RPM sensors when an oscilloscope is unavailable.

The RPM Sensor wiki will direct to this tool to help users.
2019-08-20 09:13:09 +10:00
mhefny
1e41f7cc61 SITL: add Webots support and examples 2019-08-19 19:36:25 +10:00
mhefny
c1c32ab615 AP_HAL_SITL: add Webots support 2019-08-19 19:36:25 +10:00
Andrew Tridgell
992016069a AP_InertialSensor: fixed watchdog on AHRS trim gyro wait 2019-08-19 14:37:46 +10:00
Peter Barker
914e6c5497 AP_HAL_Linux: check return value of system command
Compilation fails on disco without this patch as system is declared with
attribute warn_unused_result
2019-08-19 14:37:13 +10:00
Peter Barker
5f2dd57cca AP_Radio: add missing override keywords
AP_Radio doesn't compile without these patches.
2019-08-19 14:36:16 +10:00
Peter Barker
03c439f9ab GCS_MAVLink: make update_sensor_status_flags private 2019-08-17 17:45:03 +10:00
Andrew Tridgell
8ef2046f7b AP_IOMCU: use blocking writes to uart
this avoids the issue of arming failing due to a non-zero protocol count
2019-08-17 17:36:41 +10:00
Andrew Tridgell
8080efbc6a HAL_ChibiOS: allow for blocking unbuffered uarts
this is used by AP_IOMCU to avoid a race condition where the mutex is
busy on write() causing a zero-length write and delayed output
2019-08-17 17:36:41 +10:00
Andrew Tridgell
454717cf6f AP_IOMCU: cleanup IO protocol and add logging
this cleans up the IOMCU protocol structures now we don't need to be
compatible with the old nuttx based protocol and adds logging of IOMCU
errors
2019-08-17 17:36:41 +10:00
Andrew Tridgell
984542fa53 AP_IOMCU: fixed error handling for short packets
this prevents short packets from the IOMCU being processed. A short
enough read could be processed as a valid status packet, which would
lead to invalid values for safety flag and servo voltage

fixes issue #12030
2019-08-17 17:36:41 +10:00
Andrew Tridgell
afc8a70ce4 HAL_ChibiOS: fixed a bug in wait_timeout() on UARTs
wait_timeout() could return true on a read of less bytes than are
expected.
2019-08-17 17:36:41 +10:00
Peter Barker
35c2406b17 AP_HAL_ChibiOS: add missing override keywords
This was causing CubeOrange not to build
2019-08-17 13:25:05 +10:00
Michael du Breuil
e05047bb0b AP_Scripting: Remove unneeded function, add some more enums 2019-08-17 10:41:27 +09:00
Randy Mackay
a8fd04ddf9 AC_Avoidance: Dijkstra's returns oa-not-required if path has been completed 2019-08-17 09:42:43 +09:00
Randy Mackay
452be5fd94 AC_Avoidance: Dijkstra skips calcs if current loc is same as destination 2019-08-17 09:42:43 +09:00
Randy Mackay
bed21b43e1 AP_OAPathPlanner: minor fix to return original origin and dest upon failure
this has no functional effect because the consumers are not using the origin_new and destination_new unless the ret_state was OA_SUCCESS
2019-08-17 09:42:43 +09:00
Randy Mackay
aeb98c7555 AC_WPNav: integrate OAPathPlanner
includes these changse:
get_wp_distance_to_destination always uses oa unadjusted destination
get_wp_bearing_to_destination always uses oa unadjusted destination
stop vehicle if object avoidance fails
OA adjusted altitude interpolated from original track
2019-08-17 09:42:43 +09:00
Randy Mackay
6361a9a204 AC_WPNav: constify get_wp_destination 2019-08-17 09:42:43 +09:00
Peter Barker
53f8aa2b92 AP_Landing: correct format string 2019-08-16 13:47:39 +10:00
Peter Barker
83b7857349 AP_RTC: add example for RTC functions 2019-08-16 13:47:13 +10:00
Rajat Singhal
ad9093251e SITL: Remove unused includes 2019-08-15 20:03:31 +10:00
Rajat Singhal
4af8813014 AP_Proximity: Add license info in Airsim lidar backend 2019-08-15 20:03:31 +10:00
Rajat Singhal
4e847342b1 SITL: Add license info in Airsim files 2019-08-15 20:03:31 +10:00
Peter Barker
169013cae2 SITL: allow starting location to come from parameters 2019-08-15 18:00:35 +10:00
Peter Barker
94d2ce13d2 AP_HAL_SITL: allow starting location to come from parameters 2019-08-15 18:00:35 +10:00
Peter Barker
24405f1b23 SITL: correct and add comment 2019-08-15 18:00:35 +10:00
Peter Barker
f7b47679bb SITL: remove home_str from constructor 2019-08-15 15:16:11 +10:00
Peter Barker
cdab58d598 AP_HAL_SITL: remove home_str from constructor
No Aircraft was actually using this in the constructor, so it's really
adding overhead for no good reason.
2019-08-15 15:16:11 +10:00
Peter Barker
1b3e2e3c8b AP_HAL_Linux: add missing override keywords 2019-08-15 15:14:23 +10:00
Tom Pittenger
e70ff1b30a AP_Mission: update NAV_DELAY comment that said wrong ID number 2019-08-14 10:45:29 -07:00
Peter Barker
b860676f12 AP_Mission: examples: var_info is now in GCS_MAVLINK_Parameters 2019-08-14 18:25:43 +10:00
Peter Barker
6af3149adc AP_Logger: examples: var_info is now in GCS_MAVLINK_Parameters 2019-08-14 18:25:43 +10:00
Peter Barker
8c21a279ea AP_GPS: examples: var_info is now in GCS_MAVLINK_Parameters 2019-08-14 18:25:43 +10:00
Peter Barker
c16504e33e AP_Baro: examples: var_info is now in GCS_MAVLINK_Parameters 2019-08-14 18:25:43 +10:00
Peter Barker
9197ebc3b2 AP_Airspeed: examples: var_info is now in GCS_MAVLINK_Parameters 2019-08-14 18:25:43 +10:00
Peter Barker
98eca63201 AP_AHRS: var_info is now in GCS_MAVLINK_Parameters 2019-08-14 18:25:43 +10:00
Peter Barker
74670a77be GCS_MAVLink: avoid allocating a GCS_MAVLINK per mavlink channel 2019-08-14 18:25:43 +10:00
Peter Barker
13c22c667d AP_UAVCAN: add missing override keywords 2019-08-14 16:33:29 +10:00
Peter Barker
54b200a777 AP_HAL_ChibiOS: add missing uavcan-related override keywords 2019-08-14 16:33:29 +10:00
Randy Mackay
973caf26f7 AP_ToshibaCAN: constify some local variables 2019-08-14 13:29:14 +09:00
Randy Mackay
fbf5ecfe8c AP_ToshibaCAN: ensure motors are off when vehicle is disarmed 2019-08-14 13:29:14 +09:00
Peter Hall
4afcc9c289 SITL: sailboat allow motor sailing 2019-08-14 09:26:01 +09:00
Peter Barker
20be080325 AP_Logger: correct example to add required override keywords 2019-08-14 09:41:54 +10:00
Peter Barker
67bf00c1c3 GCS_MAVLink: ensure payload space before sending message ack
Also add comment about how we shouldn't be sending this message at all.
2019-08-13 16:48:17 +10:00
Peter Barker
bb542ca39a GCS_MAVLink: queue AUTOPILOT_VERSION for sending instead of direct-send
Also allows the message to be requested for streaming or with
REQUEST_MESSAGE

We weren't checking for buffer space before sending this out, so it was
a possible source of corruption.
2019-08-13 16:29:45 +10:00
Andrew Tridgell
5e40921b42 HAL_ChibiOS: fixed reboot hold in bootloader
thanks to Tom for noticing this
2019-08-12 22:21:13 -07:00
Peter Barker
e18174e4ac AP_Logger: correct use of uninitialised stack value 2019-08-13 10:43:05 +10:00
Anthony Velte
5d2f114947 AP_HAL_SITL: Add scrimmage simulator support 2019-08-13 10:07:26 +10:00
Anthony Velte
92a9ab6c6d SITL: Add scrimmage simulator support 2019-08-13 10:07:26 +10:00
Peter Barker
1adda1ccf0 AP_Compass: move automatic declination setting into AP_Compass itself 2019-08-13 10:02:13 +10:00
Andrew Tridgell
8d7262994b AP_GPS: support yaw in GPS_INPUT mavlink GPS
useful for Vicon setups
2019-08-12 10:25:40 +10:00
Randy Mackay
c7ca9c04f8 AP_Math: add comment to vector2f::point_on_segment 2019-08-10 12:21:01 +09:00
Randy Mackay
a1a2733926 AC_Avoidance: reduce OA path planner look ahead and margin param defaults 2019-08-09 15:51:26 +09:00
Peter Barker
a5ec64fc99 AC_Fence: tidy get_breach_distance
The polygon fence will soon be able to supply a breach distance -
prepare for that.
2019-08-08 16:47:41 +09:00
Peter Barker
6a241cc3e9 AC_Fence: remove pointless sanity check 2019-08-08 16:47:41 +09:00
Randy Mackay
2bfc26621a AP_Arming: resolve check_failed compiler warning 2019-08-08 12:53:51 +09:00
Peter Hall
2a3676003a SITL: sailboat add tide 2019-08-07 14:34:07 +09:00
Peter Hall
90bf224e7f SITL: sailboat add wave simulation and parameters 2019-08-07 14:34:07 +09:00
Peter Barker
57528b94cf GCS_MAVLink: allow complete() call on subclasses to fail
Also terminate uploads if any error occurs fetching items
2019-08-07 12:07:59 +10:00
Randy Mackay
1b533295a8 AR_AttitudeControl: minor comment fixes 2019-08-06 20:00:05 +09:00
Peter Hall
65d8047165 AR_AttitudeControl: fix sailboat heel PID 2019-08-06 20:00:05 +09:00
Peter Barker
4b012ab62b GCS_MAVLink: deny upload of non-MISSION items if not doing mavlink2 2019-08-06 13:58:44 +10:00
Peter Barker
4e95832433 GCS_MAVLink: send mission acks for bad MISSION_ITEM requests 2019-08-06 13:58:44 +10:00
Peter Barker
afd623a6fa GCS_MAVLink: use send_message to send mission items
It is less error-prone to use this new send_message function.

In particular, one of the parameters to these functions was using the
wrong constant when sending a mission item message.
2019-08-06 13:58:44 +10:00
Peter Barker
8fc6e16a4a GCS_MAVLink: fill missing seq and type fields in MISSION_ITEM
GCS_MAVLink: fill mission type in return MISSION_ITEM packets

GCS_MAVLink: fill in return sequence number for MISSION_ITEM messages
2019-08-06 13:58:44 +10:00
Peter Barker
b2d9d7b6a0 AP_Logger: const-struct many structures, use temp for navekf object 2019-08-06 11:45:04 +10:00
Henry Wurzburg
b6518b6b46 AP_HAL_ChiibOS: change omnibusf4 board type to be unique 2019-08-06 11:20:11 +10:00
murata
0b1987ae36 AP_RangeFinder: Use common hexadecimal to character number conversion method 2019-08-06 10:14:12 +10:00
murata
e4455491aa AP_GPS: Use common hexadecimal character to number conversion method 2019-08-06 10:14:12 +10:00
murata
a39228c453 AP_Common: Make hexadecimal character number conversion method common 2019-08-06 10:14:12 +10:00
Pierre Kancir
1a71519e17 AP_HAL_SITL: add missing header 2019-08-06 09:37:30 +10:00
Pierre Kancir
17c0cf8d5c AP_Common: check for feenableexcept on WAF 2019-08-06 09:37:30 +10:00
Bill Geyer
fbf2b62300 AP_Motors: Tradheli - Make H3-120 swashplate the default 2019-08-06 08:24:59 +09:00
Bill Geyer
7ecc368d4f AP_Motors: tradheli - remove white space in param values 2019-08-06 08:24:59 +09:00
Randy Mackay
488d1ab60a AC_Avoidance: replace Write_OA with Write_OABendyRuler and Write_OADijkstra 2019-08-06 08:15:45 +09:00
Randy Mackay
b666b172c4 AP_Logger: replace Write_OA with Write_OABendyRuler and Write_OADijkstra 2019-08-06 08:15:45 +09:00
Randy Mackay
f5a307fb13 AR_WPNav: add speed_min parameter
Should be set to boat's plane speed and ensure vehicle does not slow below this speed in corners
2019-08-05 17:04:43 -06:00
Peter Barker
61ed6e07eb AP_NavEKF3: shorten EKF3 initialisation send-text string
Now:
pbarker@bluebottle:~/rc/ardupilot(master)$ echo -n "EKF3 IMU1 buffers IMU=11 OBS=4 OF=10, dt=0.0120" | wc
      0       7      47
pbarker@bluebottle:~/rc/ardupilot(master)$

Closes #11952
2019-08-05 19:50:32 +10:00
Peter Barker
95b8c12454 AP_Arming: mark check_failed as taking a format string 2019-08-05 14:18:05 +10:00
Andrew Tridgell
9672dce335 SITL: switch vicon simulation to use VISION_POSITION_ESTIMATE
this is a more commonly used message
2019-08-05 13:58:08 +10:00
James
e474b7dcfe AP_BattMonitor: add PWM Fuel Level Sensor
this sensor produces PWM between 1100 and 1900, giving fuel level as a
percentage
2019-08-05 11:35:16 +10:00
Peter Barker
46ad04aab7 AP_GPS: correct format string warnings in SBF driver 2019-08-05 11:20:35 +10:00
Peter Barker
df01bed14f AP_Compass: take GCS link in place of channel to calibration routines 2019-08-05 09:23:10 +10:00
Peter Barker
cf0b7cf016 GCS_MAVLink: pass link object in place of channel to compass cal
Also eliminate intermediate function as just adding noise
2019-08-05 09:23:10 +10:00
Randy Mackay
01a713a812 AP_RangeFinder: param desc rename from PX4-PWM to just PWM
the PWM driver is available for many boards
2019-08-04 21:15:49 +10:00
Rajat Singhal
bd9120b725 SITL: Add script for multi-vehicle sim with AirSim 2019-08-04 07:57:46 +10:00
Rajat Singhal
8e7ab23b4f SITL: Add RC support for Airsim
Adds variable length float array parsing
2019-08-04 07:57:46 +10:00
Rajat Singhal
2954f2b4d0 SITL: Delete Airsim Readme
Wiki Page has been added - http://ardupilot.org/dev/docs/sitl-with-airsim.html
2019-08-04 07:57:46 +10:00
Rajat Singhal
ad5d3cb9f1 SITL: Add Airsim quadx lidar params 2019-08-04 07:57:46 +10:00
Rajat Singhal
8f1c9759b8 AP_Proximity: Add AirSimSITL lidar sensor 2019-08-04 07:57:46 +10:00
Rajat Singhal
2d25971801 SITL: Add Lidar Sensor for Airsim
Adds variable length array of vector3f parsing
2019-08-04 07:57:46 +10:00
Leonard Hall
7f5d6662b3 AC_AttitudeControl: Support seperate roll and pitch limits 2019-08-03 12:06:32 +09:00
Leonard Hall
036b47ec56 AP_Motors: Add seperate roll and pitch limits 2019-08-03 12:06:32 +09:00
hoangthien94
fc9ff2b09a AP_NavEKF2: add method to check if ext nav is used for yaw 2019-08-03 08:44:11 +09:00
hoangthien94
916de076ec AP_AHRS: add method to check if ext nav is used for yaw 2019-08-03 08:44:11 +09:00
Tom Pittenger
6d1362d569 AP_Proximity: allow MAV driver to accept negative increments and sanity check distances 2019-08-02 09:50:13 -06:00
Tom Pittenger
b8dcdca909 AP_Proximity: add Object Avoidance Database, remove old Sector->Location converter 2019-08-02 09:50:13 -06:00
Tom Pittenger
9ad6d14c16 AC_Avoidance: add Object Avoidance Database 2019-08-02 09:50:13 -06:00
Tom Pittenger
2dba187d30 SITL: Morse scanner lidar to use larger MAVLink msg instead of raw data squeezed into 8 sectors 2019-08-02 09:50:13 -06:00
Tom Pittenger
3f99def25a SITL: fix Morse simulator camera and changed default mission to indoor 2019-08-02 09:50:13 -06:00
SergeyBokhantsev
c73a4fd227 RC_Channel: unify debounce code 2019-08-02 12:34:02 +01:00
vierfuffzig
6b1046f0ac AP_OSD: add primary airspeed item
and fix param description
2019-08-02 09:22:55 +09:00
Peter Barker
71533c7c5c GCS_MAVLink: correct frame on rally mission items 2019-08-02 09:17:04 +10:00
Peter Barker
880e96448b GCS_MAVLink: tighten type on mavlink_coordinate_frame_to_location_alt_frame 2019-08-01 17:45:30 +10:00
Peter Barker
979a9fb679 GCS_MAVLink: ensure item being converted is a rally point 2019-08-01 17:44:37 +10:00
Andrew Tridgell
4fca69c5e9 HAL_ChibiOS: renamed Pixhawk6 to Durandal
new name for FC from Holybro
2019-08-01 14:11:06 +10:00
Andrew Tridgell
4f243aca02 AP_TECS: prevent rapid changing of pitch limits on landing approach
when on landing approach we estimate time to flare based on two noisy
numbers, the vertical speed and height above ground. With noisy
rangefinders this can change rapidly, which resulted in the pitch
limit changing rapidly, leading to a porpoising movement

this limits the rate of change, and also prevents it coming down once
it has nosed up due to pending flare on approach
2019-08-01 11:28:22 +10:00
Andrew Tridgell
4fd3008b4e AP_TECS: log pitch limits 2019-08-01 11:28:22 +10:00
Andrew Tridgell
3c8ed3d8e1 AP_TECS: fixed flare pitch limits
when limits are out of bounds
2019-08-01 11:28:22 +10:00
Andrew Tridgell
d72ded4a9e AP_TECS: prevent numerical error with zero max throttle 2019-08-01 11:28:22 +10:00
Andrew Tridgell
587aa33617 AP_TECS: added TECS_OPTIONS
used for full-time glider
2019-08-01 11:28:22 +10:00
Andrew Tridgell
df0cc40bba AP_TECS: allow TECS_PITCH_MAX to be negative 2019-08-01 11:28:22 +10:00
Andrew Tridgell
be9c98db12 AP_GPS: ensure we have full timestamp before setting RTC clock
thanks to Martin Sollie for this bug report
2019-07-31 20:13:55 +10:00
Siddharth Purohit
10e8e8e9cc AP_BoardConfig_CAN: fix bad get_slcan_serial method 2019-07-31 17:24:13 +10:00
Andrew Tridgell
c9567783e6 AP_Baro: use sensor_config_error on baro cal failure
this allows the user to fix parameters
2019-07-31 14:30:49 +10:00
Michael du Breuil
5645709e50 AP_Baro: Rearrange the sensor struct
Saves 12 bytes of RAM, 144 bytes of flash on CubeBlack
2019-07-31 14:30:25 +10:00
Andrew Tridgell
e1ce735886 AP_InertialSensor: special check for CubeBlack to force INS_USE3=1
this will cope with users loading old parameter files
2019-07-31 12:53:57 +10:00
Andrew Tridgell
6f58260d99 AP_Baro: check for all 1 ADC read on MS5611 2019-07-31 12:53:57 +10:00
Andrew Tridgell
0c314c36b6 AP_Logger: log baro health 2019-07-31 12:53:57 +10:00
Andrew Tridgell
a196c54db6 AP_Baro: consider a baro unhealthy when outside of -200 to 200 C
this helps detects unhealthy baros on SPI where we can't detect comms
failure
2019-07-31 12:53:57 +10:00
Andrew Tridgell
123800ccd2 AP_InertialSensor: default INS_USE3 to 1 2019-07-31 12:53:57 +10:00
Michael du Breuil
c19e4f2147 AP_Mission: Refactor read_cmd_from_storage for clarity 2019-07-31 09:13:43 +10:00
Andrew Tridgell
0f6b8375bb AP_RangeFinder: added a 1.5 delay to probe of LW20 I2C
the LW20 takes a long time to boot and be ready to probe
2019-07-30 13:32:36 +10:00
Andrew Tridgell
bcfdc91900 AP_BoardConfig: added BRD_BOOT_DELAY
this allows for a configurable boot delay in case a board has
peripherals that take a long time to bootup
2019-07-30 13:32:36 +10:00
Andrew Tridgell
2572885159 AP_Param: flush() after converting parameters
this prevents a race in sub where a set_default_by_name() directly
follows a parameter conversion for ARMING_CHECK. Without the flush the
default is written to storage by the IO queue draining after the set()
2019-07-30 10:42:16 +10:00
Michael du Breuil
4396540a22 AP_Arming: Add rangefinder checks 2019-07-30 10:42:16 +10:00
Michael du Breuil
3202a2e0a6 AP_Rangefinder: Add arming checks 2019-07-30 10:42:16 +10:00
Michael du Breuil
f06251a07f AP_Param: Delay param dumps to avoid running out of buffer space 2019-07-30 10:42:16 +10:00
Michael du Breuil
1677c11855 AP_Scripting: Cope with new AP_GPS::first_unconfigured_gps 2019-07-30 10:12:43 +10:00
Michael du Breuil
4b2cb45ac0 AP_Arming: Cope with new AP_GPS::first_unconfigured_gps 2019-07-30 10:12:43 +10:00
Michael du Breuil
d33006a2e7 AP_GPS: Refactor first_unconfigured_gps to return bool 2019-07-30 10:12:43 +10:00
Peter Barker
11b9737b34 AP_AccelCal: remove wrapper around send_text
With our statustext queueing system this check is not just wrong but
redundant.
2019-07-30 10:06:42 +10:00
Randy Mackay
00cc4ace8a RC_Channel: resolve gcs::send_text compiler warning 2019-07-30 09:02:39 +09:00