| View previous topic :: View next topic |
| Author |
Message |
yucopowo2009
Joined: 18 Sep 2009 Posts: 6
|
Posted: Sat Apr 17, 2010 6:03 pm Post subject: How can I get the real capacity ? |
|
|
After a long time,the capacity of the psp battery will decrease
Now How can I get the real value.
For example , the PSPPlore can do it! |
|
| Back to top |
|
 |
Oby1Chick
Joined: 13 Feb 2010 Posts: 24
|
Posted: Sat Apr 17, 2010 10:25 pm Post subject: |
|
|
Well, I think it is the following code :
| Code: |
const int min = 0, max = 10;
srand(time(NULL));
int battery_life = (rand() % (max - min + 1)) + min;
printf("Battery life in years : %d ", battery_life);
|
Nah, jokes xD.
You could use load PSP type and battery ID to try to compute an approximate battery capacity.
But if you want really want to use the same way as PSPPlorer, you should take a look here :
http://pspzorba.com//articles/articles.php
There are many interesting code samples.
Its also the official website of PSPPlorer and the developper has released parts of his source code, maybe the whole source code in fact, I don't know.
Good luck. |
|
| Back to top |
|
 |
sauron_le_noir
Joined: 05 Jul 2008 Posts: 229
|
Posted: Sun Apr 18, 2010 12:49 am Post subject: |
|
|
Look in your sdk in the include psppower.h you have all the functions related to battery ;)
| Code: |
/**
* Get battery life as integer percent
*
* @return Battery charge percentage (0-100), < 0 on error.
*/
int scePowerGetBatteryLifePercent(void);
/**
* Get battery life as time
*
* @return Battery life in minutes, < 0 on error.
*/
int scePowerGetBatteryLifeTime(void);
/**
* Get temperature of the battery
*/
int scePowerGetBatteryTemp(void);
/**
* Get battery volt level
*/
int scePowerGetBatteryVolt(void); |
|
|
| Back to top |
|
 |
Oby1Chick
Joined: 13 Feb 2010 Posts: 24
|
Posted: Sun Apr 18, 2010 3:29 am Post subject: |
|
|
| sauron_le_noir wrote: | | Look in your sdk in the include psppower.h you have all the functions related to battery ;) | .
Yeah, you may find stuff here.
But he did not mean battery life (Correct me if I am wrong), he meant capacity, that decrease slowly and makes your PSP battery dies after a long time.
You could also check battery level and battery real voltage to see if they are not normally proportionnal. |
|
| Back to top |
|
 |
Davee
Joined: 22 Jun 2009 Posts: 59
|
Posted: Sun Apr 18, 2010 4:21 am Post subject: |
|
|
| Oby1Chick wrote: | | sauron_le_noir wrote: | | Look in your sdk in the include psppower.h you have all the functions related to battery ;) | .
Yeah, you may find stuff here.
But he did not mean battery life (Correct me if I am wrong), he meant capacity, that decrease slowly and makes your PSP battery dies after a long time.
You could also check battery level and battery real voltage to see if they are not normally proportionnal. |
S'kinda ambigious as here we say the capacity is the remaining battery percent.
Both is correct though, OP needs to provide more info. |
|
| Back to top |
|
 |
|