示例#1
0
void NeoBattery::updateDumbStatus()
{
    qLog(PowerManagement) << __PRETTY_FUNCTION__;
    int min = -1; // Remaining battery (minutes)

    // apm on freerunner is borked.

    bool isFull = batteryIsFull();

    battery->setCharge( percentCharge);

    qLog(PowerManagement) << __PRETTY_FUNCTION__ << cableEnabled << percentCharge;

    battery->setCharging( cableEnabled && !isFull);
    battery->setTimeRemaining(min);
}
示例#2
0
void Ficgta01Battery::updateFicStatus()
{

    int min = -1; // Remaining battery (minutes)

    // apm on freerunner is borked.

    batteryIsFull();

    if(cableEnabled) {
        ac->setAvailability(QPowerSource::Available);
    } else {
        ac->setAvailability(QPowerSource::NotAvailable);
    }

    battery->setCharge( percentCharge);

    qLog(PowerManagement) << __PRETTY_FUNCTION__ << cableEnabled << percentCharge;

    battery->setCharging( cableEnabled);
    battery->setTimeRemaining(min);
}