Merge panda subtree

This commit is contained in:
Vehicle Researcher
2019-03-26 01:03:49 -07:00
25 changed files with 475 additions and 455 deletions

View File

@@ -250,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)
@@ -270,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)

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)