Commit Graph

23331 Commits

Author SHA1 Message Date
Randy Mackay 630bc01101 AP_HAL_SITL: send vehicle velocity to sitl vicon class 2020-06-02 08:33:42 +09:00
Randy Mackay c8f6cb233b SITL: vicon supports sending vision-speed-estimate
SIM_VICON_TMASK controls which of the 3 supported messages are sent
SIM_VICON_VGLI_X/Y/Z allows introducing a velocity glitch
2020-06-02 08:33:42 +09:00
Randy Mackay 3a209d5d84 SITL: SIM_Vicon loses unused obs_elements structure 2020-06-02 08:33:42 +09:00
Randy Mackay cad9889656 AP_AHRS: send vision-speed-estimates to EKF3 2020-06-02 08:33:42 +09:00
chobits c7817eaca1 AP_NavEKF3: support VISION_SPEED_ESTIMATE
Co-authored-by: Randy Mackay <rmackay9@yahoo.com>
2020-06-02 08:33:42 +09:00
Randy Mackay bdb67532b0 AP_Math: clarify get_vel_correction_for_sensor_offset comment 2020-06-02 08:33:42 +09:00
Randy Mackay 4639e8a698 AP_Math: add get_vel_correction_for_sensor_offset 2020-06-01 17:51:24 +09:00
chobits 9b480ca755 AP_Logger: support VISION_SPEED_ESTIMATE 2020-06-01 17:51:24 +09:00
chobits 66a5f645d7 AP_VisualOdom: support VISION_SPEED_ESTIMATE 2020-06-01 17:51:24 +09:00
chobits ff6e4c4f9a GCS_MAVLink: support VISION_SPEED_ESTIMATE 2020-06-01 17:51:24 +09:00
chobits dee095b4a4 AP_NavEKF2: support VISION_SPEED_ESTIMATE 2020-06-01 17:51:24 +09:00
chobits c9e363d529 AP_AHRS: support VISION_SPEED_ESTIMATE 2020-06-01 17:51:24 +09:00
Rishabh e7d98648e6 AR_WPNav: Reset WP origin if recovering from OA 2020-05-30 08:55:45 +09:00
Rishabh 44f0aef5e9 AP_OAPathPlanner: Add param to reset WP origin while recovering from Bendy 2020-05-30 08:55:45 +09:00
Gone4Dirt 1b7672a84f AP_Motors: Correctly adjust heli run up timer in bailout 2020-05-28 18:50:08 -04:00
Iampete1 141ab622a3 SITL: examples: JSON: MATLAB: add pnet linux compiled 2020-05-29 08:25:24 +10:00
Iampete1 13965133b0 SITL: examples: JSON: add MATLAB example 2020-05-29 08:25:24 +10:00
Iampete1 fa712082d7 SITL: examples: add JSON readme 2020-05-29 08:25:24 +10:00
Iampete1 ce0cb9660f SITL: examples: add MATLAB TCP/UDP/IP Toolbox 2020-05-29 08:25:24 +10:00
Iampete1 0c6efa5f26 SITL: add JSON backend 2020-05-29 08:25:24 +10:00
Iampete1 c31a4f4b14 AP_HAL_SITL: add JSON backend 2020-05-29 08:25:24 +10:00
CUAVcaijie 220e6999c7 HAL_ChibiOS:Adapt to CUAV Nora V1.2 hardware 2020-05-28 19:13:49 +10:00
Peter Barker 1ebfc79eb0 AP_HAL_Linux: enable console for examples
Turns out we *do* need this for examples.  We're back to stuffing up
terminals where examples have been run, but that can be addressed later.
2020-05-28 13:49:47 +10:00
pkocmoud 7809dc849c HAL_ChibiOS: Added support for mRo Pixracer Pro flight controller 2020-05-27 21:22:56 +10:00
Andrew Tridgell 529bfe8fcd AP_GPS: fixed issue with GPS selection for moving baseline
when you have a moving baseline pair of ublox GPS modules and the
rover GPS does not have full fixed RTK lock on the base GPS then we
should not use it as our primary GPS as it's position and velocity can
be badly affected by the attempts of the GPS to gain a fixed lock.

This was observed in a flight with two F9P GPS, where the GPS velocity
data from the rover GPS went way off when it lost full RTK lock. It's
status stayed at 4, so it was selected as the primary GPS
2020-05-27 10:59:46 +10:00
MisterMower 41245acf14 AP_Logger: Added units to CurrTot message
Units are not associated with the CurrTot message. AP_BattMonitor.h indicates the total current consumed is reported in mAh. This change sets the units for CurrTot to Ampere seconds and applies a multiplier of 3.6 to convert the reported mAh value to Ampere seconds.
2020-05-26 16:19:14 +10:00
Peter Barker 6cdee8c830 AP_BLHeli: read more efficiently from telemetry UART 2020-05-26 15:59:11 +10:00
Peter Barker 6d9e563ede AP_HAL_ChibiOS: override read(buffer,count) method to be more efficient 2020-05-26 15:59:11 +10:00
Peter Barker d259c03079 AP_HAL: BetterStream add a read(uint8_t*buffer, uint16_t count method 2020-05-26 15:59:11 +10:00
Peter Barker 1d9c2b1726 AP_Logger: add documentation for SBPH and SBRH 2020-05-26 14:13:06 +10:00
Henry Wurzburg 9c72525bbf AP_HAL_ChibiOS: Add unused LED output as GPIO in OmnibusF4Pro def 2020-05-26 10:51:32 +10:00
Peter Barker 19dc07250d AP_NavEKF2: clarify yaw reset error message
The current wording can be taken to indicate that the mag sensors
stopped, causing this issue.
2020-05-26 10:05:35 +10:00
Peter Barker bf3cb977fd AP_NavEKF3: clarify yaw reset error message
The current wording can be taken to indicate that the mag sensors
stopped, causing this issue.
2020-05-26 10:05:35 +10:00
vierfuffzig 6fa7dca68b AP-Baro: fix init without baro 2020-05-26 10:04:22 +10:00
yaapu 13592cef91 AP_Frsky_Telem: removed time constraint to allow SITL regression testing 2020-05-26 10:02:12 +10:00
yaapu 6303c700d4 AP_Frsky_Telem: prevent SPort frame fragmentation by writing whole 8byte frames vs writing single bytes
general scheduler delays could introduce small delays when writing SPort frames to the uart one byte
at the time potentially leading to rx desyncs on the SPort bus.
This fix replaces single byte writes with full frame writes.

The library has around 10ms to repond to polling so to guarantee frame integrity responses taking
longer than 7500us are discarded
2020-05-26 10:02:12 +10:00
Peter Barker af80c4a29f AP_RangeFinder: remove move-to-error-state for LeddarOne driver
Just because there's a lot in your input buffer doesn't necessarily mean
the rangefinder is faulty.
2020-05-26 09:20:32 +10:00
Peter Barker 3bf1ac5918 AP_BLHeli: trim annoying LF from debug "Bad CRC" line 2020-05-26 09:20:32 +10:00
Peter Barker 67e4756f19 AP_Hott_Telem: use new UARTDriver discard_input method 2020-05-26 09:20:32 +10:00
Peter Barker 90038339dc AP_UAVCAN: use new UARTDriver discard_input method 2020-05-26 09:20:32 +10:00
Peter Barker 95f9769041 AP_RangeFinder: use new UARTDriver discard_input method 2020-05-26 09:20:32 +10:00
Peter Barker f1182637a6 AP_IOMCU: use new UARTDriver discard_input method 2020-05-26 09:20:32 +10:00
Peter Barker 71f6262294 AP_EFI: use new UARTDriver discard_input method 2020-05-26 09:20:32 +10:00
Peter Barker d012cf8d47 AP_Camera: use new UARTDriver discard_input method 2020-05-26 09:20:32 +10:00
Peter Barker a073469423 AP_BLHeli: use new UARTDriver discard_input method 2020-05-26 09:20:32 +10:00
Peter Barker 80615c44ff AP_HAL_SITL: add discard_input method on UARTDriver 2020-05-26 09:20:32 +10:00
Peter Barker 9a9743e6ba AP_HAL_Linux: add discard_input method on UARTDriver 2020-05-26 09:20:32 +10:00
Peter Barker b16c1ea647 AP_HAL_Empty: add discard_input method on UARTDriver 2020-05-26 09:20:32 +10:00
Peter Barker 8f54de4184 AP_HAL_ChibiOS: add discard_input method on UARTDriver 2020-05-26 09:20:32 +10:00
Peter Barker a8d03990ec AP_HAL: add discard_input method on UARTDriver 2020-05-26 09:20:32 +10:00
Peter Hall bfd71fdae1 RC_Channel: add Qassist switch 2020-05-26 09:01:47 +10:00
Andrew Tridgell 5bfcb0ed4a SRV_Channel: Add servo chan override w/ timeout
Adds a feature to override a servo output for a given time. Scripting
bindings and example included.
2020-05-25 14:10:01 +10:00
Andrew Tridgell 5e74152444 AP_Scripting: Add servo chan override w/ timeout
Adds a feature to override a servo output for a given time. Scripting bindings and example included.
2020-05-25 14:10:01 +10:00
Andrew Tridgell cf0f95f81e AP_BLHeli: allow for negative temperatures from BLHeli32 ESCs
ESCs can send negative values
2020-05-25 13:53:32 +10:00
Andrew Tridgell a0cf4e158a AP_Compass: revert change to RM3100 scale factor and increase scale limit
This reverts the change from #13895 and instead resolves the issue by
increasing the scale factor limit to 1.4

There is an open question as to why some RM3100 compasses show a
different scale factor (by about 1.25 times) to other versions of the
same sensor. As we haven't resolved this properly it seems the correct
thing to do is follow the datasheet but allow for a wider range of
scale factors to cope with the variation between sensors
2020-05-24 15:06:15 +10:00
Peter Barker 49918d070e AP_Logger: add documentation for ESC LoggerMessage 2020-05-24 13:07:35 +10:00
Peter Barker cc60faa58e AP_Logger: use single message number for all ESCs by using instance # 2020-05-24 13:07:35 +10:00
Andy Piper 63b5711a4d AP_Compass: use a separate slot for the custom compass rotation 2020-05-24 07:46:17 +10:00
Andy Piper acff7daba5 AP_RCProtocol: scale SRXL2 using published conversion values. switch SRXL2 channels to match ArduPilot 2020-05-24 07:45:01 +10:00
Andy Piper 6da1f3bf2e AP_GyroFFT: filter energy, harmonic and amplitude fit. Make a better guess at harmonic matching
add filtered second and third harmonics and log them
make sure we use all of the gyro samples available on each axis rather than skipping
separate gyro update from fft start to minimize time in fast loop
add FFT_HMNC_PEAK to allow users to select which noise peak and which axis will be tracked.
make sure the self-test runs once and display the results
report self-test failure reason. make sure self-test runs for all windows.
always give logging a chance to run at IO_PRIORITY
add log message documentation
make sure the engine still runs even when the arming check has been disabled
record last FFT update time and cycle time and fallback to throttle estimate when update is too old
delay for longer in FFT thread between cycles to cope on F4
try really hard to get a viable frequency estimate
change range on MAXHZ/MINHZ to reflect that 50Hz is actually quite dangerous
swap the center peak for one of the shoulders if there is temporarily a closer match with the frequency trend
when FFT is disabled still log harmonic notch frequency
use distance matrix to find most appropriate peak
use a median filter to remove outliers before filtering
discount peaks that are relatively too low in energy
make sure harmonic fit is tracked for both potential targets
convert all gyro buffers to ObjectBuffer<float> for lock-free access
run all FFT steps inside the FFT thread
calculate cycle time and loop delay correctly
drop samples when the ring buffer is full
2020-05-24 07:43:34 +10:00
Andy Piper fab8168f5c AP_Arming: allow FFT to report failure reason. allow FFT check to be disabled.
document FFT arming check and make sure the appropriate side effect happens regardless
2020-05-24 07:43:34 +10:00
Andy Piper 8ac79da643 AP_InertialSensor: FFT gyro window would overflow on windows >= 256
convert FFT buffers to ObjectBuffer<float> for lock-free access
push gyro samples directly into the FFT ring buffer from the gyro thread
2020-05-24 07:43:34 +10:00
Andy Piper d873ec4533 AP_Vehicle: separate gyrofft gyro sampling from fft initiation
move FFT gyro sampling into fast loop for all vehicles
rename FFT update method
2020-05-24 07:43:34 +10:00
Andy Piper 13e40a3002 AP_HAL_Empty: add harmonics to DSP
add DSP vector mean function
add ObjectBuffer signature
2020-05-24 07:43:34 +10:00
Andy Piper 33c1523905 AP_HAL_ChibiOS: add harmonics to DSP
add vector_mean_float() to DSP
allow fft_start() to use ObjectBuffer<float> for lock-free access
2020-05-24 07:43:34 +10:00
Andy Piper ee87ef7013 AP_HAL_SITL: make harmonics part of DSP
add vector mean function to dsp
allow fft_start() to use ObjectBuffer<float> for lock-free access
2020-05-24 07:43:34 +10:00
Andy Piper e2ef0bd36e AP_HAL: collect data for three largest peaks
new dsp peak detection algorithm
add DSP sketch with frequency ascii art
tool to generate gyro data frames from batch sampled DF logs
add generated data from real Y6B flight
allow fft_start() to use ObjectBuffer<float> for lock-free access
allow ObjectBuffer to be resized
2020-05-24 07:43:34 +10:00
Peter Barker 5bbb02e03b SITL: add support for simulated proximity sensors 2020-05-22 17:06:16 +10:00
Peter Barker be9fc57e8f AP_HAL_SITL: add support for simulated RPLidarA2 2020-05-22 17:06:16 +10:00
Andy Piper f5320e8816 AP_Compass: make sure SITL rotation gets initialized like all the others
don't remove a custom rotation that has already been set
2020-05-21 16:28:27 +10:00
bugobliterator 7b9f0f3fd7 HAL_ChibiOS: use FIFO mode instead of Queue mode in FDCAN driver 2020-05-21 15:32:53 +10:00
Gone4Dirt b2d2bf61da AP_Motors: Support autorotation windows on external governors 2020-05-20 21:56:09 -04:00
Henry Wurzburg 23e7e2d193 AP_RangeFinder: rename Benewake types for easier identification 2020-05-21 08:45:30 +09:00
Paul Riseborough af19fea268 AP_NavEKF2: Fix 3-axis mag fusion per axis error handling
Ensure that if fusion checks for an axis fails, fusion will not be perfomred for all axes.
2020-05-20 15:09:32 +10:00
Buzz d4df145b4b ArduPlane: option to keep landing throttle at thr_min during flare and touchdown, not zero. 2020-05-20 11:29:45 +10:00
Buzz dc3db0476b AP_Landing: option to keep landing throttle at thr_min during flare and touchdown, not zero. 2020-05-20 11:29:45 +10:00
Andy Piper 9f02b1b1a8 AP_NavEKF2: fix typo in comment
Signed-off-by: Dr.-Ing. Amilcar do Carmo Lucas <amilcar.lucas@iav.de>
2020-05-20 07:29:31 +09:00
Andrew Tridgell 97f335396b AP_Scripting: fixed memory leak 2020-05-19 09:09:48 +10:00
Peter Hall b368188b01 AP_Scripting: add AP_Logger binding 2020-05-19 09:09:48 +10:00
Peter Hall be37a8a2b6 AP_Scripting: add example logging serial to dataflash 2020-05-19 09:09:48 +10:00
Peter Hall 11dc3e05e3 AP_Scripting: add SD file and dataflash logging example 2020-05-19 09:09:48 +10:00
Peter Hall 19ba9abc89 AP_Logger: add function and make public for scripting use 2020-05-19 09:09:48 +10:00
Peter Hall aa657626f2 AP_Scripting: examples: plane-wind-fs: read in CRT_MAH 2020-05-18 11:25:13 -07:00
Paul Riseborough 939331ae8d AP_NavEKF3: Fix double iteration of axes in SelectMagFusion 2020-05-18 09:38:45 +10:00
bugobliterator 05fe49a51f AP_Math: disable INEXACT flag from Float exception 2020-05-17 16:12:43 +10:00
bugobliterator 07907ac81d HAL_SITL: fix gcc build on macosx 2020-05-17 16:12:43 +10:00
Mark Whitehorn a54f286c1b SITL: fixed running of example programs 2020-05-16 11:06:35 +10:00
Peter Barker 115751833b AP_Logger: process pending rotate on arming
If the user arms the vehicle during the logging-persist-timeout we
should rotate the log immediately.
2020-05-15 16:02:09 +10:00
Randy Mackay 6c20264d9c AP_NavEKF3: minor comment fix 2020-05-15 11:23:07 +09:00
Randy Mackay 5ad3611142 AP_NavEKF3: improve ext nav glitch handling
replaces extNavTimeout with posTimeout
replaces lastExtNavPassTime_ms with lastPosPassTime_ms
2020-05-15 11:23:07 +09:00
Randy Mackay b2dd6446c8 SITL: add comment to SIM_VICON 2020-05-15 10:07:52 +09:00
Randy Mackay b71403c11a AP_VisualOdom: provide delay to ahrs:writeBodyFrameOdom 2020-05-15 10:07:52 +09:00
Randy Mackay b2ad1caf75 AP_AHRS: writeBodyFrameOdom accepts delay 2020-05-15 10:07:52 +09:00
Randy Mackay ef02942459 AP_NavEKF3: writeBodyFrameOdom accepts delay 2020-05-15 10:07:52 +09:00
Randy Mackay 69560ec147 AP_VisualOdom: provide delay to ahrs::writeExtNavData 2020-05-15 10:07:52 +09:00
Randy Mackay 762e82d49d AP_AHRS: writeExtNavData accepts delay 2020-05-15 10:07:52 +09:00
Randy Mackay c28fd27b02 AP_NavEKF3: writeExtNavData accepts delay 2020-05-15 10:07:52 +09:00
Randy Mackay f26a2a47b4 AP_NavEKF2: writeExtNavData accepts delay 2020-05-15 10:07:52 +09:00
Randy Mackay 366d03a533 SITL: add VICON_YAWERR
this allows simulating an error in the camera's reported yaw
2020-05-15 09:22:07 +10:00
Randy Mackay bf9ee4ada8 SITL: remove unused MAG_ERROR and VICON_HSTLEN params 2020-05-15 09:22:07 +10:00
Andrew Tridgell fd32dff45a AP_IOMCU: force safety off on IOMCU reset
if safety was forced off previously and we get an IOMCU reset then
force it off when the reset happens so vehicle can keep flying
2020-05-14 18:28:50 +10:00
mhefny 9f56b656e0 SITL: Revamp Examples to support multiple drones 2020-05-14 18:05:16 +10:00
mhefny 5a64156862 SITL: SITL-Webots timing is received from Webots only 2020-05-14 18:05:16 +10:00
Paul Riseborough 318811210f AP_NavEKF3: Don't perform emergency yaw reset unless commanded externally
This limits the use of the reset to situations where it is a last ditch resort before a lane switch and failsafe.
This will limit false positives for general deployment, but still provide protection from fly-aways at the cost of some increase in reaction time.
2020-05-14 10:40:48 +10:00
Paul Riseborough c94de61e29 AP_NavEKF2: Don't perform emergency yaw reset unless commanded externally
This limits the use of the reset to situations where it is a last ditch resort before a lane switch and failsafe.
This will limit false positives for general deployment, but still provide protection from fly-aways at the cost of some increase in reaction time.
2020-05-14 10:40:48 +10:00
Andrew Tridgell fc28cd4fa2 GCS_MAVLink: fixed a ftp duplicate reply
this fixes a bug in burst replies where the duplicate reply may have
the wrong offset. This causes the "paramftp bad type" error
2020-05-14 09:53:42 +10:00
chobits a7aa43f5d5 AP_NavEKF2: ext nav will not reset yaw if compass is used 2020-05-14 08:04:55 +09:00
Randy Mackay 45e6896d95 AP_NavEKF3: ensure extnav angle error is at least 5deg 2020-05-14 08:02:13 +10:00
Andy Piper e9b939ccb5 AP_Scripting: build fix for macOS 2020-05-13 11:59:03 -07:00
Andrew Tridgell 36869f668b AP_Scripting: fixed build on cygwin with deep directories 2020-05-12 19:55:21 +10:00
Andrew Tridgell 50db7f1648 AP_Scripting: update README.md 2020-05-12 19:55:21 +10:00
Andrew Tridgell 9cf464e570 AP_Scripting: removed the old Makefile 2020-05-12 19:55:21 +10:00
Andrew Tridgell 2c6fd13899 AP_Scripting: auto-build the bindings 2020-05-12 19:55:21 +10:00
Andrew Tridgell 5c8e4a4d7b AP_Scripting: removed old generated bindings 2020-05-12 19:55:21 +10:00
Buzz 9d9fdd1cb0 AP_Scripting: add big demo script for editing and updating mission item/s from lua. 2020-05-12 14:20:26 +10:00
Buzz 816474b6e8 AP_Scripting: rebuild bindings 2020-05-12 09:58:14 +10:00
Buzz 963b25059d AP_Scripting: allow to get/set/create arbitrary mission items
fetch item/s by their index, and review wp data, etc.  
AP_Mission: ran mission files through approved astyle  as they were non-compliant before this( astyle --options=Tools/CodeStyle/astylerc   )
2020-05-12 09:58:14 +10:00
Andrew Tridgell d16f31711e AP_RangeFinder: fixed mixing UAVCAN and non-UAVCAN rangefinders
UAVCAN rangefinders add themselves to the frontend drivers as the
devices appear. If they turn up before RangeFinder::init() is run then
this prevented init() from scanning for the other rangefinders as
num_instances is non-zero

This also fixes a race condition in updating num_instances in the
UAVCAN backend
2020-05-12 09:45:15 +10:00
Andrew Tridgell 603e5c4b55 AP_RangeFinder: added get_address()
allows AP_Periph to supply sensor_id for multiple CAN rangefinders
2020-05-11 18:36:46 +10:00
Peter Barker 5100c9fb8c GCS_Common: whitelist AUTOPILOT_VERSION for in_delay_callback sending
GCSs may request this very early on in the boot process, particularly
for SITL.

If we try to send it during a delay callback then we end up dropping it
at the moment - but we'd already sent the ack in response to the
request.
2020-05-11 15:22:38 +10:00
Peter Barker ca4af94833 AP_Logger: prevent potential infinite recursion in log-open codepath
If anything in start_new_log did logging (for example, by sending a
statustext), we end up infinitely recursing.

With the patch:

diff --git a/libraries/AP_Logger/AP_Logger_File.cpp b/libraries/AP_Logger/AP_Logger_File.cpp
index 69b8ef0431..eb422d10f8 100644
--- a/libraries/AP_Logger/AP_Logger_File.cpp
+++ b/libraries/AP_Logger/AP_Logger_File.cpp
@@ -778,6 +778,7 @@ void AP_Logger_File::PrepForArming()
  */
 void AP_Logger_File::start_new_log(void)
 {
+    gcs().send_text(MAV_SEVERITY_WARNING, "Starting new log");
     stop_logging();

     start_new_log_reset_variables();
pbarker@bluebottle:~/rc/ardupilot(master)$

We see:

    at ../../libraries/AP_Logger/AP_Logger_File.cpp:781
    this=0x555555ad9d30, pBuffer=0x7fffff8209d0, size=75, is_critical=true)
    at ../../libraries/AP_Logger/AP_Logger_Backend.cpp:372
    this=0x555555ad9d30, pBuffer=0x7fffff8209d0, size=75)
    at ../../libraries/AP_Logger/AP_Logger_Backend.h:32
    this=0x555555ad9d30, message=0x7fffff820b10 "Starting new log")
    at ../../libraries/AP_Logger/LogFile.cpp:466
    this=0x555555a6d758 <copter+11384>,
    message=0x7fffff820b10 "Starting new log")
    at ../../libraries/AP_Logger/AP_Logger.cpp:752
    this=0x555555a6e708 <copter+15400>, severity=MAV_SEVERITY_WARNING,
    fmt=0x5555557d64d0 "Starting new log", arg_list=0x7fffff820be0,
    dest_bitmask=1 '\001') at ../../libraries/GCS_MAVLink/GCS_Common.cpp:1847
    this=0x555555a6e708 <copter+15400>, severity=MAV_SEVERITY_WARNING,
    fmt=0x5555557d64d0 "Starting new log", arg_list=0x7fffff820be0)
    at ../../libraries/GCS_MAVLink/GCS.cpp:53
    this=0x555555a6e708 <copter+15400>, severity=MAV_SEVERITY_WARNING,
    fmt=0x5555557d64d0 "Starting new log")
    at ../../libraries/GCS_MAVLink/GCS.cpp:60
    at ../../libraries/AP_Logger/AP_Logger_File.cpp:781
    this=0x555555ad9d30, pBuffer=0x7fffff820dc0, size=75, is_critical=true)
    at ../../libraries/AP_Logger/AP_Logger_Backend.cpp:372

I'm not aware of any instances in the code where this will actually
happen - but it could easily sneak in.
2020-05-11 15:12:36 +10:00
Henry Wurzburg 12d5602926 AP_HAL_ChibiOS: Add ability to use UART3 and UART4 in bd alt config 4 2020-05-11 14:18:35 +10:00
Peter Barker 50523ed0fa AP_HAL_ChibiOS: remove pointless initialisations
These are never stack-allocated.

Only saves 16 bytes - but several lines
2020-05-10 18:03:36 +10:00
Randy Mackay 67903a29e2 AP_NavEKF3: fix getLLH when no GPS 2020-05-10 15:35:55 +10:00
Randy Mackay b95bc9076b AP_NavEKF2: fix getLLH when no GPS 2020-05-10 15:35:55 +10:00
Andrew Tridgell 2200dfefdb HAL_ChibiOS: during setup() we expect delays
this may fix occasional internal errors on SPI during startup
2020-05-10 15:12:43 +10:00
Andrew Tridgell 04e29d58e3 RC_Channel: avoid invalid misaligned access in example 2020-05-10 15:11:22 +10:00
Andrew Tridgell 5350ea5c58 AP_NavEKF3: avoid build warnings with g++ 9 2020-05-10 15:11:22 +10:00
Andrew Tridgell 3e853344f3 AP_Math: avoid build warnings 2020-05-10 15:11:22 +10:00
Andrew Tridgell 87c2858bde GCS_MAVLink: give banner on param download with ftp
thanks to Peter for noticing
2020-05-10 15:10:21 +10:00
Andrew Tridgell 259cb0aafd HAL_ChibiOS: removed EKF2 define, not needed any more 2020-05-10 15:09:54 +10:00
Andrew Tridgell 8868ac2d6f AP_AHRS: disable EKF2 by default on 1M boards 2020-05-10 15:09:54 +10:00
Andrew Tridgell 61d036acf3 HAL_ChibiOS: added build time check for right system clock
this helps prevent cases where we underclock a chip due to mistake in
headers or hwdef.dat
2020-05-10 15:09:28 +10:00
Andrew Tridgell 69676cd614 HAL_ChibiOS: support 24MHz f3 MCUs 2020-05-10 15:09:28 +10:00
Henry Wurzburg 3f735e7e54 HAL_ChibiOS: Make full UART4 available as bd config option 2020-05-10 08:00:57 +10:00
Henry Wurzburg 225a305cb9 AP_HAL_ChibiOS:Remove alt config since its not useful (no TX available) 2020-05-10 08:00:21 +10:00
Henry Wurzburg 8b3f07416c AP_NAVEKF3: change plane check_scaler value to match EKF2 value 2020-05-10 07:59:27 +10:00
Andrew Tridgell cd5aae20c1 AP_NavEKF3: fixed scary message for non-compass planes 2020-05-09 12:33:33 +10:00
Andrew Tridgell 4a80313fdd AP_Compass: added get_num_enabled()
used by EKF3
2020-05-09 12:33:33 +10:00
Michael du Breuil ceb0a9c827 AP_Airspeed: Rearrange state to save memory
Saves 8 bytes per airspeed sensor (2 backends for 8 total), and removes
the unneeded width specifier, which has no impact on used memory, and
saves us 88 bytes of flash because we don't have to do work to shift the
bits around.
2020-05-06 18:15:08 +10:00
Peter Barker 64e300a00c AP_Soaring: add documentation for VAR dataflash log message 2020-05-06 13:23:51 +10:00
Peter Barker 446dc61979 AP_InternalError: add warning on the internal error_t type 2020-05-06 13:23:15 +10:00
Peter Barker 70a9abfaff AP_InternalError: emit stringification of internal errors 2020-05-06 13:23:15 +10:00
Peter Barker 75514dfdfe AP_Arming: emit stringification of internal errors 2020-05-06 13:23:15 +10:00
Peter Barker 69093aa7b1 AP_Soaring: stop taking AHRS as constructor argument
... use singleton instead
2020-05-05 17:35:14 +10:00
Peter Barker f1f30a2fee AP_UAVCAN: regularise CAN pre-arm failure messages
AP_Arming tacks on the sub-system bit.

Remove PiccoloCAN's silly nullptr check

Require the library to supply the failure message (no default message)

Remove default cases so authors know to think about places they should
add things.
2020-05-05 11:27:53 +10:00
Peter Barker 245b962d92 AP_PiccoloCAN: regularise CAN pre-arm failure messages
AP_Arming tacks on the sub-system bit.

Remove PiccoloCAN's silly nullptr check

Require the library to supply the failure message (no default message)

Remove default cases so authors know to think about places they should
add things.
2020-05-05 11:27:53 +10:00
Peter Barker a6246a6afa AP_KDECAN: regularise CAN pre-arm failure messages
AP_Arming tacks on the sub-system bit.

Remove PiccoloCAN's silly nullptr check

Require the library to supply the failure message (no default message)

Remove default cases so authors know to think about places they should
add things.
2020-05-05 11:27:53 +10:00
Peter Barker b38d2c6194 AP_Arming: regularise CAN pre-arm failure messages
AP_Arming tacks on the sub-system bit.

Remove PiccoloCAN's silly nullptr check

Require the library to supply the failure message (no default message)

Remove default cases so authors know to think about places they should
add things.
2020-05-05 11:27:53 +10:00
Andrew Tridgell 8ea433ac21 AP_Terrain: added script for creating terrain *.dat files
useful for pre-populating a microSD card
2020-05-05 11:21:33 +10:00
Andrew Tridgell 7b7bf3ef86 AP_Terrain: fixed bug in disk offset calculation
this fixes a problem where two different locations could both be
mapped to the same disk block in the terrain/*.DAT files. That meant
that pre-filled terrain on the microSD card would sometimes require a
download in flight. It also means that a RTL with loss of GCS could
sometimes fly through a region with no terrain data available

Other changes in this patch:

 - allow for a 2cm discrepancy in the lat/lon of the grid
   corners. This is needed to allow for slightly different floating
   point rounding in tools that pre-generate terrain data to load on
   the microSD

 - added TERRAIN_OPTIONS parameter to allow the user to disable
   attempts to download new terrain data. This is mostly useful for
   testing to validate a terrain generator
2020-05-05 11:21:33 +10:00
Tatsuya Yamaguchi f23e592057 AP_Camera: move get_channel_pos function to RC_Channels 2020-05-05 10:09:30 +09:00
Tatsuya Yamaguchi 806bd38c7f RC_Channel: add get_channel_pos function 2020-05-05 10:09:30 +09:00
Tatsuya Yamaguchi de854a2ffe AP_Arming: pre-arm check for disarm aux switch 2020-05-05 10:09:30 +09:00
Tatsuya Yamaguchi 4fdd24ecd3 RC_Channel: add disarm aux switch RCn_OPTION=81 2020-05-05 10:09:30 +09:00
Andy Piper b7b2d9a6ce AP_Compass: add support for custom compass rotation via COMPASS_CUS_{ROLL,PIT,YAW}
add reboot required for parameters that need it
disable custom rotation on AP_Periph devices
2020-05-05 09:25:18 +10:00
Andy Piper 167e1d12d7 AP_RCProtocol: disable flow-control and buffered-writes for SRXL2 uart
switched spm_srxl.c to C++ compilation
Correctly set budget for half-duplex writes
Tidy PACKED and other externalities
disable SRXL2 on IOMCU and softserial - SRXL2 is a serial half-duplex protocol-only
fixed buffer overrun in SRXL2 parser
fix bugs in decoder sketch and allow output to SITL
2020-05-05 09:23:15 +10:00
Andy Piper 44e5171f2b AP_Frsky_Telem: refactor common code into AP_RCTelemetry
refactor naming
when using external data AP_Frsky_Telem::init() has to call AP_RCTelemetry::init() and exit.
No need to initialize serial ports
2020-05-05 09:23:15 +10:00
Andy Piper e3a88f686d AP_RCTelemetry: Spektrum telemetry library and telemetry abstraction
add support for temperature, battery voltage, battery current, flight pack
altitiude, airspeed, attitude and compass, GPS, ESC telemetry based on BLHeli
status messages and QOS packets.
refactor into AP_Telemetry
conditionally compile based on HAL_MINIMIZE_FEATURES
don't initialize spektrum telemetry if there is no RC uart
2020-05-05 09:23:15 +10:00
Andy Piper da166b256d GCS_MAVLink: add messages to Spektrum telemetry if it is enabled 2020-05-05 09:23:15 +10:00
Andy Piper 68c6a3b03d AP_RCProtocol: SRXL2 support 2020-05-05 09:23:15 +10:00
Peter Barker 967f8bf726 AP_HAL_ChibiOS: correct description of where stdout goes 2020-05-05 07:57:57 +10:00
david sastre f8b6d4b0ac AP_Parachute: Fix singleton panic message 2020-05-05 07:43:02 +10:00
Andrew Tridgell e126b6d346 HAL_ChibiOS: fixed race condition in storage write
we could mark a line as clean when it should be dirty if we lose a
race condition between storage thread and writer
2020-05-04 17:22:41 +10:00
Andrew Tridgell 0c1ba48212 AP_NavEKF3: fixed external yaw EK3_MAG_CAL=5 or 6
don't use GSF
2020-05-04 15:05:56 +10:00
Peter Barker f43e48a6f1 AP_Filesystem: correct comparison of signed/unsigned
Closes #14267
2020-05-04 12:06:30 +10:00
Lucas De Marchi 29d8586ea4 AP_HAL_Linux: RCInput_UDP: accept up to 16 channels
This allows more channels to be passed to RCInput_UDP protocol while
also allowing less than 8 channels - this is similar to the approach
used by SITL in which the packet size is used to figure out the number
of channels.
2020-05-03 00:07:52 -07:00
Andrew Tridgell f0fb64005d AP_Filesystem: document extra restrictions in param.pck 2020-04-30 21:15:28 +10:00
Andrew Tridgell 685d0666e9 AP_Filesystem: added README on VFS interface 2020-04-30 21:04:12 +10:00
Randy Mackay 183ce50138 AP_NavEKF3: check GPS used before resetting pos due to GPS receiver change 2020-04-30 15:55:59 +09:00
Randy Mackay f79d5d2d2c AP_NavEKF3: handle external nav position reset 2020-04-30 15:55:59 +09:00
Randy Mackay cbb25311bb AP_NavEKF3: setAidingMode uses lastExtNavPassTime_ms 2020-04-30 15:55:59 +09:00
Randy Mackay d763597065 AP_NavEKF3: compensate for visual odometry sensor position 2020-04-30 15:55:59 +09:00
priseborough c5e465aec9 AP_NavEKF3: add external nav system support
includes decoupling height source from use of external nav data
2020-04-30 15:55:59 +09:00
priseborough 471372cc7f AP_AHRS: Write external nav data to EKF3 2020-04-30 15:55:59 +09:00
Peter Barker 81454c7a40 GCS_MAVLink: create and use INTERNAL_ERROR macro so we get line numbers 2020-04-30 13:21:36 +10:00
Peter Barker 58a8e54d83 AP_Math: create and use INTERNAL_ERROR macro so we get line numbers 2020-04-30 13:21:36 +10:00
Peter Barker 7befe84f0c AP_Logger: create and use INTERNAL_ERROR macro so we get line numbers 2020-04-30 13:21:36 +10:00
Peter Barker f0b38fa11c AP_IOMCU: create and use INTERNAL_ERROR macro so we get line numbers 2020-04-30 13:21:36 +10:00
Peter Barker a30cdabb34 AP_InternalError: create and use INTERNAL_ERROR macro so we get line numbers 2020-04-30 13:21:36 +10:00
Peter Barker 5f8a9d1e15 AP_HAL_SITL: create and use INTERNAL_ERROR macro so we get line numbers 2020-04-30 13:21:36 +10:00
Peter Barker 141d7fed48 AP_HAL: create and use INTERNAL_ERROR macro so we get line numbers 2020-04-30 13:21:36 +10:00
Peter Barker 48da4e523c AP_HAL_ChibiOS: create and use INTERNAL_ERROR macro so we get line numbers 2020-04-30 13:21:36 +10:00
Peter Barker 37cddbeea6 AP_FlashStorage: create and use INTERNAL_ERROR macro so we get line numbers 2020-04-30 13:21:36 +10:00
Peter Barker 8e82ea2540 AP_Common: create and use INTERNAL_ERROR macro so we get line numbers 2020-04-30 13:21:36 +10:00
Peter Barker 119eef9954 AP_Arming: create and use INTERNAL_ERROR macro so we get line numbers 2020-04-30 13:21:36 +10:00
Peter Barker 36fd632a49 AP_AHRS: create and use INTERNAL_ERROR macro so we get line numbers 2020-04-30 13:21:36 +10:00
Peter Barker 069bd04bdc AC_Fence: create and use INTERNAL_ERROR macro so we get line numbers 2020-04-30 13:21:36 +10:00
pkocmoud defb7dc43f hwdef: add mRo M10070 Location One CAN GPS 2020-04-30 11:31:43 +10:00
Patrick José Pereira 3268c234d8 AP_HAL_Linux: Add PAGE_SIZE in RCInput_RPI
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-04-29 02:12:58 -07:00
Patrick José Pereira 32c0e37512 AP_HAL_Linux: Organize and document GPIO_RPI class
- Move macros to functions and improve explanation about logic behind it
- Break code in functions to make it more readable
- Add doxygen comments about functions and how they work in a comprehensive manner
- Improve general code maintainability

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-04-29 02:12:58 -07:00
Andrew Tridgell 66655212b1 AP_Compass: fixed compass ordering bug with AP_Periph
when a user swaps compasses on AP_Periph we want to immediately
replace it. The compass ordering code was rejecting the new compass
and calling panic as it was out of slots. This changes the AP_Compass
ordering so that when we only have a single compass we operate in a
very simple manner where we always accept the first compass found
2020-04-29 18:51:16 +10:00
Andrew Tridgell 3ec2ef787d HAL_ChibiOS: fixed build warning 2020-04-29 12:20:19 +10:00
Andrew Tridgell f00392d567 AP_GPS: don't accept a zero GNSS timestamp from UAVCAN GPS
this is needed for a bug in AP_Periph 1.0 which could briefly send a
zero timestamp on first fix marked as a UTC time
2020-04-29 12:20:19 +10:00
Andrew Tridgell ce68e0fbb5 HAL_ChibiOS: fixed bootloader build 2020-04-29 07:36:55 +10:00
Andrew Tridgell 0ef66659ce HAL_ChibiOS: log WDOG message once a second
this copes with delayed mounting of the microSD, making it much more
likely we log the critical data
2020-04-29 07:36:55 +10:00
Andrew Tridgell 7d6e5fa8a5 AP_InternalError: implement AP_stack_overflow() C binding
allow low level HAL code to report a stack overflow to
AP_InternalError
2020-04-29 07:36:55 +10:00
Andrew Tridgell 18e88e0ea3 HAL_ChibiOS: implement stack overflow hook
this needs C bindings to allow call from low level RTOS thread
switching code
2020-04-29 07:36:55 +10:00
Andrew Tridgell 77b8f88289 AP_Vehicle: report thread name in watchdog mavlink msg 2020-04-29 07:36:55 +10:00
Andrew Tridgell c61cecdbc7 HAL_ChibiOS: report thread name in watchdog 2020-04-29 07:36:55 +10:00
Andrew Tridgell 09477b2dfe HAL_ChibiOS: shorted thread names
changes names so threads can be distinguished by first 4 bytes
2020-04-29 07:36:55 +10:00
Andrew Tridgell a25ea5addc AP_HAL: added thread name to persistent data
this addes the first 4 bytes of the thread name to persistent data. It
also re-arranges the data so that it is more efficiently packed,
allowing us to fit the new field
2020-04-29 07:36:55 +10:00
Andrew Tridgell b519ebf512 AP_Filesystem: check for valid range for start and count 2020-04-29 07:36:55 +10:00
Andrew Tridgell 7571e616de GCS_MAVLink: handle session timeout due to lost packets
and fixed handling of losing last pkt in a burst
2020-04-29 07:36:55 +10:00
Andrew Tridgell db0d3c5e89 AP_Param: fixed race in param count handling 2020-04-29 07:36:55 +10:00
Andrew Tridgell 65e790a48c GCS_MAVLink: invalidate param count on set of ENABLE param 2020-04-29 07:36:55 +10:00
Andrew Tridgell ffe9fa22a1 AP_RangeFinder: invalidate param count when changing param tree structure 2020-04-29 07:36:55 +10:00
Andrew Tridgell d7555b4b86 AP_BoardConfig: invalidate param count when changing param tree structure 2020-04-29 07:36:55 +10:00
Andrew Tridgell 766fb32292 AP_Param: added set_enable() API
used to set value of an enable parameter, clearing count cache
2020-04-29 07:36:55 +10:00
Andrew Tridgell 7e010ef50a AP_NavEKF3: use set_enable() to set enable flag 2020-04-29 07:36:55 +10:00
Andrew Tridgell c9ffe8dcea AP_NavEKF2: use set_enable() to set enable flag 2020-04-29 07:36:55 +10:00
Andrew Tridgell f6d83069d3 AP_Filesystem: guarantee padding and added URI options 2020-04-29 07:36:55 +10:00
Andrew Tridgell 3608bfe272 AP_Filesystem: added magic header for param.pck 2020-04-29 07:36:55 +10:00
Andrew Tridgell 65749706c2 AP_Filesystem: fixed SITL build 2020-04-29 07:36:55 +10:00
Andrew Tridgell a5965d5a9e HAL_Chibios: removed unnecessary debug defines 2020-04-29 07:36:55 +10:00
Andrew Tridgell 9b14fa7ed9 AP_Filesystem: enable @PARAM, @ROMFS and @SYS with no microSD 2020-04-29 07:36:55 +10:00
Andrew Tridgell 7cd901fa5b GCS_MAVLink: enable ftp without filesystem
allows for @PARAM and @SYS
2020-04-29 07:36:55 +10:00
Andrew Tridgell 2c26807736 HAL_ChibiOS: embed hwdef.dat in ROMFS for all boards 2020-04-29 07:36:55 +10:00
Andrew Tridgell bd07e8516f Filter: use GCS_SEND_TEXT() 2020-04-29 07:36:55 +10:00
Andrew Tridgell 3397ea24cc AP_RTC: use GCS_SEND_TEXT() 2020-04-29 07:36:55 +10:00
Andrew Tridgell b102fd6b59 AP_RangeFinder: use GCS_SEND_TEXT() 2020-04-29 07:36:55 +10:00
Andrew Tridgell 9350c78023 AP_HAL_ChibiOS: use GCS_SEND_TEXT() 2020-04-29 07:36:55 +10:00
Andrew Tridgell 4f591a338f AP_GPS: use GCS_SEND_TEXT() 2020-04-29 07:36:55 +10:00
Andrew Tridgell 660f65e6b8 AP_Compass: use GCS_SEND_TEXT() 2020-04-29 07:36:55 +10:00
Andrew Tridgell 40f1b5f9ae AP_Airspeed: use GCS_SEND_TEXT() 2020-04-29 07:36:55 +10:00
Andrew Tridgell 6811d79b6f GCS_MAVLink: define GCS_SEND_TEXT() globally
used to avoid linking GCS in AP_Periph
2020-04-29 07:36:55 +10:00
Andrew Tridgell 6bacf021c8 HAL_ChibiOS: disable thread_info in AP_Periph and bootloader 2020-04-29 07:36:55 +10:00
Andrew Tridgell d82cd1363b HAL_ChibiOS: fixed bootloader build 2020-04-29 07:36:55 +10:00
Andrew Tridgell cd3b4dcc7d AP_Filesystem: added @SYS filesystem backend 2020-04-29 07:36:55 +10:00
Andrew Tridgell f0c9f4003e HAL_ChibiOS: implement thread_info() 2020-04-29 07:36:55 +10:00
Andrew Tridgell 164022ca12 AP_HAL: added thread_info() API 2020-04-29 07:36:55 +10:00
Andrew Tridgell 67fc23d01b AP_Filesystem: support downloading parameters via ftp
adds @PARAM/param.pck as a packed file of all parameters
2020-04-29 07:36:55 +10:00
Andrew Tridgell 456b685779 AP_Param: make type_size() public 2020-04-29 07:36:55 +10:00
Andrew Tridgell ea71b72c87 HAL_ChibiOS: fixed issue with I2C4 on H743
when both I2C4 and SPI4 are active on a H743 I found that some BDMA
completion interrupts were lost, which resulted in SPI transfer
timeouts. Close inspection of the ChibiOS BDMA, I2Cv3 and SPIv3
drivers did not reveal any issues, but I found that the issue only
happened when the first 4 BDMA streams were used. This change splits
the 4 streams across the first and 2nd half of the BDMA controller,
and that fixes the problem.

This works as there are only 2 peripherals (I2C4 and SPI6) that want
to use BDMA with our current setup. If we ever wish to enable ADC3
(which also uses BDMA) we will need to revisit this issue
2020-04-28 17:42:15 +10:00
Randy Mackay d8bc197d35 SITL: add VICON_GLIT_XYZ, FAIL and YAW
glitches are in meters in vicon's frame
fail disables sending of vision-position-estimate messages
yaw is the vicon's heading in degrees.  i.e. if vicon's "forward" is
pointing to the east, yaw should be set to 90
2020-04-28 12:31:14 +09:00
Paul Riseborough ad5ae1813d AP_NavEKF3: Don't use geomag data when user specifies declination 2020-04-28 11:42:31 +09:00
Paul Riseborough e1f27054d5 AP_NavEKF2: Don't use geomag data when user specifies declination 2020-04-28 11:42:31 +09:00
Paul Riseborough 8e9dc1c393 AP_Compass: Add accessor function for COMPASS_AUTODEC 2020-04-28 11:42:31 +09:00
Andrew Tridgell b1977ca43d AP_Scripting: removed old servo output binding 2020-04-28 11:14:26 +10:00
Andrew Tridgell d214e379a2 AP_Scripting: rebuild bindings 2020-04-28 11:14:26 +10:00
Andrew Tridgell ea9316c2b5 AP_Scripting: added servo movement example script 2020-04-28 11:14:26 +10:00
Andrew Tridgell ca584943a5 AP_Scripting: added bindings for servo output 2020-04-28 11:14:26 +10:00
Arash Negahdar 98dfc69887 SITL: Don't start scrimmage from ArduPilot 2020-04-28 11:09:51 +10:00
Mark Whitehorn 570aa929ca AP_Compass: handle ROTATION_CUSTOM in SITL 2020-04-28 10:57:26 +10:00
Mark Whitehorn db1c7d9bdd SITL: add support for AHRS_ORIENTATION=ROTATION_CUSTOM 2020-04-28 10:57:26 +10:00
Mark Whitehorn 7d3d664ddf AP_Math: generate internalError on call to Vector3<T>::rotate and Quaternion::from_rotation with bad rotation value 2020-04-28 10:52:21 +10:00
Mark Whitehorn b658a84124 AP_InternalError: add error type bad_rotation 2020-04-28 10:52:21 +10:00
bnsgeyer ce171107a3 SITL: update tradheli dynamics model for SITL 2020-04-28 10:45:33 +10:00
Kelly Schrock 2cb54bb11d AP_BattMonitor: NeoDesign battery driver
Adds a driver for the NeoDesign BMS, with variable cell count.
2020-04-28 10:39:57 +10:00
Randy Mackay 8caf7d5811 AP_AHRS: add set_alt_measurement_noise
These calls the EKF2 and EKF3's set_baro_alt_noise
2020-04-28 09:38:23 +09:00
Michael du Breuil 9b404669c8 AP_Compass: Skip rotating the mag data when the board orientation is none 2020-04-28 10:37:00 +10:00
Andrew Tridgell 32cdfddf12 HAL_ChibiOS: convert all hwdef from UART_ORDER to SERIAL_ORDER
much easier to understand
2020-04-28 10:32:23 +10:00
Andrew Tridgell a52070d226 HAL_ChibiOS: use SERIAL_ORDER instead of UART_ORDER
SERIAL_ORDER is much easier for developers to understand as it maps
directly to the SERIALn_ parameters
2020-04-28 10:32:23 +10:00
Andrew Tridgell 0994655f5b HAL_ChibiOS: fixed build warnings for bootloader builds 2020-04-28 10:32:23 +10:00
Andrew Tridgell 9557a5c22c HAL_ChibiOS: added more STM32CubeMX configs 2020-04-28 10:32:23 +10:00
Andrew Tridgell a9df9fe0c0 HAL_ChibiOS: removed clock tree settings in most hwdef.dat
these are better set automatically in the headers. This simplifies the
task of doing a new port
2020-04-28 10:32:23 +10:00
Andrew Tridgell a638196334 HAL_ChibiOS: skyviper-f412-rev1 uses a custom clock tree 2020-04-28 10:32:23 +10:00
Andrew Tridgell e8b2b52bae HAL_ChibiOS: removed STM32_VDD from hwdef.dat
use default
2020-04-28 10:32:23 +10:00
Andrew Tridgell d9efac2993 HAL_ChibiOS: only allow PLL override in clock selection part of header 2020-04-28 10:32:23 +10:00
Andrew Tridgell fe765b8845 HAL_ChibiOS: switched CUAV_GPS to use same clocks as other F4 2020-04-28 10:32:23 +10:00
Andrew Tridgell 82c45f6cdb HAL_ChibiOS: default STM32_VDD to 3.3V 2020-04-28 10:32:23 +10:00
Andrew Tridgell 29f538dec9 HAL_ChibiOS: use common header for STM32 clock config
avoid the need for clock config lines in most hwdef.dat files
2020-04-28 10:32:23 +10:00
Andrew Tridgell 3d5475a1d9 HAL_ChibiOS: fixed skyviper-journey build 2020-04-28 10:32:23 +10:00
Andrew Tridgell bceee69a6c AP_Filesystem: avoid some warnings in AP_Scripting 2020-04-28 10:32:23 +10:00
Andrew Tridgell 6222649e37 AP_Scripting: avoid build warnings 2020-04-28 10:32:23 +10:00
Andrew Tridgell 764117c336 AP_BoardConfig: fixed build warning 2020-04-28 10:32:23 +10:00
Andrew Tridgell bb87da628e AP_Param: fixed build warning 2020-04-28 10:32:23 +10:00
Randy Mackay 2ae31f9d76 AP_AHRS: get_position obeys always_use_EKF
Co-Authored-By: WickedShell <Wicked.Shell.Scripts@gmail.com>
2020-04-28 09:20:05 +09:00
Leonardo Mariga 0f92cb9168 AP_Landing: Description of APP_EXT and unit of L1 fixed 2020-04-28 09:59:12 +10:00
Peter Barker 9142f877e7 AP_Mount: use logger Write method for logging Solo gimbal
Also document the messages
2020-04-28 09:56:09 +10:00
Peter Barker ad9493caca AP_Logger: use logger Write method for logging Solo gimbal
Also document the messages
2020-04-28 09:56:09 +10:00
Iampete1 3618607746 AP_Proximity: AirSimSITL: fix left right swap 2020-04-28 09:37:59 +10:00
Andy Piper 8407648316 Filter: make sure the center frequency can never be zero 2020-04-28 09:32:02 +10:00
Andy Piper d0a241597a AP_InertialSensor: add support for double harmonic notches to more effectively target wider noise peaks 2020-04-28 09:32:02 +10:00
Andy Piper 1dbde3af09 Filter: add support for double harmonic notches to more effectively target wider noise peaks 2020-04-28 09:32:02 +10:00
Willian Galvani cf6f5502a4 SITL: Make Sub buoyancy a parameter 2020-04-27 12:48:52 -07:00
Randy Mackay 90db3d6317 AP_NavEKF2: minor comment fix 2020-04-27 19:15:43 +09:00
Peter Barker 830176f2f4 AP_Logger: remove unused SBFE 2020-04-27 16:16:50 +10:00
Peter Barker 26b88823f4 GCS_MAVLink: correct out-of-space-to-send call in HAVE_PAYLOAD_SPACE 2020-04-27 15:30:30 +10:00
Peter Barker 8b0b644c11 GCS_MAVLink: correct check for payload space for COMMAND_ACK 2020-04-27 15:30:30 +10:00
Peter Barker 668e0d0e65 GCS_MAVLink: check for empty replies queue first thing in send_ftp_replies
Will save us a little time on average
2020-04-27 15:30:30 +10:00
Andrew Tridgell 7320cd3174 HAL_ChibiOS: fixed assert in wait_pin() 2020-04-27 14:01:04 +10:00
Randy Mackay 1498e4c037 AC_AttitudeControl: remove unused macro 2020-04-27 09:39:46 +09:00
Randy Mackay 46ad31ad01 AC_Circle: add is_active
allows vehicle code to know if circle's yaw is valid
2020-04-27 09:39:46 +09:00
murata a8af4b2937 AP_Beacon: Change the tab code to whitespace 2020-04-27 09:32:56 +09:00
murata c713a984da AP_WheelEncoder: Change the tab code to whitespace 2020-04-27 09:32:15 +09:00
murata 1a346e5b19 AP_VisualOdom: Change the tab code to whitespace 2020-04-27 09:30:00 +09:00
murata 1fdcab2b5a AP_Parachute: Change the tab code to whitespace 2020-04-27 09:29:45 +09:00
murata dec231348e AP_OpticalFlow: Change the tab code to whitespace 2020-04-27 09:29:39 +09:00
murata 509d376c29 AP_Motors: Change the tab code to whitespace 2020-04-27 09:29:32 +09:00
murata cd981695a6 AP_Mission: Change the tab code to whitespace 2020-04-27 09:29:25 +09:00
murata 28ccc167f7 AP_LandingGear: Change the tab code to whitespace 2020-04-27 09:29:18 +09:00
murata 03e658772a AP_IRLock: Change the tab code to whitespace 2020-04-27 09:29:11 +09:00
murata 3967c46c1a AP_Gripper: Change the tab code to whitespace 2020-04-27 09:29:02 +09:00
murata a3278c73e3 AC_Sprayer: Change the tab code to whitespace 2020-04-27 09:28:51 +09:00
Ivannikov Kirill 3ab1b29397 AP_HAL_ChibiOS: error if system clock not 1mhz on 16 CH_CFG_ST_RESOLUTION. prevent variable overflow
if CH_CFG_ST_FREQUENCY not match 1000000U on 16 bit CH_CFG_ST_RESOLUTION
we try to multiply now *= 1000000U/CH_CFG_ST_FREQUENCY; it may overflow 16 bit value.
2020-04-26 19:58:54 +10:00
Peter Barker f882bd0c3e AP_Logger: remove unused UBY1/UBY2 messages
These appear to have been replaced with instance fields on the UBX1 and
UBX2 messages.

Also mark the Instance field on UBX1, UBX2 as an instance field.
2020-04-26 11:35:04 +10:00
Peter Barker 7e3c9c209e AP_Logger: document GPSB and GPAB 2020-04-26 09:02:39 +10:00
Peter Barker 6b232ee515 AP_Baro: add documentation for ICBM message (ICM20789 diagnostics) 2020-04-26 09:02:39 +10:00
Randy Mackay 91a79543c9 AP_NavEKF3: getLLH fix when no GPS available 2020-04-24 20:29:18 +09:00
Randy Mackay 2919491298 AP_NavEKF2: getLLH fix when no GPS available 2020-04-24 20:29:18 +09:00
Andrew Tridgell d9e2a644ea HAL_ChibiOS: fixed Durandal buzzer in bootloader
need to pull low to avoid buzzer running in bootloader
2020-04-24 19:46:22 +10:00
bugobliterator b94f089984 HAL_ChibiOS: improve throughput of slcan router 2020-04-24 19:39:18 +10:00
Randy Mackay 585c806618 AP_AHRS: add get_primary_core_index 2020-04-24 18:18:05 +09:00
Randy Mackay 6e93f54cff AP_NavEKF2: handle external nav position resets 2020-04-24 18:16:52 +09:00
Randy Mackay 990313371d AP_NavEKF2: minor comment fixes 2020-04-24 18:16:52 +09:00
Randy Mackay 43c9e13372 AP_NavEKF2: rename HGT_SOURCE_EV to HGT_SOURCE_EXTNAV
presumably EV stands for ExternalVision but we normally refer to this source as External Nav
2020-04-24 18:16:52 +09:00
Randy Mackay 014c889ceb AP_NavEKF2: setAidingMode uses lastExtNavPassTime_ms 2020-04-24 18:16:52 +09:00
Randy Mackay 3b20623a31 AP_NavEKF2: remove unused ext nav elements 2020-04-24 18:16:52 +09:00
Peter Barker 3440a64b66 AP_NavEKF3: correct description on XKY0 2020-04-24 18:08:14 +10:00
Peter Barker aa3165b71c AP_NavEKF3: remove incorrect units from yaw esimtator LoggerMessage 2020-04-24 18:08:14 +10:00
Peter Barker 7dfc285f2a AP_NavEKF2: remove incorrect units from yaw esimtator LoggerMessage 2020-04-24 18:08:14 +10:00
Andrew Tridgell 43ac58c63b HAL_ChibiOS: added STM32CubeMX configs for H7 processor crystal varients
useful for checking clock config changes
2020-04-24 16:55:03 +10:00
Andrew Tridgell db642717be HAL_ChibiOS: fixed clock for FDCAN to be below 80MHz
we were running at 100MHz, which is out of spec
2020-04-24 16:55:03 +10:00
Andrew Tridgell 2c68ce1986 HAL_ChibiOS: fixed clock source for FDCAN
use selected source and add 80MHz limit, as per manual and latest STM32CubeMX tool
2020-04-24 16:55:03 +10:00
Tatsuya Yamaguchi c4fe6fce1c AP_Arming: make RC check message clearer 2020-04-24 10:52:33 +09:00
Andrew Tridgell 43ef8a192b AP_NavEKF3: added missing log documentation for field C 2020-04-24 09:43:23 +10:00
Andrew Tridgell d8c533e7ab AP_NavEKF2: added missing log documentation for field C 2020-04-24 09:43:23 +10:00
Paul Riseborough 8f1b732d79 AP_NavEKF2: Add documentation for GSF logging 2020-04-24 09:43:23 +10:00
Paul Riseborough 1720c8de0f AP_NavEKF3: Add documentation for GSF logging 2020-04-24 09:43:23 +10:00
Paul Riseborough 9bdb89474a AP_NavEKF3: Use unique names for EKF2 logging 2020-04-24 09:43:23 +10:00
Paul Riseborough 49e4c799d3 AP_NavEKF2: Use unique names for EKF2 logging 2020-04-24 09:43:23 +10:00
Andrew Tridgell 080f555b16 AP_NavEKF3: remove unused isDeltaYaw param from resetQuatStateYawOnly 2020-04-24 09:43:23 +10:00
Andrew Tridgell 197d31e9cc AP_NavEKF3: fixed in-flight yaw reset 2020-04-24 09:43:23 +10:00
Randy Mackay 86d221708c AP_NavEKF3: more white space fixes 2020-04-24 09:43:23 +10:00
Randy Mackay 4d7e7a960a AP_NavEKF2: more white space fixes 2020-04-24 09:43:23 +10:00
Randy Mackay a43beaaa23 AP_NavEKF: GSF white space fixes 2020-04-24 09:43:23 +10:00
Randy Mackay 0fb233ed4b AP_NavEKF2: minor comment fixes 2020-04-24 09:43:23 +10:00
Randy Mackay c1ef894a30 AP_NavEKF3: getDataEKFGSF and getYawData pass by reference 2020-04-24 09:43:23 +10:00
Randy Mackay a9cbd5aa29 AP_NavEKF2: getDataEKFGSF and getYawData pass by reference 2020-04-24 09:43:23 +10:00
Randy Mackay 1ee9f3a6de AP_NavEKF: GSF getLogData and getYawData pass by reference 2020-04-24 09:43:23 +10:00
Randy Mackay 8a8271c2c7 AP_NavEKF3: minor format fixes 2020-04-24 09:43:23 +10:00
Randy Mackay d61c517e76 AP_NavEKF2: minor format fix 2020-04-24 09:43:23 +10:00
Randy Mackay ed3d072318 AP_NavEKF3: rename GSF_RUN_MASK, GSF_USE_MASK, GSF_RST_MAX 2020-04-24 09:43:23 +10:00
Randy Mackay 91ef87064a AP_NavEKF2: rename GSF_RUN_MASK, GSF_USE_MASK, GSF_RST_MAX 2020-04-24 09:43:23 +10:00
Paul Riseborough 7ba39c844c AP_NavEKF3: Split GSF yaw estimator processing
Separate prediction and correction steps are required to provide an up to
2020-04-24 09:43:23 +10:00
Paul Riseborough abc821ad36 AP_NavEKF2: Split GSF yaw estimator processing
Separate prediction and correction steps are required to provide an up to date yaw estimate using IMU prediction before it may be required by SelectMagFusion() whilst still doing the velocity update after GPS data haw been pulled from the buffer by SelectVelPosFusion()
2020-04-24 09:43:23 +10:00
Andrew Tridgell 216935c1f2 AP_NavEKF3: fixed loss of GPS fusion
we must not do a storedGPS.recall unless we will be using the data,
otherwise we will lose GPS samples and risk stopping GPS fusion
2020-04-24 09:43:23 +10:00
Andrew Tridgell c83e2d7c0e AP_NavEKF2: fixed loss of GPS fusion
we must not do a storedGPS.recall unless we will be using the data,
otherwise we will lose GPS samples and risk stopping GPS fusion
2020-04-24 09:43:23 +10:00
Andrew Tridgell 6c3889b04f AP_NavEKF2: fixed typos 2020-04-24 09:43:23 +10:00
Andrew Tridgell 3edbe81b1e AP_NavEKF2: removed 2nd set of imuSampleTime_ms 2020-04-24 09:43:23 +10:00
Paul Riseborough 9f5e037015 AP_NavEKF3: Restore bug fix lost during rebase 2020-04-24 09:43:23 +10:00
Paul Riseborough 6952d83f00 AP_NavEKF2: Fix casting build error 2020-04-24 09:43:23 +10:00
Paul Riseborough 53df8a0238 AP_NavEKF3: Fix timer wrapping bug 2020-04-24 09:43:23 +10:00
Paul Riseborough 0d965d2a1c AP_NavEKF2: Fix timer wrapping bugs
Also replaces tab characters
2020-04-24 09:43:23 +10:00
Paul Riseborough 12d639fc17 AP_NavEKF3: Misc changes arising from review
AP_NavEKF3: Fix typo in comment

AP_NavEKF3: Use uint32_t data type for msec timers

AP_NavEKF3: Misc msec timer fixes

Fix wrapping bug.
Use common timestamp.

AP_NavEKF3: Format fixes - remove tabs

AP_NavEKF3: Fix typing and wrap issue on time comparison
2020-04-24 09:43:23 +10:00
Paul Riseborough 51b62a34b9 AP_NavEKF: Use better type for array index 2020-04-24 09:43:23 +10:00
Paul Riseborough 4b3952bd15 AP_NavEKF3: Eliminate unnecessary function call 2020-04-24 09:43:23 +10:00
Paul Riseborough 6ec69e6ed1 AP_NavEKF3: Update EK3_MAG_CAL parameter advice 2020-04-24 09:43:23 +10:00
Paul Riseborough a66479104d AP_AHRS: fix failure to arm when not using compass for yaw 2020-04-24 09:43:23 +10:00