Skip to content

armgit / flix

Public Imported from GitHub
0

Making an ESP32-based quadcopter from scratch

Fix logging pointer overflow check

Oleg Kalachevc7422d12a24c
diff --git a/flix/log.ino b/flix/log.ino
index 57e7fce..e9e852b 100644
--- a/flix/log.ino
+++ b/flix/log.ino
@@ -30,7 +30,7 @@ void logData()
logBuffer[logPointer][10] = thrustTarget;
logPointer++;
- if (logPointer >= 2000) {
+ if (logPointer >= LOG_SIZE) {
logPointer = 0;
}
}