mirror of
https://github.com/okalachev/flix.git
synced 2026-01-12 05:57:52 +00:00
Use double for storing time instead of float
Float precision may be not enough after some time of operating
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user