zeug
This commit is contained in:
@@ -15,12 +15,9 @@ socketio = SocketIO(app, cors_allowed_origins="*", async_mode='threading')
|
|||||||
app.register_blueprint(unsecure)
|
app.register_blueprint(unsecure)
|
||||||
app.register_blueprint(esp)
|
app.register_blueprint(esp)
|
||||||
|
|
||||||
# Simuliere regelmäßige Daten-Updates
|
|
||||||
|
|
||||||
def send_data():
|
def send_data():
|
||||||
counter = 0
|
counter = 0
|
||||||
while True:
|
while True:
|
||||||
#print(f"Sending data: {counter}")
|
|
||||||
data = {
|
data = {
|
||||||
'test': 'Live-Daten',
|
'test': 'Live-Daten',
|
||||||
'status': 'OK',
|
'status': 'OK',
|
||||||
@@ -28,7 +25,7 @@ def send_data():
|
|||||||
}
|
}
|
||||||
socketio.emit('update_data', data)
|
socketio.emit('update_data', data)
|
||||||
counter += 1
|
counter += 1
|
||||||
time.sleep(2) # alle 2 Sekunden neue Daten
|
time.sleep(2)
|
||||||
|
|
||||||
# Hintergrund-Thread starten
|
# Hintergrund-Thread starten
|
||||||
thread = threading.Thread(target=send_data)
|
thread = threading.Thread(target=send_data)
|
||||||
|
|||||||
BIN
static/gimmiCoffee_Logo.png
Normal file
BIN
static/gimmiCoffee_Logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.5 KiB |
@@ -6,6 +6,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>{{ title }}</title>
|
<title>{{ title }}</title>
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||||
|
<link rel="icon" href="{{ url_for('static', filename='gimmiCoffee_Logo.png') }}" type="image/png">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
|
|||||||
Reference in New Issue
Block a user