Compare commits
2 Commits
2c66a24e9d
...
181009604d
| Author | SHA1 | Date | |
|---|---|---|---|
| 181009604d | |||
| d6290efb18 |
@@ -57,7 +57,6 @@ def cooking_params():
|
||||
initial_temp_c = float(data.get("ir_initial_temp", 20.0)) # e.g., 4.0 for fridge, -18.0 for freezer
|
||||
microwave_wattage = int(data.get("microwave_wattage", 900)) # e.g., 900W
|
||||
defrost_mode = bool(data.get("defrost_mode", False)) # True for defrost, False for cook/reheat
|
||||
print("Received cooking parameters request:", data)
|
||||
print("Parsed parameters - Height (cm):", height_cm, "Initial Temp (C):", initial_temp_c, "Microwave Wattage:", microwave_wattage, "Defrost Mode:", defrost_mode)
|
||||
|
||||
# 1. Handle the Camera Image
|
||||
|
||||
@@ -204,7 +204,7 @@ def _cooking_worker(microwave_id: str, sensors_data: dict, cancel_event: threadi
|
||||
sensors_data["camera_image"] = base64.b64encode(sensors_data["camera_image"]).decode("utf-8")
|
||||
|
||||
# 1. HTTP Request (15-second timeout)
|
||||
response = requests.post(URL, json=sensors_data, timeout=15)
|
||||
response = requests.post(URL, json=sensors_data, timeout=360) # timeout for long-running requests
|
||||
|
||||
# Check cancellation right after network call returns
|
||||
if cancel_event.is_set():
|
||||
|
||||
Reference in New Issue
Block a user