| Reply | « Previous Thread | Next Thread » |
|
Someone had posted in the Request Section of Sourceforge, if there was any function in PyS60 so that he can know if the battery was charging or not?
So i thought of making solution by help of sysinfo.battery() itself, but it was frustrating to see that while charging if you print this command you just see the value stored previously. Like if battery level was 5 before charging then this command would just show you 5 while its charging. Any thing that can be done with this problem? IDEAS is all they need but still they think only Genius can give them that. |
| shubhendra |
| View Public Profile |
| Find all posts by shubhendra |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
See this article, which says something like this:
Code:
from sysagent import * from esysagent import * status = charger_status() #Check charger Status..Plugged in, Connected, etc if status == ESAChargerConnected: text="Charger is connected" elif status == EESAChargerDisconnected: text="Charger is disconnected" elif status == ESAChargerNotCharging: text="Charger is not charging" else: text="Charger unknown status print text |
|
Thanks Bogdan,
That means this module is already made. No need to ponder upon it then. But still sysinfo.battery() isn't giving correct functionality, i wish i knew something about Symbian C++. IDEAS is all they need but still they think only Genius can give them that. |
| shubhendra |
| View Public Profile |
| Find all posts by shubhendra |
|
Quote:
Or it gives wrong reading? Do let us know. Best Regards, Croozeus |
|
Hi croozeus
While charging if you print sysinfo.battery() you just see the value stored previously. Like if battery level was 5 before charging then this command would just show you 5 while its charging. According to the PyS60 Library Reference release 1.4.3 final its written "Note: The returned value may be incorrect while the device is being charged" under battery(). IDEAS is all they need but still they think only Genius can give them that. |
| shubhendra |
| View Public Profile |
| Find all posts by shubhendra |
|
Quote:
That is a limitation of the module, and as the documentation clearly mentions it, it can'nt be considered a Bug. Rest of the time the indication it shows is correct. Best Regards, Croozeus |
|
Join Date: Jul 2007
Posts: 159
Location: Eindhoven, the Netherlands
Offline
Regular Contributor
|
|
|
Quote:
However, when I run the above code with a recent 1.2.0 sysagent for 3rd (as found on http://code.google.com/p/sixty/downloads/list ), the charger_status() call doesn't seem to exist. Looking at the test_sysagent.py, I can also not find any test for such functionality. I noticed that all calls now start with get_ prefix, and tried get_charger_status() but also no luck there... Regards, Mark. |
|
No Cyke, no charging
![]() |
| neil.young |
| View Public Profile |
| Find all posts by neil.young |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |