Skip to content

Commit

Permalink
[#37] __recalc_node() to take nodes instead of indexes.
Browse files Browse the repository at this point in the history
  • Loading branch information
kosarev committed Sep 29, 2021
1 parent b1113ba commit 859786c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/z80sim/z80sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,11 @@ def __turn_transistor_off(self, t):
self.__add_recalc_node(t.c1)
self.__add_recalc_node(t.c2)

def __recalc_node(self, node):
if self.__nodes[node] in (self.__gnd, self.__pwr):
def __recalc_node(self, n):
if n in (self.__gnd, self.__pwr):
return

self.__get_node_group(self.__nodes[node])
self.__get_node_group(n)

new_state = self.__get_node_value()

Expand All @@ -250,7 +250,7 @@ def __recalc_node_list(self, list):
return

for i in list:
self.__recalc_node(i)
self.__recalc_node(self.__nodes[i])

list = self.__recalc_list
self.__recalc_list = []
Expand Down

0 comments on commit 859786c

Please sign in to comment.