mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-01 05:33:49 +08:00
System: fix dynamic pathing for crash logs (#535)
This commit is contained in:
@@ -14,7 +14,7 @@ from openpilot.system.hardware.hw import Paths
|
||||
API_HOST = os.getenv('SUNNYLINK_API_HOST', 'https://stg.api.sunnypilot.ai')
|
||||
UNREGISTERED_SUNNYLINK_DONGLE_ID = "UnregisteredDevice"
|
||||
MAX_RETRIES = 6
|
||||
CRASH_LOG_DIR = '/data/community/crashes'
|
||||
CRASH_LOG_DIR = Paths.crash_log_root()
|
||||
|
||||
|
||||
class SunnylinkApi(BaseApi):
|
||||
|
||||
@@ -70,3 +70,10 @@ class Paths:
|
||||
return str(Path(Paths.comma_home()) / "media" / "0" / "models")
|
||||
else:
|
||||
return "/data/media/0/models"
|
||||
|
||||
@staticmethod
|
||||
def crash_log_root() -> str:
|
||||
if PC:
|
||||
return str(Path(Paths.comma_home()) / "community" / "crashes")
|
||||
else:
|
||||
return "/data/community/crashes"
|
||||
|
||||
Reference in New Issue
Block a user