mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 08:14:00 +08:00
openpilot v0.6 release
This commit is contained in:
@@ -3,14 +3,12 @@ import os
|
||||
import sys
|
||||
from collections import defaultdict
|
||||
from common.realtime import sec_since_boot
|
||||
import zmq
|
||||
import selfdrive.messaging as messaging
|
||||
from selfdrive.services import service_list
|
||||
|
||||
|
||||
def can_printer(bus=0, max_msg=None, addr="127.0.0.1"):
|
||||
context = zmq.Context()
|
||||
logcan = messaging.sub_sock(context, service_list['can'].port, addr=addr)
|
||||
logcan = messaging.sub_sock(service_list['can'].port, addr=addr)
|
||||
|
||||
start = sec_since_boot()
|
||||
lp = sec_since_boot()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python2
|
||||
import psutil
|
||||
import time
|
||||
import os
|
||||
@@ -30,7 +30,7 @@ SLEEP_INTERVAL = 0.2
|
||||
|
||||
monitored_proc_names = [
|
||||
'ubloxd', 'thermald', 'uploader', 'deleter', 'controlsd', 'plannerd', 'radard', 'mapd', 'loggerd' , 'logmessaged', 'tombstoned',
|
||||
'logcatd', 'proclogd', 'boardd', 'pandad', './ui', 'calibrationd', 'locationd', 'visiond', 'sensord', 'updated', 'gpsd', 'athena']
|
||||
'logcatd', 'proclogd', 'boardd', 'pandad', './ui', 'calibrationd', 'params_learner', 'visiond', 'sensord', 'updated', 'gpsd', 'athena']
|
||||
cpu_time_names = ['user', 'system', 'children_user', 'children_system']
|
||||
|
||||
timer = getattr(time, 'monotonic', time.time)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python2
|
||||
import sys
|
||||
import argparse
|
||||
import zmq
|
||||
@@ -14,7 +14,6 @@ def run_server(socketio):
|
||||
socketio.run(app, host='0.0.0.0', port=4000)
|
||||
|
||||
if __name__ == "__main__":
|
||||
context = zmq.Context()
|
||||
poller = zmq.Poller()
|
||||
|
||||
parser = argparse.ArgumentParser(description='Sniff a communcation socket')
|
||||
@@ -40,9 +39,9 @@ if __name__ == "__main__":
|
||||
else:
|
||||
print("service not found")
|
||||
sys.exit(-1)
|
||||
sock = messaging.sub_sock(context, port, poller, addr=args.addr)
|
||||
sock = messaging.sub_sock(port, poller, addr=args.addr)
|
||||
if args.proxy:
|
||||
republish_socks[sock] = messaging.pub_sock(context, port)
|
||||
republish_socks[sock] = messaging.pub_sock(port)
|
||||
|
||||
if args.map:
|
||||
from flask.ext.socketio import SocketIO #pylint: disable=no-name-in-module, import-error
|
||||
|
||||
@@ -11,12 +11,10 @@
|
||||
# - since some messages are published at low frequency, keep this script running for at least 30s,
|
||||
# until all messages are received at least once
|
||||
|
||||
import zmq
|
||||
import selfdrive.messaging as messaging
|
||||
from selfdrive.services import service_list
|
||||
|
||||
context = zmq.Context()
|
||||
logcan = messaging.sub_sock(context, service_list['can'].port)
|
||||
logcan = messaging.sub_sock(service_list['can'].port)
|
||||
msgs = {}
|
||||
while True:
|
||||
lc = messaging.recv_sock(logcan, True)
|
||||
|
||||
Reference in New Issue
Block a user