Patch webOS Show Actual Battery Percentage

From WebOS Internals

Revision as of 08:54, 3 August 2009 by Hopspitfire (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Contents

Background

The battery level fluctuates between 94% to 100% when a charging device is present. The systemui shows 100%, regardless of actual battery percent once changed to 100% while in the range. You can however bounce the charger by reconnecting it to charge again if between actual 95% to 99% (100% systemui)

Battery Usage over Time

Note the percentage difference between actual and ui.

2009-07-09T14:16:01.070587Z [52553] castle user.info powerd: BATTERY: (1182.800049mAh, 100%, 100%_ui, 36C, 101mA, 4191mV, authentic) 
2009-07-09T14:32:10.599121Z [53345] castle user.info powerd: BATTERY: (1182.599976mAh, 100%, 100%_ui, 33C, -2mA, 4177mV, authentic) 
2009-07-09T15:27:00.124176Z [53742] castle user.info powerd: BATTERY: (1182.650024mAh, 97%, 100%_ui, 34C, -251mA, 4050mV, authentic) 
2009-07-09T15:38:02.142883Z [54357] castle user.info powerd: BATTERY: (1182.650024mAh, 94%, 98%_ui, 34C, -179mA, 4065mV, authentic) 
2009-07-09T15:39:35.158813Z [54450] castle user.info powerd: BATTERY: (1182.650024mAh, 93%, 97%_ui, 34C, -317mA, 4026mV, authentic) 
2009-07-09T15:42:30.812927Z [54475] castle user.info powerd: BATTERY: (1182.500000mAh, 93%, 97%_ui, 32C, -5mA, 4074mV, authentic) 
2009-07-09T15:46:05.388305Z [54671] castle user.info powerd: BATTERY: (1182.599976mAh, 91%, 95%_ui, 33C, -268mA, 4035mV, authentic) 
2009-07-09T16:02:47.799438Z [54876] castle user.info powerd: BATTERY: (1182.500000mAh, 90%, 94%_ui, 32C, -246mA, 4035mV, authentic) 
2009-07-09T16:24:04.350341Z [55041] castle user.info powerd: BATTERY: (1182.599976mAh, 89%, 93%_ui, 33C, -325mA, 4011mV, authentic) 
2009-07-09T16:32:16.855041Z [55151] castle user.info powerd: BATTERY: (1182.500000mAh, 88%, 92%_ui, 32C, -94mA, 4045mV, authentic) 
2009-07-09T17:08:52.938507Z [55425] castle user.info powerd: BATTERY: (1182.599976mAh, 87%, 91%_ui, 33C, -129mA, 4021mV, authentic) 
2009-07-09T17:10:20.471221Z [55505] castle user.info powerd: BATTERY: (1182.599976mAh, 86%, 90%_ui, 33C, -155mA, 4021mV, authentic) 
2009-07-09T17:32:53.020690Z [55737] castle user.info powerd: BATTERY: (1181.199951mAh, 85%, 89%_ui, 28C, -198mA, 4011mV, authentic) 
2009-07-09T17:42:48.715667Z [55921] castle user.info powerd: BATTERY: (1182.400024mAh, 84%, 88%_ui, 30C, -269mA, 3982mV, authentic) 
2009-07-09T17:54:57.073577Z [56154] castle user.info powerd: BATTERY: (1182.449951mAh, 83%, 87%_ui, 31C, -257mA, 3947mV, authentic) 
2009-07-09T18:00:19.581909Z [56365] castle user.info powerd: BATTERY: (1182.750000mAh, 82%, 86%_ui, 35C, -121mA, 3952mV, authentic) 
2009-07-09T18:16:31.352111Z [57002] castle user.info powerd: BATTERY: (1182.750000mAh, 78%, 82%_ui, 35C, -172mA, 3938mV, authentic) 
2009-07-09T18:26:24.315338Z [57595] castle user.info powerd: BATTERY: (1182.599976mAh, 75%, 78%_ui, 33C, -129mA, 3923mV, authentic) 
2009-07-09T18:27:58.995025Z [57678] castle user.info powerd: BATTERY: (1182.599976mAh, 74%, 77%_ui, 33C, -413mA, 3894mV, authentic) 
2009-07-09T18:29:36.872436Z [57772] castle user.info powerd: BATTERY: (1182.650024mAh, 73%, 76%_ui, 34C, -99mA, 3874mV, authentic) 
2009-07-09T18:39:04.429443Z [57966] castle user.info powerd: BATTERY: (1182.650024mAh, 72%, 75%_ui, 34C, -253mA, 3904mV, authentic) 
2009-07-09T18:43:09.187042Z [58173] castle user.info powerd: BATTERY: (1182.750000mAh, 71%, 74%_ui, 35C, -133mA, 3908mV, authentic) 
2009-07-09T19:11:11.807037Z [58394] castle user.info powerd: BATTERY: (1182.750000mAh, 70%, 73%_ui, 35C, -119mA, 3889mV, authentic) 
2009-07-09T19:14:17.329010Z [58561] castle user.info powerd: BATTERY: (1182.750000mAh, 69%, 72%_ui, 35C, -3mA, 3884mV, authentic) 
2009-07-09T19:29:59.327636Z [58738] castle user.info powerd: BATTERY: (1182.650024mAh, 68%, 71%_ui, 34C, -181mA, 3864mV, authentic) 
2009-07-09T19:34:37.430023Z [58876] castle user.info powerd: BATTERY: (1182.800049mAh, 67%, 70%_ui, 36C, -3mA, 3908mV, authentic) 
2009-07-09T19:49:45.848724Z [58966] castle user.info powerd: BATTERY: (1182.750000mAh, 66%, 69%_ui, 35C, -3mA, 3904mV, authentic) 
2009-07-09T20:07:47.130096Z [59150] castle user.info powerd: BATTERY: (1182.750000mAh, 65%, 68%_ui, 35C, -147mA, 3869mV, authentic) 
2009-07-09T20:12:36.596099Z [59400] castle user.info powerd: BATTERY: (1182.750000mAh, 64%, 67%_ui, 35C, -123mA, 3840mV, authentic) 
2009-07-09T20:14:40.032287Z [59416] castle user.info powerd: BATTERY: (1182.599976mAh, 64%, 67%_ui, 33C, -3mA, 3889mV, authentic) 
2009-07-09T20:14:59.553771Z [59430] castle user.info powerd: BATTERY: (1182.599976mAh, 63%, 66%_ui, 33C, -185mA, 3874mV, authentic) 
2009-07-09T20:25:15.253906Z [59849] castle user.info powerd: BATTERY: (1182.599976mAh, 61%, 64%_ui, 33C, -207mA, 3821mV, authentic) 
2009-07-09T20:27:04.345520Z [59854] castle user.info powerd: BATTERY: (1182.449951mAh, 61%, 64%_ui, 31C, -4mA, 3855mV, authentic) 
2009-07-09T20:27:05.904876Z [59855] castle user.info powerd: BATTERY: (1182.449951mAh, 60%, 63%_ui, 31C, -164mA, 3816mV, authentic) 
2009-07-09T20:40:39.371551Z [59935] castle user.info powerd: BATTERY: (1181.199951mAh, 59%, 62%_ui, 28C, -342mA, 3816mV, authentic) 
2009-07-09T21:04:45.342529Z [60073] castle user.info powerd: BATTERY: (1180.650024mAh, 58%, 61%_ui, 27C, -349mA, 3801mV, authentic) 
2009-07-09T21:19:35.981719Z [60238] castle user.info powerd: BATTERY: (1182.650024mAh, 57%, 60%_ui, 34C, -475mA, 3801mV, authentic) 
2009-07-09T21:30:22.291351Z [60470] castle user.info powerd: BATTERY: (1182.650024mAh, 56%, 58%_ui, 34C, -285mA, 3801mV, authentic) 
2009-07-09T21:47:03.883483Z [60560] castle user.info powerd: BATTERY: (1182.650024mAh, 55%, 57%_ui, 34C, -54mA, 3806mV, authentic) 
2009-07-09T22:00:19.113433Z [60836] castle user.info powerd: BATTERY: (1182.750000mAh, 54%, 56%_ui, 35C, -223mA, 3791mV, authentic) 
2009-07-09T22:04:29.153411Z [61086] castle user.info powerd: BATTERY: (1182.750000mAh, 53%, 55%_ui, 35C, -228mA, 3762mV, authentic) 
2009-07-09T22:10:30.663635Z [61249] castle user.info powerd: BATTERY: (1182.800049mAh, 52%, 54%_ui, 36C, -266mA, 3762mV, authentic) 
2009-07-09T22:17:07.168670Z [61324] castle user.info powerd: BATTERY: (1182.900024mAh, 51%, 53%_ui, 37C, -4mA, 3777mV, authentic) 
2009-07-09T22:22:53.992584Z [61450] castle user.info powerd: BATTERY: (1182.800049mAh, 50%, 52%_ui, 36C, -239mA, 3767mV, authentic) 
2009-07-09T22:29:25.488372Z [61747] castle user.info powerd: BATTERY: (1182.750000mAh, 49%, 51%_ui, 35C, -131mA, 3762mV, authentic) 
2009-07-09T22:37:42.412750Z [61775] castle user.info powerd: BATTERY: (1182.800049mAh, 48%, 50%_ui, 36C, -8mA, 3752mV, authentic) 
2009-07-09T22:49:14.228881Z [62090] castle user.info powerd: BATTERY: (1182.800049mAh, 47%, 49%_ui, 36C, -139mA, 3757mV, authentic) 
2009-07-09T22:53:00.330810Z [62316] castle user.info powerd: BATTERY: (1182.949951mAh, 46%, 48%_ui, 38C, -128mA, 3757mV, authentic) 
2009-07-09T22:57:30.282012Z [62510] castle user.info powerd: BATTERY: (1182.949951mAh, 45%, 47%_ui, 38C, -128mA, 3742mV, authentic) 
2009-07-09T22:59:44.245819Z [62644] castle user.info powerd: BATTERY: (1182.949951mAh, 44%, 46%_ui, 38C, -156mA, 3733mV, authentic) 
2009-07-09T23:13:20.309600Z [62727] castle user.info powerd: BATTERY: (1182.750000mAh, 43%, 45%_ui, 35C, -5mA, 3752mV, authentic) 
2009-07-09T23:23:03.141815Z [63082] castle user.info powerd: BATTERY: (1182.750000mAh, 42%, 44%_ui, 35C, -124mA, 3752mV, authentic) 
2009-07-09T23:25:37.678222Z [63152] castle user.info powerd: BATTERY: (1182.750000mAh, 41%, 43%_ui, 35C, -161mA, 3738mV, authentic) 
2009-07-09T23:34:15.369750Z [63434] castle user.info powerd: BATTERY: (1182.750000mAh, 39%, 41%_ui, 35C, -258mA, 3728mV, authentic) 
2009-07-09T23:39:23.430450Z [63737] castle user.info powerd: BATTERY: (1182.800049mAh, 37%, 38%_ui, 36C, -500mA, 3689mV, authentic) 
2009-07-09T23:47:07.536804Z [63794] castle user.info powerd: BATTERY: (1182.750000mAh, 36%, 37%_ui, 35C, -5mA, 3747mV, authentic) 
2009-07-09T23:56:09.047149Z [64019] castle user.info powerd: BATTERY: (1182.800049mAh, 34%, 35%_ui, 36C, -503mA, 3689mV, authentic) 
2009-07-10T00:14:06.239471Z [64098] castle user.info powerd: BATTERY: (1182.650024mAh, 33%, 34%_ui, 34C, -4mA, 3772mV, authentic) 
2009-07-10T00:28:19.894134Z [64353] castle user.info powerd: BATTERY: (1182.599976mAh, 32%, 33%_ui, 33C, -123mA, 3733mV, authentic) 
2009-07-10T00:33:34.878875Z [64657] castle user.info powerd: BATTERY: (1182.750000mAh, 30%, 31%_ui, 35C, -148mA, 3733mV, authentic) 
2009-07-10T00:38:34.882110Z [64957] castle user.info powerd: BATTERY: (1182.800049mAh, 29%, 30%_ui, 36C, -248mA, 3699mV, authentic) 
2009-07-10T00:43:34.877044Z [65257] castle user.info powerd: BATTERY: (1182.800049mAh, 27%, 28%_ui, 36C, -293mA, 3689mV, authentic) 
2009-07-10T00:48:34.882202Z [65557] castle user.info powerd: BATTERY: (1182.650024mAh, 25%, 26%_ui, 34C, -340mA, 3694mV, authentic) 
2009-07-10T00:53:34.880249Z [65857] castle user.info powerd: BATTERY: (1182.500000mAh, 23%, 24%_ui, 32C, -114mA, 3723mV, authentic) 
2009-07-10T00:58:34.876861Z [66157] castle user.info powerd: BATTERY: (1182.599976mAh, 22%, 23%_ui, 33C, -129mA, 3718mV, authentic) 

Battery Charging over Time

  • Notice the ui @ 100%
  • Positive mA is charging
  • Negative mA is not charging
2009-07-10T07:30:58.705017Z [167] castle user.info powerd: BATTERY: (1183.099976mAh, 97%, 100%_ui, 40C, 182mA, 4177mV, authentic)
2009-07-10T07:34:33.705047Z [382] castle user.info powerd: BATTERY: (1183.099976mAh, 98%, 100%_ui, 41C, 152mA, 4182mV, authentic)
2009-07-10T07:41:10.705017Z [779] castle user.info powerd: BATTERY: (1183.099976mAh, 99%, 100%_ui, 41C, 105mA, 4191mV, authentic)
2009-07-10T07:47:00.704406Z [1129] castle user.info powerd: BATTERY: (1183.099976mAh, 100%, 100%_ui, 41C, 80mA, 4191mV, authentic)
2009-07-10T07:59:32.703399Z [1881] castle user.info powerd: BATTERY: (1183.099976mAh, 99%, 100%_ui, 40C, -133mA, 4152mV, authentic)
2009-07-10T08:01:07.705078Z [1976] castle user.info powerd: BATTERY: (1183.099976mAh, 100%, 100%_ui, 40C, 102mA, 4191mV, authentic)
2009-07-10T08:07:07.704864Z [2336] castle user.info powerd: BATTERY: (1183.099976mAh, 99%, 100%_ui, 41C, -204mA, 4123mV, authentic)
2009-07-10T08:10:42.704833Z [2551] castle user.info powerd: BATTERY: (1183.099976mAh, 98%, 100%_ui, 40C, -304mA, 4128mV, authentic)
2009-07-10T08:15:17.705108Z [2826] castle user.info powerd: BATTERY: (1183.099976mAh, 97%, 100%_ui, 40C, -200mA, 4133mV, authentic)
2009-07-10T08:17:42.704528Z [2971] castle user.info powerd: BATTERY: (1183.099976mAh, 96%, 100%_ui, 40C, -273mA, 4118mV, authentic)
2009-07-10T08:22:12.705017Z [3241] castle user.info powerd: BATTERY: (1183.099976mAh, 95%, 100%_ui, 40C, -140mA, 4118mV, authentic)
2009-07-10T08:26:32.706481Z [3501] castle user.info powerd: BATTERY: (1183.050049mAh, 94%, 98%_ui, 39C, -137mA, 4104mV, authentic)
2009-07-10T08:26:42.704498Z [3511] castle user.info powerd: BATTERY: (1183.050049mAh, 95%, 100%_ui, 39C, 284mA, 4157mV, authentic)
2009-07-10T08:29:37.704376Z [3686] castle user.info powerd: BATTERY: (1183.099976mAh, 95%, 100%_ui, 41C, 213mA, 4172mV, authentic)
2009-07-10T08:30:17.707061Z [3726] castle user.info powerd: BATTERY: (1183.099976mAh, 96%, 100%_ui, 41C, 199mA, 4172mV, authentic)
2009-07-10T08:34:47.705047Z [3996] castle user.info powerd: BATTERY: (1183.099976mAh, 97%, 100%_ui, 41C, 167mA, 4177mV, authentic)
2009-07-10T08:38:22.704650Z [4211] castle user.info powerd: BATTERY: (1183.099976mAh, 98%, 100%_ui, 41C, 146mA, 4182mV, authentic)
2009-07-10T08:45:33.705017Z [4642] castle user.info powerd: BATTERY: (1183.099976mAh, 99%, 100%_ui, 42C, 101mA, 4187mV, authentic)
2009-07-10T08:54:23.706420Z [5172] castle user.info powerd: BATTERY: (1183.099976mAh, 98%, 100%_ui, 42C, -257mA, 4128mV, authentic)
2009-07-10T08:58:58.704467Z [5447] castle user.info powerd: BATTERY: (1183.099976mAh, 97%, 100%_ui, 41C, -134mA, 4138mV, authentic)
2009-07-10T09:01:25.705047Z [5594] castle user.info powerd: BATTERY: (1183.099976mAh, 96%, 100%_ui, 40C, -241mA, 4118mV, authentic)
2009-07-10T09:05:45.704986Z [5854] castle user.info powerd: BATTERY: (1183.099976mAh, 95%, 100%_ui, 40C, -250mA, 4094mV, authentic)
2009-07-10T09:10:50.771911Z [6159] castle user.info powerd: BATTERY: (1183.099976mAh, 94%, 98%_ui, 40C, -303mA, 4069mV, authentic)
2009-07-10T09:11:00.704010Z [6169] castle user.info powerd: BATTERY: (1183.099976mAh, 95%, 100%_ui, 40C, 284mA, 4152mV, authentic)
2009-07-10T09:14:35.705047Z [6384] castle user.info powerd: BATTERY: (1183.099976mAh, 96%, 100%_ui, 41C, 206mA, 4172mV, authentic)
2009-07-10T09:19:10.704315Z [6659] castle user.info powerd: BATTERY: (1183.099976mAh, 97%, 100%_ui, 41C, 171mA, 4177mV, authentic)
2009-07-10T09:23:00.704498Z [6889] castle user.info powerd: BATTERY: (1183.099976mAh, 98%, 100%_ui, 42C, 147mA, 4182mV, authentic)
2009-07-10T09:30:15.705047Z [7324] castle user.info powerd: BATTERY: (1183.099976mAh, 99%, 100%_ui, 42C, 112mA, 4187mV, authentic)
2009-07-10T09:35:25.704101Z [7634] castle user.info powerd: BATTERY: (1183.099976mAh, 98%, 100%_ui, 42C, -239mA, 4128mV, authentic)

Charge Sources

Sucessful chargeSourceSet none @ 0.
Turning charging off because of charge state is idle
ChargeStateTransitionLog in idle (P: 98%, T: 38 C, C: 105 mA, V: 4172 mV, AUTH true, Charger disabled: none* @ 0mA)
Sucessful chargeSourceSet pc @ 500.
ChargeStateTransitionLog in charging (P: 98%, T: 38 C, C: 105 mA, V: 4143 mV, AUTH true, Charger enabled: usb @ 500mA)
CHG_LOGIC: Sucessful chargeSourceSet puck @ 700.
ChargeStateTransitionLog in charging (P: 98%, T: 39 C, C: -202 mA, V: 4133 mV, AUTH true, Charger enabled: inductive @ 700mA)
Sucessful chargeSourceSet wall @ 1000.
ChargeStateTransitionLog in charging (P: 98%, T: 39 C, C: -71 mA, V: 4152 mV, AUTH true, Charger enabled: usb @ 1000mA)

Charge Logic over Time

The log shows how the charging turns off at 100% and comes back on at 94% over a time period.

2009-07-08T01:04:26.068878Z [4595] castle user.info powerd: CHG_LOGIC: ChargeStateTransitionLog in chargecomplete (P: 100%, T: 42 C, C: 35 mA, V: 4196 mV, AUTH true, Charger disabled: inductive @ 700mA)
2009-07-08T01:27:39.579468Z [5988] castle user.info powerd: CHG_LOGIC: ChargeStateTransitionLog in idle (P: 94%, T: 39 C, C: -282 mA, V: 4079 mV, AUTH true, Charger disabled: inductive @ 700mA)
2009-07-08T01:27:39.579834Z [5988] castle user.info powerd: CHG_LOGIC: ChargeStateTransitionLog in charging (P: 94%, T: 39 C, C: -282 mA, V: 4079 mV, AUTH true, Charger enabled: inductive @ 700mA)
2009-07-08T02:02:14.068909Z [8063] castle user.info powerd: CHG_LOGIC: ChargeStateTransitionLog in chargecomplete (P: 100%, T: 42 C, C: 49 mA, V: 4196 mV, AUTH true, Charger disabled: inductive @ 700mA)
2009-07-08T02:32:44.071808Z [9893] castle user.info powerd: CHG_LOGIC: ChargeStateTransitionLog in idle (P: 94%, T: 39 C, C: -150 mA, V: 4094 mV, AUTH true, Charger disabled: inductive @ 700mA)
2009-07-08T02:32:44.072174Z [9893] castle user.info powerd: CHG_LOGIC: ChargeStateTransitionLog in charging (P: 94%, T: 39 C, C: -150 mA, V: 4094 mV, AUTH true, Charger enabled: inductive @ 700mA)
2009-07-08T03:08:29.069885Z [12038] castle user.info powerd: CHG_LOGIC: ChargeStateTransitionLog in chargecomplete (P: 100%, T: 42 C, C: 49 mA, V: 4201 mV, AUTH true, Charger disabled: inductive @ 700mA)
2009-07-08T03:36:59.070679Z [13748] castle user.info powerd: CHG_LOGIC: ChargeStateTransitionLog in idle (P: 94%, T: 39 C, C: -135 mA, V: 4108 mV, AUTH true, Charger disabled: inductive @ 700mA)
2009-07-08T03:36:59.071045Z [13748] castle user.info powerd: CHG_LOGIC: ChargeStateTransitionLog in charging (P: 94%, T: 39 C, C: -135 mA, V: 4108 mV, AUTH true, Charger enabled: inductive @ 700mA)
2009-07-08T04:09:34.069244Z [15703] castle user.info powerd: CHG_LOGIC: ChargeStateTransitionLog in chargecomplete (P: 100%, T: 42 C, C: 44 mA, V: 4196 mV, AUTH true, Charger disabled: inductive @ 700mA)

Patch (show-actual-battery-percent.patch)

New 1.1.0 Patch

Index: /usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
===================================================================
--- .orig/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
+++ /usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
 
 	Mojo.Log.info("SystemUI Power Payload "+ Object.toJSON(payload));	
 	// Is the battery level provided?
-	if (payload.percent_ui != undefined) {	
+	if (payload.percent != undefined) {
 		//Save the Battery Percentage
-		this.batteryLevel = payload.percent_ui;	
+		this.batteryLevel = payload.percent;
 		for (var i = 0; i < this.powerIndicator.length; i++) {
-			if (payload.percent_ui > this.powerIndicator[i]) 
+			if (payload.percent > this.powerIndicator[i])
 				continue;
 			this.lastBatteryLevel = i;
 			this.lastBatteryLevelPayload = payload;
@@ -1397,7 +1397,7 @@
 				$('power').className = 'battery-' + i;
 
 				//Show Banner Message if the Battery level is below 20%
-				var batteryalert = $L("#{percent_ui}% battery remaining").interpolate(payload);	
+				var batteryalert = $L("#{percent}% battery remaining").interpolate(payload);
 				if(this.batteryLevel <= 5 && !this.batteryLevel5Shown) {
 					this.batteryLevel5Shown = true;
 					this.showLowBatteryAlert();
@@ -1423,7 +1423,7 @@
 			}
 			else {
 				Mojo.Log.info("SystemUI- Is Charging "+ this.isCharging );
-				if(payload.percent_ui == 100)
+				if(payload.percent == 100)
 					$('power').className = 'battery-charged';
 				else
 					$('power').className = 'battery-charging-' + i;

Old Patch

// show-actual-battery-percent
 
// http://predev.wikidot.com/show-actual-battery-percent
 
Index: /usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
===================================================================
--- .orig/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
+++ /usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
@@ -1168,11 +1168,11 @@ handlePowerNotifications: function(paylo
 
        Mojo.Log.info("SystemUI Power Payload "+ Object.toJSON(payload));
        // Is the battery level provided?
-       if (payload.percent_ui != undefined) {
+       if (payload.percent != undefined) {
                //Save the Battery Percentage
-               this.batteryLevel = payload.percent_ui;
+               this.batteryLevel = payload.percent;
                for (var i = 0; i < this.powerIndicator.length; i++) {
-                       if (payload.percent_ui > this.powerIndicator[i])
+                       if (payload.percent > this.powerIndicator[i])
                                continue;
                        this.lastBatteryLevel = i;
                        this.lastBatteryLevelPayload = payload;
@@ -1183,7 +1183,7 @@ handlePowerNotifications: function(paylo
                                $('power').className = 'battery-' + i;
 
                                //Show Banner Message if the Battery level is below 20%
-                               var batteryalert = $L("#{percent_ui}% battery remaining").interpolate(payload);
+                               var batteryalert = $L("#{percent}% battery remaining").interpolate(payload);
                                if(this.batteryLevel <= 5 && !this.batteryLevel5Shown) {
                                        this.batteryLevel5Shown = true;
                                        this.showLowBatteryAlert();
@@ -1209,7 +1209,7 @@ handlePowerNotifications: function(paylo
                        }
                        else {
                                Mojo.Log.info("SystemUI- Is Charging "+ this.isCharging );
-                               if(payload.percent_ui == 100)
+                               if(payload.percent == 100)
                                        $('power').className = 'battery-charged';
                                else
                                        $('power').className = 'battery-charging-' + i;

Contributor(s)

  • A2NY
  • hopspitfire (1.1.0 patch)
Personal tools
Google AdSense