summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.md35
-rw-r--r--.github/ISSUE_TEMPLATE/first_bug_report.md32
-rw-r--r--.github/pull_request_template.md11
-rw-r--r--.github/workflows/release_ubuntu.yml124
-rw-r--r--library/kicadLibrary/kicad_eSim-Library/eSim_Sources.lib6
-rw-r--r--src/frontEnd/Application.py9
-rwxr-xr-xsrc/frontEnd/ProjectExplorer.py54
-rw-r--r--src/kicadtoNgspice/Analysis.py12
-rw-r--r--src/kicadtoNgspice/DeviceModel.py4
-rw-r--r--src/kicadtoNgspice/KicadtoNgspice.py90
-rw-r--r--src/kicadtoNgspice/Processing.py10
-rw-r--r--src/kicadtoNgspice/SubcircuitTab.py2
12 files changed, 318 insertions, 71 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 00000000..3ab1e2d0
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,35 @@
+---
+name: Bug Report
+about: "Report a problem to help us improve \U0001F680"
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+### Description
+
+<!--- A clear and concise description of what the bug is. -->
+
+### Steps to Reproduce
+
+<!--- This could be a list of actions and possibly the eSim project files -->
+
+### Expected Behavior
+
+<!--- A clear and concise description of what you expected to happen. -->
+
+### Screenshots
+
+<!--- If applicable, add screenshots to help explain your problem. -->
+
+### Version and OS
+
+<!--- Please complete the following information. -->
+
+ - eSim version
+ - OS: [e.g. Windows 10, 64 bit]
+
+### Additional Context
+
+<!--- Add any other context about the problem here. -->
diff --git a/.github/ISSUE_TEMPLATE/first_bug_report.md b/.github/ISSUE_TEMPLATE/first_bug_report.md
new file mode 100644
index 00000000..bcc68ada
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/first_bug_report.md
@@ -0,0 +1,32 @@
+---
+name: First Bug Report
+about: Detailed guideline for your first bug report
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+### Description
+A clear and concise description of what the bug is.
+
+### Steps to reproduce
+Please provide us with enough information to reproduce the issue on our side, otherwise it's hard to fix it. You can provide a list of actions, and possibly attach eSim project files including Verilog/VHDL code (if used at all).
+
+If you can provide a [minimal working example](https://en.wikipedia.org/wiki/Minimal_working_example) that shows the problem, instead of your original project, reproducing the bug is more straightforward and we can respond faster.
+
+### Expected behavior
+A clear and concise description of what you expected to happen.
+
+### Screenshots
+If applicable, add screenshots to help explain your problem.
+
+### Additional files
+You can add additional files via drag-and-drop, possibly compressed in zip format and attaching it.
+
+### Version and OS
+ - eSim version
+ - OS: [e.g. Windows 10, 64 bit, Ubuntu 20.04 LTS]
+
+### Additional context
+Add any other context about the problem here.
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 00000000..0124c04e
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,11 @@
+### Related Issues
+
+<!-- Link to the issues that are solved with this PR. -->
+
+### Purpose
+
+<!--- Describe the problem or feature. -->
+
+### Approach
+
+<!--- How does this address the problem? -->
diff --git a/.github/workflows/release_ubuntu.yml b/.github/workflows/release_ubuntu.yml
new file mode 100644
index 00000000..0fc6043b
--- /dev/null
+++ b/.github/workflows/release_ubuntu.yml
@@ -0,0 +1,124 @@
+# By Sai Charan Lanka (@saicharan0112) : Nov 12, 2022
+# This is the workflow to pack the eSim for Ubuntu OS which follows the steps shown in the installer branch and release the zip file which can be uploaded onto the website
+# Note:
+# 1. Make sure the eSim manual for the version about to release, already exists in the https://static.fossee.in/esim/manuals/ location. Else the release fails.
+# 2. To trigger this workflow, create and push tags that start with "v".
+# For more info, refer to PR#230 and Issue#211
+
+
+name: Auto release of eSim for Ubuntu OS
+
+on:
+ push:
+ tags:
+ - 'v*' # Push events to matching v*, i.e. v2.2, v2.3 etc
+
+
+jobs:
+ release_eSim:
+ runs-on: ubuntu-latest
+ steps:
+
+
+# Create eSim release directory
+ - name: Preparing eSim for release
+ run: mkdir /home/runner/work/eSim_release
+
+
+# Steps to prepare nghld.zip
+ - name: Preparing nghdl for release
+ run: mkdir /home/runner/work/nghdl_release
+
+ - name: Checkout FOSSEE/nghdl installers branch
+ uses: actions/checkout@v3
+ with:
+ repository: FOSSEE/nghdl
+ ref: installers
+
+ - name: Get required data from the nghld/installers branch
+ run: |
+ cp Ubuntu/ghdl-*.tar.xz /home/runner/work/nghdl_release/.
+ cp Ubuntu/verilator-*.tar.xz /home/runner/work/nghdl_release/.
+ cp Ubuntu/install-nghdl.sh /home/runner/work/nghdl_release/.
+
+ - name: Checkout FOSSEE/nghdl installers branch
+ uses: actions/checkout@v3
+ with:
+ repository: FOSSEE/nghdl
+ ref: master
+
+ - name: Get required data from the nghld/master branch
+ run: |
+ cp -rf ./* /home/runner/work/nghdl_release/.
+ cd /home/runner/work
+ rm -rf nghdl_release/.git* nghdl_release/*.md
+
+ - name: Compress the nghdl folder and copy it to eSim release folder
+ run: |
+ zip -r nghld.zip . -i nghdl_release/.
+ cp nghld.zip /home/runner/work/eSim_release/.
+ tree /home/runner/work/
+
+
+# Steps to prepare eSim release directory
+ - name: Checkout FOSSEE/eSim master branch
+ uses: actions/checkout@v3
+ with:
+ repository: FOSSEE/eSim
+ ref: master
+
+ - name: Compress the library/kicadLibrary folder
+ run: |
+ tar cfJ kicadLibrary.tar.xz library/kicadLibrary/.
+ cp kicadLibrary.tar.xz /home/runner/work/eSim_release/.
+
+ - name: Copy all the data from eSim/master to eSim_release and delete specific data
+ run: |
+ rm -rf .git* code library/browser/User-Manual/figures
+ rm conf.py setup.py index.rst requirements.txt .travis.yml library/browser/User-Manual/eSim.html
+ cp -rf ./* /home/runner/work/eSim_release/.
+
+ - name: Checkout FOSSEE/eSim installers branch
+ uses: actions/checkout@v3
+ with:
+ repository: FOSSEE/eSim
+ ref: installers
+
+ - name: Copy install-eSim.sh script to the release directory
+ run: |
+ cp Ubuntu/install-eSim.sh /home/runner/work/eSim_release/.
+
+ # extract the number from the tag to pull the relevant manual from the website
+ - name: Copy eSim manual which is available at https://static.fossee.in/esim/manuals/
+ run: |
+ VERSION=$(echo $GITHUB_REF_NAME | cut -d 'v' -f 2)
+ wget https://static.fossee.in/esim/manuals/eSim_Manual_$VERSION.pdf
+
+ - name: Zip the eSim_release folder
+ run: |
+ cd /home/runner/work/
+ zip -r eSim-$VERSION.zip eSim_release/
+
+
+# Create a release and upload artifact
+ - name: Create Release
+ id: create_release
+ uses: actions/create-release@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ tag_name: ${{ github.ref_name }}
+ release_name: eSim-$VERSION
+ draft: false
+ prerelease: false
+
+ - name: Upload Release Asset
+ id: upload-release-asset
+ uses: actions/upload-release-asset@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
+ asset_path: /home/runner/work/eSim-$VERSION.zip
+ asset_name: eSim-$VERSION.zip
+ asset_content_type: application/zip \ No newline at end of file
diff --git a/library/kicadLibrary/kicad_eSim-Library/eSim_Sources.lib b/library/kicadLibrary/kicad_eSim-Library/eSim_Sources.lib
index d4d64f62..c1c62410 100644
--- a/library/kicadLibrary/kicad_eSim-Library/eSim_Sources.lib
+++ b/library/kicadLibrary/kicad_eSim-Library/eSim_Sources.lib
@@ -1,11 +1,11 @@
EESchema-LIBRARY Version 2.3
#encoding utf-8
#
-# eSim_AC
+# AC
#
-DEF eSim_AC v 0 40 Y Y 1 F N
+DEF AC v 0 40 Y Y 1 F N
F0 "v" -200 100 60 H V C CNN
-F1 "eSim_AC" -200 -50 60 H V C CNN
+F1 "AC" -200 -50 60 H V C CNN
F2 "R1" -300 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
$FPLIST
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py
index d3ef020f..7588b1a1 100644
--- a/src/frontEnd/Application.py
+++ b/src/frontEnd/Application.py
@@ -10,11 +10,11 @@
# BUGS: ---
# NOTES: ---
# AUTHOR: Fahim Khan, fahim.elex@gmail.com
-# MODIFIED: Rahul Paknikar, rahulp@iitb.ac.in
+# MAINTAINED: Rahul Paknikar, rahulp@cse.iitb.ac.in
# Sumanto Kar, sumantokar@iitb.ac.in
# ORGANIZATION: eSim Team at FOSSEE, IIT Bombay
# CREATED: Tuesday 24 February 2015
-# REVISION: Monday 31 January 2022
+# REVISION: Tuesday 13 September 2022
# =========================================================================
import os
@@ -949,4 +949,7 @@ def main(args):
# Call main function
if __name__ == '__main__':
# Create and display the splash screen
- main(sys.argv)
+ try:
+ main(sys.argv)
+ except Exception as err:
+ print("Error: ", err)
diff --git a/src/frontEnd/ProjectExplorer.py b/src/frontEnd/ProjectExplorer.py
index 456276c8..77c9352e 100755
--- a/src/frontEnd/ProjectExplorer.py
+++ b/src/frontEnd/ProjectExplorer.py
@@ -69,13 +69,20 @@ class ProjectExplorer(QtWidgets.QWidget):
parentnode, [files, os.path.join(parents, files)]
)
self.window.addWidget(self.treewidget)
-
+ self.treewidget.expanded.connect(self.refreshInstant)
self.treewidget.doubleClicked.connect(self.openProject)
self.treewidget.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
self.treewidget.customContextMenuRequested.connect(self.openMenu)
self.setLayout(self.window)
self.show()
+ def refreshInstant(self):
+ for i in range(self.treewidget.topLevelItemCount()):
+ if(self.treewidget.topLevelItem(i).isExpanded()):
+ index = self.treewidget.indexFromItem(
+ self.treewidget.topLevelItem(i))
+ self.refreshProject(indexItem=index)
+
def addTreeNode(self, parents, children):
os.path.join(parents)
pathlist = parents.split(os.sep)
@@ -125,24 +132,21 @@ class ProjectExplorer(QtWidgets.QWidget):
self.filePath = str(
self.indexItem.sibling(self.indexItem.row(), 1).data()
)
- self.obj_appconfig.print_info(
- 'The current project is ' + self.filePath)
-
- self.textwindow = QtWidgets.QWidget()
- self.textwindow.setMinimumSize(600, 500)
- self.textwindow.setGeometry(QtCore.QRect(400, 150, 400, 400))
- self.textwindow.setWindowTitle(filename)
-
- self.text = QtWidgets.QTextEdit()
- self.save = QtWidgets.QPushButton('Save and Exit')
- self.save.setDisabled(True)
- self.windowgrid = QtWidgets.QGridLayout()
if (os.path.isfile(str(self.filePath))):
self.fopen = open(str(self.filePath), 'r')
lines = self.fopen.read()
- self.text.setText(lines)
+ self.textwindow = QtWidgets.QWidget()
+ self.textwindow.setMinimumSize(600, 500)
+ self.textwindow.setGeometry(QtCore.QRect(400, 150, 400, 400))
+ self.textwindow.setWindowTitle(filename)
+
+ self.text = QtWidgets.QTextEdit()
+ self.save = QtWidgets.QPushButton('Save and Exit')
+ self.save.setDisabled(True)
+
+ self.text.setText(lines)
self.text.textChanged.connect(self.enable_save)
vbox_main = QtWidgets.QVBoxLayout(self.textwindow)
@@ -152,6 +156,12 @@ class ProjectExplorer(QtWidgets.QWidget):
self.textwindow.show()
else:
+ self.refreshProject(self.filePath)
+
+ self.obj_appconfig.print_info(
+ 'The current project is: ' + self.filePath
+ )
+
self.obj_appconfig.current_project["ProjectName"] = str(
self.filePath)
(
@@ -202,25 +212,31 @@ class ProjectExplorer(QtWidgets.QWidget):
json.dump(self.obj_appconfig.project_explorer,
open(self.obj_appconfig.dictPath["path"], 'w'))
- def refreshProject(self, filePath=None):
+ def refreshProject(self, filePath=None, indexItem=None):
"""
This function refresh the project in explorer area by right \
clicking on project and selecting refresh option.
"""
if not filePath or filePath is None:
- self.indexItem = self.treewidget.currentIndex()
+ if indexItem is None:
+ self.indexItem = self.treewidget.currentIndex()
+ else:
+ self.indexItem = indexItem
+
filePath = str(
self.indexItem.sibling(self.indexItem.row(), 1).data()
)
if os.path.exists(filePath):
filelistnew = os.listdir(os.path.join(filePath))
- parentnode = self.treewidget.currentItem()
+ if indexItem is None:
+ parentnode = self.treewidget.currentItem()
+ else:
+ parentnode = self.treewidget.itemFromIndex(self.indexItem)
count = parentnode.childCount()
for i in range(count):
- for items in self.treewidget.selectedItems():
- items.removeChild(items.child(0))
+ parentnode.removeChild(parentnode.child(0))
for files in filelistnew:
QtWidgets.QTreeWidgetItem(
parentnode, [files, os.path.join(filePath, files)]
diff --git a/src/kicadtoNgspice/Analysis.py b/src/kicadtoNgspice/Analysis.py
index 32902a81..f3784287 100644
--- a/src/kicadtoNgspice/Analysis.py
+++ b/src/kicadtoNgspice/Analysis.py
@@ -734,7 +734,7 @@ class Analysis(QtWidgets.QWidget):
self.parameter_cnt = 0
self.start_combobox = QtWidgets.QComboBox()
- self.start_combobox.addItem("Sec")
+ self.start_combobox.addItem("sec")
self.start_combobox.addItem("ms")
self.start_combobox.addItem("us")
self.start_combobox.addItem("ns")
@@ -744,13 +744,13 @@ class Analysis(QtWidgets.QWidget):
try:
self.tran_parameter[self.parameter_cnt] = str(root[2][3].text)
except BaseException:
- self.tran_parameter[self.parameter_cnt] = "Sec"
+ self.tran_parameter[self.parameter_cnt] = "sec"
self.start_combobox.activated[str].connect(self.start_combo_change)
self.parameter_cnt += 1
self.step_combobox = QtWidgets.QComboBox()
- self.step_combobox.addItem("Sec")
+ self.step_combobox.addItem("sec")
self.step_combobox.addItem("ms")
self.step_combobox.addItem("us")
self.step_combobox.addItem("ns")
@@ -759,13 +759,13 @@ class Analysis(QtWidgets.QWidget):
try:
self.tran_parameter[self.parameter_cnt] = str(root[2][4].text)
except BaseException:
- self.tran_parameter[self.parameter_cnt] = "Sec"
+ self.tran_parameter[self.parameter_cnt] = "sec"
self.step_combobox.activated[str].connect(self.step_combo_change)
self.parameter_cnt += 1
self.stop_combobox = QtWidgets.QComboBox()
- self.stop_combobox.addItem("Sec")
+ self.stop_combobox.addItem("sec")
self.stop_combobox.addItem("ms")
self.stop_combobox.addItem("us")
self.stop_combobox.addItem("ns")
@@ -774,7 +774,7 @@ class Analysis(QtWidgets.QWidget):
try:
self.tran_parameter[self.parameter_cnt] = str(root[2][5].text)
except BaseException:
- self.tran_parameter[self.parameter_cnt] = "Sec"
+ self.tran_parameter[self.parameter_cnt] = "sec"
self.stop_combobox.activated[str].connect(self.stop_combo_change)
self.parameter_cnt += 1
diff --git a/src/kicadtoNgspice/DeviceModel.py b/src/kicadtoNgspice/DeviceModel.py
index 5fd4d829..c52ea2d0 100644
--- a/src/kicadtoNgspice/DeviceModel.py
+++ b/src/kicadtoNgspice/DeviceModel.py
@@ -82,6 +82,7 @@ class DeviceModel(QtWidgets.QWidget):
words[4])
self.entry_var[self.count] = QtWidgets.QLineEdit()
self.entry_var[self.count].setText("")
+ self.entry_var[self.count].setReadOnly(True)
global path_name
try:
@@ -146,6 +147,7 @@ class DeviceModel(QtWidgets.QWidget):
words[3])
self.entry_var[self.count] = QtWidgets.QLineEdit()
self.entry_var[self.count].setText("")
+ self.entry_var[self.count].setReadOnly(True)
# global path_name
try:
for child in root:
@@ -209,6 +211,7 @@ class DeviceModel(QtWidgets.QWidget):
words[4])
self.entry_var[self.count] = QtWidgets.QLineEdit()
self.entry_var[self.count].setText("")
+ self.entry_var[self.count].setReadOnly(True)
# global path_name
try:
for child in root:
@@ -273,6 +276,7 @@ class DeviceModel(QtWidgets.QWidget):
words[5])
self.entry_var[self.count] = QtWidgets.QLineEdit()
self.entry_var[self.count].setText("")
+ self.entry_var[self.count].setReadOnly(True)
mosfetgrid.addWidget(self.entry_var[self.count], self.row, 1)
self.addbtn = QtWidgets.QPushButton("Add")
self.addbtn.setObjectName("%d" % self.count)
diff --git a/src/kicadtoNgspice/KicadtoNgspice.py b/src/kicadtoNgspice/KicadtoNgspice.py
index deabe97f..83e1642e 100644
--- a/src/kicadtoNgspice/KicadtoNgspice.py
+++ b/src/kicadtoNgspice/KicadtoNgspice.py
@@ -10,10 +10,10 @@
# BUGS: ---
# NOTES: ---
# AUTHOR: Fahim Khan, fahim.elex@gmail.com
-# MODIFIED: Rahul Paknikar, rahulp@iitb.ac.in
+# MODIFIED: Rahul Paknikar, rahulp@cse.iitb.ac.in
# ORGANIZATION: eSim Team at FOSSEE, IIT Bombay
# CREATED: Wednesday 04 March 2015
-# REVISION: Saturday 25 July 2020
+# REVISION: Sunday 18 September 2022
# =========================================================================
import os
@@ -393,9 +393,9 @@ class MainWindow(QtWidgets.QWidget):
if child.tag == "source":
attr_source = child
- count = 1
+ count = 0
grand_child_count = 0
- keys = list(obj_source.entry_var.keys())
+ entry_var_keys = list(obj_source.entry_var.keys())
for i in store_schematicInfo:
tmp_check = 0
@@ -407,7 +407,7 @@ class MainWindow(QtWidgets.QWidget):
for grand_child in child:
grand_child.text = \
str(obj_source.entry_var
- [keys[grand_child_count]].text())
+ [entry_var_keys[grand_child_count]].text())
grand_child_count += 1
if tmp_check == 0:
words = i.split(' ')
@@ -423,102 +423,124 @@ class MainWindow(QtWidgets.QWidget):
# attr_ac = ET.SubElement(attr_var, "ac")
ET.SubElement(
attr_var, "field1", name="Amplitude"
- ).text = str(obj_source.entry_var[count].text())
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
count += 1
ET.SubElement(
attr_var, "field2", name="Phase"
- ).text = str(obj_source.entry_var[count].text())
- count += 2
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
+ count += 1
elif words[len(words) - 1] == "dc":
# attr_dc = ET.SubElement(attr_var, "dc")
ET.SubElement(
attr_var, "field1", name="Value"
- ).text = str(obj_source.entry_var[count].text())
- count += 2
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
+ count += 1
elif words[len(words) - 1] == "sine":
# attr_sine = ET.SubElement(attr_var, "sine")
ET.SubElement(
attr_var, "field1", name="Offset Value"
- ).text = str(obj_source.entry_var[count].text())
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
count += 1
ET.SubElement(
attr_var, "field2", name="Amplitude"
- ).text = str(obj_source.entry_var[count].text())
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
count += 1
ET.SubElement(
attr_var, "field3", name="Frequency"
- ).text = str(obj_source.entry_var[count].text())
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
count += 1
ET.SubElement(
attr_var, "field4", name="Delay Time"
- ).text = str(obj_source.entry_var[count].text())
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
count += 1
ET.SubElement(
attr_var, "field5", name="Damping Factor"
- ).text = str(obj_source.entry_var[count].text())
- count += 2
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
+ count += 1
elif words[len(words) - 1] == "pulse":
# attr_pulse=ET.SubElement(attr_var,"pulse")
ET.SubElement(
attr_var, "field1", name="Initial Value"
- ).text = str(obj_source.entry_var[count].text())
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
count += 1
ET.SubElement(
attr_var, "field2", name="Pulse Value"
- ).text = str(obj_source.entry_var[count].text())
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
count += 1
ET.SubElement(
attr_var, "field3", name="Delay Time"
- ).text = str(obj_source.entry_var[count].text())
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
count += 1
ET.SubElement(
attr_var, "field4", name="Rise Time"
- ).text = str(obj_source.entry_var[count].text())
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
count += 1
ET.SubElement(
attr_var, "field5", name="Fall Time"
- ).text = str(obj_source.entry_var[count].text())
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
count += 1
ET.SubElement(
attr_var, "field5", name="Pulse width"
- ).text = str(obj_source.entry_var[count].text())
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
count += 1
ET.SubElement(
attr_var, "field5", name="Period"
- ).text = str(obj_source.entry_var[count].text())
- count += 2
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
+ count += 1
elif words[len(words) - 1] == "pwl":
# attr_pwl=ET.SubElement(attr_var,"pwl")
ET.SubElement(
attr_var, "field1", name="Enter in pwl format"
- ).text = str(obj_source.entry_var[count].text())
- count += 2
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
+ count += 1
elif words[len(words) - 1] == "exp":
# attr_exp=ET.SubElement(attr_var,"exp")
ET.SubElement(
attr_var, "field1", name="Initial Value"
- ).text = str(obj_source.entry_var[count].text())
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
count += 1
ET.SubElement(
attr_var, "field2", name="Pulsed Value"
- ).text = str(obj_source.entry_var[count].text())
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
count += 1
ET.SubElement(
attr_var, "field3", name="Rise Delay Time"
- ).text = str(obj_source.entry_var[count].text())
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
count += 1
ET.SubElement(
attr_var, "field4", name="Rise Time Constant"
- ).text = str(obj_source.entry_var[count].text())
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
count += 1
ET.SubElement(
- attr_var, "field5", name="Fall TIme"
- ).text = str(obj_source.entry_var[count].text())
+ attr_var, "field5", name="Fall Time"
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
count += 1
ET.SubElement(
attr_var, "field6", name="Fall Time Constant"
- ).text = str(obj_source.entry_var[count].text())
- count += 2
+ ).text = str(obj_source.entry_var
+ [entry_var_keys[count]].text())
+ count += 1
if check == 0:
attr_model = ET.SubElement(attr_parent, "model")
diff --git a/src/kicadtoNgspice/Processing.py b/src/kicadtoNgspice/Processing.py
index 94a2e51f..a0b20ada 100644
--- a/src/kicadtoNgspice/Processing.py
+++ b/src/kicadtoNgspice/Processing.py
@@ -143,8 +143,8 @@ class PrcocessNetlist:
index = schematicInfo.index(compline)
if words[3] == "pulse":
Title = "Add parameters for pulse source " + compName
- v1 = ' Enter initial value(Volts/Amps): '
- v2 = ' Enter pulsed value(Volts/Amps): '
+ v1 = ' Enter initial value (Volts/Amps): '
+ v2 = ' Enter pulsed value (Volts/Amps): '
td = ' Enter delay time (seconds): '
tr = ' Enter rise time (seconds): '
tf = ' Enter fall time (seconds): '
@@ -180,8 +180,8 @@ class PrcocessNetlist:
elif words[3] == "exp":
Title = "Add parameters for exponential source " + compName
- v1 = ' Enter initial value(Volts/Amps): '
- v2 = ' Enter pulsed value(Volts/Amps): '
+ v1 = ' Enter initial value (Volts/Amps): '
+ v2 = ' Enter pulsed value (Volts/Amps): '
td1 = ' Enter rise delay time (seconds): '
tau1 = ' Enter rise time constant (seconds): '
td2 = ' Enter fall time (seconds): '
@@ -192,7 +192,7 @@ class PrcocessNetlist:
elif words[3] == "dc":
Title = "Add parameters for DC source " + compName
- v1 = ' Enter value(Volts/Amps): '
+ v1 = ' Enter value (Volts/Amps): '
v2 = ' Enter zero frequency: '
sourcelist.append(
[index, compline, words[3], Title, v1, v2])
diff --git a/src/kicadtoNgspice/SubcircuitTab.py b/src/kicadtoNgspice/SubcircuitTab.py
index 6b98167d..59bc3ffb 100644
--- a/src/kicadtoNgspice/SubcircuitTab.py
+++ b/src/kicadtoNgspice/SubcircuitTab.py
@@ -71,7 +71,7 @@ class SubcircuitTab(QtWidgets.QWidget):
subbox.setTitle("Add subcircuit for " + words[len(words) - 1])
self.entry_var[self.count] = QtWidgets.QLineEdit()
self.entry_var[self.count].setText("")
-
+ self.entry_var[self.count].setReadOnly(True)
global path_name
try:
for child in root: