app.py
CHANGED
|
@@ -66,9 +66,9 @@ def get_data(serial):
|
|
| 66 |
client.publish(request_topic, json.dumps("HI"))
|
| 67 |
|
| 68 |
global latest_data
|
| 69 |
-
latest_data =
|
| 70 |
timeout = 10
|
| 71 |
-
while latest_data
|
| 72 |
time.sleep(1)
|
| 73 |
timeout -= 1
|
| 74 |
|
|
|
|
| 66 |
client.publish(request_topic, json.dumps("HI"))
|
| 67 |
|
| 68 |
global latest_data
|
| 69 |
+
latest_data["bed_temperature"] = "N/A"
|
| 70 |
timeout = 10
|
| 71 |
+
while latest_data["bed_temperature"] == "N/A" and timeout > 0:
|
| 72 |
time.sleep(1)
|
| 73 |
timeout -= 1
|
| 74 |
|