This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository evisum.

View the commit online.

commit b898d2cc026ccd3582cf1cfeefc7b0b094e8e72c
Author: Alastair Poole <[email protected]>
AuthorDate: Thu Jan 22 18:53:03 2026 +0000

    sensors: Add support for more battery types.
---
 src/bin/system/machine/sensors.x | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/bin/system/machine/sensors.x b/src/bin/system/machine/sensors.x
index 68ab5f0..764624c 100644
--- a/src/bin/system/machine/sensors.x
+++ b/src/bin/system/machine/sensors.x
@@ -491,6 +491,14 @@ _battery_state_get(power_t *power)
                     power->batteries[i]->charge_current = 5;
                   free(buf);
                }
+             snprintf(path, sizeof(path), "%s/capacity", link);
+             buf = file_contents(path);
+             if (buf)
+               {
+                  power->batteries[i]->charge_full = 100;
+                  power->batteries[i]->charge_current = atoi(buf);
+                  free(buf);
+               }
           }
      }
 done:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to