-
Notifications
You must be signed in to change notification settings - Fork 1
/
ui_freeimu_cal.py
509 lines (500 loc) · 31.6 KB
/
ui_freeimu_cal.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'freeimu_cal.ui'
#
# Created by: PyQt5 UI code generator 5.13.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_FreeIMUCal(object):
def setupUi(self, FreeIMUCal):
FreeIMUCal.setObjectName("FreeIMUCal")
FreeIMUCal.resize(800, 680)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(FreeIMUCal.sizePolicy().hasHeightForWidth())
FreeIMUCal.setSizePolicy(sizePolicy)
FreeIMUCal.setMinimumSize(QtCore.QSize(800, 600))
FreeIMUCal.setMaximumSize(QtCore.QSize(800, 680))
FreeIMUCal.setDocumentMode(False)
self.centralwidget = QtWidgets.QWidget(FreeIMUCal)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth())
self.centralwidget.setSizePolicy(sizePolicy)
self.centralwidget.setObjectName("centralwidget")
self.line = QtWidgets.QFrame(self.centralwidget)
self.line.setGeometry(QtCore.QRect(10, 20, 791, 16))
self.line.setFrameShape(QtWidgets.QFrame.HLine)
self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line.setObjectName("line")
self.gridLayoutWidget = QtWidgets.QWidget(self.centralwidget)
self.gridLayoutWidget.setGeometry(QtCore.QRect(0, 0, 801, 25))
self.gridLayoutWidget.setObjectName("gridLayoutWidget")
self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget)
self.gridLayout.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint)
self.gridLayout.setContentsMargins(0, 0, 0, 0)
self.gridLayout.setObjectName("gridLayout")
self.line_2 = QtWidgets.QFrame(self.gridLayoutWidget)
self.line_2.setFrameShape(QtWidgets.QFrame.VLine)
self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_2.setObjectName("line_2")
self.gridLayout.addWidget(self.line_2, 0, 4, 1, 1)
self.samplingToggleButton = QtWidgets.QPushButton(self.gridLayoutWidget)
self.samplingToggleButton.setEnabled(False)
self.samplingToggleButton.setAutoDefault(False)
self.samplingToggleButton.setDefault(False)
self.samplingToggleButton.setFlat(False)
self.samplingToggleButton.setObjectName("samplingToggleButton")
self.gridLayout.addWidget(self.samplingToggleButton, 0, 7, 1, 1)
self.serialPortEdit = QtWidgets.QLineEdit(self.gridLayoutWidget)
self.serialPortEdit.setObjectName("serialPortEdit")
self.gridLayout.addWidget(self.serialPortEdit, 0, 1, 1, 1)
self.calibrateButton = QtWidgets.QPushButton(self.gridLayoutWidget)
self.calibrateButton.setEnabled(False)
self.calibrateButton.setObjectName("calibrateButton")
self.gridLayout.addWidget(self.calibrateButton, 0, 9, 1, 1)
self.label = QtWidgets.QLabel(self.gridLayoutWidget)
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
self.calAlgorithmComboBox = QtWidgets.QComboBox(self.gridLayoutWidget)
self.calAlgorithmComboBox.setEnabled(False)
self.calAlgorithmComboBox.setObjectName("calAlgorithmComboBox")
self.calAlgorithmComboBox.addItem("")
self.gridLayout.addWidget(self.calAlgorithmComboBox, 0, 8, 1, 1)
self.connectButton = QtWidgets.QPushButton(self.gridLayoutWidget)
self.connectButton.setObjectName("connectButton")
self.gridLayout.addWidget(self.connectButton, 0, 3, 1, 1)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.gridLayout.addItem(spacerItem, 0, 6, 1, 1)
self.serialProtocol = QtWidgets.QComboBox(self.gridLayoutWidget)
self.serialProtocol.setEnabled(True)
self.serialProtocol.setObjectName("serialProtocol")
self.serialProtocol.addItem("")
self.gridLayout.addWidget(self.serialProtocol, 0, 2, 1, 1)
self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
self.tabWidget.setGeometry(QtCore.QRect(0, 30, 801, 631))
self.tabWidget.setObjectName("tabWidget")
self.uncalibratedTab = QtWidgets.QWidget()
self.uncalibratedTab.setObjectName("uncalibratedTab")
self.gridLayoutWidget_4 = QtWidgets.QWidget(self.uncalibratedTab)
self.gridLayoutWidget_4.setGeometry(QtCore.QRect(0, 10, 791, 588))
self.gridLayoutWidget_4.setObjectName("gridLayoutWidget_4")
self.gridLayout_4 = QtWidgets.QGridLayout(self.gridLayoutWidget_4)
self.gridLayout_4.setSizeConstraint(QtWidgets.QLayout.SetMaximumSize)
self.gridLayout_4.setContentsMargins(0, 0, 0, 0)
self.gridLayout_4.setObjectName("gridLayout_4")
self.gridLayout_5 = QtWidgets.QGridLayout()
self.gridLayout_5.setObjectName("gridLayout_5")
self.label_2 = QtWidgets.QLabel(self.gridLayoutWidget_4)
self.label_2.setAlignment(QtCore.Qt.AlignCenter)
self.label_2.setObjectName("label_2")
self.gridLayout_5.addWidget(self.label_2, 0, 1, 1, 1)
self.accYZ = PlotWidget(self.gridLayoutWidget_4)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.accYZ.sizePolicy().hasHeightForWidth())
self.accYZ.setSizePolicy(sizePolicy)
self.accYZ.setObjectName("accYZ")
self.gridLayout_5.addWidget(self.accYZ, 1, 0, 1, 1)
self.accZX = PlotWidget(self.gridLayoutWidget_4)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.accZX.sizePolicy().hasHeightForWidth())
self.accZX.setSizePolicy(sizePolicy)
self.accZX.setObjectName("accZX")
self.gridLayout_5.addWidget(self.accZX, 1, 1, 1, 1)
self.accXY = PlotWidget(self.gridLayoutWidget_4)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.accXY.sizePolicy().hasHeightForWidth())
self.accXY.setSizePolicy(sizePolicy)
self.accXY.setObjectName("accXY")
self.gridLayout_5.addWidget(self.accXY, 0, 0, 1, 1)
self.gridLayout_4.addLayout(self.gridLayout_5, 1, 0, 1, 1)
self.gridLayout_3 = QtWidgets.QGridLayout()
self.gridLayout_3.setSizeConstraint(QtWidgets.QLayout.SetFixedSize)
self.gridLayout_3.setObjectName("gridLayout_3")
self.magnXY = PlotWidget(self.gridLayoutWidget_4)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.magnXY.sizePolicy().hasHeightForWidth())
self.magnXY.setSizePolicy(sizePolicy)
self.magnXY.setObjectName("magnXY")
self.gridLayout_3.addWidget(self.magnXY, 0, 0, 1, 1)
self.magnYZ = PlotWidget(self.gridLayoutWidget_4)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.magnYZ.sizePolicy().hasHeightForWidth())
self.magnYZ.setSizePolicy(sizePolicy)
self.magnYZ.setObjectName("magnYZ")
self.gridLayout_3.addWidget(self.magnYZ, 1, 0, 1, 1)
self.magnZX = PlotWidget(self.gridLayoutWidget_4)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.magnZX.sizePolicy().hasHeightForWidth())
self.magnZX.setSizePolicy(sizePolicy)
self.magnZX.setObjectName("magnZX")
self.gridLayout_3.addWidget(self.magnZX, 1, 1, 1, 1)
self.label_3 = QtWidgets.QLabel(self.gridLayoutWidget_4)
self.label_3.setAlignment(QtCore.Qt.AlignCenter)
self.label_3.setObjectName("label_3")
self.gridLayout_3.addWidget(self.label_3, 0, 1, 1, 1)
self.gridLayout_4.addLayout(self.gridLayout_3, 1, 2, 1, 1)
self.magn3D = GLViewWidget(self.gridLayoutWidget_4)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.magn3D.sizePolicy().hasHeightForWidth())
self.magn3D.setSizePolicy(sizePolicy)
self.magn3D.setObjectName("magn3D")
self.gridLayout_4.addWidget(self.magn3D, 0, 2, 1, 1)
self.acc3D = GLViewWidget(self.gridLayoutWidget_4)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.acc3D.sizePolicy().hasHeightForWidth())
self.acc3D.setSizePolicy(sizePolicy)
self.acc3D.setObjectName("acc3D")
self.gridLayout_4.addWidget(self.acc3D, 0, 0, 1, 1)
self.line_3 = QtWidgets.QFrame(self.gridLayoutWidget_4)
self.line_3.setLineWidth(1)
self.line_3.setFrameShape(QtWidgets.QFrame.VLine)
self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_3.setObjectName("line_3")
self.gridLayout_4.addWidget(self.line_3, 1, 1, 1, 1)
self.tabWidget.addTab(self.uncalibratedTab, "")
self.calibratedTab = QtWidgets.QWidget()
self.calibratedTab.setObjectName("calibratedTab")
self.horizontalLayoutWidget = QtWidgets.QWidget(self.calibratedTab)
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(0, 380, 791, 181))
self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.groupBox = QtWidgets.QGroupBox(self.horizontalLayoutWidget)
self.groupBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.groupBox.setFlat(False)
self.groupBox.setCheckable(False)
self.groupBox.setObjectName("groupBox")
self.layoutWidget = QtWidgets.QWidget(self.groupBox)
self.layoutWidget.setGeometry(QtCore.QRect(10, 20, 381, 154))
self.layoutWidget.setObjectName("layoutWidget")
self.formLayout_3 = QtWidgets.QFormLayout(self.layoutWidget)
self.formLayout_3.setSizeConstraint(QtWidgets.QLayout.SetNoConstraint)
self.formLayout_3.setFieldGrowthPolicy(QtWidgets.QFormLayout.ExpandingFieldsGrow)
self.formLayout_3.setLabelAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.formLayout_3.setContentsMargins(0, 0, 0, 0)
self.formLayout_3.setObjectName("formLayout_3")
self.label_14 = QtWidgets.QLabel(self.layoutWidget)
self.label_14.setObjectName("label_14")
self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_14)
self.calRes_acc_OSx = QtWidgets.QLineEdit(self.layoutWidget)
self.calRes_acc_OSx.setObjectName("calRes_acc_OSx")
self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.calRes_acc_OSx)
self.label_15 = QtWidgets.QLabel(self.layoutWidget)
self.label_15.setObjectName("label_15")
self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_15)
self.calRes_acc_OSy = QtWidgets.QLineEdit(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.calRes_acc_OSy.sizePolicy().hasHeightForWidth())
self.calRes_acc_OSy.setSizePolicy(sizePolicy)
self.calRes_acc_OSy.setObjectName("calRes_acc_OSy")
self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.calRes_acc_OSy)
self.label_16 = QtWidgets.QLabel(self.layoutWidget)
self.label_16.setObjectName("label_16")
self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_16)
self.calRes_acc_OSz = QtWidgets.QLineEdit(self.layoutWidget)
self.calRes_acc_OSz.setObjectName("calRes_acc_OSz")
self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.calRes_acc_OSz)
self.label_17 = QtWidgets.QLabel(self.layoutWidget)
self.label_17.setObjectName("label_17")
self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_17)
self.calRes_acc_SCx = QtWidgets.QLineEdit(self.layoutWidget)
self.calRes_acc_SCx.setObjectName("calRes_acc_SCx")
self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.calRes_acc_SCx)
self.label_18 = QtWidgets.QLabel(self.layoutWidget)
self.label_18.setObjectName("label_18")
self.formLayout_3.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_18)
self.calRes_acc_SCy = QtWidgets.QLineEdit(self.layoutWidget)
self.calRes_acc_SCy.setObjectName("calRes_acc_SCy")
self.formLayout_3.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.calRes_acc_SCy)
self.label_19 = QtWidgets.QLabel(self.layoutWidget)
self.label_19.setObjectName("label_19")
self.formLayout_3.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.label_19)
self.calRes_acc_SCz = QtWidgets.QLineEdit(self.layoutWidget)
self.calRes_acc_SCz.setObjectName("calRes_acc_SCz")
self.formLayout_3.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.calRes_acc_SCz)
self.horizontalLayout.addWidget(self.groupBox)
self.groupBox_2 = QtWidgets.QGroupBox(self.horizontalLayoutWidget)
self.groupBox_2.setObjectName("groupBox_2")
self.layoutWidget_2 = QtWidgets.QWidget(self.groupBox_2)
self.layoutWidget_2.setGeometry(QtCore.QRect(10, 20, 381, 154))
self.layoutWidget_2.setObjectName("layoutWidget_2")
self.formLayout_5 = QtWidgets.QFormLayout(self.layoutWidget_2)
self.formLayout_5.setSizeConstraint(QtWidgets.QLayout.SetNoConstraint)
self.formLayout_5.setFieldGrowthPolicy(QtWidgets.QFormLayout.ExpandingFieldsGrow)
self.formLayout_5.setLabelAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.formLayout_5.setContentsMargins(0, 0, 0, 0)
self.formLayout_5.setObjectName("formLayout_5")
self.label_27 = QtWidgets.QLabel(self.layoutWidget_2)
self.label_27.setObjectName("label_27")
self.formLayout_5.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_27)
self.calRes_magn_OSx = QtWidgets.QLineEdit(self.layoutWidget_2)
self.calRes_magn_OSx.setObjectName("calRes_magn_OSx")
self.formLayout_5.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.calRes_magn_OSx)
self.label_28 = QtWidgets.QLabel(self.layoutWidget_2)
self.label_28.setObjectName("label_28")
self.formLayout_5.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_28)
self.calRes_magn_OSy = QtWidgets.QLineEdit(self.layoutWidget_2)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.calRes_magn_OSy.sizePolicy().hasHeightForWidth())
self.calRes_magn_OSy.setSizePolicy(sizePolicy)
self.calRes_magn_OSy.setObjectName("calRes_magn_OSy")
self.formLayout_5.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.calRes_magn_OSy)
self.label_29 = QtWidgets.QLabel(self.layoutWidget_2)
self.label_29.setObjectName("label_29")
self.formLayout_5.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_29)
self.calRes_magn_OSz = QtWidgets.QLineEdit(self.layoutWidget_2)
self.calRes_magn_OSz.setObjectName("calRes_magn_OSz")
self.formLayout_5.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.calRes_magn_OSz)
self.label_30 = QtWidgets.QLabel(self.layoutWidget_2)
self.label_30.setObjectName("label_30")
self.formLayout_5.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_30)
self.calRes_magn_SCx = QtWidgets.QLineEdit(self.layoutWidget_2)
self.calRes_magn_SCx.setObjectName("calRes_magn_SCx")
self.formLayout_5.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.calRes_magn_SCx)
self.label_31 = QtWidgets.QLabel(self.layoutWidget_2)
self.label_31.setObjectName("label_31")
self.formLayout_5.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_31)
self.calRes_magn_SCy = QtWidgets.QLineEdit(self.layoutWidget_2)
self.calRes_magn_SCy.setObjectName("calRes_magn_SCy")
self.formLayout_5.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.calRes_magn_SCy)
self.label_32 = QtWidgets.QLabel(self.layoutWidget_2)
self.label_32.setObjectName("label_32")
self.formLayout_5.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.label_32)
self.calRes_magn_SCz = QtWidgets.QLineEdit(self.layoutWidget_2)
self.calRes_magn_SCz.setObjectName("calRes_magn_SCz")
self.formLayout_5.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.calRes_magn_SCz)
self.horizontalLayout.addWidget(self.groupBox_2)
self.horizontalLayoutWidget_2 = QtWidgets.QWidget(self.calibratedTab)
self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(488, 560, 301, 31))
self.horizontalLayoutWidget_2.setObjectName("horizontalLayoutWidget_2")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_2)
self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.saveCalibrationEEPROMButton = QtWidgets.QPushButton(self.horizontalLayoutWidget_2)
self.saveCalibrationEEPROMButton.setEnabled(False)
self.saveCalibrationEEPROMButton.setObjectName("saveCalibrationEEPROMButton")
self.horizontalLayout_2.addWidget(self.saveCalibrationEEPROMButton)
self.saveCalibrationHeaderButton = QtWidgets.QPushButton(self.horizontalLayoutWidget_2)
self.saveCalibrationHeaderButton.setEnabled(False)
self.saveCalibrationHeaderButton.setObjectName("saveCalibrationHeaderButton")
self.horizontalLayout_2.addWidget(self.saveCalibrationHeaderButton)
self.horizontalLayoutWidget_3 = QtWidgets.QWidget(self.calibratedTab)
self.horizontalLayoutWidget_3.setGeometry(QtCore.QRect(0, 0, 791, 381))
self.horizontalLayoutWidget_3.setObjectName("horizontalLayoutWidget_3")
self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_3)
self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.tabWidget_2 = QtWidgets.QTabWidget(self.horizontalLayoutWidget_3)
self.tabWidget_2.setTabPosition(QtWidgets.QTabWidget.South)
self.tabWidget_2.setTabShape(QtWidgets.QTabWidget.Rounded)
self.tabWidget_2.setUsesScrollButtons(True)
self.tabWidget_2.setDocumentMode(False)
self.tabWidget_2.setTabsClosable(False)
self.tabWidget_2.setMovable(False)
self.tabWidget_2.setObjectName("tabWidget_2")
self.tab = QtWidgets.QWidget()
self.tab.setObjectName("tab")
self.accXY_cal = PlotWidget(self.tab)
self.accXY_cal.setGeometry(QtCore.QRect(0, 0, 781, 351))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.accXY_cal.sizePolicy().hasHeightForWidth())
self.accXY_cal.setSizePolicy(sizePolicy)
self.accXY_cal.setObjectName("accXY_cal")
self.tabWidget_2.addTab(self.tab, "")
self.tab_4 = QtWidgets.QWidget()
self.tab_4.setObjectName("tab_4")
self.accYZ_cal = PlotWidget(self.tab_4)
self.accYZ_cal.setGeometry(QtCore.QRect(0, 0, 781, 351))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.accYZ_cal.sizePolicy().hasHeightForWidth())
self.accYZ_cal.setSizePolicy(sizePolicy)
self.accYZ_cal.setObjectName("accYZ_cal")
self.tabWidget_2.addTab(self.tab_4, "")
self.tab_3 = QtWidgets.QWidget()
self.tab_3.setObjectName("tab_3")
self.accZX_cal = PlotWidget(self.tab_3)
self.accZX_cal.setGeometry(QtCore.QRect(0, 0, 781, 351))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.accZX_cal.sizePolicy().hasHeightForWidth())
self.accZX_cal.setSizePolicy(sizePolicy)
self.accZX_cal.setObjectName("accZX_cal")
self.tabWidget_2.addTab(self.tab_3, "")
self.tab_7 = QtWidgets.QWidget()
self.tab_7.setObjectName("tab_7")
self.acc3D_cal = GLViewWidget(self.tab_7)
self.acc3D_cal.setGeometry(QtCore.QRect(0, 0, 389, 351))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.acc3D_cal.sizePolicy().hasHeightForWidth())
self.acc3D_cal.setSizePolicy(sizePolicy)
self.acc3D_cal.setObjectName("acc3D_cal")
self.tabWidget_2.addTab(self.tab_7, "")
self.horizontalLayout_3.addWidget(self.tabWidget_2)
self.tabWidget_3 = QtWidgets.QTabWidget(self.horizontalLayoutWidget_3)
self.tabWidget_3.setTabPosition(QtWidgets.QTabWidget.South)
self.tabWidget_3.setTabShape(QtWidgets.QTabWidget.Rounded)
self.tabWidget_3.setUsesScrollButtons(True)
self.tabWidget_3.setDocumentMode(False)
self.tabWidget_3.setTabsClosable(False)
self.tabWidget_3.setMovable(False)
self.tabWidget_3.setObjectName("tabWidget_3")
self.tab_2 = QtWidgets.QWidget()
self.tab_2.setObjectName("tab_2")
self.magnXY_cal = PlotWidget(self.tab_2)
self.magnXY_cal.setGeometry(QtCore.QRect(0, 0, 781, 351))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.magnXY_cal.sizePolicy().hasHeightForWidth())
self.magnXY_cal.setSizePolicy(sizePolicy)
self.magnXY_cal.setObjectName("magnXY_cal")
self.tabWidget_3.addTab(self.tab_2, "")
self.tab_5 = QtWidgets.QWidget()
self.tab_5.setObjectName("tab_5")
self.magnYZ_cal = PlotWidget(self.tab_5)
self.magnYZ_cal.setGeometry(QtCore.QRect(0, 0, 781, 351))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.magnYZ_cal.sizePolicy().hasHeightForWidth())
self.magnYZ_cal.setSizePolicy(sizePolicy)
self.magnYZ_cal.setObjectName("magnYZ_cal")
self.tabWidget_3.addTab(self.tab_5, "")
self.tab_6 = QtWidgets.QWidget()
self.tab_6.setObjectName("tab_6")
self.magnZX_cal = PlotWidget(self.tab_6)
self.magnZX_cal.setGeometry(QtCore.QRect(0, 0, 781, 351))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.magnZX_cal.sizePolicy().hasHeightForWidth())
self.magnZX_cal.setSizePolicy(sizePolicy)
self.magnZX_cal.setObjectName("magnZX_cal")
self.tabWidget_3.addTab(self.tab_6, "")
self.tab_8 = QtWidgets.QWidget()
self.tab_8.setObjectName("tab_8")
self.magn3D_cal = GLViewWidget(self.tab_8)
self.magn3D_cal.setGeometry(QtCore.QRect(0, 0, 389, 351))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.magn3D_cal.sizePolicy().hasHeightForWidth())
self.magn3D_cal.setSizePolicy(sizePolicy)
self.magn3D_cal.setObjectName("magn3D_cal")
self.tabWidget_3.addTab(self.tab_8, "")
self.horizontalLayout_3.addWidget(self.tabWidget_3)
self.horizontalLayoutWidget_4 = QtWidgets.QWidget(self.calibratedTab)
self.horizontalLayoutWidget_4.setGeometry(QtCore.QRect(0, 560, 161, 31))
self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4")
self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4)
self.horizontalLayout_4.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
self.clearCalibrationEEPROMButton = QtWidgets.QPushButton(self.horizontalLayoutWidget_4)
self.clearCalibrationEEPROMButton.setEnabled(False)
self.clearCalibrationEEPROMButton.setObjectName("clearCalibrationEEPROMButton")
self.horizontalLayout_4.addWidget(self.clearCalibrationEEPROMButton)
self.tabWidget.addTab(self.calibratedTab, "")
self.tab_9 = QtWidgets.QWidget()
self.tab_9.setObjectName("tab_9")
self.label_4 = QtWidgets.QLabel(self.tab_9)
self.label_4.setGeometry(QtCore.QRect(290, 270, 261, 16))
self.label_4.setObjectName("label_4")
self.tabWidget.addTab(self.tab_9, "")
FreeIMUCal.setCentralWidget(self.centralwidget)
self.statusbar = QtWidgets.QStatusBar(FreeIMUCal)
self.statusbar.setObjectName("statusbar")
FreeIMUCal.setStatusBar(self.statusbar)
self.retranslateUi(FreeIMUCal)
self.tabWidget.setCurrentIndex(0)
self.tabWidget_2.setCurrentIndex(0)
self.tabWidget_3.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(FreeIMUCal)
def retranslateUi(self, FreeIMUCal):
_translate = QtCore.QCoreApplication.translate
FreeIMUCal.setWindowTitle(_translate("FreeIMUCal", "FreeIMU Calibration Application"))
self.samplingToggleButton.setToolTip(_translate("FreeIMUCal", "Toggle Start/Stop sampling of sensor data from the IMU"))
self.samplingToggleButton.setText(_translate("FreeIMUCal", "Start Sampling"))
self.calibrateButton.setToolTip(_translate("FreeIMUCal", "Run calibration algorithm over the data collected"))
self.calibrateButton.setText(_translate("FreeIMUCal", "Calibrate"))
self.label.setText(_translate("FreeIMUCal", "Serial Port:"))
self.calAlgorithmComboBox.setToolTip(_translate("FreeIMUCal", "<html><head/><body><p>Calibration Algorithm used.</p></body></html>"))
self.calAlgorithmComboBox.setItemText(0, _translate("FreeIMUCal", "Ellipsoid to Sphere"))
self.connectButton.setToolTip(_translate("FreeIMUCal", "Connect or Disconnect from the Arduino"))
self.connectButton.setText(_translate("FreeIMUCal", "Connect"))
self.serialProtocol.setToolTip(_translate("FreeIMUCal", "Serial Protocol to Communicate with IMU"))
self.serialProtocol.setItemText(0, _translate("FreeIMUCal", "FreeIMU_serial"))
self.label_2.setText(_translate("FreeIMUCal", "Accelerometer"))
self.label_3.setText(_translate("FreeIMUCal", "Magnetometer"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.uncalibratedTab), _translate("FreeIMUCal", "Uncalibrated"))
self.groupBox.setTitle(_translate("FreeIMUCal", "Accelerometer"))
self.label_14.setText(_translate("FreeIMUCal", "Offset X"))
self.label_15.setText(_translate("FreeIMUCal", "Offset Y"))
self.label_16.setText(_translate("FreeIMUCal", "Offset Z"))
self.label_17.setText(_translate("FreeIMUCal", "Scale X"))
self.label_18.setText(_translate("FreeIMUCal", "Scale Y"))
self.label_19.setText(_translate("FreeIMUCal", "Scale Z"))
self.groupBox_2.setTitle(_translate("FreeIMUCal", "Magnetometer"))
self.label_27.setText(_translate("FreeIMUCal", "Offset X"))
self.label_28.setText(_translate("FreeIMUCal", "Offset Y"))
self.label_29.setText(_translate("FreeIMUCal", "Offset Z"))
self.label_30.setText(_translate("FreeIMUCal", "Scale X"))
self.label_31.setText(_translate("FreeIMUCal", "Scale Y"))
self.label_32.setText(_translate("FreeIMUCal", "Scale Z"))
self.saveCalibrationEEPROMButton.setToolTip(_translate("FreeIMUCal", "Store the calibration parameters to the microcontroller EEPROM"))
self.saveCalibrationEEPROMButton.setText(_translate("FreeIMUCal", "Save to EEPROM"))
self.saveCalibrationHeaderButton.setToolTip(_translate("FreeIMUCal", "Store the calibration parameters in an header .h file. When such header is active the EEPROM calibration storage code is disabled thus saving program and data memory."))
self.saveCalibrationHeaderButton.setText(_translate("FreeIMUCal", "Save to calibration.h"))
self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab), _translate("FreeIMUCal", "Acc XY"))
self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_4), _translate("FreeIMUCal", "Acc YZ"))
self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_3), _translate("FreeIMUCal", "Acc ZX"))
self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_7), _translate("FreeIMUCal", "Acc 3D"))
self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.tab_2), _translate("FreeIMUCal", "Magn XY"))
self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.tab_5), _translate("FreeIMUCal", "Magn YZ"))
self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.tab_6), _translate("FreeIMUCal", "Magn ZX"))
self.tabWidget_3.setTabText(self.tabWidget_3.indexOf(self.tab_8), _translate("FreeIMUCal", "Magn 3D"))
self.clearCalibrationEEPROMButton.setToolTip(_translate("FreeIMUCal", "<html><head/><body><p>Clear any calibration parameter from the microcontroller EEPROM</p></body></html>"))
self.clearCalibrationEEPROMButton.setText(_translate("FreeIMUCal", "Clear EEPROM"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.calibratedTab), _translate("FreeIMUCal", "Calibrated"))
self.label_4.setText(_translate("FreeIMUCal", "To Be Implemented"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_9), _translate("FreeIMUCal", "Orientation Sensing Test"))
from pyqtgraph import PlotWidget
from pyqtgraph.opengl import GLViewWidget
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
FreeIMUCal = QtWidgets.QMainWindow()
ui = Ui_FreeIMUCal()
ui.setupUi(FreeIMUCal)
FreeIMUCal.show()
sys.exit(app.exec_())