Closed gaoyakang closed 3 days ago
online_logisim/src/core/nodes/flipFlop/rsFlipFlop
下列代码将rs的状态弄反了:
// .... node.anchors.forEach((anchor) => { const { id } = anchor; // 找到对应的锚点 if (id === 'rsFlipFlop-lefttop-input') { // S输入 lf.graphModel.edges.forEach((edge) => { if (edge.targetAnchorId === id) { const sourceNode = activeNodes.value[edge.sourceNodeId] || false ; S = sourceNode.active ? '1' : '0'; } }); } else if (id === 'rsFlipFlop-leftbottom-input') { // R输入 lf.graphModel.edges.forEach((edge) => { if (edge.targetAnchorId === id) { const sourceNode = activeNodes.value[edge.sourceNodeId] || false; R = sourceNode.active ? '1' : '0'; } }); } else if (id === 'rsFlipFlop-leftmiddle-input') { // C输入 lf.graphModel.edges.forEach((edge) => { if (edge.targetAnchorId === id) { const sourceNode = activeNodes.value[edge.sourceNodeId] || false; C = sourceNode.active ? '1' : '0'; } }); } }); // ...
已修复:https://github.com/gaoyakang/online_logisim/commit/08986a49aed4cb184430b45acd02aa57d9f9e333
online_logisim/src/core/nodes/flipFlop/rsFlipFlop
下列代码将rs的状态弄反了: