Utilize internal ESP32 UART invertor for SBUS

This commit is contained in:
Oleg Kalachev 2024-01-26 13:46:13 +03:00
parent 1b54b3fa25
commit 69cfc9e5fa
2 changed files with 5 additions and 0 deletions

View File

@ -5,6 +5,8 @@
#include <SBUS.h>
#define INVERT_SERIAL true // false if external SBUS invertor is used
// NOTE: use `cr` command and replace with the actual values
int channelNeutral[] = {995, 883, 200, 972, 512, 512};
int channelMax[] = {1651, 1540, 1713, 1630, 1472, 1472};
@ -14,6 +16,7 @@ SBUS RC(Serial2);
void setupRC() {
Serial.println("Setup RC");
RC.begin();
Serial2.setRxInvert(INVERT_SERIAL);
}
void readRC() {

View File

@ -122,6 +122,8 @@ public:
}
return -1;
}
void setRxInvert(bool invert) {};
};
HardwareSerial Serial, Serial2;