0.1.6: UPS, carico sotto il 10% mostrato come 'basso'
This commit is contained in:
1 parent
8ed183c1fc
commit
99aba8fa03
4 files changed
+17
-6
No files matched your search
@@ -121,8 +121,15 @@ Page {
|
||||
parts.push(qsTr("carica ") + statusClient.fmtNum(u.charge_pct, 0) + "%")
|
||||
if (u.runtime_s)
|
||||
parts.push(qsTr("autonomia ") + Math.round(u.runtime_s / 60) + " min")
|
||||
if (u.load_pct !== null && u.load_pct !== undefined)
|
||||
parts.push(qsTr("carico ") + statusClient.fmtNum(u.load_pct, 0) + "%")
|
||||
// Il carico lo riportano questi firmware a passi del 2% e sotto il 10%
|
||||
// dichiarano semplicemente il minimo: un "2%" sembrerebbe una misura
|
||||
// e non lo è. Sopra il 10% il numero ha senso, sotto si dice "basso".
|
||||
if (u.load_pct !== null && u.load_pct !== undefined) {
|
||||
if (u.load_pct >= 10)
|
||||
parts.push(qsTr("carico ") + statusClient.fmtNum(u.load_pct, 0) + "%")
|
||||
else
|
||||
parts.push(qsTr("carico basso"))
|
||||
}
|
||||
if (u.input_voltage)
|
||||
parts.push(statusClient.fmtNum(u.input_voltage, 0) + " V")
|
||||
return parts.join(" · ")
|
||||
|
||||
Reference in new issue
Block a user