Added logo to flasher
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user