mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-18 17:23:52 +08:00
cleanup fw filename conventions (#1434)
* cleanup fn * import os * fix path
This commit is contained in:
@@ -14,7 +14,7 @@ from typing import Optional
|
||||
from itertools import accumulate
|
||||
|
||||
from .base import BaseHandle
|
||||
from .constants import McuType
|
||||
from .constants import FW_PATH, McuType
|
||||
from .dfu import PandaDFU
|
||||
from .isotp import isotp_send, isotp_recv
|
||||
from .spi import PandaSpiHandle, PandaSpiException
|
||||
@@ -485,7 +485,7 @@ class Panda:
|
||||
|
||||
def flash(self, fn=None, code=None, reconnect=True):
|
||||
if not fn:
|
||||
fn = self._mcu_type.config.app_path
|
||||
fn = os.path.join(FW_PATH, self._mcu_type.config.app_fn)
|
||||
assert os.path.isfile(fn)
|
||||
logging.debug("flash: main version is %s", self.get_version())
|
||||
if not self.bootstub:
|
||||
@@ -536,7 +536,8 @@ class Panda:
|
||||
|
||||
def up_to_date(self) -> bool:
|
||||
current = self.get_signature()
|
||||
expected = Panda.get_signature_from_firmware(self.get_mcu_type().config.app_path)
|
||||
fn = os.path.join(FW_PATH, self.get_mcu_type().config.app_fn)
|
||||
expected = Panda.get_signature_from_firmware(fn)
|
||||
return (current == expected)
|
||||
|
||||
def call_control_api(self, msg):
|
||||
|
||||
Reference in New Issue
Block a user