refactor: LPA interface, CLI location (#35328)

* refactor: LPABase, simpler switch() interface

* leave this since LPABase hides

* hw-agnostic esim.py

* newline

* use latest
This commit is contained in:
Trey Moen
2025-05-25 08:54:07 -07:00
committed by GitHub
parent 840ced5005
commit 993b1b4d88
7 changed files with 117 additions and 90 deletions
+4 -2
View File
@@ -1,12 +1,11 @@
import random
from cereal import log
from openpilot.system.hardware.base import HardwareBase
from openpilot.system.hardware.base import HardwareBase, LPABase
NetworkType = log.DeviceState.NetworkType
NetworkStrength = log.DeviceState.NetworkStrength
class Pc(HardwareBase):
def get_os_version(self):
return None
@@ -41,6 +40,9 @@ class Pc(HardwareBase):
'data_connected': False
}
def get_sim_lpa(self) -> LPABase:
raise NotImplementedError("SIM LPA not implemented for PC")
def get_network_strength(self, network_type):
return NetworkStrength.unknown