Use double for storing time instead of float

Float precision may be not enough after some time of operating
This commit is contained in:
Oleg Kalachev
2025-01-12 19:58:36 +03:00
parent d4e04c46cd
commit 70f5186c1b
10 changed files with 16 additions and 14 deletions

View File

@@ -113,7 +113,7 @@ bool setParameter(const char *name, const float value) {
}
void syncParameters() {
static float lastSync = 0;
static double lastSync = 0;
if (t - lastSync < 1) return; // sync once per second
if (motorsActive()) return; // don't use flash while flying, it may cause a delay
lastSync = t;