Skip to content

armgit / flix

Public Imported from GitHub
0

Making an ESP32-based quadcopter from scratch

Remove unneeded INVERT_SERIAL define

Oleg Kalachev0661aecccfb9
diff --git a/flix/rc.ino b/flix/rc.ino
index ce7e439..014fe6a 100644
--- a/flix/rc.ino
+++ b/flix/rc.ino
@@ -5,8 +5,6 @@
#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};
@@ -16,7 +14,7 @@ SBUS RC(Serial2);
void setupRC() {
Serial.println("Setup RC");
RC.begin();
- Serial2.setRxInvert(INVERT_SERIAL);
+ Serial2.setRxInvert(true); // SBUS uses inverted signal
}
void readRC() {