Commit Graph

21566 Commits

Author SHA1 Message Date
Andrew Tridgell
167732de0a AP_Airspeed: enable for use in AP_Periph 2020-02-05 10:43:36 +11:00
Andrew Tridgell
e6db33fddc HAL_ChibiOS: split out f103-GPS from base f103-periph
this makes it easier to create more peripheral variants
2020-02-05 10:43:36 +11:00
Tom Pittenger
3686135076 SITL: morse simulator should generate packets from same vehicle sysid 2020-02-05 10:43:36 +11:00
Mirko Denecke
a603a1577c AP_HAL_ChibiOS: remove unnecessary tabs and whitespaces 2020-02-05 10:43:36 +11:00
Mirko Denecke
c6a58fa732 AP_IOMCU: remove unnecessary tabs and whitespaces 2020-02-05 10:43:36 +11:00
Andrew Tridgell
ef6d513c63 HAL_ChibiOS: fixed I2C on F103
we need to use open-drain, and the sign of the constant matters
2020-02-05 10:43:36 +11:00
Andrew Tridgell
43e753d442 HAL_ChibiOS: enable NCP5623 LED in f103-GPS 2020-02-05 10:43:36 +11:00
Jaaaky
fc5e1362a9 AP_NavEKF3: added EK3_MAG_EF_LIM parameter
Adapted from EKF2 implementation as of commits
3835d2613, e9ed3540f and df4fc0fff
this sets a limit on the difference between the earth field from the
WMM tables and the learned earth field inside the EKF. Setting it to
zero disables the feature. A positive value sets the limit in mGauss.
2020-02-05 10:43:36 +11:00
Vlad-Andrei Dorobantu
f2489b6405 AP_Compass: corrected the cause of SIGSEGV signal when running AP_Compass_test 2020-02-05 10:43:36 +11:00
Siddharth Purohit
90e83bdabd AP_KDECAN: update prearm method to support snprintf methods 2020-02-05 10:43:36 +11:00
Siddharth Purohit
719f4610a0 AP_Arming: add support for reporting UAVCAN Server errors 2020-02-05 10:43:36 +11:00
Siddharth Purohit
3c1e99cc6b AP_Math: add method for generating hash 2020-02-05 10:43:36 +11:00
Siddharth Purohit
e266188963 HAL_ChibiOS: remove unused code 2020-02-05 10:16:44 +11:00
Siddharth Purohit
1197ab9479 StorageManager: add storage aread for CAN Dynamic Node Alloc 2020-02-05 10:16:44 +11:00
Siddharth Purohit
53cea84bf8 AP_UAVCAN: setup uavcan server with internal storage 2020-02-05 10:16:44 +11:00
Peter Barker
b437daf2b7 AP_Mission: add sanity check that 16-bit commands aren't stored_in_location
This is a rather confusing problem when it happens during development,
so a sanity check is good.  What you see in dev is that your latitude
gets corrupted between when you store and retrieve it, with no warnings
that you're doing something wrong.
2020-02-05 10:16:44 +11:00
Randy Mackay
f2f1dbeccd AP_Logger: add vibration failsafe error subsystem 2020-02-05 10:16:44 +11:00
Leonard Hall
7d8458fd22 AC_PosControl: add high vibration compensation 2020-02-05 10:16:44 +11:00
Randy Mackay
e142b33090 AC_PID: update pid_info when integrator set 2020-02-05 10:16:44 +11:00
Randy Mackay
7f5be1cc9e AP_InertialNav: use ekf::get_vert_pos_rate during high vibration 2020-02-05 10:16:44 +11:00
Randy Mackay
15ca5f5511 AP_NavEKF3: reduce EK3_HRT_FILT max to 30 2020-02-05 10:16:44 +11:00
Paul Riseborough
c5e3f7df7f AP_NavEKF3: Add missing vertical position derivative calculation 2020-02-05 10:16:44 +11:00
Randy Mackay
607f57e4d1 AP_NavEKF2: reduce EK2_HRT_FILT max to 30 2020-02-05 10:16:44 +11:00
Paul Riseborough
e868b9dc35 AP_NavEKF2: Add missing vertical position derivative calculation
Use a third order order complementary filter to estimate the rate of change of vertical position output.
2020-02-05 10:16:44 +11:00
Randy Mackay
27bde0f2db AP_AHRS: add get_innovations 2020-02-05 10:16:44 +11:00
Leonard Hall
476f853ab3 RC_Channel: Support for Standby functions 2020-02-05 10:16:43 +11:00
Leonard Hall
9e89710d49 AP_Logger: Support for Standby functions 2020-02-05 10:16:23 +11:00
Leonard Hall
fe0c05d7e4 AC_AttitudeControl: Support for Standby functions 2020-02-05 10:16:23 +11:00
Michael du Breuil
025fbfad8d AP_Scripting: Fix up uint32_t manipulation, fix AP_Notify
This also adds a touched up version of the foxhunt demo that was done at
the 2019 developer unconf
2020-02-05 10:16:23 +11:00
Peter Barker
9fde3e6297 AP_HAL_SITL: ToneAlarm doesn't play tones if disabled via param 2020-02-05 10:16:10 +11:00
Peter Barker
a94b1ed65e SITL: create SITL tonealarm files to hold enable parameter 2020-02-05 10:16:10 +11:00
Peter Barker
438c29e924 AP_Notify: add a simulated buzzer for SITL 2020-02-05 10:15:48 +11:00
Peter Barker
da3403112a AP_HAL_SITL: add a simulated buzzer 2020-02-05 10:15:48 +11:00
Peter Barker
ff3ba8b05f SITL: add a simulated buzzer 2020-02-05 10:15:48 +11:00
Andrew Tridgell
ba23ce7857 AP_ADSB: added handle_adsb_vehicle() API
this allows for UAVCAN ADSB adapters
2020-02-05 10:15:17 +11:00
Andrew Tridgell
da943524d1 AP_ADSB: added singleton interface 2020-02-05 10:15:17 +11:00
Andrew Tridgell
2451d1bf38 AP_UAVCAN: support ADSB over UAVCAN 2020-02-05 10:15:17 +11:00
Andrew Tridgell
ad2d9d1666 HAL_ChibiOS: added a f103-ADSB firmware
for presenting a ping ADSB device as UAVCAN
2020-02-05 10:13:53 +11:00
Andrew Tridgell
43fb6bfdd1 HAL_ChibiOS: split out f103-GPS from base f103-periph
this makes it easier to create more peripheral variants
2020-02-05 10:13:53 +11:00
Michael du Breuil
9ba3bfbab5 AP_Scripting: Add an example message interval script 2020-02-05 10:13:53 +11:00
Michael du Breuil
4eaf4b72ad AP_Scripting: Add a one arg variant of uint32_t, and expose table unpack 2020-02-05 10:13:53 +11:00
Bill Geyer
362abc143a AP_Motors: make init_targets_on_arming global 2020-02-05 10:13:53 +11:00
bnsgeyer
47b1a20238 AC_AttitudeControl: incorporate SysID into tradheli 2020-02-05 10:13:53 +11:00
Leonard Hall
e9ff670df5 AC_AttitudeControl: Support System ID tests 2020-02-05 10:13:53 +11:00
Andrew Tridgell
a610279eb0 HAL_ChibiOS: reduce max compasses to 1 on AP_Periph 2020-02-05 10:13:53 +11:00
Michael du Breuil
f4a1410434 AP_Motors: Fix safe disarm 2020-02-05 10:13:53 +11:00
Leonard Hall
0719626d2b AP_Motors: Use safety timer to enable pwm before spool up 2020-02-05 10:13:53 +11:00
Michael du Breuil
9b2fcdfb82 AP_Scripting: Raise default heap size 2020-02-05 10:13:53 +11:00
Michael du Breuil
4fc5eccb8f AP_Scripting: Stop running scripts if the enable flag ever goes false 2020-02-05 10:13:53 +11:00
Peter Barker
3d59d2d6c8 AP_Vehicle: add singleton 2020-02-05 10:13:53 +11:00
Leonard Hall
92402da5ef Copter: add voltage compensation to _throttle_thrust_max 2020-02-05 10:13:53 +11:00
Andrew Tridgell
e3cbb3a6b4 AP_GPS: fixed UAVCAN GPS status when disconnected
this fixes the status reported for a UAVCAN GPS when the cable is
unplugged. It should be "NO GPS", but was instead reporting "NO
FIX". The user had no way to distinguish between not finding a CAN GPS
at all and it not getting satellites

thanks to CUAV for reporting
2020-02-05 10:13:53 +11:00
murata
2a003bcd13 AP_RangeFinder: Add TF03-180 2020-02-05 10:13:53 +11:00
Randy Mackay
9413c63548 SRV_Channel: renamed EPM to Gripper in FUNCTION param docs 2020-02-05 10:13:53 +11:00
Andrew Tridgell
f24de4e2bc AP_NavEKF3: set a min yaw accuracy from GPS of 5 degrees
GPS modules tend to be rather optimistic about their yaw accuracy. By
setting a min or 5 degrees we prevent the user constantly getting
warnings about yaw innovations
2020-02-05 10:13:53 +11:00
Andrew Tridgell
0b435559bd AP_GPS: improved checking for valid yaw for moving baseline
and fixed check for carrSolnFixed
2020-02-05 10:13:53 +11:00
Michael du Breuil
a0475874a7 AP_GPS: UBLOX: Parse RELPOSNED messages
This does not yet:
  - validate the receiver configuration
  - manage timing out stale GPS heading info
  - relPosNormalized usage isn't clear, which may defeat the STRICT_LENGTH_CHECK
2020-02-05 10:13:53 +11:00
Michael du Breuil
624ed28ef8 AP_Logger: Log GPS yaw accuracy 2020-02-05 10:13:53 +11:00
Michael du Breuil
7b9d3594fb AP_Scripting: Fix generation of uint32_t arguments
This also fixes the message interval description not generating
correctly, it must have been manually edited before
2020-02-05 10:13:53 +11:00
Andrew Tridgell
45a6df0cee HAL_ChibiOS: drop mRoControlZeroF7 DPS310 clock to 5MHz 2020-02-05 10:13:53 +11:00
Randy Mackay
ba8e916e44 GCS_Mavlink: handle_preflight_reboot made virtual 2020-02-05 10:13:53 +11:00
Henry Wurzburg
40af63daf3 AP_HAL_ChibiOS/hwdef: update KakuteF4 readme 2020-02-05 10:13:52 +11:00
Andy Piper
be2ef926b0 AP_HAL_ChibiOS: hardware definitions for Kakute F7 Mini 2020-02-05 10:13:52 +11:00
Andy Piper
3d289d105b Filter: set the harmonic notch filter ref default to zero (disabled)
Modify parameter descriptions for tradheli
2020-02-05 10:13:52 +11:00
Leonard Hall
39f07e9ee7 AP_Motors: Add variable to record the final thrust value
Add Throttle_Out for other frames
2020-02-05 10:13:52 +11:00
Andrew Tridgell
4a16e791d6 AP_InertialSensor: publish an IMU temperature
makes testing of mavlink extension easier
2020-02-05 10:13:52 +11:00
Andrew Tridgell
a832c3bff0 GCS_MAVLink: supply IMU temperature in mavlink extensions 2020-02-05 10:13:52 +11:00
Andrew Tridgell
339da0d07f HAL_ChibiOS: fixed padding of neopixel bits
lack of padding at start caused occasional glitches in colors
displayed
2020-02-05 10:12:13 +11:00
Peter Barker
7c5e84d572 AP_Proximity: declare RangeFinder as a class to avoid circular include issue 2020-02-05 10:12:13 +11:00
Peter Barker
f0ee5a6aea AP_BoardConfig: correct include of AP_Vehicle_Type 2020-02-05 10:12:13 +11:00
Peter Barker
f5fc308f9e DataFlash: adjust for new vehicle base class 2020-02-05 10:12:13 +11:00
Peter Barker
5818d86420 AP_Mission: adjust for new vehicle base class 2020-02-05 10:12:13 +11:00
Peter Barker
31065bc9d2 AP_Compass: adjust for new vehicle base class 2020-02-05 10:12:13 +11:00
Peter Barker
55eab1546d AP_AccelCal: adjust for new vehicle base class 2020-02-05 10:12:13 +11:00
Peter Barker
245152e91b AC_AttitudeControl: adjust for new vehicle base class 2020-02-05 10:12:13 +11:00
Peter Barker
dbb1f01445 AP_Vehicle: move many members up to base class 2020-02-05 10:12:13 +11:00
Peter Barker
6db60ec711 AP_Arming: remove bogus ARMING_CHECK_NONE 'bitmask value'
This looks like a bitmask value, but if you treat it like one (and
people have in the past!) by using logical operations then you get the
incorrect result.

Places which were checking for equivalence to ARMING_CHECK_NONE now
simply check the bitmask to see if it is all-empty.
2020-02-05 10:12:13 +11:00
murata
73a9f31424 AP_Motors: Change to description(NFC) 2020-02-05 10:12:13 +11:00
Andrew Tridgell
a34b135a57 AP_BoardConfig: fixed CAN init without SLCAN 2020-02-05 10:12:13 +11:00
Henry Wurzburg
2c3d57a373 Rover: implement steering trim save in armed/manual mode only 2020-02-05 10:12:13 +11:00
Randy Mackay
da0c1d1b42 AP_Follow: add clear_offsets_if_required method
this restores the offsets to zero if they were initialised from zero when the lead vehicle was first spotted
2020-02-05 10:10:37 +11:00
Ebin
767cabf8e5 SITL: Yaw rate calculation uses wheel offset 2020-02-05 10:10:37 +11:00
Peter Barker
63e8c5abcb AP_WheelEncoder: add SITL backend
AP_WheelEncoder: added update function for SITL quadrature encoder
2020-02-05 10:10:37 +11:00
Peter Barker
e6346587d7 AP_Logger: tidy MessageWriter stages using enum class 2020-02-05 10:10:37 +11:00
Henry Wurzburg
d95cbc81b3 AP_BLHeli: Change descriptions in SERVO_BLH_PORT param to actual AP port 2020-02-05 10:10:37 +11:00
Andrew Tridgell
4638c57819 AP_Motors: enable docs for hover thr learning in plane 2020-02-05 10:10:37 +11:00
Randy Mackay
59f2b42bd9 AP_SmartRTL: fixup compile error
fix typo introduced by me attempting a minor fixup before merging
2020-02-05 10:10:37 +11:00
Peter Barker
2deea7835f AP_Logger: correct uninitialised value when logging all rally points 2020-02-05 10:10:37 +11:00
Henry Wurzburg
6f5d9a686e AP_SmartRTL: give warning buffer is about to fill-up 2020-02-05 10:10:37 +11:00
Henry Wurzburg
edc7fefe2a AP_Follow: hide params not used by Rover 2020-02-05 10:10:37 +11:00
Randy Mackay
9f5d629503 GCS_MAVLink: add comment above set-message-interval 2020-02-05 10:10:37 +11:00
Randy Mackay
b3fbceccb2 GCS_MAVLink: minor fix to set_message_interval 2020-02-05 10:10:37 +11:00
Tatsuya Yamaguchi
ce588f004d AP_Scripting: add set_message_interval binding 2020-02-05 10:10:37 +11:00
Tatsuya Yamaguchi
48307e2268 GCS_MAVLink: add set_message_interval functions 2020-02-05 10:10:37 +11:00
Andrew Tridgell
4e799be144 AP_Scheduler: use fill_nanf() on each scheduler function 2020-02-05 10:10:37 +11:00
Andrew Tridgell
161154bf05 AP_NavEKF2: fixed build
broken by recent common variable change
2020-02-05 10:10:37 +11:00
Andrew Tridgell
8984a8fa85 HAL_SITL: pre-fill stack on each loop with NaN
this allows us to catch use of uninitialised stack variables in SITL
without having valgrind running
2020-02-05 10:10:37 +11:00
Andrew Tridgell
b1e0299a0f 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
2020-02-05 10:10:20 +11:00
Andrew Tridgell
da7dc71195 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
2020-02-05 10:10:20 +11:00
IamPete1
b5e78f9260 AP_Motors: add reversed tricopter option 2020-02-05 10:10:20 +11:00
Peter Barker
3939a24f95 AP_ADSB: move is_valid_octal to is_valid_callsign and add tests for it 2020-02-05 10:10:20 +11:00
Peter Barker
6e4813cc92 AP_Math: move is_valid_octal into adsb
This doesn't ensure the value is octal digits - there's more magic in
it.
2020-02-05 10:10:20 +11:00
mhefny
919208c47c SITL: removed unnecessary files of webots 2020-02-05 10:10:20 +11:00
Peter Barker
dae920634f AP_Baro: exclude Sub pressure transducers from non-sub builds 2020-02-05 10:10:20 +11:00
Andrew Tridgell
f5cd193f71 AP_Common: removed fcntl overrides
not needed with AP_Filesystem, and fixes lots of warnings with newer
compilers
2020-02-05 10:10:20 +11:00
Andrew Tridgell
6ebfbb4b94 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
2020-02-05 10:10:20 +11:00
Henry Wurzburg
df32ec154f AP_OSD: add current averaging filter to reduce jitter (~5 sample timeconstant) 2020-02-05 10:10:20 +11:00
Randy Mackay
633fd0f6c9 AC_Avoidance: add enabled and margin accessors 2020-02-05 10:10:20 +11:00
Randy Mackay
f188f7e05e RC_Channels: define surface tracking auxiliary function 2020-02-05 10:10:20 +11:00
Randy Mackay
1edac100ac 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
2020-02-05 10:09:54 +11:00
Randy Mackay
8674997a24 AP_Logger: add error code to Write_OADijkstra 2020-02-05 10:09:54 +11:00
Peter Barker
422aebce95 AP_Proximity: polyfence valid() has been renamed 2020-02-05 10:09:54 +11:00
Peter Barker
56473413d7 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
2020-02-05 10:09:54 +11:00
Peter Barker
179db476bf 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
2020-02-05 10:09:54 +11:00
Peter Barker
107b9d95ba AP_OADijkstra: cope with polyfence holding boundary points 2020-02-05 10:09:54 +11:00
Peter Barker
9c89f9cc8b AP_OABendyRuler: cope with polyfence holding boundary points 2020-02-05 10:09:54 +11:00
Peter Barker
0c92a6d091 AC_Avoidance: cope with polyfence holding boundary points 2020-02-05 10:09:54 +11:00
Peter Barker
75b022378a GCS_MAVLink: cope with polyfence holding boundary points 2020-02-05 10:09:54 +11:00
Peter Barker
c6aa243a2b AP_Proximity: cope with polyfence holding boundary points 2020-02-05 10:09:54 +11:00
Peter Barker
6064f22615 AC_Fence: move polygon points into AC_Fence_Polygon 2020-02-05 10:09:54 +11:00
Peter Barker
63256a6df5 AP_Math: define != for Vector2<int> 2020-02-05 10:09:54 +11:00
Peter Barker
eea711be66 StorageManager: add write_uint8 alias for write_byte 2020-02-05 10:09:54 +11:00
Peter Barker
dc5852dad8 AP_InternalError: add a general should-not-be-here bit 2020-02-05 10:09:54 +11:00
Peter Barker
4e793e7169 GCS_MAVLink: squelched rally-points-received message 2020-02-05 10:09:54 +11:00
Willian Galvani
5c00aa5921 AP_TemperatureSensor: Update TSYS01 for Pixhawk2 2020-02-05 10:09:54 +11:00
Peter Barker
35ea916adf AP_Relay: change parameter name from relay to instance 2020-02-05 10:09:54 +11:00
Peter Barker
47b9cb2e28 AP_Relay: tidy, reduce flash usage 2020-02-05 10:09:54 +11:00
Peter Hall
3a58aeb6c6 AR_WPNav: make get_stopping_location public 2020-02-05 10:09:54 +11:00
Henry Wurzburg
dffed8e008 AP_OSD: distance total fix for slow vehicles 2020-02-05 10:09:54 +11:00
Willian Galvani
8ad195dd51 APMotors_6DOF: Implement motor_is_enabled(), get_motor_angular_factors() and set_reversed(); 2020-02-05 10:09:54 +11:00
Peter Hall
1e02cbe009 AP_Windvane: caculate vehicles current tack 2020-02-05 10:09:54 +11:00
Willian Galvani
ae8df5678a AP_Motors_6DOF: Add missing 'break' 2020-02-05 10:09:54 +11:00
Henry Wurzburg
fb0b92cc94 AP_OSD: scale xtrack, add precision for distances <10 units 2020-02-05 10:09:54 +11:00
Patrick José Pereira
6c734b5006 AP_HAL_Linux: PCA9685: Check for device before accessing it
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-02-05 10:09:54 +11:00
mhefny
9d67a9423f SITL: adding Tricopter model in Webots 2020-02-05 10:09:54 +11:00
Randy Mackay
586b1f3c8c GCS_MAVLink: allow proximity to send only upward facing distances
this removes the requirement that a horizontal proximity sensor be enabled
2020-02-05 10:09:54 +11:00
Henry Wurzburg
0f0ceb6499 AP_OSD: formatting fixes 2020-02-05 10:09:54 +11:00
bnsgeyer
5898986b0a AP_Motor: tradheli align swash params btwn frames and fix metadata 2020-02-05 10:09:20 +11:00
Peter Barker
5871cdad23 AP_Math: remove unit_mod concept from wrap functions
devcall decided it would be clearer to have non-shared implementation
for the _cd variants
2020-02-05 10:09:20 +11:00
Peter Barker
5e9aaca8df AP_NavEKF2: initialise Kfusion stack variable to fix compilation
This fixes the compilation, as previous patches have done.
2020-02-05 10:09:20 +11:00
Peter Barker
ec991969c7 AP_HAL_ChibiOS: correct include of mavlink header for analog debug 2020-02-05 10:09:20 +11:00
liang
9c44ebaced AP_Baro: LPS22H: correct formatting 2020-02-05 10:09:20 +11:00
Andrew Tridgell
de12430977 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
2020-02-05 10:09:20 +11:00
murata
6de2311689 AP_Radio: Change direct value to define name 2020-02-05 10:09:20 +11:00
murata
a74123148b AP_Compass: Change direct value to define name 2020-02-05 10:09:20 +11:00
Andrew Tridgell
5d67618968 AP_NavEKF2: added comment (review request) 2020-02-05 10:09:20 +11:00
Andrew Tridgell
164813bcc2 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
2020-02-05 10:09:20 +11:00
Andrew Tridgell
6ffffff8c6 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
2020-02-05 10:09:00 +11:00
Andrew Tridgell
a48d97c307 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
2020-02-05 10:08:10 +11:00
Peter Barker
5ce16f81ff AP_ADSB: use ObjectBuffer in place of AP_Buffer 2020-02-05 10:05:59 +11:00
Peter Barker
ed5848238c AP_Buffer: remove as it is replaced with ObjectBuffer 2020-02-05 10:05:59 +11:00
Willian Galvani
8f6ca7bb8f APMotors6DOF: add roll factor for motors 4 and 5 for SIMPLEROV_4 and SIMPLEROV_5 2020-02-05 10:05:59 +11:00
Willian Galvani
f5ba04d098 APMotors6DOF: add case for SIMPLEROV_3 2020-02-05 10:05:59 +11:00
Peter Barker
552cc4be5c AP_HAL_SITL: catch SIGTERM and exit with zero exit status 2020-02-05 10:05:59 +11:00
Andrew Tridgell
7ecbec5b96 HAL_SITL: added MotorBoat 2020-02-05 10:05:59 +11:00
Andrew Tridgell
be083aab1a SITL: added a MotorBoat class
a sailboat with zero sail area
2020-02-05 10:05:59 +11:00
Lucas De Marchi
77a06de66f 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.
2020-02-05 10:05:59 +11:00
Peter Hall
5b434e814a APM_Control: AR_AttitudeControl: add description for new PID params 2020-02-05 10:05:59 +11:00
Andrew Tridgell
d85a7e4c4b AP_Logger: fixed use of old irqsave() API 2020-02-05 10:04:08 +11:00
Michael du Breuil
af0c55b4df AP_HAL_ChibiOS: Only include MAVLink when using the MAVLink debugging 2020-02-05 10:04:08 +11:00
Michael du Breuil
bfe4d6ee82 GCS_MAVLink: remove some unused includes 2020-02-05 10:04:08 +11:00
Peter Barker
506126cb44 AC_AutoTune: correct abs to fabsf for roll_cd and pitch_cd 2020-02-05 10:04:08 +11:00
Peter Barker
3e9f470bfb AP_L1_Control: wrap_180_cd no longer solely returns floats 2020-02-05 10:04:08 +11:00
Peter Barker
7c2c809b06 APM_Control: wrap_180_cd no longer solely returns floats 2020-02-05 10:04:08 +11:00
Peter Barker
33ef991282 AP_Math: stop returning float for integer wrap_180/wrap_360 etc 2020-02-05 10:04:08 +11:00
Peter Barker
818402ab99 AP_Math: add more tests for wrap functions 2020-02-05 10:04:08 +11:00
Peter Barker
89cfdb678f AC_WPNav: do not calculate NEU vector from invalid location 2020-02-05 10:04:08 +11:00
Michael du Breuil
14f43f24a9 AP_Common: Include altitude in the init check for a location 2020-02-05 10:04:08 +11:00
Andrew Tridgell
5bac7018b6 AP_GPS: use jitter correction on GPS_INPUT data
this allows for more accurate timing when using GPS_INPUT for indoor
positioning systems
2020-02-05 10:04:08 +11:00
Peter Barker
882d3b0c0d GCS_MAVLink: use singleton to get AP_AdvancedFailsafe pointer 2020-02-05 10:04:08 +11:00
Peter Barker
7a1afc580d AP_AdvancedFailSafe: add singleton getter 2020-02-05 10:04:08 +11:00
Andrew Tridgell
f1cb9ed956 AP_FileSystem: chunk IOs to max 4k
this prevents larger IOs from attempting to allocate too much memory
in DMA bouncebuffers
2020-01-18 12:27:51 +11:00
Andrew Tridgell
2d817db7f3 AP_IOMCU: added a health check based on status read errors
if we have more than 1 in 128 read status requests failing then mark
IOMCU unhealthy
2020-01-18 12:27:42 +11:00
Andrew Tridgell
630ccb2ef9 AP_IOMCU: reduce uart buffer sizes 2020-01-18 12:27:39 +11:00
Andrew Tridgell
23005e6f46 HAL_ChibiOS: use 4k bouncebuffer for sdcard
match AP_Logger IO size
2020-01-18 12:27:36 +11:00
Andrew Tridgell
c5b1c88948 HAL_ChibiOS: adjust dma reserve allocation
use larger target and allow for smaller allocation
2020-01-18 12:27:33 +11:00
Andrew Tridgell
64dc29cf98 HAL_ChibiOS: don't extend alloc of iomcu uart 2020-01-18 12:27:29 +11:00
Andrew Tridgell
7c0cb85361 HAL_ChibiOS: added checking on bouncebuffer allocation
fail operations if DMA bouncebuffer alloc fails

# Conflicts:
#	libraries/AP_HAL_ChibiOS/I2CDevice.cpp
2020-01-18 12:27:23 +11:00
Andrew Tridgell
b60fd97f32 AP_Logger: add a semaphore to protect creation of new log formats 2020-01-18 12:26:29 +11:00
Andrew Tridgell
66b14f4aaf AP_Filesystem: fixed set_mtime semaphore 2020-01-18 12:26:25 +11:00
Michael du Breuil
0fe9763e19 AP_Param: Fix failing to invalidate the cached parameter count
This would cause a GCS to download fewer then the requested number of
parameters
2020-01-15 14:03:36 +11:00
Andrew Tridgell
e9f60ede1b AP_SerialManager: ensure users can't break SERIAL0_PROTOCOL
this prevents users from setting SERIAL0_PROTOCOL to something that
prevents them accessing the board. This can happen when users are
trying to setup SLCAN
2020-01-10 19:12:10 +11:00
Andrew Tridgell
7d91460e85 AP_Declination: re-generate mag tables
max interpolate error between -60 and 60 latitude is 13.86 mGauss
2020-01-10 19:12:10 +11:00
Andrew Tridgell
3584f1b779 AP_Declination: update generate script
added ability to display max error
2020-01-10 19:12:10 +11:00
Andrew Tridgell
9261b32430 AP_GPS: fixed build 2020-01-10 19:12:10 +11:00
Andrew Tridgell
0ed02b1d88 AP_Compass: added mag_cal_fixed_yaw()
this is a fast compass calibration that uses a yaw value provided by
the user.
2020-01-10 18:48:52 +11:00
Andrew Tridgell
aea2238936 GCS_MAVLink: support MAV_CMD_FIXED_MAG_CAL_YAW 2020-01-10 18:48:49 +11:00
Andrew Tridgell
b95a31ccfc AP_RCProtocol: fixed support for 22ms multi-frame DSM 2020-01-10 18:48:42 +11:00
Andrew Tridgell
0dc22331d0 AP_Frsky_Telem: fixed a race condition with statustext handling
this fixes an issue that can cause a hardfault. See this bug report:

https://discuss.ardupilot.org/t/hexa-crash-after-watchdog-reset/50917

ObjectArray is not thread safe
2020-01-10 18:48:17 +11:00
Andrew Tridgell
b834796f3b HAL_ChibiOS: fixed clock src for I2C4 on H7 2020-01-08 06:02:46 +11:00
Andrew Tridgell
17118977dc HAL_ChibiOS: automatically set AP_FEATURE_RTSCTS 2020-01-02 07:50:35 +11:00
Andrew Tridgell
5c4802ce25 AP_Compass: limit rotations we try to ROTATION_MAX_AUTO_ROTATION 2020-01-01 09:08:31 +11:00
Andrew Tridgell
686b9322cd AP_Math: define ROTATION_MAX_AUTO_ROTATION
we don't want to use ROTATION_PITCH_7 in our auto rotation mix, as it
is too close to level
2020-01-01 09:08:19 +11:00
Andrew Tridgell
8311a5be63 HAL_ChibiOS: fixed H7 I2C timing
we were running the clock at too low speed. This affected the SSD1306 display

# Conflicts:
#	libraries/AP_HAL_ChibiOS/I2CDevice.cpp
2019-12-30 14:35:57 +11:00
Peter Barker
abe1a09c7a AP_HAL: stop emitting extra CR before a LF as part of our printf 2019-12-25 12:00:37 +11:00
Pierre Kancir
ecdd07e793 AP_Compass: add register to checked ones and remove single-use goto
Also fix comment on TMRC register setting
2019-12-23 20:20:12 +11:00
Pierre Kancir
d9edd3c8b5 AP_Compass: probe for RM3100 2019-12-23 20:20:01 +11:00
Andrew Tridgell
318c0a958d HAL_ChibiOS: removed PB1 and PB0 TIM1 complementary channels for F76x
these do not work, possibly a datasheet bug
2019-12-23 19:42:04 +11:00
Andrew Tridgell
24e48b5e81 HAL_ChibiOS: switch MatekF765 to timer 12
fixes PWM 5 and 6
2019-12-23 19:42:02 +11:00
Andrew Tridgell
af04f1eb93 HAL_ChibiOS: ensure bootloader flash is multiple of 32 bytes 2019-12-23 17:36:28 +11:00
Andrew Tridgell
9c2caf5b12 AP_InertialSensor: default fast sampling on
if we have a first IMU capable of fast sampling then we want it
enabled by default
2019-12-23 09:56:26 +11:00
Andrew Tridgell
f733e963df HAL_ChibiOS: scale uart rx buffer size with baudrate
this ensures we have enough buffer space for a RTK GPS, as well as for
high speed comms with a companion computer
2019-12-23 09:56:26 +11:00
Peter Barker
48a04d21ce AP_NMEA_Output: NavEKF constructors no longer take rangefinder 2019-12-23 09:56:26 +11:00
Randy Mackay
e206134fa6 AP_NMEA_Output: 10hz rate limiting uses uint32_t 2019-12-23 09:56:26 +11:00
Peter Barker
46c384b412 AP_NMEA_Output: correct 10Hz rate limiting
integer promotion issue
2019-12-23 09:56:26 +11:00
Peter Barker
9fd53b0dbc AP_NMEA_Output: add example 2019-12-23 09:56:26 +11:00
Peter Barker
e90b6bafca AP_NMEA_Output: skip sending sentences if no space on UART
AP_NMEA_Output: clean scope by removing unneeded temps

AP_NMEA_Output: redo last_sent to last_run

AP_NMA_Output: early-exit if no data
2019-12-23 09:56:26 +11:00
Andrew Tridgell
12e51965c9 HAL_ChibiOS: change CUAVv5Nano volt scale to 18.000 2019-12-23 09:56:26 +11:00
Andrew Tridgell
96bccba638 HAL_ChibiOS: fixed build of SPI clock test 2019-12-12 20:43:40 +11:00
Andrew Tridgell
87f2839f3e GCS_MAVLink: fixed critical error on prefight cal ops 2019-12-12 20:43:35 +11:00
Andrew Tridgell
595a49eec4 GCS_MAVLink: send temperature for IMUs 2019-12-09 13:25:18 +11:00
Andrew Tridgell
04827d229c AP_NavEKF2: don't use WMM tables unless we have a compass scale factor set 2019-12-09 13:18:01 +11:00
Andrew Tridgell
c36687a79f SITL: added SIM_MAG_SCALING for testing scale factor errors
# Conflicts:
#	libraries/SITL/SITL.cpp
2019-12-09 13:18:01 +11:00
Andrew Tridgell
bc7f811ff0 AP_GPS: cope with UAVCAN GPS that don't provide Aux message
thanks to @VadimZ for the suggestion
2019-12-09 13:18:01 +11:00
Randy Mackay
0cd737856d AP_RangeFinder: remove param conversion for 3rd and 4th
3rd and 4th instances were not available to users unless they used their own builds which is rare
this reduces the firmware's flash size a small amount
2019-12-09 13:18:01 +11:00
Randy Mackay
4cb470e4df AP_RangeFinder: param conversion fix
This resolves an issue with the parameter conversion when moving from Copter-3.6.x to 4.0 (and similar moves for other vehicle types)
2019-12-09 13:18:01 +11:00
Peter Barker
8fac70149d AP_Compass: tidy constructor 2019-12-09 13:18:01 +11:00
Peter Barker
03064f8eea AP_Compass: make compass_cal_status_t enum class Status within CompassCalibrator 2019-12-09 13:18:01 +11:00
Andrew Tridgell
342dd67dc0 AP_Compass: narrow range of allowed scale factor 2019-12-09 13:18:01 +11:00
Andrew Tridgell
536222859d AP_Compass: added COMPASS_OPTIONS
this allows user to set that calibration requires GPS lock
2019-12-09 13:18:01 +11:00
Andrew Tridgell
920007f3c4 AP_Compass: added estimation of compass scale factor
this adds new COMPASS_SCALE, COMPASS_SCALE2 and COMPASS_SCALE3
parameters, which give the sensor scaling factor. It is used to
compensate for an incorrect scaling in a compass.

The 3D compass calibration process will set the correct value
automatically, otherwise users can set the value to a known value for
an existing compass
2019-12-09 13:18:01 +11:00
Randy Mackay
ae234635e8 AP_Compass: minor comment fix
Co-Authored-By: Peter Barker <pb-gh@barker.dropbear.id.au>
2019-12-09 13:18:01 +11:00
lukezhqin
f59d22aa41 AP_Compass: fix thin_samples to avoid comparing sample to itself 2019-12-09 13:18:01 +11:00
Randy Mackay
b87f42bc07 AP_Compass: fix calibrator update when step one fails 2019-12-09 13:18:01 +11:00
Randy Mackay
d9fde84ccb AP_Compass: rename CompassCalibrator::clear to stop 2019-12-09 13:18:01 +11:00
Randy Mackay
6c8ee8fa67 AP_Compass: remove unused calc_mean_squared_residuals 2019-12-09 13:18:01 +11:00
Randy Mackay
a5e0af6868 AP_Compass: add comments to calibrator 2019-12-09 13:18:01 +11:00
Randy Mackay
243cf3b22d AP_Compass: formatting fixes
this should be a non-functional change
2019-12-09 13:18:01 +11:00
Randy Mackay
69a7a52e5f AP_Compass: constify get_completion_mask and remove use of auto 2019-12-09 13:18:01 +11:00
Randy Mackay
cf34abba87 AP_Compass: constify get_orientation 2019-12-09 13:18:01 +11:00
Andrew Tridgell
47fe57bd8d AP_Compass: remove expected error
this happens with AK09916 probing on invensense sensor
2019-12-09 13:18:01 +11:00
Andrew Tridgell
3b244bbc7f AP_Compass: disable HIL for AP_Periph
this saves several k of flash
2019-12-09 13:18:01 +11:00
Randy Mackay
88761e59f0 AP_Compass: LEARN param default to 0 for all vehicles 2019-12-09 13:18:01 +11:00
Andrew Tridgell
1afd603fa8 AP_Compass: don't show too many params when max compasses 1 2019-12-09 13:18:01 +11:00
Andrew Tridgell
2d25adca33 HAL_ChibiOS: fixed build of sparky2
running out of flash
2019-12-09 13:18:01 +11:00
Andrew Tridgell
9f76d2cf50 AP_BLHeli: fixed critical errors caused by BLHeli code 2019-12-09 13:18:01 +11:00
Andrew Tridgell
1fa764c915 HAL_ChibiOS: update mRoX21-777 I2C mask
all external
2019-12-09 12:58:55 +11:00
Phillip Kocmoud
0fffc77dae HAL_ChibiOS: update mRoControlZeroF7 I2C mask 2019-12-09 12:58:52 +11:00
Andrew Tridgell
59b576ebf3 AP_BattMonitor: added Durandal selection for batt mon pins 2019-12-09 12:57:44 +11:00
Andrew Tridgell
5fe0cd16ab HAL_ChibiOS: enable MatekF765 LED pin
- use tonealarm for buzzer
 - add more baro options
2019-12-09 12:56:40 +11:00
yaapu
4bf6f4c297 Ap_Frsky_Telem: replaced the passthrough scheduler with a WFQ one.
This replaces the default scheduler with a WFQ one
2019-12-09 12:56:13 +11:00
vierfuffzig
91c77e6df4 AP_BLHeli: fix eRPM conversion 2019-12-09 12:55:37 +11:00
Andy Piper
00406180c4 AP_HAL_ChibiOS: specify Durdanal IMUs so that ordering is correct 2019-12-09 12:54:14 +11:00
Henry Wurzburg
4d4b4d46a2 HWDEF: Speedybeef4 change I2C internal mask to 0 to allow probing ext baros 2019-12-09 12:54:06 +11:00
Andrew Tridgell
3a1b24c9bb HAL_ChibiOS: fixed handling of 16bit timer wrap
this fixes #12948
2019-12-09 12:45:20 +11:00
Andrew Tridgell
6f9abb8a4b HAL_ChibiOS: added assert for systime_t size 2019-12-09 12:45:09 +11:00
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
Andrew Tridgell
a49cc87dae AP_NavEKF3: change optimisation from -O3 to -O2 2019-10-02 12:03:53 +10:00
Andrew Tridgell
fb7ddd9b9d AP_NavEKF2: change optimisation from -O3 to -O2 2019-10-02 12:03:47 +10:00
Andrew Tridgell
2962211ea0 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-10-01 08:33:13 +10:00
Andrew Tridgell
560a1bf9e0 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-10-01 08:32:56 +10:00
Mark Whitehorn
eb620f0792 AP_IOMCU: fix IO fast channel mask 2019-10-01 08:32:03 +10:00
Mark Whitehorn
2034bde367 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 08:32:00 +10:00
Andrew Tridgell
4c22633c60 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-10-01 08:31:20 +10:00
Henry Wurzburg
6108c5b5ab AP_OSD: Add autoranging to current and speed displays 2019-09-22 21:11:06 +10:00
Randy Mackay
1433741cc9 AP_Proximity: fix rangefinder backends cm to m conversion 2019-09-22 21:09:38 +10:00
Peter Barker
784edac137 AP_NavEKF2: correct return of empty prearm string 2019-09-22 21:09:11 +10:00
Peter Barker
6693610c7a AP_NavEKF3: correct return of empty prearm string 2019-09-22 21:09:04 +10:00
Andrew Tridgell
2bebe8f916 SITL: added SIM_LOOP_DELAY parameter
this allows us to test high CPU load conditions by adding a delay to
each loop
2019-09-22 21:08:38 +10:00
Andrew Tridgell
ae4bcf0f6f 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-22 21:08:34 +10:00
Andrew Tridgell
d916c31575 AP_Logger: added logging of extra loop time from the scheduler 2019-09-22 21:08:27 +10:00
Lucas De Marchi
1eb2dc2b2f AP_RangeFinder: add missing overrides 2019-09-22 21:08:14 +10:00
Lucas De Marchi
575200f8c7 AP_RangeFinder: fix build 2019-09-22 21:08:11 +10:00
Andrew Tridgell
62c3fec45c HAL_ChibiOS: fixes from LGTM errors 2019-09-22 21:07:54 +10:00
Andrew Tridgell
f6b28f3013 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 21:07:49 +10:00
Andrew Tridgell
372eca7dad 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:07:38 +10:00
Andrew Tridgell
eeb6fbe5ee HAL_ChibiOS: fixed undef for define lines
this fixes IMU heater enable for CubeBlack+
2019-09-16 12:55:44 +10:00
Andrew Tridgell
dceee38d69 HAL_ChibiOS: fixed IMU order and board ID for CubeBlack+ 2019-09-16 12:55:36 +10:00
bugobliterator
e540248695 HAL_ChibiOS: hwdef: add hwdef for CubeBlack+ 2019-09-16 12:55:34 +10:00
bugobliterator
8dca2b14db AP_BoardConfig: add support for CubeBlackPlus 2019-09-16 12:55:32 +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