Commit Graph

30855 Commits

Author SHA1 Message Date
Andy Piper c815f04e97 AP_RCProtocol: add has_uart() 2022-10-18 11:20:25 +11:00
Peter Barker f75f68c2f1 GCS_MAVLink: add AP_MAVLINK_BATTERY2_ENABLED define
on by default but can be turned off in next stable
2022-10-18 11:12:49 +11:00
Leonardo Garcia 72c6977ea5 AP_InertialSensor: Fix BMI085 accel scaling
Original BMI088 has 24G range so it was hardcoded for *scale* within
read_fifo_accel. Added a class variable accel_range which is assigned
the correct value when the sensor type is received (16.0 or 24.0).
2022-10-18 11:03:34 +11:00
Peter Barker 6c3f9f9778 GCS_MAVLink: fix set-default-rate of a message we don't send by default
this fixes a problem where a GCS must know that a message isn't sent by default if they want to set it back to its default rate
2022-10-18 10:11:00 +11:00
Michael du Breuil 6b0dd7e689 AP_GPS: Fix novatel driver to handle DOP correctly, and fix overly optimistic horizontal accuracy estimate 2022-10-18 10:06:46 +11:00
Tom Pittenger 812128125b AP_BattMonitor: add set_temperature() by external temperature sources/libraries 2022-10-18 10:05:31 +11:00
Tom Pittenger 89bcd65603 AP_ESC_Telem: allow external libraries, like AP_TemperatureSensor, to override the temperature 2022-10-18 10:05:31 +11:00
Tom Pittenger 475fb67c2b AP_TemperatureSensor: use AP_Enum<>, add sitl, add _config.h 2022-10-18 10:05:31 +11:00
Tom Pittenger 1205e26ace AP_TemperatureSensor: add Dummy methods so that Sub can use this feature by default but everything else not 2022-10-18 10:05:31 +11:00
Tom Pittenger b3a4219b06 hwdef: added new f303-TempSensor based on mRo f303 kitcan 2022-10-18 10:05:31 +11:00
Tom Pittenger e398579277 AP_TemperatureSensor: refactor for upcoming upgrades 2022-10-18 10:05:31 +11:00
Tom Pittenger 9ed192a371 AP_TemperatureSensor: add driver MCP9600 2022-10-18 10:05:31 +11:00
Tom Pittenger c4f7470cbc AP_TemperatureSensor: refactor for upcoming upgrades 2022-10-18 10:05:31 +11:00
Tom Pittenger 0ca53d5065 AP_TemperatureSensor: TSYS01 adapt to front/back end split
Co-authored-by: Joshua Henderson <hendjoshsr71@gmail.com>
2022-10-18 10:05:31 +11:00
Joshua Henderson 3fdf87a6c7 SITL: TSYS01 add sim temperature based on altitude 2022-10-18 10:05:31 +11:00
Tom Pittenger 1254e18fa9 AP_Vehicle: add AP_TemperatureSensor
Co-authored-by: Joshua Henderson <hendjoshsr71@gmail.com>
2022-10-18 10:05:31 +11:00
Iampete1 14a786bdfa AC_AttitudeControl: remove duplicate `_attitude_target.normalize()` 2022-10-18 08:30:46 +11:00
Andrew Tridgell d398e567a3 AP_AHRS: added ATSC logging
log scale factors for angle P scaling when not == 1.0
2022-10-18 07:38:39 +11:00
Andrew Tridgell bd1be3b41c AC_AttitudeControl: added single loop override of angle P gains
this is used by quadplanes in back-transiton to prevent oscillation
caused by driving the fixed wing controller too fast
2022-10-18 07:38:39 +11:00
Andrew Tridgell 01d006ebd1 APM_Control: added access to time constant 2022-10-18 07:38:39 +11:00
Iampete1 da0ee9a8cb AP_Scripting: set lua nullptr after delete 2022-10-17 08:29:53 +11:00
Andrew Tridgell 1c5c1a566f AP_RPM: fixed SITL RPM backend for new motor mask 2022-10-16 20:38:19 +11:00
Andrew Tridgell 1138f9e624 SITL: allow for extra actuators to be marked as motors 2022-10-16 20:38:19 +11:00
Andrew Tridgell dc3f6fe69d AP_ESC_TELEM: allow for non-continguous ESC telem motor sets
this fixes ESC telem for quadplanes with motors at 5-8 or 9-12
2022-10-16 20:38:19 +11:00
Andrew Tridgell 1871c6bef7 HAL_SITL: use motor mask for noise checking for motors 2022-10-16 20:38:19 +11:00
Andrew Tridgell c42acd553e AP_InertialSensor: use motor_mask from SITL for which outputs are motors
generate noise based on motor_mask
2022-10-16 20:38:19 +11:00
Andrew Tridgell ac2701b1bf AP_Vehicle: removed num_dynamic_notches limit in dynamic harmonic
use INS_MAX_NOTCHES instead, allowing for more ESCs to be added by lua
scripts
2022-10-16 20:38:19 +11:00
Andrew Tridgell 02c06167c1 Filter: allow for expansion of dynamic filters
this allows for the number of dynamic filters on a harmonic notch
filter to expand at runtime, which allows for ESC RPMs to be populated
from other than AP_Motors, such as with lua scripts or for fwd motors
in a SLT quadplane
2022-10-16 20:38:19 +11:00
Andrew Tridgell a0af08a3aa SITL switched to motor_mask for which actuators are motors
this allows for any output to be an ESC, which allows for proper
simulation of quadplanes with ESCs on outputs 5-8 or 9-12, for testing
notch filtering
2022-10-16 20:38:19 +11:00
Andrew Tridgell 4b8b2d8236 SITL: support playback of new GPS log format 2022-10-15 17:20:42 +11:00
Andrew Tridgell 6f805cb537 AP_GPS: fixed resolution of KSXT parsing for NMEA
needs to be double precision for lat/lon
2022-10-15 17:20:42 +11:00
Andrew Tridgell 4812b67ad6 AP_GPS: added logging to more serial GPS backends 2022-10-15 17:20:42 +11:00
Andrew Tridgell 5cd1aeaf38 AP_GPS: improve GPS debug logging
use timestamped data allowing for much more precise playback
2022-10-15 17:20:42 +11:00
Iampete1 bedbc0a65f AP_Button: print button index and postion on aux function trigger 2022-10-14 12:01:07 +11:00
Iampete1 6a4280429a RC_Channel: move aux pos string to function, print RC channel number with aux fun 2022-10-14 12:01:07 +11:00
Peter Barker 917878de76 AP_Notify: correct NTF_BUZZ_PIN documentation
The default is -1 - disabled - but we don't have that in the documentation...
2022-10-13 19:26:49 +11:00
bugobliterator 05f8e3c18d AP_InertialSensor: disable temperature based fifo check on ICM20602 2022-10-13 10:14:59 +11:00
Iampete1 c801f12a78 AP_Scripting: applets: add Hexsoon LEDs script 2022-10-12 19:04:30 +11:00
Henry Wurzburg 65a1b0cb56 AP_HAL_ChibiOS:add back displayport for KakuteF7
Co-authored-by: Peter Barker <pb-gh@barker.dropbear.id.au>
2022-10-12 18:48:31 +11:00
bugobliterator 4d2b7bb7c9 AP_HAL_ChibiOS: add CubePilot CAN Module hwdef 2022-10-12 18:28:52 +11:00
bugobliterator a669b2ef3e AP_HAL_ChibiOS: fix typo in CubeOrangePlus hwdef 2022-10-12 18:28:52 +11:00
Andrew Tridgell 938df192fa AP_Scripting: added rc:get_aux_cached() example 2022-10-11 11:47:04 +11:00
Andrew Tridgell ac1be8b500 AP_Scripting: added get_aux_cached() RC binding 2022-10-11 11:47:04 +11:00
Andrew Tridgell ff4478a4d9 RC_Channel: added cache of aux functions for scripting
allows for scripting to act on aux functions
2022-10-11 11:47:04 +11:00
Andrew Tridgell 9d42f49ac8 AP_Common: added setonoff() method for bitmask 2022-10-11 11:47:04 +11:00
Andrew Tridgell 19fd2d0b88 AP_Scripting: added relay get() binding 2022-10-11 11:47:04 +11:00
Andrew Tridgell e7aa868669 AP_Relay: added get() method for scripting 2022-10-11 11:47:04 +11:00
Tom Pittenger af56837752 AP_HAL_ChibiOS: add support for SLCAN to CubeOrange-periph, enabled by default 2022-10-11 11:26:40 +11:00
Tom Pittenger d238a542ed AP_CANManager: allow SLCAN to be initialized without CANManager
Co-authored-by: bugoblitorater <siddharthbharatpurohit@gmail.com>
2022-10-11 11:26:40 +11:00
Tom Pittenger 9103140aa5 AP_HAL_Chibios: fix periph-heavy build hwdef 2022-10-11 11:20:50 +11:00
Tom Pittenger a54d785df3 AP_Arming: wrap compass cal function calls with COMPASS_CAL_ENABLED 2022-10-11 11:20:50 +11:00
Henry Wurzburg 98551ff005 AP_HAL_ChibiOS: update defaults for KakuteH7 boards 2022-10-11 10:52:05 +11:00
Henry Wurzburg 1db7c92603 AP_HAL_ChibiOS:Add defaults for KakuteH7Mini-NAND 2022-10-11 10:52:05 +11:00
Peter Barker 5e7ae1213f AP_RangeFinder: remove sitl pointer from header
similar to what we do elsewhere, just grab the singleton in the cpp file rather than taking a pointer to it
2022-10-11 10:50:13 +11:00
Peter Barker 6be8d9cd06 SITL: remove unneeded circular rangfinder include 2022-10-11 10:50:13 +11:00
Peter Barker c06d0cda30 AP_UAVCAN: correct compilation with EFI dronecan not compiled in 2022-10-11 10:50:13 +11:00
Peter Barker d4a7ff1ccd AP_RPM: correct compilation when RPM_PIN disabled 2022-10-11 10:50:13 +11:00
Iampete1 3e8e846d1d AP_TECS: reset vdot filter if not been called 2022-10-11 10:41:25 +11:00
Peter Barker f24a8cd176 AP_Button: make emitting nice strings on aux functions a selectable feature 2022-10-11 10:23:19 +11:00
Peter Barker 8e7d87447c RC_Channel: make emitting nice strings on aux functions a selectable feature 2022-10-11 10:23:19 +11:00
Peter Barker 93db267204 AP_HAL_ChibiOS: make emitting nice strings on aux functions a selectable feature 2022-10-11 10:23:19 +11:00
Peter Barker 3f98e3aacb hwdef: use an include file for boards requiring generic feature minimization 2022-10-11 10:23:19 +11:00
Iampete1 93b1825414 RC_Channel: add method to check if override hads ever been recived 2022-10-09 16:02:13 +01:00
Andrew Tridgell cc4a7993bc AP_Airspeed: use DEVID to maintain lineup of CAN sensors
persist DEVID and use it to ensure that we keep the order of DroneCAN
sensors between boots. It still allows for a sensor to be swapped out
for a new one, while keeping slot of the one that hasn't been removed
2022-10-08 21:12:01 +11:00
Randy Mackay d612bb3089 RC_Channel: add winch enable to option param docs for Copter 2022-10-08 03:11:01 +09:00
Andrew Tridgell fdff3d57ac hwdef: removed unused AP_FEATURE_BRD_PWM_COUNT_PARAM 2022-10-07 11:38:15 +11:00
Andrew Tridgell fe88515889 AP_BoardConfig: fixed BRD_SAFETY_MASK
this was being omitted on most boards since we changed to
SERVOn_FUNCTION=-1 method for GPIO
2022-10-07 11:38:15 +11:00
davidsastresas 670a702ea0 AP_NMEA_Output.cpp: Fix conversion precision issue:
We were casting the location in integer 32 bits
to float, and making fabsf in float as well, so
we were losing precision translated in about 40 cm
minimum variation in position for the NMEA output.

Also, even if using double and fabsF, we were still
rounding up last 2 decimals, so now the logic is
done in degree * 10e7 to not loose precision and
then converted properly before building the string
2022-10-07 08:37:59 +11:00
Andrew Tridgell bcdf3d5d60 AP_ICEngine: report when engine goes into run state 2022-10-07 07:53:50 +11:00
Andrew Tridgell f7d5789b0e AP_Param: fixed handling of long lines in defaults.parm
lines longer than 100 bytes were causing the parsing to stop
2022-10-07 07:53:16 +11:00
Andrew Tridgell 1796cd5394 AP_Vehicle: check for motors being nullptr
this can happen with plane with Q_ENABLE=0
2022-10-06 21:28:55 +11:00
MatthewHampsey 8fb00f02f4 AP_Scripting: Added additional trajs, cuban eight 2022-10-06 15:55:45 +11:00
Randy Mackay 23878faaef AP_Scripting: winch-test example script 2022-10-06 14:39:28 +11:00
Randy Mackay cf461793d5 AP_Scripting: add winch docs 2022-10-06 14:39:28 +11:00
Randy Mackay 57f8a46339 AP_Scripting: add winch bindings 2022-10-06 14:39:28 +11:00
Andrew Tridgell 2faa0fd2f2 AP_Vehicle: implement 1M/2M warnings
encourage users to run the right firmware for their boards
2022-10-06 10:58:46 +11:00
Andrew Tridgell 861bd06034 hwdef: added warning messages about flash size 2022-10-06 10:58:46 +11:00
Andrew Tridgell 07f80c2442 HAL_ChibiOS: make check_limit_flash_1M() available in main firmware 2022-10-06 10:58:46 +11:00
Andrew Tridgell e5b46eb2a7 HAL_ChibiOS: fixed build error with gcc 11.3 2022-10-06 10:45:49 +11:00
Andrew Tridgell b5b1aee954 AP_Scripting: fixed use of clock and time in lua
not available on stm32
2022-10-06 10:45:49 +11:00
Andrew Tridgell 9f5f7e018e GCS_MAVLINK: fixed warning in ftp build with gcc 11.3 2022-10-06 10:45:49 +11:00
Andrew Tridgell d919a7f8f4 hwdef: reduce flash usage to allow build 2022-10-06 10:31:51 +11:00
Peter Barker dc85169cb1 AP_Compass: send report if we are in the BAD_RADIUS state 2022-10-06 10:31:09 +11:00
murata 272e719a14 SITL: Make the same process into a method 2022-10-06 08:42:13 +11:00
Peter Barker 05a638a639 AP_Compass: correct is_calibrating check
before this we only ever looked at the first backend
2022-10-06 08:21:03 +11:00
Peter Barker 75919171b7 AP_Compass: remove default clause from calibrator status switch
bad_radius should almost certainly be treated just like bad orientation
2022-10-06 08:21:03 +11:00
Peter Barker d6c5a0ab2b AP_Compass: correct compilation when COMPASS_MAX_INSTANCE>1 and no diagonals 2022-10-06 08:21:03 +11:00
Iampete1 4668e1b61e AP_InertialSensor: Logging: only log single notch frequency unless per-motor, never log fixed 2022-10-05 18:30:24 +11:00
Andy Piper ce481af167 AP_HAL: correct prescaler calculation and add testing debug.
use normalized bitwidths for neopixel.
make sure low prescaler values are allowed.
significantly tighten clocking prescaler tests
add assertions around expected prescaler values
2022-10-05 18:27:43 +11:00
jackhong12 4a4f361a17 all: use CLASS_NO_COPY() macro 2022-10-04 11:23:04 +11:00
Peter Barker 0f359c6a4e GCS_MAVLink: remove individual static members for fence, mission and rally 2022-10-04 11:17:35 +11:00
Peter Barker 61c4320e89 RC_Channel: add AP_GRIPPER_ENABLED 2022-10-04 10:58:34 +11:00
Peter Barker 9c7c29b2a7 GCS_MAVLink: add AP_GRIPPER_ENABLED 2022-10-04 10:58:34 +11:00
Peter Barker aea7b0a097 AP_Mission: add AP_GRIPPER_ENABLED 2022-10-04 10:58:34 +11:00
Peter Barker 0bd08a4a82 AP_HAL_ChibiOS: add AP_GRIPPER_ENABLED 2022-10-04 10:58:34 +11:00
Peter Barker a3be41c3b0 AP_Gripper: add AP_GRIPPER_ENABLED 2022-10-04 10:58:34 +11:00
Peter Barker 670a1dbdb1 hwdef: disable RPM on skyviper 2022-10-04 10:58:34 +11:00
Andrew Tridgell ad6bf648e9 AP_Scripting: ALT_OFFSET example for copter
this was requested by a user that has GCS function for setting
ALT_OFFSET for magnetometer surveys
2022-10-03 17:31:23 +11:00
Andrew Tridgell a14b77db74 hwdef: added MatekL431-GPS build
this sets up for DMA on GPS UARTs, disables unnecessary UARTs and SPI
and disables unnecessary sensor types

the changes make moving baseline GPS with two DroneCAN GPS modules on
MatekL431 much more reliable
2022-10-03 17:30:59 +11:00
Andy Piper cfdf6306ef AP_Logger: ensure that we don't read the same block more than once, dramatically increasing performance. 2022-10-03 07:52:43 +11:00
MatthewHampsey 10f355b05b AP_Scripting: Fix bug with local variable 2022-10-02 16:58:37 +11:00
MatthewHampsey 7dbc1690e9 AP_Scripting: Added extra argument node 2022-10-02 16:58:37 +11:00
MatthewHampsey 527b0e5ba9 AP_Math: Add comments to quaternion methods 2022-10-02 16:58:37 +11:00
MatthewHampsey 1dba013e4a AP_Scripting:Improve speed controller, various other fixes 2022-10-02 16:58:37 +11:00
Andrew Tridgell 6555682fa8 AP_Scripting: delay getting EFI backend
allow for AP_EFI startup after scripting
2022-10-02 08:15:06 +11:00
Andrew Tridgell c00c13d011 AP_Scripting: changed bindings to ap_object 2022-10-02 08:15:06 +11:00
Andrew Tridgell c3499f12c4 AP_Scripting: convert HFE driver to get_backend 2022-10-02 08:15:06 +11:00
Andrew Tridgell fed4909dd1 AP_EFI: convert to using ap_object approach 2022-10-02 08:15:06 +11:00
Andrew Tridgell 6e308814ad AP_Scripting: added mag_heading example 2022-10-02 08:15:06 +11:00
Andrew Tridgell 1f42453bb4 AP_Scripting: added EFI HFE driver 2022-10-02 08:15:06 +11:00
Andrew Tridgell 7f7b8893e3 AP_Scripting: added EFI_HFE tester 2022-10-02 08:15:06 +11:00
Andrew Tridgell 24b83135e0 AP_HAL: added id_signed for CANFrame
makes for more efficient lua processing
2022-10-02 08:15:06 +11:00
Andrew Tridgell acb18cf946 AP_Scripting: update bindings for new fields 2022-10-02 08:15:06 +11:00
Andrew Tridgell 698c25a060 AP_EFI: added more fields
fill in 3 remaining fields available in MAVLink
2022-10-02 08:15:06 +11:00
Andrew Tridgell b514f44b7a AP_Scripting: added EFI testing script 2022-10-02 08:15:06 +11:00
Andrew Tridgell a08c4b6761 AP_Scripting: added EFI_SkyPower driver 2022-10-02 08:15:06 +11:00
Andrew Tridgell fd52ff923d AP_EFI: removed array from cylinder_status
this array was never used and just makes doing drivers harder. Removed
to reduce complexity
2022-10-02 08:15:06 +11:00
Joshua Henderson f74ad276a9 AP_EFI: add EFI scripting driver 2022-10-02 08:15:06 +11:00
Andrew Tridgell d3c014ca35 AP_Scripting: update docs 2022-10-02 08:15:06 +11:00
Joshua Henderson d74081b22b AP_Scripting: add scripting EFI bindings 2022-10-02 08:15:06 +11:00
Joshua Henderson 996089dc2a AP_Vehicle: EFI increase loop rate to 50Hz 2022-10-02 08:15:06 +11:00
murata b90079bfa6 AP_Mount: Enable debugging outputs and variables in debug definitions 2022-10-01 09:05:05 +09:00
Andrew Tridgell 805e194b0b hwdef: disable compass cal for herePro
it doesn't work as diagonals and offdiagonals not available
2022-09-30 21:25:36 +10:00
Andrew Tridgell 0b9769e658 AP_Compass: removed diagonals and offdiagonals on AP_Periph 2022-09-30 21:25:36 +10:00
Andrew Tridgell af224dab1e AP_Compass: fixed AP_Periph compass
diagonals are no longer initialised to 1.0, which leaves us with zero
compass after matrix mul
2022-09-30 21:25:36 +10:00
Randy Mackay de3d763e36 AP_Mount: minor comment fix to has_pan_control 2022-09-30 15:17:29 +09:00
Randy Mackay 47e2be6e60 RC_Channel: add camera aux functions 2022-09-30 15:17:29 +09:00
Randy Mackay 2ffe692706 AP_Camera: add record video zoom and focus 2022-09-30 15:17:29 +09:00
Randy Mackay 8c5463ec78 AP_Mount: add Siyi gimbal driver 2022-09-30 15:17:29 +09:00
Randy Mackay 53905c5f35 AP_Mount: add camera controls 2022-09-30 15:17:29 +09:00
Andrew Tridgell 17d9018a91 AP_NavEKF3: fixed EKF3 origin alt inconsistency
always use common origin, and adjust output posD for difference
between public and local lane origin heights
2022-09-30 07:44:42 +10:00
Andrew Tridgell 3f4c5e243e AP_CANManager: disable SLCAN when armed
this disables SLCAN if enabled using CAN_SLCAN_CPORT and
SERIALn_PROTOCOL=22 when we are armed, to reduce load on the CAN
thread from the very inefficient SLCAN processing
2022-09-29 20:40:21 +10:00
Peter Barker f225592f48 AP_GPS: use default case for sending blob
This structure avoids a compiler warning that a statement isn't reachable when all backends are compiled out.
2022-09-29 20:00:53 +10:00
Peter Barker 288089a158 AP_GPS: no init blobs for SBF/GSOF/NOVA/SITL 2022-09-29 20:00:53 +10:00
Peter Barker 3a3f9bdb84 AP_GPS: cycle through baud rates for SBF/GSOF/NOVA/SITL 2022-09-29 20:00:53 +10:00
Peter Barker a56ed66aa3 SITL: make NOVA run at specific baudrate 2022-09-29 20:00:53 +10:00
AerofoxTech 5ca31ac1a1 hwdef: add AeroFox PMU module hwdef 2022-09-29 15:15:36 +10:00
Willian Galvani c607c38cbf AP_HAL_Linux: add missing header to RCInput_RCProtocol.cpp
This fixes muslhf linux build
2022-09-28 18:38:33 -03:00
Willian Galvani 4558742e39 HAL_Linux: add RC in driver for Navigator 2022-09-28 18:38:33 -03:00
Peter Barker 0717c3409b SITL: SITL SerialDevice optionally checks baudrates match 2022-09-28 20:53:34 +10:00
Peter Barker 0d5d9c04f0 AP_HAL_SITL: SITL SerialDevice optionally checks baudrates match 2022-09-28 20:53:34 +10:00
Peter Barker 855f4fe2d2 AP_RPM: correct SITL backend compilation if RPM disabled in SITL 2022-09-28 20:10:21 +10:00
Peter Barker 86df7e1bfc AP_Vehicle: add 0x to internal error statustext 2022-09-28 19:46:08 +10:00
Andrew Tridgell bf89a39621 AP_UAVCAN: removed the old DroneCAN Fix message
only send/process Fix2 message, saving bus bandwidth and flash space
2022-09-28 17:27:32 +10:00
Andrew Tridgell fde5c35d35 AP_GPS: removed the old DroneCAN Fix message
only send/process Fix2 message, saving bus bandwidth and flash space
2022-09-28 17:27:32 +10:00
Randy Mackay b8042d57de AP_Scripting: add mount-poi example 2022-09-28 17:09:31 +10:00
Randy Mackay 7f8448e344 AP_Scripting: add Location::offset_bearing_and_pitch binding 2022-09-28 17:09:31 +10:00
Randy Mackay dd58cb7492 AP_Scripting: add binding for Mount get_attitude_euler 2022-09-28 17:09:31 +10:00
Randy Mackay e9b92da241 AP_Mount: add get_attitude_euler
this allows external callers including Lua to retrieve the gimbal mount's current attitude
2022-09-28 17:09:31 +10:00
Randy Mackay 145adb6ae4 AP_Math: quaternion::to_euler scaling clarified with comment 2022-09-28 17:09:31 +10:00