summaryrefslogtreecommitdiff
path: root/decoders/sbus_futaba/__init__.py
diff options
context:
space:
mode:
authorGerhard Sittig <gerhard.sittig@gmx.net>2022-04-20 07:58:28 +0200
committerGerhard Sittig <gerhard.sittig@gmx.net>2022-04-23 18:58:48 +0200
commitf035667239e6f7d012b496c434e50161014a263d (patch)
tree731cf5b6ba0b4060ccb8ef3d6c9982c074c356e8 /decoders/sbus_futaba/__init__.py
parent24ba9e1bdfe107e394176eda3116b714463a8437 (diff)
downloadlibsigrokdecode-f035667239e6f7d012b496c434e50161014a263d.tar.gz
libsigrokdecode-f035667239e6f7d012b496c434e50161014a263d.zip
sbus_futaba: add decoder for SBUS hobby remote control by Futaba
This is the SBUS remote control by Futaba, the 25 bytes on top of UART. Not the computer peripheral bus. Hence the suffix in the decoder name. The implementation was tested with synthetic data. Example captures with real world data have yet to become available. This implementation shows the message framing, the proportional and digital channels' values, and the flags. Several warnings for short and long and invalid messages are implemented, as are user adjustable channel value range limits. The boilerplate may need adjustment. All naming was made up by me based on what information was available (vendor doc was missing).
Diffstat (limited to 'decoders/sbus_futaba/__init__.py')
-rw-r--r--decoders/sbus_futaba/__init__.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/decoders/sbus_futaba/__init__.py b/decoders/sbus_futaba/__init__.py
new file mode 100644
index 0000000..9404f4f
--- /dev/null
+++ b/decoders/sbus_futaba/__init__.py
@@ -0,0 +1,35 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2022 Gerhard Sittig <gerhard.sittig@gmx.net>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, see <http://www.gnu.org/licenses/>.
+##
+
+'''
+SBUS by Futaba, a hobby remote control protocol on top of UART.
+Sometimes referred to as "Serial BUS" or S-BUS.
+
+UART communication typically runs at 100kbps with 8e2 frame format and
+inverted signals (high voltage level is logic low).
+
+SBUS messages take 3ms to transfer, and typically repeat in intervals
+of 7ms or 14ms. An SBUS message consists of 25 UART bytes, and carries
+16 proportional channels with 11 bits each, and 2 digital channels
+(boolean, 1 bit), and flags which represent current communication state.
+Proportional channel values typically are in the 192..1792 range, but
+individual implementations may differ.
+'''
+
+from .pd import Decoder