|
|
@ -151,6 +151,7 @@ float BatteryStats::getPower(int batt_num) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool BatteryStats::isCharging() {
|
|
|
|
bool BatteryStats::isCharging() {
|
|
|
|
|
|
|
|
if (numBattery() > 0) {
|
|
|
|
for(int i =0; i < 2; i++) {
|
|
|
|
for(int i =0; i < 2; i++) {
|
|
|
|
string syspath = battPath[i];
|
|
|
|
string syspath = battPath[i];
|
|
|
|
string status = syspath + "/status";
|
|
|
|
string status = syspath + "/status";
|
|
|
@ -167,11 +168,12 @@ bool BatteryStats::isCharging() {
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool BatteryStats::fullCharge(){
|
|
|
|
bool BatteryStats::fullCharge(){
|
|
|
|
//check if both batteries are fully charged
|
|
|
|
//check if both batteries are fully charged
|
|
|
|
int charged =0;
|
|
|
|
int charged =0;
|
|
|
|