Skip to content

armgit / flix

Public Imported from GitHub
0

Making an ESP32-based quadcopter from scratch

Don't apply level correction on idle thrust

Oleg Kalachev0f2e384ce607
diff --git a/flix/estimate.ino b/flix/estimate.ino
index e66cf38..3303da9 100644
--- a/flix/estimate.ino
+++ b/flix/estimate.ino
@@ -47,6 +47,7 @@ void applyAcc() {
void applyLevel() {
if (landed) return;
+ if (thrustTarget < 0.1) return; // skip at idle thrust
// assume the pilot keeps the drone more or less level in flight
Vector up = Quaternion::rotateVector(Vector(0, 0, 1), attitude);