Making an ESP32-based quadcopter from scratch
Python arduinoautopilotcontrol-theorydroneesp32flight-controlflight-controllermavlinkquadcopterquadcopter-firmwareuav
Minor fixes and changes
Oleg Kalachevad6bc0264374
diff --git a/.gitignore b/.gitignoreindex 0ee1924..f7a56be 100644--- a/.gitignore+++ b/.gitignore@@ -1,5 +1,5 @@*.hex*.elf-gazebo/build/+build/tools/log/.dependenciesdiff --git a/README.md b/README.mdindex 27f0045..1318881 100644--- a/README.md+++ b/README.md@@ -57,8 +57,8 @@ You can also check a user contributed [variant of complete circuit diagram](http||~~SBUS inverter~~*|<img src="docs/img/inv.jpg" width=100>|~~1~~||3.7 Li-Po 850 MaH 60C|Battery|||||Battery charger|<img src="docs/img/charger.jpg" width=100>|1|-||Wires, connectors, tape, ...||-||3D-printed frame parts||+||Wires, connectors, tape, ...|||+||3D-printed frame parts|||*\* — not needed as ESP32 supports [software pin inversion](https://github.com/bolderflight/sbus#inverted-serial).*diff --git a/flix/control.ino b/flix/control.inoindex dc524bf..2d18175 100644--- a/flix/control.ino+++ b/flix/control.ino@@ -169,6 +169,7 @@ const char* getModeName() {case MANUAL: return "MANUAL";case ACRO: return "ACRO";case STAB: return "STAB";+ case USER: return "USER";default: return "UNKNOWN";}}diff --git a/flix/quaternion.h b/flix/quaternion.hindex 07d8504..c644156 100644--- a/flix/quaternion.h+++ b/flix/quaternion.h@@ -167,6 +167,7 @@ public:return Vector(res.x, res.y, res.z);}+ // Rotate vector by quaternioninline Vector rotate(const Vector& v) {return conjugateInversed(v);}diff --git a/gazebo/joystick.h b/gazebo/joystick.hindex 6cf9ce4..5294d77 100644--- a/gazebo/joystick.h+++ b/gazebo/joystick.h@@ -8,8 +8,8 @@#include <iostream>// simulation calibration overrides, NOTE: use `cr` command and replace with the actual values-const int channelNeutralOverride[] = {-258, -258, -27349, 0, 5417, 0};-const int channelMaxOverride[] = {27090, 27090, 27090, 27090, 27090, 1};+const int channelNeutralOverride[] = {-258, -258, -27349, 0, -27349, 0};+const int channelMaxOverride[] = {27090, 27090, 27090, 27090, -5676, 1};#define RC_CHANNEL_ROLL 0#define RC_CHANNEL_PITCH 1