Commit Graph

63896 Commits

Author SHA1 Message Date
Andrew Tridgell e86e012896 AP_HAL_ChibiOS: removed run_debug_shell 2024-07-11 07:42:54 +10:00
Andrew Tridgell 4d5095cea1 AP_DDS: fixed cell voltages
the std:copy was copying from uint16_t to float
2024-07-11 07:25:33 +10:00
Peter Barker 7f0f851243 hwdef: remove bogus EK2_RPRIMARY from Cube defaults files
looks likely, but hasn't ever existed
2024-07-10 22:35:51 +10:00
Peter Barker 4231275f50 AP_Compass: remove default clause from set_status switch
forces someone to consider what they need to do for any new state
2024-07-10 18:18:31 +10:00
Peter Barker afd8d8255f AP_Compass: use switch statement in failed() method 2024-07-10 18:18:31 +10:00
Thomas Watson dc58d0406c AP_Periph: add ESC_RATE parameter to RC_OUT peripherals
Like other vehicles (which use RC_SPEED), ESC_RATE is used to set the
PWM output rate for outputs whose functions are set to MotorN so that
ESCs can be driven at a fast speed (400Hz, same default as aerial
vehicles) while servos still run at normal speed (50Hz, controlled by
OUT_RATE).
2024-07-10 18:17:41 +10:00
Peter Barker ef0de65347 AP_InertialSensor: tidy IMU killing 2024-07-10 18:17:00 +10:00
muramura d6a79c0e02 RC_Channel: Add a MOUNT2 retract
Update libraries/RC_Channel/RC_Channel.cpp

Co-authored-by: Peter Hall <33176108+IamPete1@users.noreply.github.com>
2024-07-10 17:45:28 +10:00
Peter Barker 31f3a796f1 AP_Proximity: avoid use of int16_t-read call 2024-07-10 17:01:09 +10:00
MattKear 2025712505 AP_RPM: Improve rpm logging 2024-07-10 12:24:15 +10:00
Michael du Breuil aafa2f3998 AP_Math: Remove template parameter from constructor
Not valid in C++20, and makes GCC 14.1.1 very unhappy.
2024-07-10 10:07:24 +10:00
muramura e48044dc45 AP_InertialSensor: Clearly state the maximum G-force 2024-07-10 10:07:16 +10:00
“Jane_ZeroOne” 91e54272fd Tools: PMU And GNSS ID Reserve for ZeroOne. 2024-07-10 10:07:05 +10:00
muramura 9f6edd8d55 AP_Mount: Increment the serial instance 2024-07-10 08:31:25 +09:00
Ep Pravitra f3d55d821e SITL: fix json airspeed
Airspeed calculation for JSON was not quite working because velocity_air_ef was not updated in SIM_JSON.cpp

Update libraries/SITL/SIM_JSON.cpp

Co-authored-by: Peter Hall <33176108+IamPete1@users.noreply.github.com>
Update libraries/SITL/SIM_JSON.cpp

Co-authored-by: Peter Hall <33176108+IamPete1@users.noreply.github.com>

comment changes

remove redundant airspeed calculation
2024-07-10 08:24:19 +10:00
James O'Shannessy 9924462618 AP_Mission: Allow Param4 to be uploaded with NaN
By default, QGroundControl will attempt to upload Loiter Unlimited with a NaN in param4.
Given this field could be NaN, we allow it through the parser.

See: https://mavlink.io/en/messages/common.html#MAV_CMD_NAV_LOITER_UNLIM
2024-07-09 22:39:57 +10:00
Thomas Watson 43bc80ab59 AP_Periph: ensure the dshot type gets set
Same fix as https://github.com/ArduPilot/ardupilot/pull/27093 .
2024-07-09 19:57:31 +10:00
Peter Barker 69c76a96d3 autotest: reboot after any context in which a reboot was done
this makes the assumption that any reboot done within a SITL was because some parameter changes only take effect after a reboot.

... so after we have reverted the parameters, reboot again to make the reverted parameter values take effect
2024-07-09 16:48:29 +10:00
Peter Barker 0cf357eb51 autotest: increase timeout for GCSMission upload test
MAVProxy may not have gotten all of the waypoints uploaded in 5 seconds.
2024-07-09 16:48:29 +10:00
Peter Barker 481e0301dd hwdef: H757_EVAL: make it not-AP_Periph
avoids this compilation error:

../../Tools/AP_Periph/can.cpp:152:33: error: static assertion failed: DroneCAN bootloader cannot support external flash
  152 | static_assert(EXT_FLASH_SIZE_MB == 0, "DroneCAN bootloader cannot support external flash");
compilation terminated due to -Wfatal-errors.
2024-07-09 12:00:52 +10:00
Randy Mackay 5a8ed5fb51 AP_NavEKF: option to align extnav to optflow pos estimate 2024-07-09 11:59:36 +10:00
Thomas Watson 1249388f23 AP_Common: use template parameter in bitmask functions
Substantially improves code optimization and reduces memory usage.
2024-07-09 11:51:41 +10:00
Thomas Watson 6a4520e8fd AP_Common: clean up bitmask operators
Code already won't compile if there are different numbers of bits as the
template parameter will be different.
2024-07-09 11:51:41 +10:00
Thomas Watson b030b8e789 AP_Common: correctly bound bitmask datatypes
Probably won't work correctly (and of questionable use) if less than 1.
The `first_set()` function might not be able to return a valid value if
greater than INT16_MAX.

unsigned int needs to be >= uint32_t so that the shift ops are in range.
2024-07-09 11:51:41 +10:00
Thomas Watson 0b320fe303 AP_Common: unify bitmask out of bounds checking
Ensures out-of-bounds reads and writes are never performed for setting,
clearing, and checking. Fixes test failure when the number of bits
evenly divides the word size.
2024-07-09 11:51:41 +10:00
Thomas Watson 9a89223531 AP_Common: fix bitmask setall()
Fixes an issue where the last word was not set to all 1s if the number
of bits evenly divided the word size.

Also fixes UB if there were 31 valid bits.
2024-07-09 11:51:41 +10:00
Thomas Watson 122cd72d9c AP_Common: improve bitmask test coverage 2024-07-09 11:51:41 +10:00
Thomas Watson 4a2f03f851 AP_Common: test more bitmask bit widths
Actually test different widths and reveal problems with edge cases.
2024-07-09 11:51:41 +10:00
Thomas Watson 521cf00964 AP_Common: templatify bitmask tests
Enables testing of different widths and edge cases.
2024-07-09 11:51:41 +10:00
Peter Barker aff3af67e6 AP_Logger: remove short-filename compatability code
We used to produce files hwih looked like log1.BIN.  We moved to 00000001.BIN instead so things collate.

This code allowed the autopilot to return data from SD cards which had old logs on them.
2024-07-09 11:34:40 +10:00
Iampete1 f3743b869d AC_PID: correct error caculation to use latest target 2024-07-09 11:33:03 +10:00
Andrew Tridgell b19186980a AP_Mount: added sending of position data to Siyi gimbal
Co-authored-by: Randy Mackay <rmackay9@yahoo.com>
this will allow for exif tags of position for photos
2024-07-09 11:28:57 +10:00
Peter Barker 99fb5a994e AC_WPNav: correct calculation of predict-accel when zeroing pilot desired accel 2024-07-09 10:52:14 +10:00
Peter Barker 11e49c5528 autotest: add test for entering loiter after auto in RC failsafe 2024-07-09 10:52:14 +10:00
Peter Barker c8a20726ff AP_NavEKF3: do not store prediction-enabled as state
this is only used in one place, and that place is called from the same routine setting the persistent state.  The only other place which calls readIMUData shouldn't be running the prediction step, but mmay, depending on the previous setting of the prediction step.

We are not initialising this state on filter reset, so it's possible that the state will be set when we do an InitialiseFilterBootstrap, which is probably not desired
2024-07-09 10:45:03 +10:00
Peter Barker a110c9c39f autotest: add tests for onboard file log validity 2024-07-09 10:40:08 +10:00
Peter Barker 3208491983 AP_Logger: remove twin paths for writing FMT messages
This stops us tracking formats-written in two places.

The Write() method will now emit formats as required and set the relevant bit in the backend-owned bitmask of formats sent.
2024-07-09 10:40:08 +10:00
Willian Galvani 64e859ecc5 AP_Compass: warn user if fix_radius() is skipped 2024-07-09 10:13:34 +10:00
Willian Galvani 325d6f6c94 AP_Compass: use ahrs for location instead of GPS directly for calibration 2024-07-09 10:13:34 +10:00
Peter Barker df0b4cdf6d AP_HAL_ChibiOS: chibios_hwdef.py: correct flake8 issues 2024-07-09 10:13:00 +10:00
Oleksiy Protas 6d27f69c96 GCS_MAVLink: correct a debugging message
Probably changed from a pointer to reference at some point and forgot to update a normally disabled block
2024-07-09 10:10:52 +10:00
Andy Piper 58b87f8b42 AP_Bootloader: iFlight 2RAWH743 2024-07-09 09:43:38 +10:00
Andy Piper aa47c8895f bootloaders: iFlight 2RAWH743 2024-07-09 09:43:38 +10:00
Andy Piper 1b5febe046 AP_HAL_ChibiOS: iFlight 2RAWH743 2024-07-09 09:43:38 +10:00
Randy Mackay b6c5ad450d AP_Common: char_to_hex returns 0 on invalid char 2024-07-09 09:08:51 +10:00
Randy Mackay dd927e1542 Tools: add build option for Topotek mount 2024-07-09 09:08:51 +10:00
laozhou 611fb94660 AP_Mount: integrate topotek gimbal driver
Co-authored-by: Randy Mackay <rmackay9@yahoo.com>
2024-07-09 09:08:51 +10:00
laozhou d5d1b9885c AP_Mount: add topotek backend
Co-authored-by: Randy Mackay <rmackay9@yahoo.com>
2024-07-09 09:08:51 +10:00
HiRCBro 8e28e6ab26 Tools: longBowF405WING 2024-07-09 09:05:27 +10:00
HiRCBro 8c58334173 AP_HAL_ChibiOS: longBowF405WING 2024-07-09 09:05:27 +10:00