Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Commit

Permalink
Bugfix for status overlay screenshot.
Browse files Browse the repository at this point in the history
Change from 12 hour clock to 24 hour clock so the snapshots remain in
better lexographical order. Also add seconds to the timestamp to fix bug
where if you took too multiple screenshots within a minute, subsequent
pictures would overwrite the previous ones.
  • Loading branch information
CoryParsnipson committed Nov 5, 2021
1 parent c830ad3 commit 152ee26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/power/status_overlay/status_overlay.py
Expand Up @@ -503,7 +503,7 @@ def handle_power_button_press(channel):
else:
# long press has happened
screenshot_call = "raspi2png -c 9 -p " + CONFIG["SCREENSHOT_PATH"] + "/snapshot-" + \
datetime.datetime.now().strftime("%m%d%Y-%I%M") + ".png"
datetime.datetime.now().strftime("%m%d%Y-%H%M%S") + ".png"
subprocess.Popen(screenshot_call, shell=True)
draw_notification("snapshot_notification.png", "snapshot", 3)
else:
Expand Down

0 comments on commit 152ee26

Please sign in to comment.