v1.3.0: 修复pinmap_layout周长公式,新增PinList→PinMAP反向转换完整支持

This commit is contained in:
2026-06-01 11:43:53 +08:00
parent 3228c1a2e6
commit 8ad31cbf04
16 changed files with 967 additions and 183 deletions

View File

@@ -3,7 +3,7 @@
Validates a PinList for:
1. Pin numbers starting from 1 with no gaps
2. No duplicate pin numbers
3. Total pin count matches grid perimeter (2×rows + 2×cols 4)
3. Total pin count matches grid perimeter (rows + cols) × 2
4. Missing PinName defaults to NC (warning)
5. Pin count not a multiple of 4 (info)
"""
@@ -22,7 +22,7 @@ def validate_pinlist(
检查项:
1. Pin 序号从 1 开始连续无缺失
2. Pin 序号无重复
3. Pin 总数 = 2×rows + 2×cols 4(周长匹配)
3. Pin 总数 = (rows + cols) × 2(周长匹配)
4. Pin 缺少 PinName 时默认为 NCwarning
5. Pin 数量不是 4 的倍数时提示info
@@ -68,7 +68,8 @@ def validate_pinlist(
))
# ── 3. 周长匹配 ──────────────────────────────────────────────
expected_total = 2 * rows + 2 * cols - 4
# 周长公式:(rows + cols) * 2
expected_total = (rows + cols) * 2
actual_total = len(entries)
if actual_total != expected_total:
errors.append(ValidationError(