Commit Graph

69 Commits

Author SHA1 Message Date
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
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
Peter Barker f75c905d25 AP_RCProtocol: remove intermediate option_is_enabled methods for RC_Channel 2023-06-14 17:39:43 +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
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 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 b26cd59da6 AP_RCProtocol: add and use RC_Channel_config.h 2023-03-22 14:25:09 +11: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 64193542ed AP_RCProtocol: allow FRSky to be compiled out 2022-11-15 18:44:45 +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
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
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 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
Andrew Tridgell 67fd862a8c AP_RCProtocol: check for RC protocol switching enable
by default don't allow protocol switching after initial protocol is
found
2021-10-15 19:29:23 -04:00
Hwurzburg c5f53fc0b6 AP_RCProtocol: add Link Quality reporting to RC protocols 2021-07-16 13:27:38 +10:00
Andy Piper 881fd4f37c AP_HAL_ChibiOS: use buffered writes for CRSF telemetry 2021-02-03 18:28:28 +11:00
Andy Piper 27d7c73c8e AP_RCProtocol: rc_protocols_mask must be set before bootstrap occurs 2021-01-04 20:04:19 +11:00
Andrew Tridgell 9fcf36bad9 AP_RCProtocol: save memory in IO firmware
disable FPort2 to save memory.
Disable SBUS_NI as it is not needed on IOMCU as it has a dedicated
inverter
2020-12-28 08:27:23 +11:00
Andy Piper e6d0e38129 AP_RCProtocol: allow handshake to initiate RC connection. Support listen-only SRXL2 devices.
only bootstrap when SRXL2 is the only configured protocol (RC_PROTOCOLS=256)
remove spurious 0 initializers
2020-12-16 18:06:49 +11:00
Andrew Tridgell a8770a5a82 AP_RCProtocol: added FPort2 protocol support 2020-10-28 09:00:34 +11:00
Andrew Tridgell 2779b26e6e AP_RCProtocol: fixed the "3 good frames" test
require 3 consecutive good frames, not 3 frames total, to declare the
weak protocols as detected
2020-08-24 16:32:35 +10:00
Andrew Tridgell e0ec46f06d AP_RCProtocol: support a mask of enabled RC protocols 2020-08-24 16:32:35 +10:00
Andy Piper 4e88adf86e AP_RCProtocol: TBS CRSF implementation
refactor rc channels decoding into backend
refactor SBUS to use decode_11bit_channels()
only support big-endian
don't include CRSF in iomcu
2020-07-07 18:48:06 +10:00
Andy Piper 167e1d12d7 AP_RCProtocol: disable flow-control and buffered-writes for SRXL2 uart
switched spm_srxl.c to C++ compilation
Correctly set budget for half-duplex writes
Tidy PACKED and other externalities
disable SRXL2 on IOMCU and softserial - SRXL2 is a serial half-duplex protocol-only
fixed buffer overrun in SRXL2 parser
fix bugs in decoder sketch and allow output to SITL
2020-05-05 09:23:15 +10:00
Andy Piper 68c6a3b03d AP_RCProtocol: SRXL2 support 2020-05-05 09:23:15 +10:00
Andrew Tridgell 8e67c3459a AP_RCProtocol: added multi-channel read() API
and use pulse_input_enable() to disable pulse input when not needed
2020-01-31 11:09:07 +11:00
Andrew Tridgell a72eaabc96 AP_RCProtocol: support FPort RSSI 2020-01-02 09:52:57 +11:00
Andrew Tridgell 9332c08c46 AP_RCProtocol: added FPort protocol support 2020-01-02 09:52:57 +11:00
Andrew Tridgell c8de2ec9c7 AP_RCProtocol: added update() method for use by SITL 2019-09-06 08:51:45 +10:00
Andrew Tridgell 2b856abdd1 AP_RCProtocol: support an additional uart on RC input
this will allow for any UART to be configured as an additional RC
input source
2019-09-06 08:51:45 +10:00
PraiseSatan bad5fb418d AP_RCProtocol: added ibus RX support to recieve channel data from ibus transmitters. 2019-07-07 20:49:18 +10:00
Tom Pittenger a597c2972c AP_RCprotocol: unify singleton naming to _singleton and get_singleton() 2019-02-10 19:09:58 -07:00
Andrew Tridgell 137253ac2c AP_RCProtocol: fixed SBUS failsafe
thanks to Nate for spotting this
2018-11-08 20:55:46 +11:00
Andrew Tridgell a8e6a09903 AP_RCProtocol: expose protocol name mapping 2018-11-07 07:35:45 +11:00
Andrew Tridgell eb78d4fa26 AP_RCProtocol: added destructor
for use by test suite
2018-11-07 07:35:45 +11:00