We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed9b76a commit 11f66caCopy full SHA for 11f66ca
src/MAVez/controller.py
@@ -1062,6 +1062,8 @@ async def sync_clocks(self) -> int:
1062
# rolling average for offset
1063
if self.offset is None:
1064
self.offset = offset
1065
+ elif abs(self.offset - offset) > self.offset * 0.1: # if offset differs by more than 10%, ignore it
1066
+ self.logger.debug("[Controller] Offset differs significantly, ignoring sample.")
1067
else:
1068
self.offset = (self.offset * len(self.local_samples) + offset) // (len(self.local_samples) + 1)
1069
0 commit comments