修复电阻箱模拟

This commit is contained in:
2025-09-12 11:40:42 +08:00
parent 5159b22b6f
commit 2fd050ec6d
+1 -1
View File
@@ -490,7 +490,7 @@ function buildNet(): BuiltNet {
resistors.push({ inst, nPlus: n0, nMinus: n3, R: Rad })
// CD 固定为最大电阻
resistors.push({ inst, nPlus: n2, nMinus: n3, R: Rmax })
} else if (key === 'resistor' || key === 'light_bulb' || key === 'meter') {
} else if (key === 'resistor' || key === 'light_bulb' || key === 'meter' || key === 'resistance_box') {
const R = Math.max(1e-6, safeNum(inst.props?.['resistance'], 0))
resistors.push({ inst, nPlus: n0, nMinus: n1, R })
} else {