mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-22 08:43:58 +08:00
dragonpilot beta3
date: 2023-10-09T10:55:55 commit: 91b6e3aecd7170f24bccacb10c515ec281c30295
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
import numpy as np
|
||||
import time
|
||||
from collections import defaultdict, deque
|
||||
from typing import DefaultDict, Deque, MutableSequence
|
||||
|
||||
from common.realtime import sec_since_boot
|
||||
import cereal.messaging as messaging
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ if __name__ == "__main__":
|
||||
rcv_times: DefaultDict[str, MutableSequence[float]] = defaultdict(lambda: deque(maxlen=100))
|
||||
valids: DefaultDict[str, Deque[bool]] = defaultdict(lambda: deque(maxlen=100))
|
||||
|
||||
t = sec_since_boot()
|
||||
t = time.monotonic()
|
||||
for name in socket_names:
|
||||
sock = messaging.sub_sock(name, poller=poller)
|
||||
sockets[sock] = name
|
||||
@@ -36,7 +36,7 @@ if __name__ == "__main__":
|
||||
|
||||
name = msg.which()
|
||||
|
||||
t = sec_since_boot()
|
||||
t = time.monotonic()
|
||||
rcv_times[name].append(msg.logMonoTime / 1e9)
|
||||
valids[name].append(msg.valid)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user