Squashed 'panda/' changes from 39c1e39e..06958e42

06958e42 Fix pedal bootstub build
f5817e6b Fix Pedal bootstub version
c00fe867 CircleCI needs to check bootstub doesn't break too
9b5b696e Subaru: remove GM leftover
20c76ad5 Power Saving (#169)
c6eeaad6 Subaru: added last engage/disengage regression test
37d46e0c Subaru: added subaru safety tests
5686dae2 Subaru updated driver factor
a6193a82 Dcp remove (#168)
e437b9b4 Subaru: fixed bug and added safety tests
176f1325 Subaru: added proper safety model
0b10bb70 Subaru safety: move camera to bus 2
bce279a6 Pedal: only one firmware (#164)
4f73cb48 Toyota pedal: checking for no pedal being commanded when openpilot is off
0b2327e5 Merge pull request #160 from commaai/capture_make_failure
7b504d2f panda safety test that replays drives of saved CAN messages (#151)
d7d08892 Capture make failure so it can be logged to sentry

git-subtree-dir: panda
git-subtree-split: 06958e424cad7efa3fb35d262480c29817733059
This commit is contained in:
Vehicle Researcher
2019-03-26 01:03:49 -07:00
parent a25e2153a0
commit 2a0f066426
25 changed files with 483 additions and 457 deletions

View File

@@ -8,6 +8,7 @@ import usb1
import os
import time
import traceback
import subprocess
from dfu import PandaDFU
from esptool import ESPROM, CesantaFlasher
from flash_release import flash_release
@@ -25,7 +26,13 @@ DEBUG = os.getenv("PANDADEBUG") is not None
def build_st(target, mkfile="Makefile"):
from panda import BASEDIR
assert(os.system('cd %s && make -f %s clean && make -f %s %s >/dev/null' % (os.path.join(BASEDIR, "board"), mkfile, mkfile, target)) == 0)
cmd = 'cd %s && make -f %s clean && make -f %s %s >/dev/null' % (os.path.join(BASEDIR, "board"), mkfile, mkfile, target)
try:
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
except subprocess.CalledProcessError as exception:
output = exception.output
returncode = exception.returncode
raise
def parse_can_buffer(dat):
ret = []
@@ -243,6 +250,7 @@ class Panda(object):
pass
def flash(self, fn=None, code=None, reconnect=True):
print("flash: main version is " + self.get_version())
if not self.bootstub:
self.reset(enter_bootstub=True)
assert(self.bootstub)
@@ -263,7 +271,7 @@ class Panda(object):
code = f.read()
# get version
print("flash: version is "+self.get_version())
print("flash: bootstub version is " + self.get_version())
# do flash
Panda.flash_static(self._handle, code)
@@ -541,4 +549,3 @@ class Panda(object):
msg = self.kline_ll_recv(2, bus=bus)
msg += self.kline_ll_recv(ord(msg[1])-2, bus=bus)
return msg

View File

@@ -8,6 +8,8 @@ def ensure_st_up_to_date():
with open(os.path.join(BASEDIR, "VERSION")) as f:
repo_version = f.read()
repo_version += "-EON" if os.path.isfile('/EON') else "-DEV"
panda = None
panda_dfu = None
should_flash_recover = False
@@ -24,7 +26,7 @@ def ensure_st_up_to_date():
if len(panda_dfu) > 0:
panda_dfu = PandaDFU(panda_dfu[0])
panda_dfu.recover()
print "waiting for board..."
time.sleep(1)