openpilot v0.9.5 release

date: 2023-11-17T23:53:40
master commit: d3aad9ca46
This commit is contained in:
Vehicle Researcher
2023-11-17 23:53:40 +00:00
parent eff388b1b6
commit b2f2dabe71
861 changed files with 33802 additions and 28415 deletions
+7 -7
View File
@@ -1,17 +1,17 @@
#!/usr/bin/env python3
import argparse
import binascii
import time
from collections import defaultdict
import cereal.messaging as messaging
from common.realtime import sec_since_boot
def can_printer(bus, max_msg, addr, ascii_decode):
logcan = messaging.sub_sock('can', addr=addr)
start = sec_since_boot()
lp = sec_since_boot()
start = time.monotonic()
lp = time.monotonic()
msgs = defaultdict(list)
while 1:
can_recv = messaging.drain_sock(logcan, wait_for_one=True)
@@ -20,17 +20,17 @@ def can_printer(bus, max_msg, addr, ascii_decode):
if y.src == bus:
msgs[y.address].append(y.dat)
if sec_since_boot() - lp > 0.1:
if time.monotonic() - lp > 0.1:
dd = chr(27) + "[2J"
dd += f"{sec_since_boot() - start:5.2f}\n"
dd += f"{time.monotonic() - start:5.2f}\n"
for addr in sorted(msgs.keys()):
a = f"\"{msgs[addr][-1].decode('ascii', 'backslashreplace')}\"" if ascii_decode else ""
x = binascii.hexlify(msgs[addr][-1]).decode('ascii')
freq = len(msgs[addr]) / (sec_since_boot() - start)
freq = len(msgs[addr]) / (time.monotonic() - start)
if max_msg is None or addr < max_msg:
dd += "%04X(%4d)(%6d)(%3dHz) %s %s\n" % (addr, addr, len(msgs[addr]), freq, x.ljust(20), a)
print(dd)
lp = sec_since_boot()
lp = time.monotonic()
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="simple CAN data viewer",
+3 -3
View File
@@ -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)
+7 -6
View File
@@ -3,13 +3,14 @@ import os
import sys
import argparse
import json
from hexdump import hexdump
import codecs
codecs.register_error("strict", codecs.backslashreplace_errors)
from cereal import log
import cereal.messaging as messaging
from cereal.services import service_list
from hexdump import hexdump
from cereal import log
from cereal.services import SERVICE_LIST
codecs.register_error("strict", codecs.backslashreplace_errors)
if __name__ == "__main__":
@@ -30,7 +31,7 @@ if __name__ == "__main__":
poller = messaging.Poller()
for m in args.socket if len(args.socket) > 0 else service_list:
for m in args.socket if len(args.socket) > 0 else SERVICE_LIST:
messaging.sub_sock(m, poller, addr=args.addr)
values = None
+3 -3
View File
@@ -4,8 +4,8 @@ import argparse
import json
import cereal.messaging as messaging
from tools.lib.logreader import LogReader
from tools.lib.route import Route
from openpilot.tools.lib.logreader import LogReader
from openpilot.tools.lib.route import Route
LEVELS = {
"DEBUG": 10,
@@ -59,7 +59,7 @@ if __name__ == "__main__":
logs = [args.route[0]]
else:
r = Route(args.route[0])
logs = [q_log if r_log is None else r_log for (q_log, r_log) in zip(r.qlog_paths(), r.log_paths())]
logs = [q_log if r_log is None else r_log for (q_log, r_log) in zip(r.qlog_paths(), r.log_paths(), strict=True)]
if len(args.route) == 2 and logs:
n = int(args.route[1])
@@ -62,6 +62,10 @@ SUPPORTED_FW_VERSIONS = {
b"TM__ SCC F-CUP 1.00 1.02 99110-S2000\x18\x07\x08\x18W ": ConfigValues(
default_config=b"\x00\x00\x00\x01\x00\x00",
tracks_enabled=b"\x00\x00\x00\x01\x00\x01"),
# 2021 K5 HEV
b"DLhe SCC FHCUP 1.00 1.02 99110-L7000 \x01 \x102 ": ConfigValues(
default_config=b"\x00\x00\x00\x01\x00\x00",
tracks_enabled=b"\x00\x00\x00\x01\x00\x01"),
}
if __name__ == "__main__":
+2 -2
View File
@@ -2,8 +2,8 @@
import time
from cereal import car, log, messaging
from common.params import Params
from selfdrive.manager.process_config import managed_processes
from openpilot.common.params import Params
from openpilot.selfdrive.manager.process_config import managed_processes
if __name__ == "__main__":
CP = car.CarParams(notCar=True)
+1
View File
@@ -144,6 +144,7 @@ if __name__ == "__main__":
uds_client.write_data_by_identifier(VOLKSWAGEN_DATA_IDENTIFIER_TYPE.CODING, new_coding) # type: ignore
except (NegativeResponseError, MessageTimeoutError):
print("Writing new configuration failed!")
print("Make sure the comma processes are stopped: tmux kill-session -t comma")
quit()
try: