Correctly set output parameters of simulated SBUS::read, minor name fix

This commit is contained in:
Oleg Kalachev 2024-02-06 21:02:20 +03:00
parent 410fccf015
commit ba6e63b50b
2 changed files with 6 additions and 4 deletions

View File

@ -18,9 +18,9 @@ void setupRC() {
}
void readRC() {
bool failSafe, lostFrame;
if (RC.read(channels, &failSafe, &lostFrame)) {
if (failSafe) { return; } // TODO:
bool failsafe, lostFrame;
if (RC.read(channels, &failsafe, &lostFrame)) {
if (failsafe) { return; } // TODO:
if (lostFrame) { return; }
normalizeRC();
}

View File

@ -9,7 +9,9 @@ class SBUS {
public:
SBUS(HardwareSerial& bus) {};
void begin() {};
bool read(int16_t* channels, bool* failsafe, bool* lostFrame) { // NOTE: on the hardware channels is uint16_t
bool read(int16_t *channels, bool *failsafe, bool *lostFrame) { // NOTE: on the hardware channels is uint16_t
*failsafe = false;
*lostFrame = false;
return joystickGet();
};
};