diff options
author | Maxim Devaev <[email protected]> | 2023-09-10 14:54:21 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2023-09-10 14:54:25 +0300 |
commit | cec03c4468df87bcdc68f20c2cf51a7998c56ebd (patch) | |
tree | 17df2d093adcb74d2c8cda905cac8453122082d0 /kvmd/apps | |
parent | 7900a243a298df7e211aa2ba68db49b998396bc3 (diff) |
mute false-positive underpower on cm4-based (v4) devices
Diffstat (limited to 'kvmd/apps')
-rw-r--r-- | kvmd/apps/__init__.py | 1 | ||||
-rw-r--r-- | kvmd/apps/kvmd/info/hw.py | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/kvmd/apps/__init__.py b/kvmd/apps/__init__.py index 4bd8a60d..90399638 100644 --- a/kvmd/apps/__init__.py +++ b/kvmd/apps/__init__.py @@ -383,6 +383,7 @@ def _get_config_scheme() -> dict: "extras": Option("/usr/share/kvmd/extras", type=valid_abs_dir), "hw": { "vcgencmd_cmd": Option(["/opt/vc/bin/vcgencmd"], type=valid_command), + "ignore_past": Option(False, type=valid_bool), "state_poll": Option(10.0, type=valid_float_f01), }, "fan": { diff --git a/kvmd/apps/kvmd/info/hw.py b/kvmd/apps/kvmd/info/hw.py index fe0008ab..ed6d8a2c 100644 --- a/kvmd/apps/kvmd/info/hw.py +++ b/kvmd/apps/kvmd/info/hw.py @@ -46,10 +46,12 @@ class HwInfoSubmanager(BaseInfoSubmanager): def __init__( self, vcgencmd_cmd: list[str], + ignore_past: bool, state_poll: float, ) -> None: self.__vcgencmd_cmd = vcgencmd_cmd + self.__ignore_past = ignore_past self.__state_poll = state_poll self.__dt_cache: dict[str, str] = {} @@ -127,6 +129,7 @@ class HwInfoSubmanager(BaseInfoSubmanager): "past": bool(flags & (1 << 18)), }, }, + "ignore_past": self.__ignore_past, } return None |