summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-03-19 23:08:11 +0300
committerMaxim Devaev <[email protected]>2022-03-19 23:08:11 +0300
commitd4c307b804f3328e9b9d25314c261c390ceaa128 (patch)
tree7caf1ccbee134cd673237c2a3f0ea93e7ccb63f1
parentc2634cb69f7d32076bb17f846ae18cc85d6ed8de (diff)
vcgencmd measure_temp and thermal_zone0 are the same
-rw-r--r--kvmd/apps/kvmd/info/hw.py10
-rwxr-xr-xtestenv/fakes/vcgencmd1
2 files changed, 1 insertions, 10 deletions
diff --git a/kvmd/apps/kvmd/info/hw.py b/kvmd/apps/kvmd/info/hw.py
index 436a6157..9a4d0c53 100644
--- a/kvmd/apps/kvmd/info/hw.py
+++ b/kvmd/apps/kvmd/info/hw.py
@@ -54,10 +54,9 @@ class HwInfoSubmanager(BaseInfoSubmanager):
self.__state_poll = state_poll
async def get_state(self) -> Dict:
- (model, cpu_temp, gpu_temp, throttling) = await asyncio.gather(
+ (model, cpu_temp, throttling) = await asyncio.gather(
self.__get_dt_model(),
self.__get_cpu_temp(),
- self.__get_gpu_temp(),
self.__get_throttling(),
)
return {
@@ -68,7 +67,6 @@ class HwInfoSubmanager(BaseInfoSubmanager):
"health": {
"temp": {
"cpu": cpu_temp,
- "gpu": gpu_temp,
},
"throttling": throttling,
},
@@ -127,12 +125,6 @@ class HwInfoSubmanager(BaseInfoSubmanager):
}
return None
- async def __get_gpu_temp(self) -> Optional[float]:
- return (await self.__parse_vcgencmd(
- arg="measure_temp",
- parser=(lambda text: float(text.split("=")[1].split("'")[0])),
- ))
-
async def __parse_vcgencmd(self, arg: str, parser: Callable[[str], _RetvalT]) -> Optional[_RetvalT]:
cmd = [*self.__vcgencmd_cmd, arg]
try:
diff --git a/testenv/fakes/vcgencmd b/testenv/fakes/vcgencmd
index 3f4990c6..3985bc1f 100755
--- a/testenv/fakes/vcgencmd
+++ b/testenv/fakes/vcgencmd
@@ -1,5 +1,4 @@
#!/bin/sh
case $1 in
get_throttled) echo "throttled=0x0";;
- measure_temp) echo "temp=35.0'C";;
esac