Automated Change by GitHub Action

This commit is contained in:
okunze
2025-11-28 21:08:17 +00:00
committed by github-actions[bot]
parent b58a168f89
commit f3386d5f01
7 changed files with 239 additions and 8 deletions

View File

@@ -42,6 +42,8 @@ if os.path.exists("/etc/argon/argoneonoled.py"):
OLED_CONFIGFILE = "/etc/argoneonoled.conf"
UNIT_CONFIGFILE = "/etc/argonunits.conf"
SHUTDOWN_FLAGFILE = "/dev/shm/argonshutdownflag.txt"
# This function converts the corresponding fanspeed for the given temperature
# The configuration data is a list of strings in the form "<temperature>=<speed>"
@@ -257,6 +259,13 @@ def display_loop(readq):
screenenabled = []
while len(screenenabled) > 0:
try:
if os.path.isfile(SHUTDOWN_FLAGFILE):
display_defaultimg()
return
except:
pass
if len(curlist) == 0 and screenjogflag == 1:
# Reset Screen Saver
screensavermode = False
@@ -565,9 +574,18 @@ def display_defaultimg():
if len(sys.argv) > 1:
cmd = sys.argv[1].upper()
if cmd == "SHUTDOWN":
try:
with open(SHUTDOWN_FLAGFILE, "w") as f:
f.write("signalled")
except:
pass
# Signal poweroff
argonregister_signalpoweroff(bus)
if OLED_ENABLED == True:
display_defaultimg()
elif cmd == "FANOFF":
# Turn off fan
argonregister_setfanspeed(bus,0)