mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 17:49:33 +00:00
25 lines
483 B
C++
25 lines
483 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) {};
|
|
void begin() {};
|
|
bool read() { return joystickGet(); };
|
|
SBUSData data() {
|
|
SBUSData data;
|
|
for (uint8_t i = 0; i < 16; i++) {
|
|
data.ch[i] = channels[i];
|
|
}
|
|
return data;
|
|
};
|
|
};
|