Skip to content

Commit

Permalink
Prevent it from looking at the last saved version
Browse files Browse the repository at this point in the history
  • Loading branch information
livingkurt committed Dec 9, 2024
1 parent 8d2f5f0 commit 768260b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions HeliosEmbedded/find_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ def find_version(hex_content):
# Otherwise read from stdin if input is piped
elif not sys.stdin.isatty():
content = sys.stdin.buffer.read() # Read binary from stdin
# Finally, try to read default filename
# If no input provided, show usage
else:
with open('helios_firmware.hex', 'rb') as f: # Open in binary mode
content = f.read()
print("Error: No input provided")
print("Usage: python find_version.py [filename]")
print(" or: cat file.hex | python find_version.py")
sys.exit(1)

version = find_version(content)
if version:
Expand Down

0 comments on commit 768260b

Please sign in to comment.