Skip to content

Commit

Permalink
gw reset: By default do not reset configured delay parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
keirf committed Oct 3, 2024
1 parent e1636f8 commit 3d723b7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/greaseweazle/tools/reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,25 @@
import sys

from greaseweazle.tools import util
from greaseweazle.tools.delays import Delays
from greaseweazle import usb as USB

def main(argv) -> None:

parser = util.ArgumentParser(usage='%(prog)s [options]')
parser.add_argument("--device", help="device name (COM/serial port)")
parser.add_argument("--delays", action="store_true",
help="include \"gw delays\" in the reset")
parser.description = description
parser.prog += ' ' + argv[1]
args = parser.parse_args(argv[2:])

try:
usb = util.usb_open(args.device)
delays = Delays(usb)
usb.power_on_reset()
if not args.delays:
delays.update()
except USB.CmdError as error:
print("Command Failed: %s" % error)

Expand Down

0 comments on commit 3d723b7

Please sign in to comment.