[tuxdroid-svn] r5274 - software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces
Status: Beta
Brought to you by:
ks156
|
From: remi <c2m...@c2...> - 2009-08-03 09:20:39
|
Author: remi
Date: 2009-08-03 11:20:24 +0200 (Mon, 03 Aug 2009)
New Revision: 5274
Modified:
software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
Log:
* Updated battery thresholds for middle and full levels
Modified: software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py 2009-08-01 13:09:43 UTC (rev 5273)
+++ software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py 2009-08-03 09:20:24 UTC (rev 5274)
@@ -44,12 +44,12 @@
if state == None:
batteryState = "nodongle"
else:
- rndVal = int(state[0] / 333) * 333
- if rndVal < 4995:
+ battVal = state[0]
+ if battVal < 4995:
batteryState = "empty"
- elif (rndVal >= 4995) and (rndVal <= 5328):
+ elif (battVal >= 4995) and (battVal <= 5128):
batteryState = "low"
- elif (rndVal > 5328) and (rndVal <= 5661):
+ elif (battVal > 5128) and (battVal <= 5461):
batteryState = "middle"
else:
batteryState = "high"
|