Skip to content

Commit d903255

Browse files
committed
Added updatebrowser
1 parent 40bcb48 commit d903255

6 files changed

+365
-4
lines changed

dfu_ui.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""DFU module for UI and upgrade procee.
1+
"""DFU module for UI and upgrade process.
22
33
Regroup all required classes to manage the DFU UI.
44

main.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@
4343
import vesc_ui
4444
import effects_monitor
4545
import effects_graph_ui
46+
import updater
4647

4748
# This GUIs version
48-
VERSION = "1.9.3"
49+
VERSION = "1.9.4"
4950

5051
# Minimal supported firmware version.
5152
# Major version of firmware must match firmware. Minor versions must be higher or equal
@@ -106,6 +107,8 @@ def setup(self):
106107
self.actionAbout.triggered.connect(self.open_about)
107108
self.serialchooser.connected.connect(self.serial_connected)
108109

110+
self.actionUpdates.triggered.connect(self.open_updater)
111+
109112
self.timer.start(5000)
110113
self.profile_ui = profile_ui.ProfileUI(main=self)
111114
self.serialchooser.connected.connect(self.profile_ui.setEnabled)
@@ -196,6 +199,10 @@ def open_about(self):
196199
"""Open the about dialog box."""
197200
AboutDialog(self).exec()
198201

202+
def open_updater(self):
203+
updater.UpdateBrowser(self).exec()
204+
205+
199206
def save_flashdump_to_file(self):
200207
"""Send a async message to get the flashdump from board."""
201208
self.get_value_async("sys", "flashdump", config.saveDump)

requirements.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ PyQt6-Charts
44
PyQt6-Charts-Qt6
55
PyQt6-sip
66
pyusb
7-
intelhex
7+
intelhex
8+
requests

res/MainWindow.ui

+7-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
<x>0</x>
6565
<y>0</y>
6666
<width>644</width>
67-
<height>24</height>
67+
<height>21</height>
6868
</rect>
6969
</property>
7070
<widget class="QMenu" name="menuHelp">
@@ -73,6 +73,7 @@
7373
</property>
7474
<addaction name="actionErrors"/>
7575
<addaction name="actionActive_features"/>
76+
<addaction name="actionUpdates"/>
7677
<addaction name="actionAbout"/>
7778
</widget>
7879
<widget class="QMenu" name="menuSettings">
@@ -197,6 +198,11 @@
197198
<string>Encoder tuning...</string>
198199
</property>
199200
</action>
201+
<action name="actionUpdates">
202+
<property name="text">
203+
<string>Updates</string>
204+
</property>
205+
</action>
200206
</widget>
201207
<resources/>
202208
<connections/>

res/updatebrowser.ui

+170
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
3+
<class>Form</class>
4+
<widget class="QWidget" name="Form">
5+
<property name="geometry">
6+
<rect>
7+
<x>0</x>
8+
<y>0</y>
9+
<width>705</width>
10+
<height>622</height>
11+
</rect>
12+
</property>
13+
<property name="windowTitle">
14+
<string>Updatebrowser</string>
15+
</property>
16+
<layout class="QGridLayout" name="gridLayout">
17+
<item row="1" column="1">
18+
<widget class="QGroupBox" name="groupBox_3">
19+
<property name="sizePolicy">
20+
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
21+
<horstretch>0</horstretch>
22+
<verstretch>1</verstretch>
23+
</sizepolicy>
24+
</property>
25+
<property name="title">
26+
<string>Release files</string>
27+
</property>
28+
<layout class="QVBoxLayout" name="verticalLayout_2">
29+
<item>
30+
<widget class="QListWidget" name="listWidget_files"/>
31+
</item>
32+
<item>
33+
<layout class="QHBoxLayout" name="horizontalLayout_3">
34+
<item>
35+
<spacer name="horizontalSpacer_2">
36+
<property name="orientation">
37+
<enum>Qt::Horizontal</enum>
38+
</property>
39+
<property name="sizeHint" stdset="0">
40+
<size>
41+
<width>40</width>
42+
<height>20</height>
43+
</size>
44+
</property>
45+
</spacer>
46+
</item>
47+
<item>
48+
<widget class="QLabel" name="label_fileUrl">
49+
<property name="text">
50+
<string/>
51+
</property>
52+
<property name="openExternalLinks">
53+
<bool>true</bool>
54+
</property>
55+
</widget>
56+
</item>
57+
</layout>
58+
</item>
59+
</layout>
60+
</widget>
61+
</item>
62+
<item row="0" column="0" colspan="2">
63+
<widget class="QGroupBox" name="groupBox_2">
64+
<property name="title">
65+
<string>Repository</string>
66+
</property>
67+
<layout class="QHBoxLayout" name="horizontalLayout">
68+
<item>
69+
<widget class="QRadioButton" name="radioButton_main">
70+
<property name="toolTip">
71+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Ultrawipf/OpenFFBoard&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
72+
</property>
73+
<property name="text">
74+
<string>OpenFFBoard (Firmware + Configurator)</string>
75+
</property>
76+
<property name="checked">
77+
<bool>true</bool>
78+
</property>
79+
<attribute name="buttonGroup">
80+
<string notr="true">buttonGroup_repo</string>
81+
</attribute>
82+
</widget>
83+
</item>
84+
<item>
85+
<widget class="QRadioButton" name="radioButton_configurator">
86+
<property name="toolTip">
87+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Ultrawipf/OpenFFBoard-configurator&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
88+
</property>
89+
<property name="text">
90+
<string>Configurator only</string>
91+
</property>
92+
<attribute name="buttonGroup">
93+
<string notr="true">buttonGroup_repo</string>
94+
</attribute>
95+
</widget>
96+
</item>
97+
</layout>
98+
</widget>
99+
</item>
100+
<item row="1" column="0">
101+
<widget class="QGroupBox" name="groupBox">
102+
<property name="sizePolicy">
103+
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
104+
<horstretch>0</horstretch>
105+
<verstretch>1</verstretch>
106+
</sizepolicy>
107+
</property>
108+
<property name="title">
109+
<string>Releases</string>
110+
</property>
111+
<layout class="QVBoxLayout" name="verticalLayout">
112+
<item>
113+
<widget class="QListWidget" name="listWidget_release"/>
114+
</item>
115+
<item>
116+
<layout class="QHBoxLayout" name="horizontalLayout_2">
117+
<item>
118+
<spacer name="horizontalSpacer">
119+
<property name="orientation">
120+
<enum>Qt::Horizontal</enum>
121+
</property>
122+
<property name="sizeHint" stdset="0">
123+
<size>
124+
<width>40</width>
125+
<height>20</height>
126+
</size>
127+
</property>
128+
</spacer>
129+
</item>
130+
<item>
131+
<widget class="QLabel" name="label_releaseUrl">
132+
<property name="text">
133+
<string/>
134+
</property>
135+
<property name="openExternalLinks">
136+
<bool>true</bool>
137+
</property>
138+
</widget>
139+
</item>
140+
</layout>
141+
</item>
142+
</layout>
143+
</widget>
144+
</item>
145+
<item row="2" column="0" colspan="2">
146+
<widget class="QGroupBox" name="groupBox_4">
147+
<property name="sizePolicy">
148+
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
149+
<horstretch>0</horstretch>
150+
<verstretch>2</verstretch>
151+
</sizepolicy>
152+
</property>
153+
<property name="title">
154+
<string>Release notes</string>
155+
</property>
156+
<layout class="QVBoxLayout" name="verticalLayout_3">
157+
<item>
158+
<widget class="QTextBrowser" name="textBrowser_releasenotes"/>
159+
</item>
160+
</layout>
161+
</widget>
162+
</item>
163+
</layout>
164+
</widget>
165+
<resources/>
166+
<connections/>
167+
<buttongroups>
168+
<buttongroup name="buttonGroup_repo"/>
169+
</buttongroups>
170+
</ui>

0 commit comments

Comments
 (0)