添加了5个电磁阀+修改了传送带传感器的逻辑
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user