This commit is contained in:
root 2025-08-16 12:11:30 +08:00
commit 1db5a5cb33

View File

@ -2502,13 +2502,13 @@ class RealPressureDevice:
right_rear_pct = float((right_rear / right_total_abs * 100) if right_total_abs > 0 else 0) right_rear_pct = float((right_rear / right_total_abs * 100) if right_total_abs > 0 else 0)
return { return {
'left_front': int(left_front_pct), 'left_front': round(left_front_pct),
'left_rear': int(left_rear_pct), 'left_rear': round(left_rear_pct),
'right_front': int(right_front_pct), 'right_front': round(right_front_pct),
'right_rear': int(right_rear_pct), 'right_rear': round(right_rear_pct),
'left_total': int(left_total_pct), 'left_total': round(left_total_pct),
'right_total': int(right_total_pct), 'right_total': round(right_total_pct),
'total_pressure': int(total_abs) 'total_pressure': round(total_abs)
} }
except Exception as e: except Exception as e:
logger.error(f"计算足部区域压力异常: {e}") logger.error(f"计算足部区域压力异常: {e}")