Commit Graph

1304 Commits

Author SHA1 Message Date
Peter Barker
5a967a60ff AP_HAL: re-order initialiser lines so -Werror=reorder will work 2024-09-24 22:50:28 +10:00
Andrew Tridgell
4a102e2f2b AP_HAL: support more than 1 registered CAN callback
this allows for CAN MCAST and MAVCAN at the same time
2024-09-17 10:02:29 +10:00
Andrew Tridgell
21b6b1b229 AP_HAL: allow for multicast sockets in bootloader 2024-09-17 10:02:29 +10:00
Bob Long
4a1e4ebcd6 RCOutput: initialize _esc_pwm_min and _esc_pwm_max
Further protection from potential dangerous behavior when these do not
get initialized for some reason.
2024-09-17 09:18:36 +10:00
Peter Barker
690947537a AP_HAL: examples: add missing include for AP_InertialSensor
we instantiate this library in here
2024-09-06 08:52:01 +10:00
Willian Galvani
11e05b1436 AP_HAL: add BMP390 option for navigator 2024-09-02 11:37:40 -03:00
Thomas Watson
e99b0fd7b9 AP_HAL: increase overtime margin on ESP32 2024-09-02 09:21:08 +10:00
Andrew Tridgell
1fe21b6120 QURT: allow for external compasses
this allows for additional compasses on I2C
2024-08-17 13:20:00 +10:00
Pierre Kancir
3e4241ee7f AP_HAL: add missing header for timeval struct on alpine linux 2024-08-15 22:33:42 +10:00
Thomas Watson
5ec3313c31 AP_HAL: remove never-overridden get_shell_stream function
The only caller is now gone and nobody ever overrode it to do return
more than nullptr.
2024-08-06 09:08:04 +10:00
Peter Barker
bc1c305629 AP_HAL: default SITL and Linux to have 4MB of "flash" 2024-08-02 16:29:57 +10:00
Peter Barker
894b99fce5 AP_HAL: remove unused HAL_MINIMIZE_FEATURES define 2024-08-02 16:29:57 +10:00
Peter Barker
1ce6aa7e38 AP_HAL: adjust for renaming of Gimbal to SoloGimbal 2024-07-21 14:22:05 +10:00
Peter Barker
70729df4c0 AP_HAL: enable Solo Gimbal in SITL 2024-07-20 22:44:10 +10:00
Peter Barker
9a1a99fd61 AP_HAL_Boards: stop users specifying HAL_GPIO_LED_ON as the default value 2024-07-17 17:42:01 +10:00
Peter Barker
fd80d331cb AP_HAL: add simulator for 1-LED boards 2024-07-17 17:18:27 +10:00
Peter Barker
43dbae54a3 AP_HAL: SIMState: include SITL glider header
used if you want to use the Glider model in Sim-on-Hardware
2024-07-16 22:28:57 +10:00
Peter Barker
55308e6d79 AP_HAL: stop using linux board subtype in Notify LED setup
... instead have the board definitions define things like we do for ChibiOS
2024-07-16 10:11:40 +10:00
Andrew Tridgell
cd8b93e1c5 HAL_QURT: adjustments to support different frames
added docs and service files, and support reboot
2024-07-13 14:38:31 +10:00
Andrew Tridgell
4e8f1e6092 AP_HAL: added QURT board type and header 2024-07-12 15:56:48 +10:00
Peter Barker
75f9c4e4fc AP_HAL: chiibos.h: die nicely if HAL_HAVE_PIXRACER_LED is used 2024-07-11 20:08:13 +10:00
Peter Barker
bad755f4a5 AP_HAL: add support for simulated GPIO LEDs 2024-07-11 20:08:13 +10:00
Andrew Tridgell
b34d0c9c87 AP_HAL: removed vector based I2C get_device
this is unused and prevents building on QURT
2024-07-11 11:20:47 +10:00
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
Peter Barker
3b764c5812 AP_HAL: adjust hwdef files for define renames 2024-07-11 09:34:00 +10:00
Andrew Tridgell
f235b71f6b AP_HAL: switched ENABLE_HEAP to an #if 2024-07-11 09:28:17 +10:00
Andrew Tridgell
d54b69a5fe AP_HAL: removed run_debug_shell 2024-07-11 07:42:54 +10:00
bugobliterator
bace8d4c85 AP_HAL: add methods that deal in ip address as uint32_t 2024-06-21 20:31:31 +10:00
bugobliterator
3c69f156f4 AP_HAL: make recv call to be undirected but also get the ip:port of received packet 2024-06-21 20:31:31 +10:00
bugobliterator
43615f22b7 AP_HAL: add AP_MAVLINK_PACKETISE_ENABLE option 2024-06-21 20:31:31 +10:00
Peter Barker
d70f5b92e0 AP_HAL: move definition of HAL_WITH_POSTYPE_DOUBLE into AP_HAL_Boards.h
other libraries need to know if we are doing double-precision offsets
2024-06-11 19:50:18 +10:00
Brad Bosch
f2f9349419 AP_HAL: Add support for parity to Serial passthrough
Add code to reflect USB ACM parity setting to the passthrough port alongside existing support for ACM baud rate changes.  Some use cases for serial passthrough require specific parity settings.

For example, even parity is used and required by the USART protocol used in the STM32 system bootloader. This enhancement allows the use of standard flash programming tools such as STM32CubeProgrammer to flash connected STM based peripherals such as Receivers and Telemetry radios via serial passthrough.  Some examples of such peripherals include the FrSky R9 receivers as well as various other STM based LoRa modules used by the mLRS project.
2024-06-11 09:24:32 +10:00
Andrew Tridgell
20959524b8 AP_HAL: use NEW_NOTHROW for new(std::nothrow) 2024-06-04 09:20:21 +10:00
Iampete1
d340f37678 AP_HAL: UARTDriver: Add new flow control option "FLOW_CONTROL_RTS_DE" for RS485 driver enable. 2024-05-28 09:48:19 +10:00
Maxim Buzdalov
1232e810d4 AP_HAL: add support for Extended DShot Telemetry v2 2024-05-15 17:29:19 +10:00
Peter Barker
f6bfd7cad3 AP_HAL: move handling of AP_Radio RC input down into AP_RCProtocol 2024-05-01 17:51:49 +10:00
Andy Piper
25b10fb8c4 AP_HAL: make NeoPixel high-low proportions match for 0 and 1 2024-04-30 11:00:30 +10:00
Iampete1
92adcb14e1 AP_HAL: utility: Add Data Rate Limit helper 2024-04-23 09:16:55 +10:00
Iampete1
e82502a4a4 AP_HAL: Util: add virtual uart_log method 2024-04-09 10:00:50 +10:00
Iampete1
1e63ec24a8 AP_HAL: UARTDriver: add log_stats method and log structure 2024-04-09 10:00:50 +10:00
Iampete1
a4fd3980a8 AP_HAL: UARTDriver: add getters for cumulative tx and rx counts 2024-04-09 10:00:50 +10:00
Iampete1
c64124daf9 AP_HAL: Add StatsTracker helper 2024-04-03 13:10:06 +01:00
Peter Barker
b7fe779713 AP_HAL: move GPIO ON/off defaults from AP_HAL_ChibiOS to AP_HAL
these can be reused across different vehicles
2024-04-03 11:00:24 +11:00
Peter Barker
f70a1927f5 AP_HAL: chibios.h: remove defaulting of HAL_GPIO_LED_ON and _OFF
this same defaulting is being done in AP_HAL_ChibiOS/GPIO.h
2024-04-03 11:00:24 +11:00
Peter Barker
416f7d393a hwdef: remove DISABLE_SERIAL_ESC_COMM AP_Periph boilerplate
... use the defaults file instead
2024-04-02 11:28:27 +11:00
Peter Barker
3387cad322 AP_HAL: remove VRBrain board sub-types
these were only used to turn choose between AP_Notify LED backends, which can be done much more neatly with specific features defines.
2024-03-26 11:06:13 +11:00
Peter Barker
6cb6d605ec AP_HAL: remove HAL_BOARD_SUBTYPE_CHIBIOS_FMUV4
this isn't used for anything
2024-03-26 10:59:23 +11:00
Peter Barker
4a996c81fb AP_HAL: add and use AP_RCProtocol_UDP 2024-03-25 22:35:04 +11:00
Ryan Friedman
650db2db35 AP_HAL: Fix incorrect return type
* This caused position quantization errors in the MicroStrain7

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2024-03-25 08:06:46 +11:00
Peter Barker
0256cef7b9 AP_HAL: rename GPS_to GPS1_ 2024-03-19 19:50:12 +11:00
Patrick José Pereira
8fa4d6200c AP_HAL: Turn hold_in_bootloader default as false in reboot
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2024-03-12 21:13:41 +11:00
Peter Barker
31eb340928 AP_HAL: move AC_Avoidance defines into libraries 2024-03-11 18:07:18 +11:00
Andrew Tridgell
b4d8e1133c AP_HAL: use NoVehicle by default
allows build of examples for esp32s3empty
2024-03-02 17:55:43 +11:00
Andy Piper
f094ee66ec AP_HAL: add timeout helper functions
add tests for timeout functions
2024-02-28 22:25:48 +11:00
Peter Barker
f7886ca14d AP_HAL: move logger object up to AP_Vehicle 2024-02-13 10:54:29 +11:00
Peter Barker
b1ade6ccf5 AP_HAL: add power status bits to logger metadata 2024-02-06 11:13:14 +11:00
Peter Barker
940b6fd1fb AP_HAL_SITL: new Loweheiser generator/efi sim 2024-01-23 11:27:30 +11:00
Andrew Tridgell
b48a01dbc8 AP_HAL: allow mutexes in bootloader 2024-01-21 12:30:08 +11:00
Andrew Tridgell
07fee626d9 AP_HAL: added IP4_STR_LEN 2024-01-21 12:30:08 +11:00
Andrew Tridgell
40a029c15d AP_HAL: allow socket build for bootloader 2024-01-21 12:30:08 +11:00
Andrew Tridgell
f77f8e5ad7 AP_HAL: added is_write_locked() for UARTs 2024-01-18 14:57:57 +11:00
Peter Barker
e27a353107 AP_HAL: correct Sub SITL-on-hardware build 2024-01-16 12:41:18 +11:00
Peter Barker
b17b70d1d4 AP_HAL: correct tracker SITL-on-hardware build 2024-01-16 12:41:18 +11:00
Peter Barker
3c57e9c14a AP_HAL: correct blimp SITL-on-hardware build 2024-01-16 12:41:18 +11:00
Peter Barker
147c5ad78d AP_HAL: move simulated height_agl into fdm structure
allows value to be shipped via multicast to simulated peripherals
2024-01-08 20:00:01 +11:00
Andrew Tridgell
7d1cc14b1e AP_HAL: fixed build with AP_SIM_ENABLED 2024-01-07 20:51:55 +11:00
Andrew Tridgell
f2a1c80652 AP_HAL: added MEM_FILESYSTEM memory type 2024-01-05 06:52:11 -08:00
Andrew Tridgell
1e7ca34531 AP_HAL: socket native fix 2024-01-03 12:14:47 +11:00
Andrew Tridgell
ef67fa4293 AP_HAL: use SocketAPM_native 2024-01-03 12:14:47 +11:00
Andrew Tridgell
cbb3e27519 AP_HAL: added SocketAPM_native
this is a varient of SocketAPM that always uses native sockets
(ie. doesn't go via AP_Networking lwip)
2024-01-03 12:14:47 +11:00
Andrew Tridgell
3d5251dfe8 AP_HAL: added inet_str_to_addr to SocketAPM 2024-01-03 12:14:47 +11:00
Andrew Tridgell
ec5c0b82e7 AP_HAL: added PRIORITY_NET 2024-01-03 12:14:47 +11:00
Andrew Tridgell
8e132e44cf AP_HAL: improved sockaddr_in compatibility 2024-01-03 12:14:47 +11:00
Andrew Tridgell
e53729f331 AP_HAL: make Socket.cpp safe for lwip and SITL usage 2024-01-03 12:14:47 +11:00
Peter Barker
9e5edefc4a AP_HAL: guard against DSP being compiled out of code 2024-01-03 11:45:31 +11:00
Andrew Tridgell
635c764c6f AP_HAL: added BinarySemaphore test 2024-01-03 07:37:05 +11:00
Andrew Tridgell
a52c71f380 AP_HAL: implement BinarySemaphore
and removed event handles
2024-01-03 07:37:05 +11:00
Andrew Tridgell
d1fcb76c9f AP_HAL: ensure all UARTDriver implementations have receive_time_constraint_us
this fixes NMEA over network ports
2024-01-02 20:59:50 +11:00
Andrew Tridgell
7b5b1ba59f AP_HAL: fixed build without MSG_NOSIGNAL
for older MacOSX
2024-01-02 08:12:37 +11:00
Andrew Tridgell
e79f0201bd AP_HAL: added esp32s3empty 2023-12-31 09:55:02 +11:00
Thomas Watson
bcfad0d712 AP_HAL: remove references to legacy UART order 2023-12-19 06:53:15 +11:00
Thomas Watson
ebbcf42236 AP_HAL: constructor now accepts UARTs in SERIALn order 2023-12-19 06:53:15 +11:00
Thomas Watson
6a6c3ce7a1 AP_HAL: inline serial accessor function
Saves a bit more flash.
2023-12-19 06:53:15 +11:00
Thomas Watson
8747ae539f AP_HAL: move serial re-mapping to driver array initialization
Saves a bit of flash and execution time.
2023-12-19 06:53:15 +11:00
Thomas Watson
de45437704 AP_HAL: use array of UART drivers instead of consecutive variables
Avoids UB-inducing assumption that UART drivers are consecutive in the
serial() function.
2023-12-19 06:53:15 +11:00
Andy Piper
a8772ef5a2 AP_HAL: allow bdshot iomcu on non-bdshot fmu 2023-12-18 19:02:52 +11:00
Andy Piper
2a9c2fdf14 AP_HAL: add methods to directly access erpm array from rcout 2023-12-18 19:02:52 +11:00
Andrew Tridgell
48ab76d06e AP_HAL: added InertialLabs simulator 2023-12-17 09:47:30 +11:00
Andrew Tridgell
9358bfce34 AP_HAL: added duplicate() in SocketAPM 2023-12-11 18:00:38 +11:00
Andrew Tridgell
a77331e725 AP_HAL: mark socket as not connected on EOF
this allows lua scripts to properly detect a closed TCP connection
2023-12-11 18:00:38 +11:00
Andrew Tridgell
64d649fbcc AP_HAL: fixed SO_REUSEADDR on bind
and use MSG_NOSIGNAL to prevent pipe errors in SITL
2023-12-11 18:00:38 +11:00
Andrew Tridgell
98e8b9785c AP_HAL: added close() to SocketAPM 2023-12-11 18:00:38 +11:00
Andrew Tridgell
b49152bbe6 AP_HAL: mark new accept() socket as connected 2023-12-11 18:00:38 +11:00
Ka Ru
329c6ba668 AP_HAL: add can-zero board 2023-12-05 07:41:06 -06:00
Ryan Friedman
fadedbbb47 AP_HAL: Add MicroStrain7 support
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-12-05 11:09:22 +11:00
Andrew Tridgell
2ee48dea29 AP_HAL: support bi-directional UDP broadcast sockets 2023-11-28 12:18:55 +11:00
Andrew Tridgell
a05acfc090 AP_HAL: added last_recv_address() with supplied buffer
this prevents a race condition with a static string
2023-11-28 12:18:55 +11:00
Thomas Watson
dc76e03890 AP_HAL: introduce get_HAL_mutable() to complement get_HAL()
Returns a mutable reference to the same HAL for certain purposes where
the HAL needs to be mutated to avoid UB problems with casting away const
and to make the fact that mutation is happening obvious.
2023-11-28 08:24:25 +11:00
Tom Pittenger
e8c852f0d4 AP_HAL: Allow APMSockets to autodetect Broadcast IPs 2023-11-25 16:28:07 -08:00
Andrew Tridgell
ee592476ce AP_HAL: implement multicast for UDP sockets 2023-11-25 12:19:43 -08:00