1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
Date: Mon, 10 Oct 2022 15:05:43 +0200
Subject: main: add new name for PP Keyboard case
Now that the PPKB patches have been upstreamed, the battery is named
`ip5xxx-battery` instead of `kb151`. Add this possibility so the name is
reported properly (the old value is kept for backward compatibility).
Forwarded: https://gitlab.com/MartijnBraam/powersupply/-/merge_requests/8
---
powersupply/__main__.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/powersupply/__main__.py b/powersupply/__main__.py
index 611f6b5..442561d 100644
--- a/powersupply/__main__.py
+++ b/powersupply/__main__.py
@@ -216,7 +216,8 @@ class DataPoller(threading.Thread):
name = '{} {}'.format(manuf_handle.read().strip(), name)
names = {
- 'kb151': 'Keyboard case'
+ 'kb151': 'Keyboard case',
+ 'ip5xxx-battery': 'Keyboard case'
}
if name in names:
name = names[name]
|