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:
Adeeb Shihadeh
2022-08-31 21:13:53 -07:00
committed by GitHub
parent e422f77099
commit caac56b92e
11 changed files with 24 additions and 85 deletions
-4
View File
@@ -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
+1 -4
View File
@@ -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
-1
View File
@@ -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):