configurable polling intervals and thresholds per module

This commit is contained in:
Damocles 2026-04-12 17:44:52 +02:00
parent 0eaba947f4
commit 7a4e1859a9
11 changed files with 64 additions and 32 deletions

View file

@ -8,7 +8,8 @@ M.BarSection {
tooltip: "Temperature: " + root.celsius + "\u00B0C"
property int celsius: 0
property color _stateColor: celsius > 80 ? M.Theme.base09 : celsius > 60 ? M.Theme.base0A : M.Theme.base08
property color _stateColor: celsius > (M.Modules.temperature.hot || 80) ? M.Theme.base09
: celsius > (M.Modules.temperature.warm || 60) ? M.Theme.base0A : M.Theme.base08
Behavior on _stateColor { ColorAnimation { duration: 300 } }
FileView {
@ -17,7 +18,7 @@ M.BarSection {
onLoaded: root.celsius = Math.round(parseInt(text()) / 1000)
}
Timer {
interval: 2000
interval: M.Modules.temperature.interval || 2000
running: true
repeat: true
onTriggered: thermal.reload()