Fix SBUS simulation logic

Don't consider zero values from not connected joystick
This commit is contained in:
Oleg Kalachev 2024-12-23 04:04:00 +03:00
parent 7533a9cbfa
commit 28f6cfff60

View File

@ -14,7 +14,7 @@ public:
SBUS(HardwareSerial& bus, const bool inv = true) {};
SBUS(HardwareSerial& bus, const int8_t rxpin, const int8_t txpin, const bool inv = true) {};
void begin() {};
bool read() { return true; };
bool read() { return joystickInitialized; };
SBUSData data() {
SBUSData data;
joystickGet(data.ch);