Commit Graph

64318 Commits

Author SHA1 Message Date
Thomas Watson 9aeab7b424 AP_DroneCAN: DNA_Server: use 0 as unknown ID
Slightly reduces flash usage and probably is clearer.
2024-07-30 09:49:43 +10:00
Thomas Watson 8d57533f1c AP_DroneCAN: DNA_Server: fix cases involving use of invalid node IDs 2024-07-30 09:49:43 +10:00
Thomas Watson a9317b1a07 AP_DroneCAN: correct and validate allowed NODE range
Node IDs >= 128 don't exist, and IDs 126 and 127 are "reserved for
network maintenance tools" according to the spec.
2024-07-30 09:49:43 +10:00
Thomas Watson 485a9387b1 AP_DroneCAN: DNA_Server: clean up storage failure handling
The StorageManager read_block/write_block methods only return failure if
an out of bounds access is performed. Assert statically that this does
not happen.

Also remove the now-impossible failed to add node state.
2024-07-30 09:49:43 +10:00
Thomas Watson cd8519321b AP_DroneCAN: DNA_Server: search for valid nodes after magic check
Ensures the occupation mask doesn't get populated with junk if the magic
is not valid.
2024-07-30 09:49:43 +10:00
Thomas Watson c1f59186fa AP_DroneCAN: DNA_Server: make reset method private 2024-07-30 09:49:43 +10:00
Ian Burwell 6b4e11090c AP_Scripting: Add BQ40Z shutdown example
This example intercepts PREFLIGHT_REBOOT_SHUTDOWN COMMAND_LONG's and if
param1==2, it shuts down the BQ40Z smart battery BMS. Otherwise it
passes through the COMMAND_LONG as a COMMAND_INT (this required updating
the gcs:run_command_int to return a MAV_RESULT rather than a bool).
2024-07-30 09:40:10 +10:00
Ian Burwell 9d34fa2a5e AP_Scripting: Add I2C transfer bindings
This adds bindings for an I2CDevice's transfer() function, an example,
and removes the nil return hint from the get_device() docs as it never
actually returns nil.
2024-07-30 09:40:10 +10:00
muramura 0e7a5ef520 Copter: Make multiple decisions into a SWITCH statement 2024-07-30 08:16:27 +09:00
Iampete1 838fbc2b3b AP_Param: Fix `ENABLE_DEBUG` enabled error with no embedded param 2024-07-30 08:51:09 +10:00
Bob Long 64fc60ce32 AP_HAL_SITL: initialize rcout safety state
This allows BRD_SAFETY_DEFLT=1 to work correctly for SITL.
2024-07-30 08:44:31 +10:00
Peter Barker f2ec97e4c7 autotest: correct Rover RangeFinder test
for reasons I can't fathom, defaulting the rangefinder state causes problems with the vehicle orientation in SITL - probably a state update fix somewhere.

This test was kind of broken anyway - the RangeFinder was pointing latterally out from the vehicle, but is displayed forward of the vehicle (ther RANGEFINDER mavlink message conveys no orientation information)
2024-07-30 08:42:42 +10:00
Peter Barker f60ecbfe4e autotest: disable PolyFenceObjectAvoidanceBendyRuler as it is unreliable ATM 2024-07-29 20:58:39 +10:00
Peter Barker 2245399ff9 autotest: tidy Rover autotests
autotest: tidy WheelEncoders test

autotest: rover: tidy PolyFenceObjectAvoidance code

autotest: add load_fence_using_mavwp

Also corrects the mission item types being returned by the mission-item-to-misison-item-int converter

autotest: fix Rover PolyFenceAvoidanceBendyRulerEasier test

these tests weren't being run becausethey were disabled based on support for loading fence items from QGC files.

autotest: fix Rover PolyFenceAvoidanceBendyRuler test
2024-07-29 20:58:39 +10:00
Peter Barker d7bc9a420f autotest: tracker; tidy GPSForYaw test 2024-07-29 20:58:39 +10:00
arynrosh 6dae760346 Tools: added name to GIT_Success.txt 2024-07-29 18:33:35 +10:00
Randy Mackay 2806f8b63b Plane: 4.5.5-beta2 release notes 2024-07-29 16:19:30 +10:00
Randy Mackay 8f51eafc82 Copter: 4.5.5-beta2 release notes 2024-07-29 15:18:17 +09:00
Randy Mackay b752f8d4cf Rover: 4.5.5-beta2 release notes 2024-07-29 15:18:15 +09:00
Randy Mackay 9f99d3c934 Tracker: 4.5.5-beta2 release notes 2024-07-29 15:18:11 +09:00
BLash d7ecf5fbc5 AP_ExternalAHRS_VectorNav: Consolidate EAH3 definition to single method
Resolve SITL failures due to multiply defined logger message by pulling the call to a single method
2024-07-29 15:52:29 +10:00
BLash 1d1bb5724e AP_ExternalAHRS_VectorNav: Address review comments
Remove unnecessary header
Switch parameters to default initialization
Change pointer casting to prevent a const_cast, and remove doubled sync byte when echoing ASCII messages
Fix Valgrind report by preventing use of nmea_printf on buffers which may not be null-terminated
2024-07-29 15:52:29 +10:00
BLash 50980ee03e AP_ExternalAHRS_VectorNav: Update SIM to match new message definitions
Redefine messages to 3 INS packets, and send as appropriate
Resolve SITL failures due to too-long logger message headers
2024-07-29 15:52:29 +10:00
BLash d4ca5fe868 AP_ExternalAHRS_VectorNav: Split IMU and EKF message
In AHRS Mode, split the single message to an IMU packet and an AHRS packet; in EKF Mode, split the two messages into an IMU message, an EKF packet, and a GNSS packet.
Simplify message header definition to consolidate and eliminate the need for static asserts
Update healthy logic and use to represent new packet structure
Replace EAH3 message with messages per-packet
Add Ypr as configured output in the EKF message
2024-07-29 15:52:29 +10:00
George Zogopoulos b5c91a1690 autotest: Converted parameter TKOFF_MODE to TKOFF_OPTIONS 2024-07-29 15:50:32 +10:00
George Zogopoulos e227187e72 AP_TECS: Converted parameter TKOFF_MODE to TKOFF_OPTIONS 2024-07-29 15:50:32 +10:00
George Zogopoulos c213ee2ef8 Plane: Converted paramter TKOFF_MODE into TKOFF_OPTIONS 2024-07-29 15:50:32 +10:00
George Zogopoulos 773c91cec1 ArduPlane: Added minimum throttle during TAKEOFF mode
This is a rework so that servos.cpp is responsible for setting the
throttle limits under more circumstances and always notifies TECS when
it does so.

Additionally, the TAKEOFF mode has been improved with a new parameters
TKOFF_MODE and TKOFF_THR_MIN that extend the throttle behaviour.
2024-07-29 15:50:32 +10:00
George Zogopoulos b163e13964 AP_TECS: Fixes to reset state
These concern the TAKEOFF flight stage and address #27147.

* Logging metadata fixes
* Disabled continuous TECS reset during takeoff
* Fixed bug in reached_speed_takeoff calculation
* Limited SPDWEIGHT=2 to only first part of takeoff climb
* _post_TO_hgt_offset set to constant
* Takeoff I-gain now defaults to 0 and is used
* Use at least TRIM_THROTTLE during the climb
* Updated description of TECS_TKOFF_IGAIN with new behaviour
* Forced max throttle while below TKOFF_LVL_ALT
* Added throttle constraints in no-airspeed mode

Additionally, set_min_throttle() has been created, that allows one to
set the minimum TECS throttle for the next update_pitch_throttle() loop.
Additionally, the throttle limits system has been reworked. TECS will
receive external throttle limits from Plane and will always take them
into account and respect them.
2024-07-29 15:50:32 +10:00
George Zogopoulos 1e6e291b52 autotest: New tests
Autotests for takeoffs have been added for Plane, covering AUTO and
TAKEOFF mode takeoffs.

An auxiliary `set_servo` method has been added to `vehicle_test_suite.py`.
2024-07-29 15:50:32 +10:00
Peter Barker eadc7c0ecc Tools: install_prereqs_ubuntu.sh: pin setuptools to avoid problems on Focal
focal:     return Version(version)
    focal:   File "/home/vagrant/.local/lib/python3.8/site-packages/packaging/version.py", line 202, in __init__
    focal:     raise InvalidVersion(f"Invalid version: '{version}'")
    focal: packaging.version.InvalidVersion: Invalid version: '1.0.3.linux-x86_64'
2024-07-29 15:27:23 +10:00
Peter Barker 07599ba570 Tools: environment_install: install Python packages one-at-a-time
helps to work out which packages are causing problems
2024-07-29 15:27:23 +10:00
cuav-chen2 3267b91160 bootloaders: Add CUAV-7-Nano bootloader 2024-07-29 12:25:53 +10:00
cuav-chen2 08c8ef379b HAL_ChibiOS: Added support for CUAV-7-Nano flight controller 2024-07-29 12:25:53 +10:00
Peter Barker 317fab2f19 AP_Mission: add and use an option_is_set method 2024-07-29 10:37:52 +10:00
Thomas Watson bbde876353 hwdef: remove EKF opinion from FlywooF745
No effect as lines have always been commented out, but not useful and
EKF2 is not something to encourage.

Verified no compiler output change.
2024-07-29 09:32:22 +10:00
Andrew Tridgell 3ddd477d04 CI: only run qurt build on ArduPilot main repo
this prevents user repos getting failures

thanks to Pete for the suggestion
2024-07-29 08:38:56 +10:00
Peter Barker 16c2e23ee7 AP_Mount: allow AP_MOUNT_BACKEND_DEFAULT_ENABLED to be overridden 2024-07-28 12:00:02 +10:00
Peter Barker debf3cb28e hwdef: SpeedyBeeF405WING: restrict mount support to the servo gimbal 2024-07-28 12:00:02 +10:00
Peter Barker 84efdd5700 hwdef: SpeedyBeeF405WING: remove landing gear support 2024-07-28 12:00:02 +10:00
Peter Barker 317c59c709 autotest: tidy various ArduPlane autotests
autotest: tidy Plane TerrainRally test

autotest: tidy Plane TestFlaps test

autotest: tidy Plane ThrottleFailsafe test

autotest: tidy Plane GripperMission test

autotest: tidy Plane FenceStatic test

autotest: tidy Plane FenceRTL tests

autotest: tidy FenceRetRally test

autotest: tidy Plane ahrs2 test

autotest: tidy Plane RangeFinder test

autotest: tidy Plane ADSB test

autotest: tidy Plane LOITER test

autotest: tidy Plane EKFLaneswitch test

autotest: tidy Plane FenceAltCeilFloor test

autotest: tidy Plane FenceMinAltAutoEnable

autotest: tidy Plane FenceMinAltEnableAutoland

autotest: tidy Plane FenceMinAltAutoEnableAbort

autotest: tidy Plane FenceCircleExclusionAutoEnable

autotest: tidy self.homeloc out of MainFlight
2024-07-28 11:53:44 +10:00
Andrew Tridgell 2ce6532698 AP_Math: updated EulerAngles.pdf link 2024-07-27 11:14:10 +10:00
Andrew Tridgell 98733882f5 AP_Math: added comments and a test for euler ordering
our main euler functions did not have a comment on the ordering
convention
2024-07-27 11:14:10 +10:00
Peter Barker f1a1b11830 autotest: tidy Helicopter missions to use new infrastructure
autotest: tidy PosHoldTakeoff heli test

autotest: tidy StabilizeTakeoff heli test

autotest: tidy SplineWaypoint heli test

autotest: tidy ManAutoRotation heli test

autotest: tidy AirspeedDrivers heli test

autotest: tidy PIDNotches heli test
2024-07-27 09:44:41 +10:00
Peter Barker 605a9d34e3 autotest: tidy various Rover autotests
autotest: tidy Sprayer test

autotest: tidy rover AC_Avoidance test

autotest: tidy rover ModeSwitch test

autotest: tidy rover AuxModeSwitch

autotest: tidy rover RCOverrides test

autotest: tidy rover MANUAL_CONTROL test

autotest: tidy rover PolyFenceObjectAvoidance test
2024-07-26 23:43:16 +10:00
CB Unmanned 763292780a Tools: Reserve ID for CBUnmanned CM405 Flight Controller 2024-07-26 20:13:11 +10:00
Peter Barker 1b1ca35927 build_options.py: add HAL_WITH_FRSKY_TELEM_BIDIRECTIONAL 2024-07-26 20:12:40 +10:00
yaapu 5b7aaae008 AP_Frsky_Telem: fix for HAL_WITH_FRSKY_TELEM_BIDIRECTIONAL = 0 2024-07-26 20:12:40 +10:00
muramura e86d5e113f AP_Filesystem: BOOL for binary types 2024-07-26 20:12:05 +10:00
Leonard Hall bb1758ecb1 AC_Autotune: Add ABORT state for consistency between tests 2024-07-26 20:11:42 +10:00