Commit Graph

174 Commits

Author SHA1 Message Date
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
Peter Barker 35e3dcd83b AP_RCProtocol: HAL_LOGGING_ENABLED in place of checking build types
We don't care how logging works, just that it does
2023-03-21 08:31:27 +11:00
Peter Barker 440db27807 AP_RCProtocol: correct use of MAX_CHANNELS in SRXL2
This is a little all over the place.  Safe, but ARRAY_SIZE ensures correctness, and we save memory...
2023-03-15 13:33:45 -07:00
Peter Barker d5bca05fb6 AP_RCProtocol: SRXL2 uses own define for max-channels
Different protocol, different count.
2023-03-15 13:33:45 -07:00
Peter Barker 9d099fbcd5 AP_RCProtocol: add option to not include SRXL in build 2023-03-15 22:45:23 +11:00
Andrew Tridgell 988028f765 AP_RCProtocol: on IOMCU don't allow protocol to change once detected
this prevents a crash where in-flight noise causes an incorrect
protocol detection, such as DSM for a SBUS input
2023-02-08 10:08:23 +11:00
Peter Barker 2a263972b2 AP_RCProtocol: iterate over array size rather than to last entry
This can move us towards not instantiating backends (having an _num_backends) at some stage.

More typical of what we do throughout the code, and makes the derefernces on the subsequent lines a lot more comfortable to casual browsing.
2023-01-25 09:14:16 +11:00
Peter Barker c139f7c730 AP_RCProtocol: add and use AP_VIDEOTX_ENABLED 2023-01-24 11:03:27 +11:00
Andy Piper 425f2b946e AP_RCProtocol: check for 3 good frames for CRSF
Move get_link_rate() and get_protocol_string() to CRSF protocol
allow ELRS at 420kbaud to be configured
allow CRSF to bootstrap at ELRS desired baudrate
2022-12-22 18:38:31 +00:00
Peter Barker 64193542ed AP_RCProtocol: allow FRSky to be compiled out 2022-11-15 18:44:45 +11:00
Andy Piper c815f04e97 AP_RCProtocol: add has_uart() 2022-10-18 11:20:25 +11:00
Peter Barker 402d9708a5 AP_RCProtocol: fix examples 2022-08-19 18:33:58 +10:00
Andy Piper 9b8ea8475d AP_RCProtocol: reset UART on RX failure for CRSF
update CRSF timestamps to use microseconds
implement RX liveness protocol and implement for CRSF
2022-06-15 17:20:36 +10:00
Andy Piper fe29324828 AP_RCProtocol: check for bad frames in CRSF decoding. 2022-06-08 17:35:03 +10:00
Andy Piper 89ea5dc12c AP_RCProtocol: flush CRSF telemety writes 2022-04-20 17:38:08 +10:00
Andrew Tridgell 5df38d0298 AP_RCProtocol: added using_uart() method 2022-03-28 17:09:26 +11:00
Andrew Tridgell 522173328c AP_RCProtocol: added failsafe_active() API 2022-03-22 10:30:35 +11:00
Andrew Tridgell 7716754c61 Revert "AP_RCProtocol: change default SBUS frame gap to 4ms"
This reverts commit af9e96c619.

revert as this causes a problem on some receivers such as the Frsky R9

fixes #19899
2022-02-11 08:10:25 +11:00
Andrew Tridgell af9e96c619 AP_RCProtocol: change default SBUS frame gap to 4ms
this is to cope with some newer receivers such as the skydroid H16
which produces SBUS frames with gaps over 2ms

without this change we get can RC failsafes constantly
2022-01-29 15:09:29 +11:00
yaapu 55bfa41d13 AP_RC_Protocol: added ExpressLRS support 2021-12-22 18:48:49 +11:00
yaapu 76bd10bf02 AP_RCProtocol: added custom telemetry frame types and subtypes to debug trace 2021-12-22 18:48:49 +11:00
Andrew Tridgell 47590a55ff AP_RCProtocol: allow changes of serial settings between protocols
if we are searching for new protocols then allow for baudrate table
changes
2021-12-21 11:07:44 +11:00
Jaaaky 91e3441c6d AP_RCProtocol: Fix multi #include's 2021-12-21 10:38:46 +11:00
Hwurzburg eaa557106a AP_RCProtocol: add RC option to report CRSF LQ as RSSI
Co-author: Jules Gilson <julesgilson@yahoo.co.uk>
2021-12-21 10:04:33 +11:00
Andy Piper 5224468ec6 AP_RCProtocol: process CRSF crc per-byte 2021-12-01 19:04:19 +11:00
Peter Barker 409147a291 AP_RCProtocol: add support for DJI Fast SBUS
It's just SBUS... but with increased opportunities for corruption
2021-11-18 17:19:04 +11:00
Peter Barker 411ed0f50e AP_RCProtocol: use data structure for serial configurations 2021-11-16 22:06:24 +11:00
Peter Barker c1cdfb448c AP_RCProtocol: move uart flow control set out of CRSF code
11:32 AM] AndrewTridgell: @Peter Barker we should disable flow control when we first add the uart - none of the RC protocols use flow control
[11:32 AM] AndrewTridgell: the blocking writes call isn't needed
[11:32 AM] Peter Barker: Thanks, I'll make a patch.
2021-11-16 22:06:24 +11:00
Peter Barker 5e18f98b8e AP_RCProtocol: number all of the RC Protocols supported
Needed this as soon as we got the RC_PROTOCOL bitmask
2021-11-12 09:00:45 +11:00
Peter Barker 7c774d02bb AP_RCProtocol: remove pointless 100kbaud speed change
added.opened is set to false.  Next time we check_added_uart, the baud
rate is unconditionally set in each of the phases.  Thus this line has
no effect except to confuse the reader
2021-11-10 07:04:47 +11:00
Peter Barker 63f87a863c AP_RCProtocol: use switch statement for 3-frame check
Forces new protocol implementer to consider whether a 3-frame check is
required
2021-11-09 09:06:45 +11:00