Commit Graph

21020 Commits

Author SHA1 Message Date
Andrew Tridgell 9a978c1eef AP_Airspeed: switched to recursive semaphore
this is needed by the SDP3X driver. It is the simplest fix for the
issue
2019-11-20 07:35:07 +11:00
Andrew Tridgell 99932a3319 AP_GPS: fixed cast for comparison with txspace 2019-11-19 07:49:55 +11:00
Andrew Tridgell c8f6697859 AP_TECS: removed TECS_LAND_PMIN
thanks to TunaLobster for pointing out that it is redundent
2019-11-19 07:47:33 +11:00
Andrew Tridgell 9035195fca AP_UAVCAN: support RTCMStream for RTCM injection 2019-11-17 11:58:52 +11:00
Andrew Tridgell 0080f3c011 AP_GPS: fixed sizes of config items 2019-11-17 11:57:51 +11:00
Michael du Breuil ea337209e6 AP_GPS: UBlox: Fix the assumption that all keys are 1 byte keys 2019-11-17 11:57:48 +11:00
Michael du Breuil 62f69cf92f AP_GPS: UBlox fix not listing the time mode as a configuration reason 2019-11-17 11:57:45 +11:00
Andrew Tridgell 3b75b4e5ad AP_GPS: fixed TMODE config issue on non-F9 GPS
thanks to Michel Pastor for reporting this
2019-11-17 11:57:39 +11:00
Andrew Tridgell 58b0f4acf6 AP_GPS: added automatic config of TMODE on F9
the Drotek F9 GPS ships with TMODE enabled, which means we don't get a
3D fix.

This also adds the VALGET/VALSET msgs we will need for automatic
moving baseline config
2019-11-17 11:56:53 +11:00
Andrew Tridgell 76f4420710 AP_GPS: support Fix2 message for UAVCAN
this allows for RTK fix levels
2019-11-17 11:56:11 +11:00
Andrew Tridgell 022dbb2e30 AP_GPS: support RTCMStream for RTCM injection on UAVCAN 2019-11-17 11:55:44 +11:00
Andrew Tridgell 6eb4ccd428 HAL_ChibiOS: retain OPENDRAIN if set on a pin
this allows OPENDRAIN when set on a pin to be retained when set with a
pinMode(). This fixes a partially lit B/E LED on the Pixhawk4
2019-11-17 11:45:55 +11:00
vierfuffzig 1821fc9594 AP_RTC: add local time support 2019-11-17 11:40:29 +11:00
Andrew Tridgell d3d4dff9ba AP_OSD: add clock panel 2019-11-17 11:36:07 +11:00
Andrew Tridgell c3bc1e3dd4 AP_Baro: added register checking and reset to DPS280 driver
this is to fix an issue found on a mRoControlZeroF7
2019-11-17 11:29:53 +11:00
Michael du Breuil a9fabdb278 AP_Logger: Fix logging of current on non primary instances 2019-11-17 11:29:38 +11:00
Andrew Tridgell 752c2872f9 RC_Channel: added RC option for new takeoff mode 2019-11-17 11:29:13 +11:00
Andrew Tridgell df5e154144 AP_RangeFinder: fixed failover between rangefinders
this fixes the case where we have one rangefinder that can handle
short range and another that is good for long range but no good for
short range (quite common, eg radar and lidar)

If possible we want to use the first rangefinder that is in range for
the right orientation. If none are in range then use the first for the
orientation
2019-11-17 11:27:13 +11:00
Andrew Tridgell b19ad689a6 AP_GPS: fixed GPS to UART mapping
this allows for first GPS as UAVCAN and 2nd as UART. That is not
possible currently unless you waste a uart
2019-11-17 11:26:44 +11:00
Andrew Tridgell a5e79f4231 AP_TECS: added TECS_LAND_PMIN for min pitch in flare
this is useful to narrow the range of available pitch after flare
2019-11-17 11:26:07 +11:00
Peter Barker fffed10692 GCS_MAVLink: check reply channel for space rather than current channel 2019-11-02 14:08:47 +11:00
Andrew Tridgell 65c3d4ff20 HAL_ChibiOS: enable advanced timers if we have any N PWM channels 2019-11-02 13:46:43 +11:00
Andrew Tridgell 88e78afb19 HAL_ChibiOS: fixed SPI timeout bug
thanks to CUAV for noticing
2019-11-01 21:54:43 +11:00
Andrew Tridgell 3c1a362d90 GCS_MAVLink: fixed uninitialised bytes in send_named_float()
this fixes an issue with mavproxy with python3
2019-10-17 11:52:53 +11:00
liang 194ea66912 AP_Airspeed: protect sample timestamp while get data 2019-10-15 21:12:15 +11:00
Andrew Tridgell 6ebb9ad84a AP_HAL: enabled SLCAN on fmuv2 and Pixhawk1-1M
this fits for now, and is needed for CAN GPS for now
2019-10-07 21:14:24 +11:00
Andrew Tridgell 42c4b41bf6 AP_UAVCAN: cleanup ifdefs for SLCAN enable 2019-10-07 21:14:24 +11:00
Andrew Tridgell 83bacfa89c AP_HAL: cleanup ifdefs for SLCAN enable 2019-10-07 21:14:24 +11:00
Andrew Tridgell 0eb9a58f17 AP_HAL_ChibiOS: cleanup ifdefs for SLCAN enable 2019-10-07 21:14:24 +11:00
Andrew Tridgell 53e03816c0 AP_BoardConfig: cleanup ifdefs for SLCAN enable 2019-10-07 21:14:24 +11:00
Andrew Tridgell a452f8e4ed switch optimisation to O2
on average makes for faster and smaller code than O3
2019-10-06 10:58:07 +11:00
Andrew Tridgell ee25d05f3c AP_Math: make fill_nanf() use a signalling NaN
we want use of these values to trigger a FPE
2019-10-06 10:58:07 +11:00
Andrew Tridgell 43df0022e1 use common variables for EKF 2019-10-06 10:58:07 +11:00
Andrew Tridgell 9ad9fe42bc 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-06 10:58:07 +11:00
Andrew Tridgell 46628b4401 AP_NavEKF2: make it easy to do EK2 timing tests
for future benchmarking
2019-10-06 10:58:07 +11:00
Andrew Tridgell cd9c9e0809 AP_NavEKF: fixed build with vector index checking 2019-10-06 10:58:07 +11:00
Andrew Tridgell 156a64aca0 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-06 10:58:07 +11:00
Michel Pastor eb24e12666 AP_Logger: fix logging on 256Mbit flash chips 2019-10-06 10:58:07 +11:00
Michel Pastor d7033dbf0d AP_Logger: fix AP_Logger_Block::get_num_logs() 2019-10-06 10:58:07 +11:00
Andrew Tridgell 0ec6210184 HAL_ChibiOS: removed wait on CAN peripheral in H7
these wait busy loops can take a very long time, and end up causing
interrupts to be lost elsewhere in the system, causing lost bytes on
UARTs

We should not have while loops waiting on peripharals like this. If we
do need to wait for a flag to clear then it needs to be done in a low
priority thread, or we need to check for completion in a timer

CAN still seems to work with this change, but needs flight testing
2019-10-06 10:58:07 +11:00
Andrew Tridgell d017a9a60d AP_Logger: fixed LOG_FILE_DSRMROT with delayed log stop
now that we persist logging for 15s after disarm we need to also delay
the log rotation if LOG_FILE_DSRMROT=1. Otherwise we will put the log
data into the next log, which defeats the purpose of the 15s
persistance
2019-10-06 10:58:07 +11:00
Andrew Tridgell 5a25d5c42d AP_Proximity: fixed incorrect use of fabs() 2019-10-06 10:58:07 +11:00
vierfuffzig 0b1cbc7bde AP_AHRS: fix custom orientation ToRad conversion 2019-10-06 10:58:07 +11:00
Andrew Tridgell df86990c96 GCS_MAVLink: use HAL_MEM_CLASS for status sizes 2019-10-06 10:58:07 +11:00
Andrew Tridgell 6cd6b37826 AP_Logger: use HAL_MEM_CLASS for logging buffer size 2019-10-06 10:58:07 +11:00
Andrew Tridgell 609a2d95f8 AP_Logger: try harder to use close to user buffer size
this stops us drastically reducing buffer size when low on memory
2019-10-06 10:58:07 +11:00
Andrew Tridgell 3105255080 AP_HAL: added HAL_MEM_CLASS for amount of memory 2019-10-06 10:58:07 +11:00
Andrew Tridgell b8a77890b6 HAL_ChibiOS: generate HAL_MEMORY_TOTAL_KB for each board 2019-10-06 10:58:07 +11:00
Andrew Tridgell bd95331068 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-06 10:58:07 +11:00
vierfuffzig afdb53daca AP_BLHeli: fix watchdog resets with telemetry active from non-multirotor motors 2019-10-06 10:58:07 +11:00