Added logo to flasher

This commit is contained in:
Brent Perteet
2025-10-14 09:50:35 -05:00
parent 5a893a034c
commit bca2f6ea9c
7 changed files with 131 additions and 286 deletions

View File

@@ -51,6 +51,12 @@ def index():
"""Serve the main page"""
return render_template('index.html')
@app.route('/static/<path:filename>')
def serve_static(filename):
"""Serve static files"""
static_dir = os.path.join(os.path.dirname(__file__), 'static')
return send_from_directory(static_dir, filename)
@app.route('/api/ports')
def get_ports():
"""Get list of available serial ports"""
@@ -134,10 +140,10 @@ def handle_disconnect():
"""Handle client disconnection"""
global client_connected, shutdown_timer
client_connected = False
print('Client disconnected - scheduling shutdown in 5 seconds...')
print('Client disconnected - scheduling shutdown in 1 second...')
# Schedule shutdown after 5 seconds
shutdown_timer = threading.Timer(5.0, shutdown_server)
shutdown_timer = threading.Timer(1.0, shutdown_server)
shutdown_timer.daemon = True
shutdown_timer.start()