cooking state logs at interval
This commit is contained in:
@@ -198,13 +198,17 @@ async def lora_process_task():
|
|||||||
|
|
||||||
|
|
||||||
async def cooking_loop_task():
|
async def cooking_loop_task():
|
||||||
"""Ticks the cooking state and logs information periodically."""
|
"""Ticks the cooking state and logs information periodically without flooding output."""
|
||||||
|
log_counter = 0
|
||||||
while True:
|
while True:
|
||||||
if cooking_state is not None:
|
if cooking_state is not None:
|
||||||
cooking_state.update_tick()
|
cooking_state.update_tick()
|
||||||
print(f"[Cooking Task] State: {cooking_state.state}, Temp: {cooking_state.current_dish_temp}, "
|
log_counter += 1
|
||||||
f"Paused: {cooking_state.paused}, Remaining: {cooking_state.get_remaining_time():.2f}s, "
|
|
||||||
f"Est. Remaining: {cooking_state.get_remaining_time_estimation():.2f}s")
|
# Print log output every 5 seconds (10 ticks x 500ms)
|
||||||
|
if log_counter % 10 == 0:
|
||||||
|
print(f"[Cooking Task] State: {cooking_state.state}, Temp: {cooking_state.current_dish_temp}, "
|
||||||
|
f"Paused: {cooking_state.paused}, Remaining: {cooking_state.get_remaining_time():.2f}s")
|
||||||
|
|
||||||
await asyncio.sleep_ms(500)
|
await asyncio.sleep_ms(500)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user