Commit Graph

36421 Commits

Author SHA1 Message Date
muramura
e48044dc45 AP_InertialSensor: Clearly state the maximum G-force 2024-07-10 10:07:16 +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
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
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
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
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
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
8c58334173 AP_HAL_ChibiOS: longBowF405WING 2024-07-09 09:05:27 +10:00
Peter Barker
933aed5f91 AP_Scripting: add missing scheduler include
corrects compilation of cubeorange-periph-heavy
2024-07-09 07:40:03 +10:00
cuav-chen2
f906fffff7 hwdef: fixed pin definition for C-RTK2-HP 2024-07-08 22:10:27 +10:00
Andrew Tridgell
db19bce1d2 AP_Common: wrap _malloc_r on cygwin
fixes dual allocation heap bug
See https://cygwin.com/pipermail/cygwin/2000-July/038916.html
2024-07-07 07:11:59 +10:00
Andrew Tridgell
842a4f507b AP_Scripting: added NMEA 2000 EFI driver
this has been tested on a marine engine, and correctly produces key
telemetry data

the NMEA_2000.lua module is broken out to make it easier to add other
NMEA 2000 based drivers
2024-07-06 07:19:25 +10:00
Peter Barker
9090420db0 SITL: remove duplicated crc code
same as one we already have
2024-07-05 23:02:18 +10:00
Peter Barker
c1c3580f8b AP_Logger: remove unused _log_file_size_bytes variable
AP_Logger: comment corection
2024-07-05 21:42:21 +10:00
BLash
0e4124060c SITL: VectorNav: Add support for sensors outside VN-100 and VN-300
Includes naming changes to match new broadened usage
2024-07-05 21:41:22 +10:00
BLash
271f08fc03 AP_ExternalAHRS: VectorNav: Add support for sensors outside VN-100 and VN-300
Includes naming changes to match new broadened usage
2024-07-05 21:41:22 +10:00
Peter Barker
1916490ae6 AC_Sprayer: create and use an AP_Sprayer_config.h 2024-07-05 14:27:45 +10:00
bugobliterator
b93c9256c7 AP_HAL_ChibiOS:hwdef/common: disable second core on dual core MCUs 2024-07-05 14:16:27 +10:00
bugobliterator
c8fe71b6b0 AP_HAL_ChibiOS: use debug option 3 which includes defines as well 2024-07-05 14:16:27 +10:00
Peter Barker
6ce7e179d7 RC_Channel: produce error if feature compiled out and aux func initialised 2024-07-04 19:41:07 +10:00
Peter Barker
ce48932f4d AP_NavEKF3: remove storedRange member variable if rangefinder measurements disabled 2024-07-04 19:21:44 +10:00
Peter Barker
3dff46b2b2 AC_AutoTune: remove unused variables 2024-07-04 13:19:12 +10:00
Peter Barker
35bdadb8ec AC_AutoTune: adjust variable names to include _cd postfix 2024-07-04 13:19:12 +10:00
Vincent Poon
fba47e641d Update Pixhawk6C hwdef.dat
Fix https://github.com/ArduPilot/ardupilot/issues/25840

The overcurrent detection of the HIPOWER current limiting chip is connected to PC11 on the Pixhawk 6C.
2024-07-04 06:37:58 +10:00
George Zogopoulos
61c910b08b AP_Scripting: Added script for Quad-X CoM compensation
The script uses the scripting matrix to produce non-equal
front and back thrust, compensating for the lever arm between the center
of thrust and the center of mass.
2024-07-03 18:44:36 +10:00
George Zogopoulos
2cd5413b0d SITL: Documented SIM_WIND_DIR_Z 2024-07-03 18:13:11 +10:00
Willian Galvani
cb74ebbddd EKF3: allow earth-frame fields to be estimated with an origin but no GPS 2024-07-03 16:49:27 +10:00
bnsgeyer
5fa2fcfa56 AC_AutoTune: return freqresp ring buffers to original implementation 2024-07-01 22:57:55 -04:00
bnsgeyer
475663e199 AC_AutoTune: use ring buffer only for dwells 2024-07-01 22:57:55 -04:00