Add "reset" option to turn power off then on
Closed this issue · 3 comments
GoogleCodeExporter commented
I'm often using two invocations of this command to reset power to the device
I'm testing. I updated my copy with this code to add a "reset" command that
will turn power off, wait 1 second or a specified time, then turn power back on.
Here's the code I added, plus I also updated the usage line. The exception
handler catches both the no argument and invalid argument case for the reset
time.
elif cmd == "reset":
power.Set(False);
try:
time.sleep(float(argv[2]))
except:
time.sleep(1);
power.Set(True);
Original issue reported on code.google.com by ben.combee
on 16 May 2014 at 2:47
GoogleCodeExporter commented
That seems simple and sufficiently useful. Added in r5.
Original comment by sparkm...@gmail.com
on 17 May 2014 at 5:24
- Changed state: Fixed
GoogleCodeExporter commented
I renamed it to "reboot" in r6, because I don't want to be
needlessly incompatible with this fork:
https://github.com/nickodell/usbnetpower
Original comment by sparkm...@gmail.com
on 17 May 2014 at 5:39
GoogleCodeExporter commented
Sounds great to me! Thanks for incorporating it.
Original comment by ben.combee
on 19 May 2014 at 2:24