mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-10-01 03:43:51 +08:00
USB power mode cleanup (#25619)
* first pass at usb power mode cleanup
* fix build
* a sneaky one
* little more
* fix build
* bump pnada
* remove that
* power monitoring cleanup
* fix tests
* bump submodules
old-commit-hash: 28cb1897cb
This commit is contained in:
@@ -78,10 +78,6 @@ class HardwareBase(ABC):
|
||||
def set_bandwidth_limit(upload_speed_kbps: int, download_speed_kbps: int) -> None:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def get_usb_present(self):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def get_current_power_draw(self):
|
||||
pass
|
||||
|
||||
@@ -50,12 +50,9 @@ class Pc(HardwareBase):
|
||||
def get_network_strength(self, network_type):
|
||||
return NetworkStrength.unknown
|
||||
|
||||
def get_usb_present(self):
|
||||
return False
|
||||
|
||||
def get_current_power_draw(self):
|
||||
return 0
|
||||
|
||||
|
||||
def get_som_power_draw(self):
|
||||
return 0
|
||||
|
||||
|
||||
@@ -372,7 +372,6 @@ class Tici(HardwareBase):
|
||||
return (self.read_param_file("/sys/class/power_supply/bms/voltage_now", int) * self.read_param_file("/sys/class/power_supply/bms/current_now", int) / 1e12)
|
||||
|
||||
def shutdown(self):
|
||||
# Note that for this to work and have the device stay powered off, the panda needs to be in UsbPowerMode::CLIENT!
|
||||
os.system("sudo poweroff")
|
||||
|
||||
def get_thermal_config(self):
|
||||
|
||||
Reference in New Issue
Block a user