devbisme / skidl

SKiDL is a module that extends Python with the ability to design electronic circuits.
https://devbisme.github.io/skidl/
MIT License
1.04k stars 118 forks source link

When creating Nets as part of a Bus, create them in a circuit #199

Closed worktycho closed 6 months ago

worktycho commented 9 months ago

When creating Nets as part of extending a Bus, create the nets as part of the circuit of what we want to connect them to, rather than the default circuit. This causes a crash if this functionality is used on a circuit other than the default circuit

devbisme commented 9 months ago

Thanks for fixing this!

I had to change your code since an int doesn't have a circuit attribute. So I changed both your modifications to use the circuit of the bus (circuit=self.circuit). I checked the modifications into the development branch. Test it and make sure it does what you need.

devbisme commented 6 months ago

OK, I'll assume this works...