Making an ESP32-based quadcopter from scratch
Python arduinoautopilotcontrol-theorydroneesp32flight-controlflight-controllermavlinkquadcopterquadcopter-firmwareuav
Correctly set output parameters of simulated SBUS::read, minor name fix
Oleg Kalachevba6e63b50b22
diff --git a/flix/rc.ino b/flix/rc.inoindex 014fe6a..8927a21 100644--- a/flix/rc.ino+++ b/flix/rc.ino@@ -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();}diff --git a/gazebo/SBUS.h b/gazebo/SBUS.hindex 307a8ba..afc7559 100644--- a/gazebo/SBUS.h+++ b/gazebo/SBUS.h@@ -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();};};