Try tomorrow

This commit is contained in:
david rice
2026-04-21 16:23:43 +01:00
parent b7b4d22723
commit de632c68d0
2 changed files with 15 additions and 6 deletions

View File

@@ -10,7 +10,7 @@ Add addresses to REGISTER_COMMANDS to capture more register ranges.
import os
import re
import signal
import socket
import subprocess
import threading
@@ -94,7 +94,9 @@ def control_display():
if state == "on":
with _video_lock:
if _video_proc is not None and _video_proc.poll() is None:
_video_proc.send_signal(signal.SIGUSR1)
_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
_sock.sendto(b'switch', ('127.0.0.1', 5001))
_sock.close()
return jsonify({"status": "video switched"}), 200
# fallback when video is not running
os.system("echo 0 > /sys/class/graphics/fb0/blank")