void Balancer::powerOn() { hardware::setBalancerOutput(true); for(uint8_t i = 0; i < MAX_BALANCE_CELLS; i++) { AnalogInputs::ValueType vi = getV(i); Voff_[i] = Von_[i] = vi; } balance = 0; done = false; setBalance(0); balancingEnded = 0; resetMinCell(); }
void Balancer::powerOn() { hardware::setBalancerOutput(true); cells = AnalogInputs::getRealValue(AnalogInputs::VbalanceInfo); for(int i = 0; i < cells; i++) { AnalogInputs::ValueType vi = getV(i); Voff_[i] = Von_[i] = vi; } balance = 0; done = false; setBalance(0); balancingEnded = 0; resetMinCell(); }