mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 09:39:33 +00:00
Utilize internal ESP32 UART invertor for SBUS
This commit is contained in:
parent
1b54b3fa25
commit
69cfc9e5fa
@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
#include <SBUS.h>
|
#include <SBUS.h>
|
||||||
|
|
||||||
|
#define INVERT_SERIAL true // false if external SBUS invertor is used
|
||||||
|
|
||||||
// NOTE: use `cr` command and replace with the actual values
|
// NOTE: use `cr` command and replace with the actual values
|
||||||
int channelNeutral[] = {995, 883, 200, 972, 512, 512};
|
int channelNeutral[] = {995, 883, 200, 972, 512, 512};
|
||||||
int channelMax[] = {1651, 1540, 1713, 1630, 1472, 1472};
|
int channelMax[] = {1651, 1540, 1713, 1630, 1472, 1472};
|
||||||
@ -14,6 +16,7 @@ SBUS RC(Serial2);
|
|||||||
void setupRC() {
|
void setupRC() {
|
||||||
Serial.println("Setup RC");
|
Serial.println("Setup RC");
|
||||||
RC.begin();
|
RC.begin();
|
||||||
|
Serial2.setRxInvert(INVERT_SERIAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void readRC() {
|
void readRC() {
|
||||||
|
@ -122,6 +122,8 @@ public:
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setRxInvert(bool invert) {};
|
||||||
};
|
};
|
||||||
|
|
||||||
HardwareSerial Serial, Serial2;
|
HardwareSerial Serial, Serial2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user