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"
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn