Commit Graph

210 Commits

Author SHA1 Message Date
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
Peter Barker d4dbf82c33 AP_RCProtocol: let compiler elide unused method
... rather than removing it based on target.

I need this symbol for other targets
2023-05-26 14:26:27 +10:00
Andrew Tridgell c7f97751cf AP_RCProtocol: return true on initial protocol detection
we need to tell the IO firmware that a byte was consumed when we first
detect a protocol as otherwise the next bad byte on DSM will lock us
on the DSM port
2023-05-23 12:11:04 +10:00
lipper-chengdu b351644583 AP_RCProtocol: Fix the issue of ST24 receiver not working 2023-05-18 08:24:22 +10:00
Peter Barker d59c9cc633 AP_RCProtocol: add separate define for AP_RCPROTOCOL_SUMD_ENABLED 2023-05-17 18:27:19 +10:00
Peter Barker c9b39c6d32 AP_RCProtocol: add separate define for AP_RCPROTOCOL_IBUS_ENABLED 2023-05-17 18:27:19 +10:00
Peter Barker 1b040fa0c3 AP_RCProtocol: add separate define for AP_RCPROTOCOL_PPMSUM_ENABLED 2023-05-17 18:27:19 +10:00
Peter Barker 1225d4c88f AP_RCProtocol: add separate define for AP_RCPROTOCOL_ST24_ENABLED 2023-05-17 18:27:19 +10:00
Peter Barker 2c00813aab AP_RCProtocol: add and use AP_RCPROTOCOL_ENABLED 2023-05-16 09:16:37 +10:00
Peter Barker 73b0ce6db8 AP_RCProtocol: define accepted RC backends for IOMCU in its hwdef files 2023-05-03 19:06:33 +10:00
Peter Barker 18e55b9d6e AP_RCProtocol: add and use AP_RCPROTOCOL_SBUS_ENABLED 2023-05-02 10:19:50 +10:00
Peter Barker 6535bfa546 AP_RCProtocol: add and use AP_RCPROTOCOL_CRSF_ENABLED 2023-04-27 18:31:30 +10:00
Peter Barker dd549ee625 AP_RCProtocol: use defaults to turn off CRSF telem on IO firmware 2023-04-27 18:31:30 +10:00