switching from power supply via power supply to power supply via battery operation