Commit Graph

33327 Commits

Author SHA1 Message Date
Andy Piper
9f9be8da0f AP_HAL_ChibiOS: correct voltage sensor and current scale on speedybeef4v3 2023-07-23 12:47:14 +10:00
Henry Wurzburg
3629037177 RC_Channel:clean up metadata for AUX switches 2023-07-21 11:16:47 +10:00
Peter Barker
dd325a7aaf AP_HAL_ChibiOS: disable terrain unless SD card available 2023-07-19 17:25:18 +09:00
Peter Barker
5ee85b82f9 AP_Terrain: assume HAL_BOARD_TERRAIN_DIRECTORY is defined 2023-07-19 17:25:18 +09:00
Peter Barker
338a4d6b38 hwdef: remove HAL_BOARD_LOG_DIRECTORY and HAL_BOARD_TERRAIN_DIRECTORY defaults
these are now defaulted in chibios_hwdef.py
2023-07-19 17:25:18 +09:00
Peter Barker
092afa54a9 AP_HAL_ChibiOS: defaults for board log directory and terrain directory in chibios_hwdef.py 2023-07-19 17:25:18 +09:00
Peter Barker
274aedeaae GCS_MAVLink: rely on item conversion to run DO_SET_ROI_NONE when presented in COMMAND_LONG 2023-07-19 17:03:00 +09:00
Rhys Mainwaring
3bb6fb460e AP_DDS: fix reliable stream buffer size
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
2023-07-19 16:59:38 +09:00
Andy Piper
15047ddfc7 AP_RCProtocol: rescan at CRSFv3 baud rates to avoid RX loss on soft reboot 2023-07-19 16:32:36 +09:00
Andy Piper
7a6065940d AP_RCProtocol: report tracer frame rate correctly 2023-07-19 16:32:36 +09:00
Andy Piper
016448ca40 AP_HAL_ChibiOS: correct comment in HEEWING-F405 v1 2023-07-19 16:29:47 +09:00
Andy Piper
c2820b2d87 AP_HAL_ChibiOS: HEEWING-F405v2 which includes dataflash logging 2023-07-19 16:29:47 +09:00
Randy Mackay
ca935ef47e AP_Mount: viewpro and xacti only enabled on boards 2mb flash 2023-07-18 21:02:02 +09:00
Randy Mackay
d5977b6d96 AP_Mount: viewpro calc_crc len arg fix
Also remove one unnecessary length check
Also correct length check that meant last byte of buffer was unusable
2023-07-18 21:02:02 +09:00
Randy Mackay
a8bb79b9ab AP_Mount: add viewpro cpp driver 2023-07-18 21:02:02 +09:00
Randy Mackay
75de6c0398 AP_Camera: mount backend implements set_tracking 2023-07-18 21:02:02 +09:00
Randy Mackay
ddb91afdde AP_Mount: add set_tracking accessor 2023-07-18 21:02:02 +09:00
Randy Mackay
471f528233 AP_Mount: Xacti integrates get-date-and-time return of ms 2023-07-18 21:02:02 +09:00
Randy Mackay
b5cbefc43a AP_RTC: get-date-and-time returns milliseconds 2023-07-18 21:02:02 +09:00
Randy Mackay
4b96c2f568 AP_AHRS: comment to clarify get-velocity-NED units 2023-07-18 21:02:02 +09:00
Randy Mackay
b80ea6572c AP_Scripting: viewpro driver comment fix 2023-07-18 21:02:02 +09:00
Peter Barker
0302672722 hwdef: remove bootloader flashing from MambaF405US-I2C and omnibusf4pro-bdshot
also use an include where appropriate on a pair of other boards
2023-07-18 11:40:32 +10:00
Andrew Tridgell
56be632916 HAL_ChibiOS: use set_size_best()
maximise chance of getting a reasonable uart buffer size
2023-07-18 11:38:27 +10:00
Andrew Tridgell
8a8a45dd23 AP_HAL: added set_size_best() for ByteBuffer 2023-07-18 11:38:27 +10:00
Henry Wurzburg
f4503a5b7b AP_Arming:change metatdata for ARMING_REQUIRE 2023-07-18 11:35:55 +10:00
Peter Barker
8ff9fc0f70 AP_Logger: add Write_NamedValueFloat
for getting diagnostics into the code during ddebug fast
2023-07-18 11:34:31 +10:00
Iampete1
f5d6e167b5 AP_Vehicle: dynamic notch use min ratio for RPM tracking 2023-07-18 11:32:39 +10:00
Peter Barker
a3f43b26ae AP_OpticalFlow: use vector rotate method 2023-07-18 11:19:57 +10:00
Peter Barker
92b7cfbbb2 AP_Beacon: MarvelMind: avoid potentially reading INT32_MAX bytes of input
constrain the number of bytes read.  Simplify the way bytes are read.

the return value from available() is unsigned...
2023-07-18 11:18:47 +10:00
Peter Barker
32659fd3b6 AP_HAL_SITL: correct return values on UARTDriver write call 2023-07-18 11:17:01 +10:00
Andy Piper
0b20328756 Filter: fix notch filter test. 2023-07-18 11:06:02 +10:00
Andrew Tridgell
af491e2f2a AP_Math: define M_PI to more digits for use by code that uses DOUBLE_PRECISION_SOURCES 2023-07-18 11:06:02 +10:00
Andy Piper
5d260f1f42 AP_Mission: use fabsF where appropriate 2023-07-18 11:06:02 +10:00
Peter Barker
6e0639ea91 AP_HAL: tidy AP_Airspeed includes, use AP_AIRSPEED_ENABLED properly 2023-07-18 11:03:07 +10:00
Peter Barker
c88a53b662 AP_Airspeed: tidy AP_Airspeed includes, use AP_AIRSPEED_ENABLED properly 2023-07-18 11:03:07 +10:00
Henry Wurzburg
f70c1e96c7 hwdef:add bdshot to MatekF765-SE 2023-07-18 10:26:44 +10:00
Peter Barker
ae8d3724cd GCS_MAVLink: convert to COMMAND_INT to handle MAV_CMD_DO_SET_HOME 2023-07-18 09:10:26 +10:00
Iampete1
49226b6dcf AP_motors: Example: Test: allow to run on heliquad 2023-07-18 08:05:26 +09:00
Iampete1
c3200b00dd AP_Motors: Example: Test: make mostly flake 8 clean 2023-07-18 08:05:26 +09:00
Iampete1
b175e7a2f9 AP_Motors: example: heli comparison: update functionality and support setting swash type 2023-07-18 08:05:26 +09:00
Iampete1
c5c26e89da AP_Motors: example: allow setting shashplate type at runtime 2023-07-18 08:05:26 +09:00
Iampete1
b327f00b25 AP_Motors: heli: move swash servo defualt and setup into swash lib 2023-07-18 08:05:26 +09:00
Iampete1
d32d1dfec8 AP_Motors: Heli: get output mask from swashplate lib 2023-07-18 08:05:26 +09:00
Iampete1
b61b761141 AP_Motors: Heli: move swashplate output state and code into swash lib 2023-07-18 08:05:26 +09:00
Iampete1
6717da708c AP_MotorsHeli: swash: combine configure and calculate_roll_pitch_collective_factors functions 2023-07-18 08:05:26 +09:00
Iampete1
83f216a386 AP_Motors: Heli: Swash: re-work roll pitch and collecive factor caculation 2023-07-18 08:05:26 +09:00
Asif Khan
0c67f20a74 AP_Mount: fix setting default mode redundantly in each backend 2023-07-15 10:46:28 +10:00
Peter Barker
f288ba7cd0 AP_HAL_SITL: correct parsing of --rate on SITL commandline
it's in the help but not in the code...
2023-07-15 00:13:12 +10:00
Andy Piper
2f97a9855a AP_NavEKF3: fix docs on ABIAS_P_NSE_DEFAULT 2023-07-14 08:33:05 +09:00
Peter Barker
efc7b4b6ee AP_HAL_SITL: remove race in SITL::UARTDriver::_write
txspace could change if another thread is involved
2023-07-13 18:13:42 +10:00
yaapu
4f69f9cc23 AP_OSD: added OSD_TYPE2 param to enable dual OSDs backend support
Co-authored-by:HWurzburg(hurzburg@yahoo.com)

up to 2 OSD instances can run at the same time sharing a single OSD thread

)
2023-07-13 12:39:19 +10:00
yaapu
3923dcb63e AP_Arming: added OSD_TYPE2 param to enable dual OSDs backend support
Co-authored-by:HWurzburg(hurzburg@yahoo.com)

up to 2 OSD instances can run at the same time sharing a single OSD thread
2023-07-13 12:39:19 +10:00
Andy Piper
504fdb4ca3 GCS_MAVLink: squash bitwise | operator warnings 2023-07-13 11:02:40 +10:00
Andy Piper
3224cf19a8 SITL: remove unused variables 2023-07-13 11:02:40 +10:00
Andy Piper
2e2491f4ff AP_TECS: remove unused variables 2023-07-13 11:02:40 +10:00
Andy Piper
80112051b4 AP_Proximity: initialize structures correctly 2023-07-13 11:02:40 +10:00
Andy Piper
e06952bf0f AP_OSD: use message with static assert 2023-07-13 11:02:40 +10:00
Andy Piper
1b10008e38 AP_Math: use message with static assertion 2023-07-13 11:02:40 +10:00
Andy Piper
d9869290ee AP_Logger: remove unused counter 2023-07-13 11:02:40 +10:00
Andy Piper
d36149e1a8 AP_HAL_SITL: remove unused counter 2023-07-13 11:02:40 +10:00
Andy Piper
f7f29650ba AP_Follow: remove unused variables 2023-07-13 11:02:40 +10:00
Andy Piper
74a70e52b8 AP_BattMonitor: remove unsued variables 2023-07-13 11:02:40 +10:00
Andy Piper
76e2d950d4 AP_Arming: squash bitwise & warnings 2023-07-13 11:02:40 +10:00
Andy Piper
813cf3660d AC_AutoTune: remove unsued variables 2023-07-13 11:02:40 +10:00
Andrew Tridgell
0f8d618102 AP_Scripting: added bindings for VTOL motor loss
this allows a script to take an action on loss of a VTOL motor
2023-07-13 08:03:52 +10:00
Peter Barker
36ffe42f01 RC_Channel: add and use AP_OPTICALFLOW_CALIBRATOR_ENABLED 2023-07-12 21:37:24 +10:00
Peter Barker
8416730a8c AP_OpticalFlow: add and use AP_OPTICALFLOW_CALIBRATOR_ENABLED 2023-07-12 21:37:24 +10:00
Peter Barker
f14aab29e5 AP_OpticalFlow: correct compilation when HAL_LOGGING_ENABLED is 0 2023-07-12 21:37:24 +10:00
Andrew Tridgell
aa0b119806 HAL_ChibiOS: disable CANFD bits if CANFD not enabled
cannot support CANFD receive on G4
2023-07-12 18:54:45 +10:00
Andrew Tridgell
deab955a0f hwdef: update HolybroG4_GPS
disable CAN2 (unused), and prevent sharing of DMA for GPS UART
2023-07-12 18:54:45 +10:00
Peter Barker
f3e5e28364 GCS_MAVLink: zero structured passed in to convert_COMMAND_LONG_to_COMMAND_INT 2023-07-12 18:51:07 +10:00
Peter Barker
527f3d5728 GCS_MAVLink: add infrastructure to handle command longs as command ints 2023-07-12 18:51:07 +10:00
Peter Barker
ab5908cb59 hwdef: disable bootloader flashing for F35Lightning
both boards on our Wiki seem to show boot0 pins
2023-07-12 17:54:02 +10:00
Peter Barker
6b87318062 SITL: act on safety switch being enabled in SITL by zeroing outputs 2023-07-12 17:53:12 +10:00
Peter Barker
2c9551a25a AP_HAL_SITL: act on safety switch being enabled in SITL by zeroing outputs 2023-07-12 17:53:12 +10:00
Peter Barker
f5a26495d3 AP_HAL: act on safety switch being enabled in SITL by zeroing outputs 2023-07-12 17:53:12 +10:00
Andrew Tridgell
a6055033ab AP_SerialManager: removed set_blocking_writes_all 2023-07-12 17:06:02 +10:00
Andrew Tridgell
36528cae57 AP_RCProtocol: removed set_blocking_writes 2023-07-12 17:06:02 +10:00
Andrew Tridgell
8c6aa02b86 AP_FETtecOneWire: removed set_blocking_writes 2023-07-12 17:06:02 +10:00
Andrew Tridgell
4fc29909a4 AP_Hott_Telem: removed set_blocking_writes 2023-07-12 17:06:02 +10:00
Andrew Tridgell
22c31ac729 AP_IOMCU: removed set_blocking_writes 2023-07-12 17:06:02 +10:00
Andrew Tridgell
2d28b59661 AP_Common: removed set_blocking_writes
and moved to top level locking in UARTs
2023-07-12 17:06:02 +10:00
Andrew Tridgell
4087e0b215 AP_Camera: removed set_blocking_writes 2023-07-12 17:06:02 +10:00
Andrew Tridgell
6e952bae17 HAL_SITL: allow override of serial devices in SITL periph 2023-07-12 17:06:02 +10:00
Andrew Tridgell
fca6f2cba2 HAL_SITL: fixed crash with command line args to SITL periph 2023-07-12 17:06:02 +10:00
Andrew Tridgell
a3eba8bbd3 HAL_ChibiOS: enable UART monitor
enabled if GPS moving baseline available or the board flash size is
256k or over
2023-07-12 17:06:02 +10:00
Andrew Tridgell
62b2fdb8f8 GCS_MAVLink: update to new read_locked() API 2023-07-12 17:06:02 +10:00
Andrew Tridgell
25761c3a8e AP_HAL_Linux: moved UART port locking up to AP_HAL 2023-07-12 17:06:02 +10:00
Andrew Tridgell
3caf52a841 AP_HAL_ESP32: moved UART port locking up to AP_HAL 2023-07-12 17:06:02 +10:00
Andrew Tridgell
66e5ea0b1b AP_HAL_Empty: moved UART port locking up to AP_HAL 2023-07-12 17:06:02 +10:00
Andrew Tridgell
aa74615ce1 AP_CANManager: moved UART port locking up to AP_HAL 2023-07-12 17:06:02 +10:00
Andrew Tridgell
8fd5341b5b HAL_ChibiOS: moved uart locking up to AP_HAL
and removed set_blocking_writes
2023-07-12 17:06:02 +10:00
Andrew Tridgell
4f81a40066 AP_HAL_SITL: moved UART port locking up to AP_HAL 2023-07-12 17:06:02 +10:00
Andrew Tridgell
ceb07c3f7b AP_HAL: moved locking to AP_HAL and added monitor callback 2023-07-12 17:06:02 +10:00
HelloLeFei
8ec404c6fc AP_HAL_ChibiOS: add HEEWING-F405 flight controller
add bi-directional dshot
add back in features.
juggle DMA allocations to allow CRSF to work correctly
disable dshot on PWM 10 as it is not used
do not enable quadplane by default
do not disable arming checks
run ICM42688 at 1Mhz for low speed to avoid gyro noise
add HEEWING README and picture
2023-07-12 10:40:37 +10:00
David Buzz
0d9f0c8dd6 AP_HAL_ESP32: esp32 i2c bugfix for idf4.4 2023-07-12 08:19:34 +09:00
Randy Mackay
c28e629af3 AP_Mount: Xacti fix for gnss format 2023-07-12 08:18:46 +09:00
Tom Pittenger
0b13fa2c0f AP_ADSB: correct bad 16bit port read in ADSB drivers 2023-07-12 08:05:29 +10:00
Peter Barker
fbc66132e3 AP_ADSB: correct bad port read in Sagetech driver 2023-07-12 08:05:29 +10:00
Andrew Tridgell
9454b54a1d AP_Mount: prevent SIYI driver crash if serial port not setup
if MNT1_TYPE=8 and no serial protocol set to gimbal then a camera
trigger can crash the vehicle
2023-07-11 20:35:13 +09:00
Max-001
afc019e1ea EFI: added efi MavLink class 2023-07-11 12:32:19 +10:00
Peter Barker
b7232b1d38 AP_RangeFinder: add missing include for I2cDevice.h
needed for the FOREACH_I2C macro
2023-07-11 10:30:02 +09:00
Peter Barker
f697489ab7 AP_RangeFinder: correct use of enable defines for Lua backend 2023-07-11 10:30:02 +09:00
Peter Barker
bf3bafcd17 AP_RangeFinder: move remaining feature defines into _config.h 2023-07-11 10:30:02 +09:00
muramura
d5dd4151eb AP_Motors: If frame specification is FALSE, frame name is unsupported 2023-07-11 10:22:26 +09:00
Gone4Dirt
d5e72a5440 AP_Motors: Fix up MotorTestSweep.sh now that frame_class is an enforced argument 2023-07-11 10:10:14 +10:00
Gone4Dirt
2563edc3c3 AP_Motors: Allow frame class to be a run-time arg to AP_Motors_test and add all heli frame classes to test
AP_Motors: Example: init each frame type correctly and warn for init fail
2023-07-11 10:10:14 +10:00
bugobliterator
1b3de3acf2 AP_HAL: add HAL_ENABLE_SENDING_STATS to enable sending stats over CAN 2023-07-10 12:56:37 +10:00
bugobliterator
a0e541893c AP_DroneCAN: add support for sending CAN and Protocol Stats 2023-07-10 12:56:37 +10:00
Andrew Tridgell
7a1b7e85be HAL_ChibiOS: default AP_BOOTLOADER_ALWAYS_ERASE to 1 on AP_Periph 2023-07-10 06:52:44 +10:00
Andrew Tridgell
0accc9f897 HAL_ChibiOS: clear EOP bit at end of F4 programming 2023-07-10 06:52:44 +10:00
Andrew Tridgell
5a84e988a5 AP_CheckFirmware: fixed error code for bad firmware
when we have a bad unsigned firmware we check if it is a good signed
firmware. If it is then we should return OK, if not we should return
the original error code, otherwise we end up giving a misleading
reason for not booting a peripheral
2023-07-09 18:11:54 +10:00
Andy Piper
d98666832c AP_HAL_ChibiOS: correct incorrect defaults for serial ports on FoxeerH743v1 2023-07-07 16:55:26 +10:00
Andy Piper
993da19f27 AP_SerialManager: check for incorrect usage of old HAL_SERIALx_PROTOCOL 2023-07-07 16:55:26 +10:00
Stephen Dade
c73fa82d07 AP_Scripting: Add SET_MODE support for Rockblock lua script and mavlink example 2023-07-07 13:15:09 +10:00
bugobliterator
a497c06e83 AP_Scripting: stash and restore FPU register context in LUAI_TRY
this fixes an issue where a lua library function triggers an exception
after it does a math operation which changes the floating point
registers on M7 MCUs (such as STM32H7). An example is math.random()
which calls math_random(), which pre-calculates a double value before
checking if the arguments to the call are valid. When it then checks
and finds invalid values the exception longjmp does not restore the
floating point registers.
2023-07-07 07:51:02 +10:00
yunjiuav
92a7d09e2e HAL_ChibiOS: added YJUAV_A6 support 2023-07-06 20:36:28 +10:00
Peter Barker
4ef85b14d0 hwdef: add hwdef for SDMODELH7V1 2023-07-06 17:35:44 +10:00
Peter Barker
e26f8c1d11 AP_RangeFinder: populate AP_RangeFinder_config.h 2023-07-06 08:30:27 +10:00
Tom Pittenger
5cbb776951 AP_Arming: wrap things in P_INERTIALSENSOR_ENABLED 2023-07-05 13:51:00 -07:00
Andy Piper
1f9539a1b3 AP_BLHeli: add battery status MSP handling
give internal error if an unknown MSP command occurs
2023-07-05 15:39:15 +01:00
Randy Mackay
9c15dcb206 AR_PosControl: limit and zero velocity I-term
zero in forward-back direction
limit in lateral direction
2023-07-05 20:27:54 +09:00
Randy Mackay
6f52eaf9a7 AR_AttitudeContol: add steering_limited checks 2023-07-05 20:27:54 +09:00
Randy Mackay
46702e6c49 AP_Math: Vector2f::projected made const 2023-07-05 20:27:54 +09:00
Peter Barker
daf56c5ab1 RC_Channel: add and use SetFocusResult 2023-07-05 16:28:42 +10:00
Peter Barker
485fee36ab AP_Mount: add and use SetFocusResult 2023-07-05 16:28:42 +10:00
Peter Barker
958622523f AP_Mission: add and use SetFocusResult 2023-07-05 16:28:42 +10:00
Peter Barker
82b0630c6a AP_Camera: add and use SetFocusResult 2023-07-05 16:28:42 +10:00
Mikhail Degtiarenko
cc0b2ab3bb AP_HAL_ChibiOS: add SPL06 to MambaH743v4
The Diatone Mamba MK4 H743 v2 Flight Control have moved from the DPS280 barometer to using SPL06.

https://www.diatone.us/products/mamba-mk4-h743-v2-flight-control-30mm-m3l
2023-07-05 16:26:57 +10:00
Asif Khan
82b709083c AP_Camera: add CAMx_OPTION support for start/stop recording when arm/Disarm 2023-07-05 09:07:53 +10:00
Andrew Tridgell
0aab2f7974 HAL_ChibiOS: implement newlib alloc functions as malloc wrappers
this fixes issue #24106
2023-07-05 07:13:39 +10:00
Tom Pittenger
e05700e10d AP_BoardConfig: add accessor for param BRD_SERIAL_NUM 2023-07-04 13:35:09 -07:00
Tom Pittenger
f27ad17ea0 AP_AccellCal: initialize HAL_INS_ACCELCAL_ENABLED for periph 2023-07-04 05:41:03 -07:00
Peter Barker
d0b967097e AP_HAL_ChibiOS: process @include lines within hwdef files 2023-07-04 17:36:32 +10:00
Peter Barker
53e6f289e5 AP_HAL_ChibiOS: factor out a write_processed_defaults_file method 2023-07-04 17:36:32 +10:00
Peter Barker
26359204bd AP_HAL_ChibiOS: tidy defaults.parm handling 2023-07-04 17:36:32 +10:00
Tom Pittenger
ecc517360f AP_Vehicle: is_landing/is_taking_off not to req scripting 2023-07-03 22:44:00 -07:00
Tom Pittenger
461671eaf3 AP_DroneCAN: add NotifyState.landing & taking off 2023-07-03 22:44:00 -07:00
Andrew Tridgell
41fbc6124b AP_Scripting: updated VTOL quicktune docs 2023-07-04 12:24:02 +10:00
Andrew Tridgell
b7b12d7220 AP_Scripting: fixed lua-check warnings in VTOL-quicktune 2023-07-04 12:24:02 +10:00
Andrew Tridgell
3aea282bdd AP_Scripting: fixed use of QUIK_ENABLE in VTOL-quicktune
this was lost when the cached access was added
2023-07-04 12:24:02 +10:00
Andrew Tridgell
d8bcb41b26 AP_Scripting: added QUIK_MAX_REDUCE parameter to VTOL-quicktune.lua
this limits the amount that rate gains can reduce from the original
values in a quicktune. Large reductions in rate gains can be
incorrectly triggered by a frame resonance or gust of wind which can
result in gains that are dangerously low, which can trigger an angle P
oscillation
2023-07-04 12:24:02 +10:00
Iampete1
f55267017b AP_Motors: Heli: Remove unused init_output return and don't assume single for initialised OK 2023-07-04 11:31:21 +10:00
Andy Piper
810dfaf4f6 AP_HAL_ChibiOS: pull RTS lines low on Pixhawk6C to avoid glitches on startup 2023-07-04 11:13:26 +10:00
Andrew Tridgell
9a68b78973 AP_DroneCAN: allow BRD_SAFETY_MASK to work on CAN ESCs and servos
this allows for testing of a fwd motor or control surfaces while not
allowing for VTOL ESCs to run. This makes CAN actuators behave the
same as direct PWM actuators
2023-07-04 10:40:45 +10:00
Peter Barker
c45c02ce82 AP_GPS: use AP_AHRS_ENABLED in place of HAL_BUILD_AP_PERIPH
the guard here is just against use of the singleton
2023-07-04 10:27:32 +10:00
Peter Barker
7a7e44ae3c AP_EFI: move case labels inside ifdefs 2023-07-04 10:26:26 +10:00
Peter Barker
257c684edf hwdef: update FlyingMoonF407 hwdef
changes from vendor
2023-07-04 10:25:19 +10:00
Henry Wurzburg
5df9b8abf1 AP_TECS: set FW landing speed if not set 2023-07-04 10:24:30 +10:00
Henry Wurzburg
c33ef034b4 AP_Landing: set FW landing speed if not set 2023-07-04 10:24:30 +10:00