Files
sunnypilot/system/hardware/__init__.py
Adeeb Shihadeh 9e945d4d93 set AGNOS from /AGNOS file
old-commit-hash: 9cda2d6338
2022-06-11 18:43:24 -07:00

17 lines
345 B
Python

import os
from typing import cast
from system.hardware.base import HardwareBase
from system.hardware.tici.hardware import Tici
from system.hardware.pc.hardware import Pc
TICI = os.path.isfile('/TICI')
AGNOS = os.path.isfile('/AGNOS')
PC = not TICI
if TICI:
HARDWARE = cast(HardwareBase, Tici())
else:
HARDWARE = cast(HardwareBase, Pc())