Commit Graph

204 Commits

Author SHA1 Message Date
Andy Piper
2e6e020c04 AP_RCProtocol: only update rc value for GHST on rc frames 2024-09-27 13:47:54 +09:00
Andy Piper
2bb9d8f80e AP_RCProtocol: squash compile warning 2024-08-21 17:10:45 +10:00
rmaia
4b037c2d63 AP_RCProtocol: add extended RC link stats OSD fields
Adds RSSI dBm, SNR, LQ, Tx power and active antenna OSD fields
2024-07-03 10:30:07 +09:00
Andrew Tridgell
02af8ac143 AP_RCProtocol: fixed underflow wrap in GHST 2024-04-08 12:08:53 +09:00
Andrew Tridgell
55724c2a63 AP_RCProtocol: added random data test
this triggers the CRSF crash bug that was just fixed
2024-04-08 12:08:53 +09:00
Andrew Tridgell
a617f3d617 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-08 12:08:53 +09:00
Peter Barker
3f2e3615e5 AP_RCProtocol: CRSF: use subtraction with times, not time+timedelta 2024-03-14 09:33:54 +09:00
Andrew Tridgell
fd6b3cda0e AP_RCProtocol: decode high duty-cycle CRSF frames using frame markers rather than timeouts
Co-authored-by: Andrew Tridgell <andrew@tridgell.net>
2024-03-14 09:33:54 +09:00
Peter Barker
7b727a8ac1 AP_RCProtocol: correct CSRF->CRSF
Co-authored-by: Andy Piper <github@andypiper.com>
Co-authored-by: Andrew Tridgell <andrew@tridgell.net>
2024-03-14 09:33:54 +09:00
Andy Piper
69d3968b9f 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-03-14 09:33:54 +09:00
Andy Piper
3f8c4770b0 AP_RCProtocol: discriminate GHST and CRSF based on first byte
do not change to GHST baudrate unless it has been specifically configured
2024-02-14 09:21:15 +09: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
Peter Barker
e89ccf1fa7 AP_RCProtocol: remove intermediate srxl2 callback-chain functions 2023-04-27 08:21:32 +10:00
Peter Barker
b3b46f7be6 AP_RCProtocol: add add use AP_RCPROTOCOL_SRXL2_ENABLED 2023-04-26 22:54:33 +10:00
Peter Barker
75a0c592ab AP_RCProtocol: move code from SRXL2.cpp into Backend.cpp
NFC, just moving from one cpp to another
2023-04-21 09:15:01 +10:00
Peter Barker
ff441de8ec AP_RCProtocol: move configure_vtx method to AP_RCProtocol_Backend
this is called as a static method from DSM to SRXL2 which isn't good.
2023-04-21 09:15:01 +10:00
Peter Barker
b26cd59da6 AP_RCProtocol: add and use RC_Channel_config.h 2023-03-22 14:25:09 +11:00
Peter Barker
8db14c2bbf AP_RCProtocol: tidy enablement RC FastSBUS support
use the the hwdef to turn it off on IOMCU
2023-03-21 12:08:06 +11:00