openpilot v0.3.0 release

v0.3.0
Vehicle Researcher 2017-05-12 16:46:20 -07:00
parent 4653a9aef0
commit c5d8aec28b
9 changed files with 12 additions and 16 deletions

2
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "panda"]
path = panda
url = git@github.com:commaai/panda.git
url = https://github.com/commaai/panda.git

Binary file not shown.

View File

@ -22,7 +22,6 @@ class CANParser(object):
self.msgs_ck = [check[0] for check in checks]
self.frqs = [check[1] for check in checks]
self.can_valid = False # start with False CAN assumption
self.msgs_upd = [] # list of updated messages
# list of received msg we want to monitor counter and checksum for
# read dbc file
self.can_dbc = dbc(os.path.join(dbcs.DBC_PATH, dbc_f))
@ -55,14 +54,14 @@ class CANParser(object):
self._message_indices[x].append(i)
def update_can(self, can_recv):
self.msgs_upd = []
msgs_upd = []
cn_vl_max = 5 # no more than 5 wrong counter checks
# we are subscribing to PID_XXX, else data from USB
for msg, ts, cdat, _ in can_recv:
idxs = self._message_indices[msg]
if idxs:
self.msgs_upd.append(msg)
msgs_upd.append(msg)
# read the entire message
out = self.can_dbc.decode((msg, 0, cdat))[1]
# checksum check
@ -107,7 +106,7 @@ class CANParser(object):
sg = self._sgs[ii]
self.vl[msg][sg] = out[sg]
# for each message, check if it's too long since last time we received it
# for each message, check if it's too long since last time we received it
self._check_dead_msgs()
# assess overall can validity: if there is one relevant message invalid, then set can validity flag to False
@ -116,6 +115,8 @@ class CANParser(object):
#print "CAN INVALID!"
self.can_valid = False
return msgs_upd
def _check_dead_msgs(self):
### input:
## simple stuff for now: msg is not valid if a message isn't received for 10 consecutive steps

View File

@ -1 +1 @@
const char *openpilot_version = "0.3.0-devel";
const char *openpilot_version = "0.3.0";

View File

@ -1,4 +1,3 @@
import numpy as np
from common.numpy_fast import clip
def rate_limit(new_value, last_value, dw_step, up_step):

View File

@ -160,9 +160,11 @@ baseui_running = False
def manage_baseui(start):
global baseui_running
if start and not baseui_running:
cloudlog.info("starting baseui")
os.system("am start -n com.baseui/.MainActivity")
baseui_running = True
elif not start and baseui_running:
cloudlog.info("stopping baseui")
os.system("am force-stop com.baseui")
baseui_running = False

View File

@ -45,7 +45,7 @@ class RadarInterface(object):
if any(x[0] == 0x445 for x in can_pub_radar):
break
self.rcp.update_can(can_pub_radar)
updated_messages = self.rcp.update_can(can_pub_radar)
ret = car.RadarState.new_message()
errors = []
@ -54,7 +54,7 @@ class RadarInterface(object):
ret.errors = errors
ret.canMonoTimes = canMonoTimes
for ii in self.rcp.msgs_upd:
for ii in updated_messages:
cpt = self.rcp.vl[ii]
if cpt['LONG_DIST'] < 255:
if ii not in self.pts or cpt['NEW_TRACK']:

View File

@ -8,13 +8,7 @@ from common.api import api_get
from common.params import Params
def get_imei():
# Telephony.getDeviceId()
result = subprocess.check_output(["service", "call", "phone", "130"]).strip().split("\n")
hex_data = ''.join(l[14:49] for l in result[1:]).replace(" ", "")
data = hex_data.decode("hex")
imei_str = data[8:-4].replace("\x00", "")
return imei_str
return subprocess.check_output(["getprop", "oem.device.imeicache"]).strip()
def get_serial():
return subprocess.check_output(["getprop", "ro.serialno"]).strip()

Binary file not shown.