feat: 2.17.18

This commit is contained in:
2026-09-23 11:03:15 +08:00
parent e67c410325
commit 2834f5b9b7
6 changed files with 39 additions and 42 deletions
+2 -2
View File
@@ -385,11 +385,11 @@ def cmd_str():
pressure_max = adc_val
if len(pressure_buf) >= PRESSURE_BATCH_SIZE:
_flush_pressure_buf("batch")
# 突变增量检测:压力增量大于300时触发
# 突变增量检测:压力增量大于400时触发
# 触发后需等气压降到触发值以下才重新检测增量
if adc_val < trigger_adc_val :
enable_check = True
if (adc_val - last_adc_val) > 500 and enable_check:
if (adc_val - last_adc_val) > 200 and enable_check:
hardware_manager.start_idle_timer() # 重新计时
last_adc_trigger = current_time
trigger_adc_val = adc_val # 记录触发时的气压值