Log modem version and some NV values (#24137)

* add back modem version number logging

* tici only

* log nv

* make event

* str cast
This commit is contained in:
Willem Melching
2022-04-05 14:29:07 -07:00
committed by GitHub
parent 5e1095e881
commit be35caca61
5 changed files with 28 additions and 8 deletions
+4 -2
View File
@@ -134,9 +134,11 @@ class HardwareBase(ABC):
def get_gpu_usage_percent(self):
pass
@abstractmethod
def get_modem_version(self):
pass
return None
def get_modem_nv(self):
return None
@abstractmethod
def get_modem_temperatures(self):
-3
View File
@@ -411,9 +411,6 @@ class Android(HardwareBase):
except Exception:
return 0
def get_modem_version(self):
return None
def get_modem_temperatures(self):
# Not sure if we can get this on the LeEco
return []
-3
View File
@@ -92,9 +92,6 @@ class Pc(HardwareBase):
def get_gpu_usage_percent(self):
return 0
def get_modem_version(self):
return None
def get_modem_temperatures(self):
return []
+13
View File
@@ -317,6 +317,19 @@ class Tici(HardwareBase):
except Exception:
return None
def get_modem_nv(self):
timeout = 0.2 # Default timeout is too short
files = (
'/nv/item_files/modem/mmode/ue_usage_setting',
'/nv/item_files/ims/IMS_enable',
'/nv/item_files/modem/mmode/sms_only',
)
try:
modem = self.get_modem()
return { fn: str(modem.Command(f'AT+QNVFR="{fn}"', math.ceil(timeout), dbus_interface=MM_MODEM, timeout=timeout)) for fn in files}
except Exception:
return None
def get_modem_temperatures(self):
timeout = 0.2 # Default timeout is too short
try: