Example #1
0
    bool analizeStrategyStatus(Strategy::statusType status) {
        if(status == Strategy::ERROR) {
            chargingMonitorError();
            return false;
        }

        if(status == Strategy::COMPLETE) {
            if(!exitImmediately)
                chargingComplete();
            return false;
        }
        return true;
    }
Example #2
0
    bool analizeStrategyStatus(Strategy::statusType status) {
        bool run = true;
        if(status == Strategy::ERROR) {
            strategyPowerOff();
            chargingMonitorError();
            run = false;
        }

        if(status == Strategy::COMPLETE) {
            strategyPowerOff();
            if(!exitImmediately)
                chargingComplete();
            run = false;
        }
        return run;
    }
    bool analizeStrategyStatus(Strategy::statusType status, bool exitImmediately) {
        bool run = true;
        if(status == Strategy::ERROR) {
            Screen::powerOff();
            strategyPowerOff();
            AnalogInputs::powerOff();   //disconnect the battery (pin12 off)
            chargingMonitorError();
            run = false;
        }

        if(status == Strategy::COMPLETE) {
            Screen::powerOff();
            strategyPowerOff();
            if(!exitImmediately)
                chargingComplete();
            run = false;
        }
        return run;
    }