diff --git a/orchestrateur/main.py b/orchestrateur/main.py index 6cfaf8b..0a1e041 100644 --- a/orchestrateur/main.py +++ b/orchestrateur/main.py @@ -817,16 +817,16 @@ async def monitor_dish_height_task(): if dist is not None: # Hysteresis Thresholds: - # - Must be > 2.5 cm to detect dish insertion - # - Must be < 1.2 cm to detect dish removal - if dist > 2.5: + # - Must be > 1.2 cm to detect dish insertion + # - Must be < 0.8 cm to detect dish removal + if dist > 1.2: consecutive_present += 1 consecutive_absent = 0 - elif dist < 1.2: + elif dist < 0.8: consecutive_absent += 1 consecutive_present = 0 else: - # Dead-zone (1.2cm to 2.5cm) -> Noise buffer + # Dead-zone (1.2cm to 0.8cm) -> Noise buffer consecutive_present = 0 consecutive_absent = 0 @@ -848,7 +848,7 @@ async def monitor_dish_height_task(): ir_data_cache.pop(mw_id, None) ir_data_events.pop(mw_id, None) - await asyncio.sleep(0.3) + await asyncio.sleep(0.7) # --- BOOTSTRAP --- async def main():