From 1724c6a06ad9b5819b3bf576780c0197eb8694ba Mon Sep 17 00:00:00 2001 From: Matthias Guillitte Date: Tue, 11 Aug 2026 14:21:23 +0200 Subject: [PATCH] Added safety checker debug --- cloud/app.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cloud/app.py b/cloud/app.py index 425b713..0d78578 100644 --- a/cloud/app.py +++ b/cloud/app.py @@ -157,7 +157,7 @@ def telemetry(): return jsonify({"error": f"Database error: {str(e)}"}), 500 -@app.route("/debug", methods=["GET"]) +@app.route("/debug/telemetryrequest", methods=["GET"]) def debug(): # Construct external HTTP endpoint dynamically based on incoming request host telemetry_url = f"{request.host_url.rstrip('/')}/telemetry" @@ -175,6 +175,10 @@ def debug(): }), 200 except Exception as e: return jsonify({"error": f"Failed to publish MQTT command: {str(e)}"}), 500 + +@app.route("/debug", methods=["GET"]) +def debug(): + return safety_checker.check_dish_safety(os.path.join(CAMERA_IMAGE_DIR, "dish_0de0ee1dab8949fc8e78796947e24ed3.jpg")) if __name__ == "__main__":