SerialIO
Loading...
Searching...
No Matches
sbus.h
Go to the documentation of this file.
1
6#pragma once
7#ifndef SBUS_H
8#define SBUS_H
9
10#include "../SerialIO.h" // Include header file for the serial IO class
11#include "sbus_protocol.h"
12
16class sbus : public SerialIO {
17private:
18 sbus_channels_t _channelData;
19 uint8_t _rxData[SBUS_MAX_PACKET_SIZE];
20
21public:
30 explicit sbus(Stream *rxPort, int rxPin = -1, int txPin = -1,
31 bool inverted = true);
32
36 void begin() override;
37
41 void processIncoming() override;
42
48 void getChannel(rc_channels_t *channelData) override;
49};
50
51#endif // SBUS_H
Header file for serial input/output (IO) functionality.
Class that stores state and functions for initialising and decoding rc protocol.
Definition SerialIO.h:36
A class for handling SBUS protocol communication.
Definition sbus.h:16
void processIncoming() override
Processes incoming SBUS data.
Definition sbus.cpp:26
sbus(Stream *rxPort, int rxPin=-1, int txPin=-1, bool inverted=true)
Constructor for the SBUS class.
Definition sbus.cpp:8
void begin() override
Initializes the SBUS communication.
Definition sbus.cpp:11
void getChannel(rc_channels_t *channelData) override
Gets the decoded RC channels from the SBUS data.
Definition sbus.cpp:37
Header file for the SBus protocol implementation.
#define SBUS_MAX_PACKET_SIZE
SBus packet length.
Definition sbus_protocol.h:20
Definition SerialIO.h:11
Definition sbus_protocol.h:22