mirror of
https://github.com/okalachev/flix.git
synced 2025-08-17 17:16:10 +00:00
Keep the t variable monotonic in the simulation
Otherwise it causes stopping sending MAVLink and other bugs
This commit is contained in:
@@ -134,7 +134,8 @@ void delay(uint32_t ms) {
|
||||
}
|
||||
|
||||
unsigned long __micros;
|
||||
unsigned long __resetTime = 0;
|
||||
|
||||
unsigned long micros() {
|
||||
return __micros;
|
||||
return __micros + __resetTime; // keep the time monotonic
|
||||
}
|
||||
|
Reference in New Issue
Block a user