Commit Graph

28489 Commits

Author SHA1 Message Date
Shiv Tyagi fa6adc0beb SITL: add JEDEC dataflash simulator
We currently use AP_Logger_SITL for this purpose but we can instead add a dataflash simulator which can work with existing AP_Logger_Dataflash backend instead of using AP_Logger_SITL.

Co-Authored-By: Divyateja Pasupuleti <divyateja2004@gmail.com>
2021-12-25 09:14:31 +11:00
Shiv Tyagi 3533e1e0ed AP_Logger: remove AP_Logger_SITL
We now use jedec dataflash simulator for this purpose. Hence, we should remove these files and all references to HAL_LOGGING_SITL_ENABLED

Co-Authored-By: Divyateja Pasupuleti <divyateja2004@gmail.com>
2021-12-25 09:14:31 +11:00
Shiv Tyagi af950e266b AP_HAL_SITL: add dataflash to spi device table
We simulate jedec flash for logging. Hence, we need to add dataflash to device table. Also, we need to remove HAL_LOGGING_SITL_ENABLED since we no longer need it

Co-Authored-By: Divyateja Pasupuleti <divyateja2004@gmail.com>
2021-12-25 09:14:31 +11:00
Peter Barker 939407a26f AP_NMEA_Output: remove pointless use of intermediate res variables 2021-12-23 21:04:18 +11:00
Peter Barker 97ea8b52af AP_Baro: KellerLD: clean up reading of calibration data
Co-authored-by: Josh Henderson <hendjoshsr71@gmail.com>

Checks all return values from transfer functions to avoid use of
uninitialised data.
2021-12-22 18:50:58 +11:00
yaapu c0663da918 AP_RCTelemetry: added ExpressLRS support 2021-12-22 18:48:49 +11:00
yaapu 55bfa41d13 AP_RC_Protocol: added ExpressLRS support 2021-12-22 18:48:49 +11:00
yaapu 76bd10bf02 AP_RCProtocol: added custom telemetry frame types and subtypes to debug trace 2021-12-22 18:48:49 +11:00
mateksys be601acd89 AP_HAL_ChibiOS: add MatekF405-TE hwdef 2021-12-22 18:47:37 +11:00
Peter Hall 98c5704b92 AP_TECS: add reset throttle I function 2021-12-22 18:46:14 +11:00
Andy Piper fbaa2e7b09 AP_Math: allow selection of inline version of vector operations for performance. 2021-12-22 18:23:33 +11:00
Andy Piper fbdeea2d03 Filter: optimize hot parts of notch filter updates 2021-12-22 18:23:33 +11:00
Andy Piper 6e3b502110 AP_InertialSensor: inline vector ops for backends and temp cal 2021-12-22 18:23:33 +11:00
Andy Piper 9ba1cbc9d8 AP_Vehicle: log up to 12 harmonic notch frequencies 2021-12-22 18:13:38 +11:00
Andy Piper c50ccd1d09 AP_GyroFFT: use harmonics for harmonics and number of notches elsewhere
modify energy based on peak width
always log harmonic notch frequencies
2021-12-22 18:13:38 +11:00
Andy Piper 5259272326 AP_HAL_Empty: remove redundant harmonics from DSP 2021-12-22 18:13:38 +11:00
Andy Piper fa91e74fde AP_HAL_SITL: remove redundant harmonics from DSP 2021-12-22 18:13:38 +11:00
Andy Piper 2fab99d647 AP_HAL_ChibiOS: remove redundant harmonics from DSP 2021-12-22 18:13:38 +11:00
Andy Piper d4024d9216 AP_HAL: allow configuration of maximum number of notches based on MCU type
increase notch filters in SITL
remove redundant harmonics from DSP
2021-12-22 18:13:38 +11:00
Andy Piper d44478ff59 AP_InertialSensor: calculate number of notches based on motor count
configure default harmonics if dynamic harmonics
set number of notches correctly for FFT operation
include static notch in filter calculation and allow harmonic options on static notch
2021-12-22 18:13:38 +11:00
Andy Piper 34920ebd60 Filter: allow harmonics and notch-per-motor in harmonic notch
allow default harmonics to be configured
allow combination of harmonics and indpendent centre frequencies
pre-calculate number of harmonics
2021-12-22 18:13:38 +11:00
arbalasquide fd3c83c0d1 AP_Math: Add AUS_TO_MAH definition 2021-12-22 07:52:03 +11:00
arBalasquide 10b4eebce4 AP_BattMonitor: Add calculate_mah, add unit tests 2021-12-22 07:52:03 +11:00
Andrew Tridgell 08ca708347 AP_SerialManager: fixed AP_Periph GPS
the disable of RX/TX pins broke AP_Periph on boards that don't enable
the GCS, as they don't have the SERIALn parameters, so we disable the
UART pins of the GPS
2021-12-21 20:14:55 +11:00
Andrew Tridgell ba58558bd1 SITL: fixed default BATT_CAPACITY for SITL
don't override from JSON model unless we have a value
2021-12-21 19:53:43 +11:00
Mingchen Zhang 61e0c5b6e7 AP_SmartAudio: fix a bug that would starve the lower priority thread, such as scripting. 2021-12-21 16:03:44 +09:00
Randy Mackay e41cad8bd7 SRV_Channel: minor param desc format fix 2021-12-21 14:45:49 +09:00
Brad Stinson cd39110b68 hwdef: add support for PixC4-Jetson
add support for building IOMCU with F103 and 8MHz clock
2021-12-21 13:05:34 +11:00
Andrew Tridgell a39040d864 AC_AutoTune: limit autotune target rates to parameter limits
this makes it safer to autotune a large vehicle which may become
unstable at very high target rates
2021-12-21 11:02:51 +09:00
Andrew Tridgell 53f1fc1295 AC_AttitudeControl: added get_ang_vel_yaw_max_rads() 2021-12-21 11:02:51 +09:00
Andrew Tridgell 178ae9e0c1 AP_RCTelemetry: use have_serial when detecting
avoid find_serial() as it changes port options
2021-12-21 11:07:44 +11:00
Andrew Tridgell 366ff24941 AP_RangeFinder: use have_serial when detecting
avoid find_serial() as it changes port options
2021-12-21 11:07:44 +11:00
Andrew Tridgell 93d8a0606f AP_Proximity: use have_serial when detecting
avoid find_serial() as it changes port options
2021-12-21 11:07:44 +11:00
Andrew Tridgell 0da0f6dd37 AP_ADSB: use have_serial when detecting
avoid find_serial() as it changes port options
2021-12-21 11:07:44 +11:00
Andrew Tridgell 47590a55ff AP_RCProtocol: allow changes of serial settings between protocols
if we are searching for new protocols then allow for baudrate table
changes
2021-12-21 11:07:44 +11:00
Andrew Tridgell deb2d6b782 AP_SerialManager: added have_serial() method
this checks if we have the protocol without setting the options on the
uart
2021-12-21 11:07:44 +11:00
Peter Barker 600b085cf3 AP_Logger: correct constraint of maximum message ID 2021-12-21 10:42:18 +11:00
Peter Barker 168f278959 AP_Logger: reallocate 32 IDs from vehicles to main message area
ArduPlane uses ~18 messages and the list is relatively static, so this
should be a reasonable reallocation.

We're using a lot of Log_Write(...) to create messages dynamically - but
that requires IDs and we only left space for about 18 before this patch

More space is left to ease future use of IDs in some libraries
2021-12-21 10:42:18 +11:00
Jaaaky db8d08b349 SRV_Channel: Fix multi #include's 2021-12-21 10:38:46 +11:00
Jaaaky 71154105e4 SITL: Fix multi #include's 2021-12-21 10:38:46 +11:00
Jaaaky e991bff0d5 AP_VisualOdom: Fix multi #include's 2021-12-21 10:38:46 +11:00
Jaaaky 3008a480d5 AP_UAVCAN: Fix multi #include's 2021-12-21 10:38:46 +11:00
Jaaaky 37a08507df AP_ToshibaCAN: Fix multi #include's 2021-12-21 10:38:46 +11:00
Jaaaky e92c900b56 AP_Scheduler: Fix multi #include's 2021-12-21 10:38:46 +11:00
Jaaaky 8512652511 AP_RCTelemetry: Fix multi #include's 2021-12-21 10:38:46 +11:00
Jaaaky 91e3441c6d AP_RCProtocol: Fix multi #include's 2021-12-21 10:38:46 +11:00
Jaaaky 485227b2c1 AP_Param: Fix multi #include's 2021-12-21 10:38:46 +11:00
Jaaaky da3b064a31 AP_OSD: Fix multi #include's 2021-12-21 10:38:46 +11:00
Jaaaky bbb38504d6 AP_InertialSensor: Fix multi #include's 2021-12-21 10:38:46 +11:00
Jaaaky 08d44815f6 AP_HAL_Linux: Fix multi #include's 2021-12-21 10:38:46 +11:00
Jaaaky f588b08004 AP_HAL_ESP32: Fix multi #include's 2021-12-21 10:38:46 +11:00
Jaaaky f1f31c1aef AP_HAL_ChibiOS: Fix multi #include's 2021-12-21 10:38:46 +11:00
Jaaaky 60fcfae2de AP_GyroFFT: Fix multi #include's 2021-12-21 10:38:46 +11:00
Jaaaky 6433547592 AP_GPS: Fix multi #include's 2021-12-21 10:38:46 +11:00
Jaaaky c7b1e05f1d AP_FETtecOneWire: Fix multi #include's 2021-12-21 10:38:46 +11:00
Jaaaky bfb9b1ac73 AP_Declination: Fix multi #include's 2021-12-21 10:38:46 +11:00
Jaaaky d27f122295 AP_Compass: Fix multi #include's 2021-12-21 10:38:46 +11:00
Jaaaky f8f9038092 AP_Baro: Fix multi #include's 2021-12-21 10:38:46 +11:00
Jaaaky 0c16ebec6c AC_PrecLand: Fix multi #include's 2021-12-21 10:38:46 +11:00
Shiv Tyagi 4b7b5a4d90 AP_OSD: fix code causing errors when OSD is compiled out
This fixes the code causing problem in compiling out OSD
2021-12-21 10:06:01 +11:00
Hwurzburg ff3c4b8bda RC_Channel: add RC option to report CRSF LQ as RSSI
Co-author: Jules Gilson <julesgilson@yahoo.co.uk>
2021-12-21 10:04:33 +11:00
Hwurzburg a18a4e5719 AP_RCTelemetry: add RC option to report CRSF LQ as RSSI
Co-author: Jules Gilson <julesgilson@yahoo.co.uk>
2021-12-21 10:04:33 +11:00
Hwurzburg eaa557106a AP_RCProtocol: add RC option to report CRSF LQ as RSSI
Co-author: Jules Gilson <julesgilson@yahoo.co.uk>
2021-12-21 10:04:33 +11:00
RickReeser d95c997606 AC_PosControl: fix comment
In ArduCopter/mode.cpp, ignore_descent_limit is FALSE unless landing:

        // do not ignore limits until we have slowed down for landing
        ignore_descent_limit = (MAX(g2.land_alt_low,100) > get_alt_above_ground_cm()) || copter.ap.land_complete_maybe;
2021-12-21 07:41:47 +09:00
Iampete1 3606022cd7 AP_Scripting: add MiniCheetah CAN motor driver example 2021-12-21 08:51:22 +11:00
Peter Barker f6fa676411 AP_AIS: correct number of bytes to read from device 2021-12-20 18:39:01 +09:00
bugobliterator 62945e1d85 AP_HAL_ChibiOS: use common directory reference wrt hwdef scripts 2021-12-20 12:47:25 +11:00
Paul Riseborough 5178f4a7d0 AP_NavEKF3: Add missing covariance row reset 2021-12-20 09:28:37 +11:00
Oliver 80c7c9f16a AP_PiccoloCAN: Bug fix for ESC temperature data
- Fixes issues with temperature data in telemetry and logs
- Use the maximum of available temperature values for the ESC (where available)
2021-12-19 10:50:37 +11:00
Peter Barker a281c3ef91 AP_HAL_ChibiOS: remove stray 'No Crash Detected' diagnostic 2021-12-19 10:48:44 +11:00
Peter Barker bdeec0868e AP_HAL_ChibiOS: turn wind-compensation off in hwdef defaults 2021-12-19 10:45:16 +11:00
Peter Barker 5ff410f2cb AP_Baro: turn wind-compensation off using hwdef defaults 2021-12-19 10:45:16 +11:00
Peter Barker c6734ad825 AP_InertialSensor: correct logging of inertial-sensor reg-change logging 2021-12-18 21:25:27 +11:00
bugobliterator f0073e472b HAL_ChibiOS: set SWD pins pulled up and low by default 2021-12-17 22:51:18 -08:00
Shiv Tyagi c34301d925 AP_BattMonitor: remove MPPT_PacketDigital from Type enum
we have removed AP_BattMonitor_MPPT_PacketDigital, hence this should be removed too
2021-12-17 20:24:25 +09:00
Shiv Tyagi 814e0f9cac AP_Arming: remove Driver_Type_MPPT_PacketDigital from CAN checks
we have removed AP_BattMonitor_MPPT_PacketDigital, hence this should be removed too
2021-12-17 20:24:25 +09:00
Shiv Tyagi b2073e4e1c AP_HAL_ChibiOS: remove stray define HAL_PERIPH_ENABLE_BATTERY_MPPT_PACKETDIGITAL
We have removed the class AP_BattMonitor_MPPT_PacketDigital, hence this should be removed too
2021-12-17 20:24:25 +09:00
Shiv Tyagi d846a81055 AP_CANManager: remove MPPT_PacketDigital parameter description
We have removed the class AP_BattMonitor_MPPT_PacketDigital, we should also remove these from parameter descriptions and enums
2021-12-17 20:24:25 +09:00
Shiv Tyagi ef5b43ca95 AP_Baro_KellerLD : add SensorMode enum and _p_mode property
This adds SensorMode enum and _p_mode property which is used to set _p_mode_offset

Co-Authored-By: Josh Henderson <69225461+hendjoshsr71@users.noreply.github.com>
Co-Authored-By: ES-Alexander <25898329+ES-Alexander@users.noreply.github.com>
2021-12-17 11:58:19 +11:00
Shiv Tyagi dd00fd720d AP_Baro_KellerLD : set/update _p_mode_offset based on _p_mode
This initialises/updates _p_mode_offset on the basis of _p_mode

Co-Authored-By: Josh Henderson <69225461+hendjoshsr71@users.noreply.github.com>
Co-Authored-By: ES-Alexander <25898329+ES-Alexander@users.noreply.github.com>
2021-12-17 11:58:19 +11:00
Jaaaky 6cae738ab8 StorageManager: fix write_block() comment 2021-12-17 09:53:47 +09:00
Tom Pittenger e48adbf1c0 AP_ADSB: post link to uAvionix UCP protocol 2021-12-17 09:53:02 +09:00
Peter Barker 0cb4425eb9 AP_NavEKF3: fix type, 'willbe' -> 'will be' 2021-12-17 09:44:57 +09:00
Peter Barker 1886b2dccd AP_NavEKF2: fix type, 'willbe' -> 'will be' 2021-12-17 09:44:57 +09:00
QioTek e5a8695640 AP_InertialSensor: added support for ICM-20608-D sensor 2021-12-17 07:58:48 +11:00
Leonard Hall b7801947af AC_PID: AC_PID_2D: let I term change direction but not grow when limited 2021-12-16 09:54:49 +09:00
Leonard Hall 90db81354b AC_AttitudeControl: AC_PosControl: Prioritize crosstrack acceleration 2021-12-16 09:54:49 +09:00
Leonard Hall 1e124ca957 AP_Math: Control: Add directional based acceleration limit
AP_Math: Control: Add directional based acceleration limit
2021-12-16 09:54:49 +09:00
Shiv Tyagi b34a7e46a8 AP_BatteryMonitor: remove AP_BattMonitor_MPPT_PacketDigital class
since latest versions of PacketDigital MPPT support UAVCAN, we can remove this older class
2021-12-16 09:39:43 +09:00
Samuel Tabor 719aa4bc53 AP_Soaring: Add speed-to-fly calculation used if SOAR_CRSE_ARSPD<0. 2021-12-16 07:12:24 +11:00
Samuel Tabor c44fed34d4 AP_Soaring: Override airspeed and flap angle. 2021-12-16 07:12:24 +11:00
Samuel Tabor 3ab9dda6f5 AP_Soaring: Store reference to glide polar params in variometer 2021-12-16 07:12:24 +11:00
Peter Barker 508d7df739 AP_SerialManager: remove duplication of SERIALn_PROTOCOL values
... and SERIALn_BAUD while we're at it
2021-12-16 07:11:33 +11:00
bugobliterator 957da68da5 AP_Compass: fix compilation issue with declaring var after goto 2021-12-15 22:11:10 +11:00
Peter Barker 2205b95c99 AP_Math: create double versions of is_zero, is_positive and is_negative
Seeks to prevent

Thread 1 "ardurover" received signal SIGFPE, Arithmetic exception.
is_positive<double> (fVal1=9.6315720352771873e+44)
    at ../../libraries/AP_Math/AP_Math.h:66
66          return (static_cast<float>(fVal1) >= FLT_EPSILON);
2021-12-15 19:33:55 +11:00
yaapu c6c285b5a2 AP_Frsky_Telem: added frame 0x500D for waypoint data 2021-12-15 18:15:47 +11:00
Andrew Tridgell 32d846520c SRV_Channel: validate function number before array access
this fixes an issue with invalid SERVOn_FUNCTION values for array
index.
2021-12-15 18:10:45 +11:00
Bill Geyer afaff18bd0 AP_Motors: modifications based on suggested changes 2021-12-14 22:50:05 -05:00
Bill Geyer a8d74c6414 AP_Motors: Tradheli- add governor engaged message over GCS 2021-12-14 22:50:05 -05:00
Bill Geyer 2ac157b188 AP_Motors: Tradheli- fix governor spool up bug 2021-12-14 22:50:05 -05:00
MidwestAire 22c2329063 AP_Motors:Heli_RSC - throttle curve _control_output does not need a constrain_float
- change lower limit of governor enaged output to 150% of idle speed
- add governor_reset() function
- remove governor defaults from header
- rearrange governor metadata in alphabetical order, assign new eeprom slot for rpm
2021-12-14 22:50:05 -05:00
MidwestAire 77f0fdf112 AP_Motors:clean up whitespace in heli motors class 2021-12-14 22:50:05 -05:00
Bill Geyer ea90217e09 AP_Motors: fix heli RSC parameter indices 2021-12-14 22:50:05 -05:00
Bill Geyer 05e8285f93 AP_Motors: use RPM singleton to get rpm in RSC 2021-12-14 22:50:05 -05:00
MidwestAire 301238fb8a AP_Motors:Heli_RSC - update governor to new torque integrating design with autothrottle 2021-12-14 22:50:05 -05:00
MidwestAire 42a131522b AP_Motors:Heli - new rotor speed control modes for autothrottle governor 2021-12-14 22:50:05 -05:00
Stephen Dade 68ca18329c AP_HAL: Add UART option to not override streamrates 2021-12-15 14:14:07 +11:00
Stephen Dade fb5ac63a63 AP_HAL_ChibiOS: Fix get_options() to use uint16_t 2021-12-15 14:14:07 +11:00
Stephen Dade 42c584a377 AP_SerialManager: Add UART option to not override streamrates 2021-12-15 14:14:07 +11:00
Stephen Dade 038ae432ab GCS_MAVLink: Add UART option to not override streamrates 2021-12-15 14:14:07 +11:00
Randy Mackay 09388b7408 AP_Math: minor comment fix 2021-12-15 11:58:23 +09:00
Peter Barker 1c18b27427 AP_Button: use CopyValuesFrom to avoid duplication 2021-12-15 09:54:06 +11:00
Hwurzburg b95d3df7ab AP_RangeFinder: change UAVCAN to DroneCAN in param metadata 2021-12-15 09:53:21 +11:00
Hwurzburg 84d0cdb5d0 AP_OpticalFlow: change UAVCAN to DroneCAN in param metadata 2021-12-15 09:53:21 +11:00
Hwurzburg 7ec7a9c444 AP_Notify: change UAVCAN to DroneCAN in param metadata 2021-12-15 09:53:21 +11:00
Hwurzburg 2f493f08b4 AP_Gripper: change UAVCAN to DroneCAN in param metadata 2021-12-15 09:53:21 +11:00
Hwurzburg 35cc90d117 AP_GPS: change UAVCAN in metadata to DroneCAN 2021-12-15 09:53:21 +11:00
Hwurzburg 8ddb12d9cb AP_Compass: change UAVCAN in metadata to DroneCAN 2021-12-15 09:53:21 +11:00
Hwurzburg 71f8a1f25e AP_CANManager: change UAVCAN in metadata to DroneCAN 2021-12-15 09:53:21 +11:00
Hwurzburg 38e8e15200 AP_BattMonitor: change UAVCAN in metadata to DroneCAN 2021-12-15 09:53:21 +11:00
Hwurzburg 7c6816ec70 AP_Airspeed: change UAVCAN in metadata to DroneCAN 2021-12-15 09:53:21 +11:00
Andrew Tridgell 9e86629800 AP_Arming: log @SYS/storage.bin
this allows for reproduction of tricky issues involving the exact data
in storage
2021-12-15 08:01:38 +11:00
Andrew Tridgell 045daaf191 AP_Logger: speed up logging of crash_dump.bin
dump 450k crash log in about 1 minute
2021-12-15 08:01:38 +11:00
Andrew Tridgell 6f34fa7919 AP_Logger: allow for logged files over 32k in size
crash_dump.bin can be large
2021-12-15 08:01:38 +11:00
Andrew Tridgell a8eed76f61 AP_Arming: log @SYS/crash_dump.bin 2021-12-15 08:01:38 +11:00
Stephen Dade c49fd7e908 GCS_MAVLink: Don't start with MAVLink1 messages on a MAVLink2 connection 2021-12-14 12:20:07 +09:00
Peter Barker 7cbe48d1f6 hwdef: fix CubeOrange-periph-heavy build 2021-12-14 14:11:35 +11:00
Iampete1 9cace37b03 AHRS: RATE log: add missing ff terms 2021-12-14 10:14:28 +09:00
QioTek 586c2064a6 AP_InertialSensor: added support for IIM-42652 and ICM-40605 sensors
handle new Invensense v3 sensor types
2021-12-14 11:38:36 +11:00
Peter Barker 7b90326888 AP_Vehicle: declare get_control_output only if scripting is enabled
It's right there in the comments - this should only be defined if
scripting is enabled.

Rover overrides this but that is protected by AP_SCRIPTING_ENABLED.
2021-12-14 11:38:06 +11:00
Peter Barker 7c126b1e7b SRV_Channel: make function an Enum16 2021-12-14 11:28:33 +11:00
Peter Barker b1cff2d3f5 AP_Param: add AP_Enum16 for AP_Int16 enumerated values 2021-12-14 11:28:33 +11:00
Peter Barker 31dd17a743 AP_Compass: avoid loaded-value checks in case of HAL_USE_EMPTY_STORAGE 2021-12-14 11:13:28 +11:00
Peter Barker 15ec2c9c40 AP_NavEKF3: allow boards to override NavEKF3 features 2021-12-14 11:12:50 +11:00
Josh Henderson d79a9b7497 AP_BattMonitor: use SOC 127 as an invalid SOC flag 2021-12-14 09:11:48 +09:00
Peter Barker f461605d88 GCS_MAVLink: make logging dependent on HAL_LOGGING_ENABLED not HAL_BUILD_AP_PERIPH 2021-12-14 10:34:06 +11:00
Peter Barker 8973dfa8e0 AP_RangeFinder: use HAL_LOGGING_ENABLED in place of HAL_BUILD_AP_PERIPH 2021-12-14 10:34:06 +11:00
Peter Barker 70d98336bc AP_BattMonitor: make logging dependent on HAL_LOGGING_ENABLED not HAL_BUILD_AP_PERIPH
We have logging on some periphs now
2021-12-14 10:34:06 +11:00
Andrew Tridgell ee7464140a HAL_ChibiOS: avoid re-writing hwdef.h if unchanged
this makes dependency handling faster
2021-12-14 09:37:17 +11:00
Andrew Tridgell 0e5beb423e HAL_ChibiOS: sort shared dma mask
this prevents an unnecessary change in hwdef.h on reconfigure
2021-12-14 09:37:17 +11:00
Peter Barker fbe46f400f AP_HAL_SITL: stop passing home_str to _sitl_setup
This is poked into the model now
2021-12-13 09:30:33 +11:00
Peter Barker 2f77fef10e AP_HAL_SITL: permit float-equal while we do comparison vs INFINITY 2021-12-13 08:38:17 +11:00
hfujikawa77 1f1c3796c1 AP_Button: fix RCx_OPTION value in source comment 2021-12-12 21:03:57 +11:00
murata 23253d0d26 AP_L1_Control: Simplify the decision process by initializing the stack variables 2021-12-11 12:27:40 -08:00
Peter Barker 497e6df326 SITL: correct submarine rangefinding 2021-12-11 20:10:10 +11:00
Peter Barker 6fcf724b67 SITL: tidy range calculations
Also return INFINITY if the rangefinder can't see the ground
2021-12-11 20:10:10 +11:00
Peter Barker acbe567202 AP_HAL_SITL: consolidate rangefinder range calculations 2021-12-11 20:10:10 +11:00
Hwurzburg 83d3aace44 RC_Channel: correct Rover metadata 2021-12-11 09:55:30 +11:00
Andrew Tridgell c9b35ccfc8 hwdef: enable ESC telem on CarbonixL496 2021-12-10 08:11:24 -08:00
Andrew Tridgell 5e43370e35 SRV_Channel: added get_motor_num()
map back from a channel to a motor number, for ESC telemetry reporting
2021-12-10 08:11:24 -08:00
Andrew Tridgell 604f2430f8 AP_BLHeli: allow for no uart in update() 2021-12-10 08:11:24 -08:00
Andrew Tridgell 9359f39e30 SRV_Channel: allow for AP_Periph ESC telemetry 2021-12-10 08:11:24 -08:00
Andrew Tridgell 9da03668ae AP_ESC_Telem: allow build with AP_Periph 2021-12-10 08:11:24 -08:00
Andrew Tridgell c6bde6745a SRV_Channel: allow BLHeli build with AP_Periph 2021-12-10 08:11:24 -08:00
Andrew Tridgell 778de59fff AP_BLHeli: allow build as part of AP_Periph 2021-12-10 08:11:24 -08:00
Peter Barker 522b12135f AP_Common: correct UINT32_VALUE 2021-12-10 08:07:43 -08:00
Peter Barker 06c58bc476 AP_SerialManager: remove unused extern bool reference
This isn't used - or even defined.
2021-12-10 19:40:04 +09:00
Peter Barker 69f4b25f81 AP_AHRS: mark type column in ORGN as instance 2021-12-08 08:31:21 +09:00
Randy Mackay d0747c5f20 GCS_MAVLink: battery status reports fault bitmask 2021-12-07 02:12:06 -08:00
Randy Mackay dea7e969bd AP_BattMonitor_UAVCAN: re-format text based fault reporting and add get_mavlink_fault_bitmask 2021-12-07 02:12:06 -08:00
Tom Pittenger 1724d4911d AP_BattMonitor: add UAVCAN MPPT PacketDigital driver 2021-12-07 02:12:06 -08:00
Andrew Tridgell 639447142a APM_Control: use EKF yaw bias to correct fixed wing yaw damper 2021-12-07 17:05:54 +11:00
Andrew Tridgell 304b7df8c2 AP_AHRS: make the EKF accel bias accessible
needed for fixed wing yaw damper
2021-12-07 17:05:54 +11:00
Peter Barker 6e8c7c6b03 AP_HAL_SITL: remove unused mag-data delay buffer state variables
This delay buffer code is now in AP_Compass_SITL
2021-12-07 16:41:11 +11:00
Leonard Hall 30ddc4e06c AC_WPNav: Support error input to kinematic shaper 2021-12-07 09:47:42 +09:00
Leonard Hall 9017ac6723 AC_AttitudeControl: AC_PosControl: Support error input to kinematic shaper 2021-12-07 09:47:42 +09:00
Leonard Hall 718c094293 AP_Math: Control: Adjust limit handling to improve corners 2021-12-07 09:47:42 +09:00
Peter Barker 66d8be825f AP_Logger: move LogOriginType into AP_AHRS
only used to log the origins by the AHRS library
2021-12-07 11:31:44 +11:00
Peter Barker 1dd34d87e7 AP_AHRS: move LogOriginType into AP_AHRS
only used to log the origins by the AHRS library
2021-12-07 11:31:44 +11:00
Andrew Tridgell fe7e2ed657 AP_Scripting: added throttle and height controller to aerobatic example
changed rolling circle to take the radius and number of
circles. negative radius for negative yaw rate and negative number of
circles for left roll
2021-12-07 10:33:13 +11:00
Andrew Tridgell 140adc126a AP_Scripting: expand to 6 SCR_USER parameters 2021-12-07 10:33:13 +11:00
Andrew Tridgell 67649fe17d hwdef: added CarbonixL496 AP_Periph node 2021-12-07 10:23:54 +11:00
Andrew Tridgell c5fc2fa709 HAL_ChibiOS: enable DShot on L4 MCUs for AP_Periph 2021-12-07 10:23:54 +11:00
Andrew Tridgell fbadc24fca HAL_ChibiOS: support 12MHz crystal on L4xx MCUs 2021-12-07 10:23:54 +11:00
Hwurzburg d132f0f3fb AP_Vehicle: clean up short failsafe 2021-12-07 10:09:33 +11:00
Peter Barker d72d0578a3 AP_Scripting: correct compilation when HAL_LOGGER_FILE_CONTENTS_ENABLED is 0 2021-12-07 09:36:48 +11:00
Peter Barker cce14d8461 AP_HAL_SITL: remove unused _home_str member 2021-12-07 09:36:22 +11:00
Andrew Tridgell 9e5fcb4ced AP_UAVCAN: removed old vendor DSDL and add README.md
this DSDL is in https://github.com/DroneCAN/DSDL now
2021-12-06 20:17:02 +11:00
Andrew Tridgell 5afe055a46 AP_UAVCAN: use soft armed state for DroneCAN ARMING_STATUS
this fixes motortest on quadplanes, so that ESCs see an armed state
during the test
2021-12-06 20:16:23 +11:00
Peter Barker bedacac816 AP_Torqeedo: simplify conversion of master error code into string 2021-12-06 14:50:15 +11:00
Randy Mackay 6f98c26b67 AP_Torqeedo: display master error code 2021-12-06 14:50:15 +11:00
Bill Geyer 3b40df133e AP_Motors: add spool down complete flag 2021-12-05 22:12:13 -05:00
Peter Barker 8cc7f51de1 AP_HAL_SITL: tidy set/get of hw RTC 2021-12-06 12:58:43 +11:00
Peter Barker d8e4669e07 AP_HAL_Linux: tidy set/get of hw RTC 2021-12-06 12:58:43 +11:00
Peter Barker f50d48f005 AP_HAL: tidy set/get of hw RTC 2021-12-06 12:58:43 +11:00
Andrew Tridgell 0944c24978 SITL: revert compass parameter changes 2021-12-04 16:51:53 +11:00
Andrew Tridgell 468444bef9 AP_NavEKF3: revert compass parameter changes 2021-12-04 16:51:53 +11:00
Andrew Tridgell efc78359d7 AP_NavEKF2: revert compass parameter changes 2021-12-04 16:51:53 +11:00
Andrew Tridgell 0d12fa7937 AP_HAL_ESP32: revert compass parameter changes 2021-12-04 16:51:53 +11:00
Andrew Tridgell 2c2369bf03 AP_HAL_ChibiOS: revert compass parameter changes 2021-12-04 16:51:53 +11:00
Andrew Tridgell 8eb40bafc5 AP_Compass: revert compass parameter changes 2021-12-04 16:51:53 +11:00
Andrew Tridgell 7ab343dd66 AP_RangeFinder: fixed support for multiple Benewake_CAN CAN lidars 2021-12-04 16:31:35 +11:00
Peter Barker 308f4e99b4 AP_NavEKF3: correct structure used for logging
XKF4 and XKF5 are clones of NKF4 and NKF5, which is why this worked
2021-12-03 15:34:21 +09:00
Randy Mackay ec6ea03b80 AP_HAL_ChibiOS: update CubeBlack-pinout image
CAN1 and CAN2 port labels have been swapped
2021-12-03 13:49:20 +09:00
Rishabh 6dea779b1e AP_Proximity: Add Cygbot D1 2021-12-03 08:02:50 +09:00
Andrew Tridgell 05ec2be62b hwdef: updated KakuteH7 battery scale defaults
thanks to Vincent at Holybro
2021-12-02 18:17:49 +11:00
Iampete1 7ad1886667 AP_Compass: reinstate MOTCT underscore 2021-12-02 12:27:09 +11:00
Iampete1 bf21ce8af6 AP_Compass: add new line after old param metadata 2021-12-02 12:27:09 +11:00
Andrew Tridgell 0554fb2d4f RC_Channel: added QRTL mode on a switch 2021-12-02 08:29:07 +11:00
Shiv Tyagi 339a07b8d3 AP_Devo_Telem: compile out devo telemetry
Devo telemetry is one of the most rarely used features (almost never used since added) we should compile it out from our code
2021-12-01 19:16:44 +11:00
Andy Piper 5224468ec6 AP_RCProtocol: process CRSF crc per-byte 2021-12-01 19:04:19 +11:00
bugobliterator f9bb9b4fc0 AP_HAL_ChibiOS: log heap and bss memory regions if enough space 2021-12-01 18:17:50 +11:00
bugobliterator 3855767ff2 AP_FileSystem: mention of HAL_CRASH_DUMP_FLASHPAGE not required 2021-12-01 18:17:50 +11:00
bugobliterator 4efe75683a HAL_ChibiOS: mention of HAL_CRASH_DUMP_FLASHPAGE not required 2021-12-01 18:17:50 +11:00
bugobliterator 878940292d HAL_ChibiOS: no need to mention END reserve for Crash Dump anymore 2021-12-01 18:17:50 +11:00
bugobliterator ee35350129 HAL_ChibiOS: setup for recording crashdump at the remaining flash space 2021-12-01 18:17:50 +11:00
bugobliterator 52c7886270 HAL_ChibiOS: fix issue with failing to write final buffer 2021-12-01 18:17:50 +11:00
bugobliterator eae3fb016f HAL_ChibiOS: dump per thread stack for crash 2021-12-01 18:17:50 +11:00
bugobliterator f02a7b560b AP_HAL_ChibiOS: update last_crash_dump api 2021-12-01 18:17:50 +11:00
bugobliterator 0c69ebc50e AP_HAL: update last_crash_dump api 2021-12-01 18:17:50 +11:00
bugobliterator b1e25ec4fd AP_Filesystem: fetch crash_log directly rather than via buffer 2021-12-01 18:17:50 +11:00
Andrew Tridgell 312a6461b6 HAL_ChibiOS: enable UART7 on Swan-K1
useful extra UART for debug
2021-12-01 18:08:54 +11:00
Andrew Tridgell 06ef5aed14 AP_Scripting: added an example of OOP programming
very useful pattern for more complex scripts
2021-12-01 17:40:34 +11:00
Randy Mackay 4096a70a1f AP_Math: update_pos_vel_accel methods accept limit as const reference
also update some comments
2021-12-01 12:45:46 +09:00
Randy Mackay f6e6ca197f Location: get_vector_from_origin gets units comment 2021-12-01 09:03:40 +09:00
Randy Mackay a3886be920 AC_PosControl: minor formatting fix 2021-12-01 08:54:34 +09:00
Randy Mackay 3a492c8e3c AR_WPNav: minor comment improvement 2021-12-01 08:54:18 +09:00
Peter Barker 56b0f8b218 AC_Fence: void index when overwriting fence count on fencepoint-close 2021-11-30 20:50:32 +11:00
Andrew Tridgell 8a95a7d80d AC_Fence: fixed fence count for old upload
when uploading a fence that is smaller than an old fence we were not
correctly setting the inclusion fence size.
2021-11-30 20:50:32 +11:00
Peter Barker af92c9679f AC_Fence: make invalid polygon vertex count clearer 2021-11-30 20:50:32 +11:00
Andrew Tridgell c83da810da APM_Control: tweaks from review feedback 2021-11-30 16:19:26 +11:00
Andrew Tridgell d52f5a9034 AP_Scripting: added rolling circle to aerobatics example 2021-11-30 16:19:26 +11:00
Andrew Tridgell ab333d0708 Ap_Scripting: added earth frame yaw tracking off WPs
this uses the new yaw rate controller to do EF tracking, so we follow
towards the next WP while doing the roll
2021-11-30 16:19:26 +11:00
Andrew Tridgell 3a3cb92efd Ap_Scripting: fixed plane aerobatics for full yaw rate control 2021-11-30 16:19:26 +11:00
Andrew Tridgell 81d20ae49d APM_Control: support yaw rate controller autotune 2021-11-30 16:19:26 +11:00
Andrew Tridgell 6685ce0527 APM_Control: added yaw rate controller for fixed wing
enabled with YAW_RATE_ENABLE parameter
2021-11-30 16:19:26 +11:00
Andrew Tridgell 5a996f308b APM_Control: fixed code style of plane rate controllers 2021-11-30 16:19:26 +11:00
Peter Barker 99b1659e4b AP_Math: memcpy nanfs rather than iteratively setting them 2021-11-30 10:35:38 +11:00
Peter Barker b32b31aecd SRV_Channel: correct casting of servo function number 2021-11-30 10:32:16 +11:00
Andrew Tridgell 724301ea53 APM_Control: make 2nd reduction of P smaller
this prevents severe P reductions when we get a small oscillation
glitch after we've already got the primary P gain
2021-11-30 10:31:34 +11:00
Josh Henderson 34b3b7999e CubeYellow: define HAL_CHIBIOS_ARCH_CUBE 2021-11-30 10:20:54 +11:00
Josh Henderson 188c3a781e CubeSolo: define HAL_CHIBIOS_ARCH_CUBE 2021-11-30 10:20:54 +11:00
Josh Henderson e78edac2a0 CubePurple: define HAL_CHIBIOS_ARCH_CUBE 2021-11-30 10:20:54 +11:00
Josh Henderson b37c214f28 CubeOrange: define HAL_CHIBIOS_ARCH_CUBE 2021-11-30 10:20:54 +11:00
Josh Henderson db3be4d07c CubeBlack: define HAL_CHIBIOS_ARCH_CUBE 2021-11-30 10:20:54 +11:00
Josh Henderson 27bcec9d6e AP_InertialSensor: for all Cubes ensure use of non-isolated IMU 2021-11-30 10:20:54 +11:00
Josh Henderson a89f58a775 AP_NavEKF3: allow define for IMU_MASK_DEFAULT 2021-11-30 10:20:54 +11:00
Josh Henderson 9f2082496c AP_NavEKF2: allow define for IMU_MASK_DEFAULT 2021-11-30 10:20:54 +11:00
Josh Henderson c7b986f30a CubeYellow: set default EKF_IMU_MASK 2021-11-30 10:20:54 +11:00
Josh Henderson b8411c22c5 CubeOrange: set default EKF_IMU_MASK 2021-11-30 10:20:54 +11:00
Peter Barker a4b3c7eb46 AP_Terrain: cast result of labs to unsigned
Fixes:

../../libraries/AP_Terrain/TerrainGCS.cpp: In member function ‘void AP_Terrain::
handle_terrain_data(const mavlink_message_t&)’:
../../libraries/AP_Terrain/AP_Terrain.h:65:55: error: comparison between signed
and unsigned integer expressions [-Werror=sign-compare]
 #define TERRAIN_LATLON_EQUAL(v1, v2) (labs((v1)-(v2)) <= unsigned(margin.get()*
100))
                                       ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
~~~~
../../libraries/AP_Terrain/AP_Terrain.h:65:55: note: in definition of macro ‘TER
RAIN_LATLON_EQUAL’
 #define TERRAIN_LATLON_EQUAL(v1, v2) (labs((v1)-(v2)) <= unsigned(margin.get()*
100))
                                                       ^~
compilation terminated due to -Wfatal-errors.
cc1plus: some warnings being treated as errors

In file included from ../../libraries/AP_Terrain/TerrainUtil.cpp:24:0:
../../libraries/AP_Terrain/TerrainUtil.cpp: In member function ‘AP_Terrain::grid
_cache& AP_Terrain::find_grid_cache(const AP_Terrain::grid_info&)’:
../../libraries/AP_Terrain/AP_Terrain.h:65:55: error: comparison between signed
and unsigned integer expressions [-Werror=sign-compare]
 #define TERRAIN_LATLON_EQUAL(v1, v2) (labs((v1)-(v2)) <= unsigned(margin.get()*
100))
                                       ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
~~~~

The return value of labs is signed
2021-11-30 10:16:01 +11:00
Iampete1 e24c90a871 AP_Compass: reinstate old param descriptions 2021-11-30 08:14:43 +09:00
Iampete1 6ba87dfe9a AP_Compass: add param conversion 2021-11-30 08:14:43 +09:00
Iampete1 e818decc39 AP_NavEKF3: update compass param discription 2021-11-30 08:14:43 +09:00
Iampete1 4303b61f94 AP_NavEKF2: update compass param discription 2021-11-30 08:14:43 +09:00
Iampete1 95713959ec SITL: exmaples: use new compass params 2021-11-30 08:14:43 +09:00
Iampete1 ab9609022b AP_HAL_ESP32: use new compass param names 2021-11-30 08:14:43 +09:00
Iampete1 0c519db602 hwdef: use new compass param names in defualts.parm 2021-11-30 08:14:43 +09:00
Iampete1 2fa2e70e7e AP_Compass: SITL: use new scale param 2021-11-30 08:14:43 +09:00
Iampete1 071ff39ff8 AP_Compass: move instance params to shared table 2021-11-30 08:14:43 +09:00