}elseif((batteryCurrent>currentThreshold)&&(batteryVoltage<voltageThreshold)&&!sim_mode)// currentThreshold ensures that this won't happen when running on DC power.
}elseif((batteryCurrent>currentThreshold)&&(batteryVoltage<voltageThreshold)&&!sim_mode)// currentThreshold ensures that this won't happen when running on DC power.