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

git pushed a commit to branch master
in repository enigmatic.

View the commit online.

commit 919c0c617e1604b5405c6e36e961064600cfcc0e
Author: Alastair Poole <m...@alastairpoole.com>
AuthorDate: Sun Aug 11 21:52:34 2024 +0100

    sensors: fix reporting of low-granular battery reports.
    
    A minor logic bug. Resolved.
---
 src/bin/system/machine/sensors.x | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/bin/system/machine/sensors.x b/src/bin/system/machine/sensors.x
index 7d0d2d7..8381315 100644
--- a/src/bin/system/machine/sensors.x
+++ b/src/bin/system/machine/sensors.x
@@ -509,16 +509,17 @@ battery_update(Battery *bat)
         buf = file_contents(path);
         if (buf)
           {
+             charge_full = 100;
              if (buf[0] == 'F')
-               bat->charge_current = 100;
+               charge_current = 100;
              else if (buf[0] == 'H')
-               bat->charge_current = 75;
+               charge_current = 75;
              else if (buf[0] == 'N')
-               bat->charge_current = 50;
+               charge_current = 50;
              else if (buf[0] == 'L')
-               bat->charge_current = 25;
+               charge_current = 25;
              else if (buf[0] == 'C')
-               bat->charge_current = 5;
+               charge_current = 5;
              free(buf);
           }
      }

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

Reply via email to