View Single Post
  #124 (permalink)  
Old 05-23-2011, 02:39 AM
highlandsun's Avatar
highlandsun
PPCGeeks Regular
Offline
 
Join Date: Jan 2011
Posts: 86
Reputation: 240
highlandsun is keeping up the good workhighlandsun is keeping up the good workhighlandsun is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: [TESTING] SCBS: Improved battery meter system

jonpry: your app is reading Battery Voltage and reporting it as capacity. This fixes it.

Code:
diff --git a/app/src/com/prymfg/babs/HtcBattery.java b/app/src/com/prymfg/babs/HtcBattery.java
index 3a7830f..e6c4acb 100644
--- a/app/src/com/prymfg/babs/HtcBattery.java
+++ b/app/src/com/prymfg/babs/HtcBattery.java
@@ -73,7 +73,7 @@ public class HtcBattery {
         if(real_device)
         {
             try {
-                String str = readFileAsString("/sys/devices/platform/htc_battery/power_supply/
battery/batt_vol");
+                String str = readFileAsString("/sys/devices/platform/htc_battery/power_supply/
battery/capacity");
                 return str.substring(0,str.length()-1) + "%";
             } catch (IOException e) {
                 return "busted";
(I've also fixed this in your kernel code so that it doesn't highjack the batt_vol reading with capacity any more, since it's already reporting capacity in the capacity node where it belonged... http://lists.xdandroid.com/pipermail...ay/000272.html)

Last edited by highlandsun; 05-23-2011 at 02:42 AM.
Reply With Quote
This post has been thanked 2 times.