mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 09:39:33 +00:00
24 lines
555 B
C++
24 lines
555 B
C++
// Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com>
|
|
// Repository: https://github.com/okalachev/flix
|
|
|
|
// SBUS library mock to make it possible to compile simulator with rc.ino
|
|
|
|
#include "joystick.h"
|
|
|
|
struct SBUSData {
|
|
int16_t ch[16];
|
|
};
|
|
|
|
class SBUS {
|
|
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 joystickInit(); };
|
|
SBUSData data() {
|
|
SBUSData data;
|
|
joystickGet(data.ch);
|
|
return data;
|
|
};
|
|
};
|