Start adding fuses

Implement a "Fuses" tab, but disable all fuse entries by now.
This commit is contained in:
Joerg Wunsch
2024-03-31 23:47:50 +02:00
parent 9bef6b23ad
commit da37f095f4
2 changed files with 480 additions and 0 deletions

View File

@@ -293,6 +293,9 @@ class adgui(QObject):
gsc.addPixmap(logo)
self.memories.avr.setScene(gsc)
self.memories.ee_avr.setScene(gsc)
self.memories.fuse_avr.setScene(gsc)
self.disable_fuses()
self.adgui.show()
@@ -656,6 +659,7 @@ class adgui(QObject):
ad.MSG_WARNING)
self.memories.flash.setEnabled(True)
self.memories.eeprom.setEnabled(True)
self.memories.fuses.setEnabled(True)
sigstr = read_sig.hex(' ').upper()
self.memories.deviceSig.setText(sigstr)
p = ad.locate_part_by_signature(ad.cvar.part_list, read_sig)
@@ -945,6 +949,11 @@ class adgui(QObject):
if amnt > 0:
self.memories.ee_buffer.setStyleSheet(self.buffer_full)
def disable_fuses(self):
# make all fuse labels and entries invisible
for w in self.memories.groupBox_13.children():
w.setVisible(False)
def main():
gui = adgui(sys.argv)

View File

@@ -742,6 +742,477 @@ color: rgb(180, 180, 180);</string>
</widget>
</widget>
</widget>
<widget class="QWidget" name="fuses">
<attribute name="title">
<string>Fuses</string>
</attribute>
<property name="enabled">
<bool>false</bool>
</property>
<widget class="QGroupBox" name="groupBox_10">
<property name="geometry">
<rect>
<x>40</x>
<y>230</y>
<width>481</width>
<height>141</height>
</rect>
</property>
<property name="title">
<string>Device:</string>
</property>
<widget class="QPushButton" name="fuse_read">
<property name="geometry">
<rect>
<x>370</x>
<y>50</y>
<width>83</width>
<height>25</height>
</rect>
</property>
<property name="toolTip">
<string>Read device into buffer</string>
</property>
<property name="text">
<string>Read →</string>
</property>
</widget>
<widget class="QPushButton" name="fuse_program">
<property name="geometry">
<rect>
<x>370</x>
<y>90</y>
<width>83</width>
<height>25</height>
</rect>
</property>
<property name="toolTip">
<string>Programm buffer into device</string>
</property>
<property name="text">
<string>← Program</string>
</property>
</widget>
<widget class="QGraphicsView" name="fuse_avr">
<property name="geometry">
<rect>
<x>150</x>
<y>30</y>
<width>171</width>
<height>101</height>
</rect>
</property>
<property name="interactive">
<bool>false</bool>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_11">
<property name="geometry">
<rect>
<x>40</x>
<y>30</y>
<width>481</width>
<height>191</height>
</rect>
</property>
<property name="title">
<string>File:</string>
</property>
<widget class="QPushButton" name="fuse_load">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>370</x>
<y>60</y>
<width>83</width>
<height>25</height>
</rect>
</property>
<property name="toolTip">
<string>Load section from file into buffer</string>
</property>
<property name="text">
<string>Load →</string>
</property>
</widget>
<widget class="QPushButton" name="fuse_save">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>370</x>
<y>120</y>
<width>83</width>
<height>25</height>
</rect>
</property>
<property name="toolTip">
<string>Save memory buffer to file</string>
</property>
<property name="text">
<string>← Save</string>
</property>
</widget>
<widget class="QGroupBox" name="groupBox_12">
<property name="geometry">
<rect>
<x>10</x>
<y>80</y>
<width>321</width>
<height>91</height>
</rect>
</property>
<property name="title">
<string>Format:</string>
</property>
<widget class="QRadioButton" name="fuse_ffAuto">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>141</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Auto (load only)</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
<widget class="QRadioButton" name="fuse_ffELF">
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<width>141</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>ELF (load only)</string>
</property>
</widget>
<widget class="QRadioButton" name="fuse_ffIhex">
<property name="geometry">
<rect>
<x>170</x>
<y>20</y>
<width>107</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Intel Hex</string>
</property>
</widget>
<widget class="QRadioButton" name="fuse_ffSrec">
<property name="geometry">
<rect>
<x>170</x>
<y>40</y>
<width>141</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Motorola S-Record</string>
</property>
</widget>
<widget class="QRadioButton" name="fuse_ffRbin">
<property name="geometry">
<rect>
<x>170</x>
<y>60</y>
<width>107</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Raw Binary</string>
</property>
</widget>
</widget>
<widget class="QLineEdit" name="fuse_filename">
<property name="geometry">
<rect>
<x>10</x>
<y>40</y>
<width>271</width>
<height>25</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="fuse_choose">
<property name="geometry">
<rect>
<x>290</x>
<y>40</y>
<width>41</width>
<height>25</height>
</rect>
</property>
<property name="toolTip">
<string>Choose filename for load or save</string>
</property>
<property name="text">
<string>…</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_13">
<property name="geometry">
<rect>
<x>540</x>
<y>30</y>
<width>161</width>
<height>341</height>
</rect>
</property>
<property name="title">
<string>Fuses</string>
</property>
<widget class="QLabel" name="fuse0">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>62</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Fuse0</string>
</property>
</widget>
<widget class="QLineEdit" name="fval0">
<property name="geometry">
<rect>
<x>70</x>
<y>30</y>
<width>61</width>
<height>25</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="fuse1">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>60</y>
<width>62</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Fuse1</string>
</property>
</widget>
<widget class="QLineEdit" name="fval1">
<property name="geometry">
<rect>
<x>70</x>
<y>60</y>
<width>61</width>
<height>25</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="fuse2">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>90</y>
<width>62</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Fuse2</string>
</property>
</widget>
<widget class="QLineEdit" name="fval2">
<property name="geometry">
<rect>
<x>70</x>
<y>90</y>
<width>61</width>
<height>25</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="fuse3">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>120</y>
<width>62</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Fuse3</string>
</property>
</widget>
<widget class="QLineEdit" name="fval3">
<property name="geometry">
<rect>
<x>70</x>
<y>120</y>
<width>61</width>
<height>25</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="fuse4">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>150</y>
<width>62</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Fuse4</string>
</property>
</widget>
<widget class="QLineEdit" name="fval4">
<property name="geometry">
<rect>
<x>70</x>
<y>150</y>
<width>61</width>
<height>25</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="fuse5">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>180</y>
<width>62</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Fuse5</string>
</property>
</widget>
<widget class="QLineEdit" name="fval5">
<property name="geometry">
<rect>
<x>70</x>
<y>180</y>
<width>61</width>
<height>25</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="fuse6">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>210</y>
<width>62</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Fuse6</string>
</property>
</widget>
<widget class="QLineEdit" name="fval6">
<property name="geometry">
<rect>
<x>70</x>
<y>210</y>
<width>61</width>
<height>25</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="fuse7">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>240</y>
<width>62</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Fuse7</string>
</property>
</widget>
<widget class="QLineEdit" name="fval7">
<property name="geometry">
<rect>
<x>70</x>
<y>240</y>
<width>61</width>
<height>25</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="fuse8">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>270</y>
<width>62</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Fuse8</string>
</property>
</widget>
<widget class="QLineEdit" name="fval8">
<property name="geometry">
<rect>
<x>70</x>
<y>270</y>
<width>61</width>
<height>25</height>
</rect>
</property>
</widget>
</widget>
</widget>
</widget>
</widget>
<resources/>