Commit Graph

222 Commits

Author SHA1 Message Date
Peter Barker 87fa7a208d AP_RCProtocol: re-order initialiser lines so -Werror=reorder will work 2024-09-24 22:50:28 +10:00
Andy Piper ef1be6fe01 AP_RCProtocol: only update rc value for GHST on rc frames 2024-09-13 18:52:05 +10:00
Peter Barker c55a5abcd9 AP_RCProtocol: remove redundant check for crsf telem on iomcu
the hwdef for the iomcu already removes crsf
2024-06-26 18:13:01 +10:00
Andrew Tridgell 51d5f85b83 AP_RCProtocol: use NEW_NOTHROW for new(std::nothrow) 2024-06-04 09:20:21 +10:00
Andy Piper 9112b14414 AP_RCProtocol: add frame ids for CRSF baro/vario 2024-05-22 17:15:04 +10:00
Peter Barker f9c5c02f91 AP_RCProtocol: move handling of AP_Radio RC input down into AP_RCProtocol 2024-05-01 17:51:49 +10:00
Andrew Tridgell 4933ef3f2d AP_RCProtocol: fixed underflow wrap in GHST 2024-04-07 15:23:47 +10:00
Andrew Tridgell 5a2f711d85 AP_RCProtocol: added random data test
this triggers the CRSF crash bug that was just fixed
2024-04-07 15:23:47 +10:00
Andrew Tridgell 427384eb11 AP_RCProtocol: fixed crc memory range error in CRSF
this fixes a crash bug that caused a watchdog for Henry on a
F765-Wing. The bug happens with corrupt serial data causing an
underflow in the length argument to the crc call
2024-04-07 15:23:47 +10:00
rmaia ea91d6e171 AP_RCProtocol: add extended RC link stats OSD fields
Adds RSSI dBm, SNR, LQ, Tx power and active antenna OSD fields
2024-04-02 10:30:24 +11:00
Peter Barker 964c30e053 AP_RCProtocol: add support for RC input from SITL FDM data 2024-03-25 22:35:04 +11:00
Peter Barker 1357b4ac33 AP_RCProtocol: add and use AP_RCProtocol_UDP 2024-03-25 22:35:04 +11:00
Andy Piper 2f246b7638 AP_RCProtocol: add CRSF binding API 2024-03-12 10:16:08 +11:00
Peter Barker 8ed1b02301 AP_RCProtocol: move support for SFML joysticks down into AP_RCProtocol 2024-03-12 08:48:35 +11:00
olliw42 fba1e68ef4 AP_RCProtocol: add support for MAVLink receiver, handle RADIO_RC_CHANNELS message 2024-03-09 10:47:39 +11:00
Peter Barker dc7626887f AP_RCProtocol: do not detect async protocols if not enabled
Co-authored-by: olliw42 <waldmanns@gmx.de>
2024-03-07 13:58:31 +11:00
Peter Barker 26d4e0d285 AP_RCProtocol: correct assignment of new_input in rcprotocol detecion
caused RCP protocol detection to break for everything other than DroneCAN
2024-02-23 11:23:13 +11:00
Peter Barker b19f8ed57f AP_RCProtocol: CRSF: use subtraction with times, not time+timedelta 2024-02-22 20:46:40 +11:00
Andy Piper b071d76565 AP_RCProtocol: decode high duty-cycle CRSF frames using frame markers rather than timeouts
Co-authored-by: Andrew Tridgell <andrew@tridgell.net>
2024-02-22 20:46:40 +11:00
Andy Piper aa9ea03c7c AP_RCProtocol: add tests for CRSF and fix protocol test
fixed RCProtocolTest on SITL and make it pass/fail with an exit code

Co-authored-by: Andrew Tridgell <andrew@tridgell.net>
2024-02-22 20:46:40 +11:00
Andy Piper a5b28cf3e3 AP_RCProtocol: squash compile warning 2024-02-22 14:40:55 +11:00
Peter Barker 3ab5f8139c AP_RCProtocol: remove unused enumeration 2024-02-21 18:35:30 +11:00
Peter Barker d37d70e787 AP_RCProtocol: factor out a poll_protocol method 2024-02-21 18:19:23 +11:00
Andy Piper d7ae8b8bb3 AP_RCProtocol: correctly process bytes from standalone UART 2024-02-19 22:46:58 +11:00
Peter Barker 3b9c9497aa AP_RCProtocol: correct CSRF->CRSF
Co-authored-by: Andy Piper <github@andypiper.com>
Co-authored-by: Andrew Tridgell <andrew@tridgell.net>
2024-02-19 21:38:39 +11:00
Peter Barker aaad98e898 AP_RCProtocol: correct compilation when crossfire not compiled in 2024-02-13 09:36:05 +11:00
Peter Barker ae19d032ce AP_RCProtocol: use constructor from parent class in ibus 2024-02-07 19:07:58 +11:00
Peter Barker 8cc662163b AP_RCProtocol: add separate define for AP_RCPROTOCOL_DSM_ENABLED 2024-02-06 11:09:12 +11:00
Andy Piper d5ba0b6302 AP_RCProtocol: discriminate GHST and CRSF based on first byte
do not change to GHST baudrate unless it has been specifically configured
2024-02-06 09:55:56 +11:00
Andy Piper 407b8a6003 AP_RCProtocol: add is_detected() so that telemetry implementations can defer actions 2024-01-17 18:31:15 +11:00
Peter Barker 61c4e4750a AP_RCProtocol: tidy disabling of GHST on iomcu 2024-01-16 09:46:57 +11:00
Andy Piper 0df36a8d81 AP_RCProtocol: bootstrap Ghost to correct baudrate 2024-01-10 18:32:53 +11:00
Andy Piper 19c6b0b8ae AP_RCProtocol: IRC Ghost protocol 2024-01-10 18:32:53 +11:00
Andrew Tridgell f96810bb22 AP_RCProtocol: fixed example build 2024-01-03 12:14:47 +11:00
Andrew Tridgell b3fbc7edb0 AP_RCProtocol: use SocketAPM_native 2024-01-03 12:14:47 +11:00
Peter Barker 4ede307be2 AP_RCProtocol: rename crc_sum8 to crc_sum8_with_carry
the name "sum8" is usually used for "sum all bytes into a uint8_t discarding carry"
2023-11-29 18:50:26 +11:00
Andrew Tridgell c858b7201d AP_RCProtocol: prevent decoding past end of output array
this fixes test_sbus on clang
2023-10-13 09:42:25 +11:00
Andrew Tridgell a2717a84bf AP_RCProtocol: added a test suite for SBUS encode/decode
cover all values and check special handling of 875
2023-10-13 09:42:25 +11:00
Andrew Tridgell ca4f26db17 AP_RCProtocol: make sbus_decode public to allow for a test suite 2023-10-13 09:42:25 +11:00
Andrew Tridgell 120a8c1b1d AP_RCProtocol: protect against invalid data in SBUS 2023-10-13 09:42:25 +11:00
Peter Barker c1110d4b43 AP_RCProtocol: disable raw logging if no RC_Channel
We're asking the singleton here for information on whether we should do raw logging.  We may not actually be compiling the RC_Channel library in.
2023-10-03 11:46:43 +11:00
Andrew Tridgell 24139d661a AP_RCProtocol: allow for fport without FRSky telem 2023-08-19 20:27:24 +10:00
Peter Barker b8a80817e4 AP_RCProtocol: add support for DroneCAN RCInput packets 2023-08-19 20:27:24 +10:00
Andy Piper 15047ddfc7 AP_RCProtocol: rescan at CRSFv3 baud rates to avoid RX loss on soft reboot 2023-07-19 16:32:36 +09:00
Andy Piper 7a6065940d AP_RCProtocol: report tracer frame rate correctly 2023-07-19 16:32:36 +09:00
Andrew Tridgell 36528cae57 AP_RCProtocol: removed set_blocking_writes 2023-07-12 17:06:02 +10:00
Michael du Breuil bbcc31ecec AP_RCProtocol: Refactor SUMD to remove legacy cruft
Of particular note this removes the partial SUMH support. This has been
broken as far back as 2018, as we only called add_input() if we were in
the SUMD or SUMD failsafe cases, which meant SUMH didn't work. This
commits to that path, and removes all the 8 bit CRC, SUMH support.

This also refactors a number of things for readability (condensing white
space, simplifying guards around debug code). Many of the debugs could
probably be removed, but this simplifies it.

This was tested against the RCProtocol example test, and everything
there reports a pass.
2023-06-27 10:57:06 +10:00
murata 004054d1b1 AP_RCProtocol: Remove invalid Slot ID checks 2023-06-20 09:06:04 +10:00
Peter Barker f75c905d25 AP_RCProtocol: remove intermediate option_is_enabled methods for RC_Channel 2023-06-14 17:39:43 +10:00
Peter Barker 109e29f048 AP_RCProtocol: move use of __builtin_parity to crc 2023-06-07 21:41:14 +10:00