Making an ESP32-based quadcopter from scratch
Python arduinoautopilotcontrol-theorydroneesp32flight-controlflight-controllermavlinkquadcopterquadcopter-firmwareuav
Fix SBUS simulation logic Don't consider zero values from not connected joystick
Oleg Kalachev28f6cfff6016
diff --git a/gazebo/SBUS.h b/gazebo/SBUS.hindex cc32a2c..c687239 100644--- a/gazebo/SBUS.h+++ b/gazebo/SBUS.h@@ -14,7 +14,7 @@ public:SBUS(HardwareSerial& bus, const bool inv = true) {};SBUS(HardwareSerial& bus, const int8_t rxpin, const int8_t txpin, const bool inv = true) {};void begin() {};- bool read() { return true; };+ bool read() { return joystickInitialized; };SBUSData data() {SBUSData data;joystickGet(data.ch);