mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
mute false-positive underpower on cm4-based (v4) devices
This commit is contained in:
@@ -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": {
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user