mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 09:39:33 +00:00
Correctly set output parameters of simulated SBUS::read, minor name fix
This commit is contained in:
parent
410fccf015
commit
ba6e63b50b
@ -18,9 +18,9 @@ void setupRC() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void readRC() {
|
void readRC() {
|
||||||
bool failSafe, lostFrame;
|
bool failsafe, lostFrame;
|
||||||
if (RC.read(channels, &failSafe, &lostFrame)) {
|
if (RC.read(channels, &failsafe, &lostFrame)) {
|
||||||
if (failSafe) { return; } // TODO:
|
if (failsafe) { return; } // TODO:
|
||||||
if (lostFrame) { return; }
|
if (lostFrame) { return; }
|
||||||
normalizeRC();
|
normalizeRC();
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,9 @@ class SBUS {
|
|||||||
public:
|
public:
|
||||||
SBUS(HardwareSerial& bus) {};
|
SBUS(HardwareSerial& bus) {};
|
||||||
void begin() {};
|
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();
|
return joystickGet();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user