From c026ae97331bab165ba436c895ac60375e8f9185 Mon Sep 17 00:00:00 2001 From: Vehicle Researcher Date: Fri, 12 May 2017 16:46:20 -0700 Subject: [PATCH] openpilot v0.3.0 release old-commit-hash: c5d8aec28b5230d34ae4b677c2091cc3dec7e3e8 --- .gitmodules | 2 +- apk/com.baseui.apk | 4 ++-- selfdrive/car/honda/can_parser.py | 9 +++++---- selfdrive/common/version.h | 2 +- selfdrive/controls/lib/drive_helpers.py | 1 - selfdrive/manager.py | 2 ++ selfdrive/radar/nidec/interface.py | 4 ++-- selfdrive/registration.py | 8 +------- selfdrive/visiond/visiond | 4 ++-- 9 files changed, 16 insertions(+), 20 deletions(-) diff --git a/.gitmodules b/.gitmodules index 2bbbbd459d..3060715f42 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "panda"] path = panda - url = git@github.com:commaai/panda.git + url = https://github.com/commaai/panda.git diff --git a/apk/com.baseui.apk b/apk/com.baseui.apk index 2c576252a4..dc34734b92 100644 --- a/apk/com.baseui.apk +++ b/apk/com.baseui.apk @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:24fcc5e7b728675f4fe5b4da4a13793d20ac66fc0eb37f8ffc294bcea03014d7 -size 8987137 +oid sha256:84da6150714d2069367c3cc9591b795cd33b218635000e79e1c031e9c0232039 +size 8987577 diff --git a/selfdrive/car/honda/can_parser.py b/selfdrive/car/honda/can_parser.py index ee11363e15..cad1676593 100644 --- a/selfdrive/car/honda/can_parser.py +++ b/selfdrive/car/honda/can_parser.py @@ -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 diff --git a/selfdrive/common/version.h b/selfdrive/common/version.h index 6285d4123e..6fec6ef3c4 100644 --- a/selfdrive/common/version.h +++ b/selfdrive/common/version.h @@ -1 +1 @@ -const char *openpilot_version = "0.3.0-devel"; +const char *openpilot_version = "0.3.0"; diff --git a/selfdrive/controls/lib/drive_helpers.py b/selfdrive/controls/lib/drive_helpers.py index 6c3689ebe7..dcf336b99d 100644 --- a/selfdrive/controls/lib/drive_helpers.py +++ b/selfdrive/controls/lib/drive_helpers.py @@ -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): diff --git a/selfdrive/manager.py b/selfdrive/manager.py index db0a8417b5..a4a9e9f9f0 100755 --- a/selfdrive/manager.py +++ b/selfdrive/manager.py @@ -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 diff --git a/selfdrive/radar/nidec/interface.py b/selfdrive/radar/nidec/interface.py index 0a02bc8d1c..e1da1b3d90 100755 --- a/selfdrive/radar/nidec/interface.py +++ b/selfdrive/radar/nidec/interface.py @@ -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']: diff --git a/selfdrive/registration.py b/selfdrive/registration.py index 946d6d722f..0779171bfb 100644 --- a/selfdrive/registration.py +++ b/selfdrive/registration.py @@ -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() diff --git a/selfdrive/visiond/visiond b/selfdrive/visiond/visiond index 5f0f994162..2965baef0b 100755 --- a/selfdrive/visiond/visiond +++ b/selfdrive/visiond/visiond @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb6d9abbef0be0d91c425402a9d85b0192ba691ae80bcbf180ec946d73160068 -size 16364248 +oid sha256:3933af9e64edf655b75cef06fc40c44254fe674c226277869b74c4714feab3b6 +size 16373432