feat: 优化线径数据处理逻辑,增强无效值过滤和回调通知功能
This commit is contained in:
parent
dce6f4a14a
commit
383e6d3aaa
@ -1160,11 +1160,9 @@ class SerialManager:
|
||||
# 转换为浮点数
|
||||
xj_value = float(number_str)
|
||||
logging.info(f"线径数据: {xj_value}")
|
||||
if xj_value/10000 > 10 or xj_value/10000 == 0:
|
||||
# 过滤无效值:>10 或 =0 的值直接跳过
|
||||
# if xj_value/10000 > 10 or xj_value/10000 == 0:
|
||||
# logging.info(f"过滤无效线径值: {xj_value} (超出有效范围或为零)")
|
||||
# return False
|
||||
if xj_value/10000 > 10 or xj_value/10000 == 0:
|
||||
return False
|
||||
|
||||
# 更新数据
|
||||
self.data['xj'] = xj_value
|
||||
|
||||
Loading…
Reference in New Issue
Block a user