summaryrefslogtreecommitdiff
path: root/src/kicadtoNgspice/Convert.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/kicadtoNgspice/Convert.py')
-rw-r--r--src/kicadtoNgspice/Convert.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/kicadtoNgspice/Convert.py b/src/kicadtoNgspice/Convert.py
index 0a38b28e..0454e1a5 100644
--- a/src/kicadtoNgspice/Convert.py
+++ b/src/kicadtoNgspice/Convert.py
@@ -204,13 +204,13 @@ class Convert:
try:
start=line[7]
end=line[8]
- num_turns=str(self.obj_track.model_entry_var[start].text())
+ num_turns=str(self.obj_track.model_entry_var[start+1].text())
if num_turns=="": num_turns="310"
h_array= "H_array = [ "
b_array = "B_array = [ "
- h1=str(self.obj_track.model_entry_var[start+1].text())
- b1=str(self.obj_track.model_entry_var[start+2].text())
+ h1=str(self.obj_track.model_entry_var[start].text())
+ b1=str(self.obj_track.model_entry_var[start+5].text())
if len(h1)!=0 and len(b1)!=0:
h_array=h_array+h1+" "
@@ -218,11 +218,11 @@ class Convert:
bh_array = h_array+" ] " + b_array+" ]"
else:
bh_array = "H_array = [-1000 -500 -375 -250 -188 -125 -63 0 63 125 188 250 375 500 1000] B_array = [-3.13e-3 -2.63e-3 -2.33e-3 -1.93e-3 -1.5e-3 -6.25e-4 -2.5e-4 0 2.5e-4 6.25e-4 1.5e-3 1.93e-3 2.33e-3 2.63e-3 3.13e-3]"
- area=str(self.obj_track.model_entry_var[start+3].text())
+ area=str(self.obj_track.model_entry_var[start+2].text())
length=str(self.obj_track.model_entry_var[start+4].text())
if area=="": area="1"
if length=="":length="0.01"
- num_turns2=str(self.obj_track.model_entry_var[start+5].text())
+ num_turns2=str(self.obj_track.model_entry_var[start+3].text())
if num_turns2=="": num_turns2="620"
addmodelLine=".model "+line[3]+"_primary lcouple (num_turns= "+num_turns+")"
modelParamValue.append([line[0],addmodelLine,"*primary lcouple"])