perf: Lower battery monitoring frequency
This commit is contained in:
parent
42b7bf0fc2
commit
80421d4e9f
1 changed files with 2 additions and 1 deletions
|
|
@ -1392,6 +1392,7 @@ static int POW_readBatteryStatus(void) {
|
||||||
#define BATTERY_2100MAH 1
|
#define BATTERY_2100MAH 1
|
||||||
#define BATTERY_2600MAH 2
|
#define BATTERY_2600MAH 2
|
||||||
#define BATTERY_3500MAH 3
|
#define BATTERY_3500MAH 3
|
||||||
|
#define UNKNOWN 9
|
||||||
|
|
||||||
int battery = BATTERY_2600MAH; // Default
|
int battery = BATTERY_2600MAH; // Default
|
||||||
int battery_txt = getInt(BATTERY_PATH);
|
int battery_txt = getInt(BATTERY_PATH);
|
||||||
|
|
@ -1436,7 +1437,7 @@ static void* POW_monitorBattery(void *arg) {
|
||||||
while(1) {
|
while(1) {
|
||||||
// TODO: the frequency of checking should depend on whether
|
// TODO: the frequency of checking should depend on whether
|
||||||
// we're in game (less frequent) or menu (more frequent)
|
// we're in game (less frequent) or menu (more frequent)
|
||||||
sleep(1);
|
sleep(30);
|
||||||
POW_updateBatteryStatus();
|
POW_updateBatteryStatus();
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue