PPCGeeks Forums HTC Arrive HTC HD2 HTC Thunderbolt HTC Touch Pro 2 HTC Evo 4G HTC Evo 3D Samsung Galaxy S II Motorola Droid X Apple iPhone Blackberry
Go Back   PPCGeeks > Windows Mobile > WM HTC Devices > HTC Touch Pro 2 > Android On TP2 > Android On TP2 Development
Register Community Search

Notices


 
 
LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11 (permalink)  
Old 05-23-2011, 02:39 AM
highlandsun's Avatar
PPCGeeks Regular
Offline
Pocket PC: HTC G1, TP2
Carrier: T-Mobile
 
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.
 

  PPCGeeks > Windows Mobile > WM HTC Devices > HTC Touch Pro 2 > Android On TP2 > Android On TP2 Development

Tags
battery, tp2


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 10:02 AM.


Powered by vBulletin® ©2000 - 2025, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0
©2012 - PPCGeeks.com