Commit Graph

36460 Commits

Author SHA1 Message Date
Andrew Tridgell
192972e502 AP_HAL: avoid vector include in I2C API
this doesn't work on QURT build and is unused
2024-07-11 11:20:47 +10:00
Andrew Tridgell
ebc7cc2daf AP_OpticalFlow: cleanup printf warnings 2024-07-11 09:34:29 +10:00
Andrew Tridgell
c40099a162 AP_Rangefinder: cleanup printf warnings 2024-07-11 09:34:29 +10:00
Andrew Tridgell
991ea6326d AP_Compass: cleanup warnings in printf calls 2024-07-11 09:34:29 +10:00
Peter Barker
f4f79905cc AP_Notify: example: do not instantiate AP_BoardLED unless the board supports it 2024-07-11 09:34:00 +10:00
Peter Barker
71332dd039 AP_GPS: example: do not instantiate AP_BoardLED unless the board supports it 2024-07-11 09:34:00 +10:00
Peter Barker
ab43668c45 AP_Notify: adjust hwdef files for define renames 2024-07-11 09:34:00 +10:00
Peter Barker
3b764c5812 AP_HAL: adjust hwdef files for define renames 2024-07-11 09:34:00 +10:00
Peter Barker
956ac243e1 AP_HAL_ChibiOS: adjust hwdef files for define renames 2024-07-11 09:34:00 +10:00
Peter Barker
8370e0b08b AP_Notify: create sanity in GPIO-based LED defines 2024-07-11 09:34:00 +10:00
Andrew Tridgell
393cd3252b AP_HAL_SITL: switched ENABLE_HEAP to an #if 2024-07-11 09:28:17 +10:00
Andrew Tridgell
3980cbbb82 AP_HAL_Linux: switched ENABLE_HEAP to an #if 2024-07-11 09:28:17 +10:00
Andrew Tridgell
f235b71f6b AP_HAL: switched ENABLE_HEAP to an #if 2024-07-11 09:28:17 +10:00
Andrew Tridgell
15ef6b1192 AP_HAL_ESP32: switched ENABLE_HEAP to an #if 2024-07-11 09:28:17 +10:00
Andrew Tridgell
64f6abd4d4 AP_HAL_ChibiOS: switched ENABLE_HEAP to an #if 2024-07-11 09:28:17 +10:00
Andrew Tridgell
429294fa1d AP_Baro: avoid i2c errors with ICP101XX
this sensor doesn't like reading at higher than expected rate
2024-07-11 09:27:33 +10:00
Andrew Tridgell
a02cd4b432 AP_Baro: fixed link with clang for shared library
avoid unused symbols
2024-07-11 09:27:09 +10:00
Andrew Tridgell
3608a78398 AP_Baro: fixed build with clang 2024-07-11 09:27:09 +10:00
Andrew Tridgell
60f582a6b2 AP_BattMonitor: support I2C INA231 battery monitor 2024-07-11 09:26:17 +10:00
Andrew Tridgell
75ebf96adb AP_Filesystem: allow for filesystem with no dtype 2024-07-11 09:25:05 +10:00
Andrew Tridgell
64ed86a82e GCS_MAVLINK: cope with dirent not having dtype 2024-07-11 09:25:05 +10:00
Andrew Tridgell
c2e52af1e2 AP_Filesystem: make fgets() much more efficient
normally fgets is on a buffered FILE handle. For AP_Filesystem we use
an unbuffered file descriptor. This means we were reading one byte at
a time from the file

this uses lseek to make fgets() much more efficient by reading the max
buffer size at a time in the file
2024-07-11 09:24:38 +10:00
Peter Barker
b2a7fcda5c AP_GPS: resolve compilation problem with timeval
./../libraries/AP_GPS/AP_GPS_SITL.cpp:37:27: error: aggregate 'timeval first_tv' has incomplete type and cannot be defined
    37 |     static struct timeval first_tv;
       |                           ^~~~~~~~
 compilation terminated due to -Wfatal-errors.

 Waf: Leaving directory `/ardupilot/src/build/sitl'
 Build failed
  -> task in 'objs/AP_GPS' failed (exit status 1):
  {task 135805090486368: cxx AP_GPS_SITL.cpp -> AP_GPS_SITL.cpp.0.o}
2024-07-11 09:22:12 +10:00
Andrew Tridgell
7477c4e205 AP_Scripting: fixed remove call
need to use AP_Filesystem
2024-07-11 07:43:35 +10:00
Andrew Tridgell
ffc78722f7 HAL_ESP32: removed run_debug_shell 2024-07-11 07:42:54 +10:00
Andrew Tridgell
c4addb7dd0 AP_HAL_SITL: removed run_debug_shell 2024-07-11 07:42:54 +10:00
Andrew Tridgell
2374d6f444 AP_HAL_Linux: removed run_debug_shell 2024-07-11 07:42:54 +10:00
Andrew Tridgell
d54b69a5fe AP_HAL: removed run_debug_shell 2024-07-11 07:42:54 +10:00
Andrew Tridgell
04bd5aa010 AP_HAL_Empty: removed run_debug_shell 2024-07-11 07:42:54 +10:00
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
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
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