添加了5个电磁阀+修改了传送带传感器的逻辑

This commit is contained in:
2026-01-29 18:30:22 +08:00
parent 070895f3dd
commit 17df13c08e
10 changed files with 670 additions and 512 deletions

View File

@ -228,7 +228,7 @@ class SingleMotorController:
current_time = time.time()
# 4. 检测到挡板且满足防抖条件
if (not sensor_status) and (not self.sensor_locked) and \
if sensor_status and (not self.sensor_locked) and \
(current_time - self.last_sensor_trigger) > SENSOR_DEBOUNCE_TIME:
logging.info(f"\n[传送带{self.conveyor_id}] [{datetime.now().strftime('%H:%M:%S')}] 检测到挡板!立即响应")
self.last_sensor_trigger = current_time