Skip to content

Commit 0797ff1

Browse files
committed
Added board disabling logic
* The user can now disable the board using a toggle button in the experiment window * The "disabled" status will report errors if the user tries to use the board in the experiment script * Fix bug that made unresponsive for 5 seconds the GUI when the check connection dialog was canceled
1 parent 3c05b60 commit 0797ff1

File tree

11 files changed

+2083
-1916
lines changed

11 files changed

+2083
-1916
lines changed

MLC/GUI/Autogenerated/autogenerated.py

Lines changed: 1834 additions & 1799 deletions
Large diffs are not rendered by default.

MLC/GUI/Autogenerated/mlc_qtcreator/experiment.ui

Lines changed: 111 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<x>0</x>
1111
<y>0</y>
1212
<width>965</width>
13-
<height>615</height>
13+
<height>687</height>
1414
</rect>
1515
</property>
1616
<property name="windowTitle">
@@ -376,24 +376,53 @@
376376
</widget>
377377
</item>
378378
<item>
379-
<widget class="QGroupBox" name="groupBox_9">
379+
<widget class="QGroupBox" name="board_config_group">
380380
<property name="title">
381381
<string>Board Configuration</string>
382382
</property>
383-
<layout class="QGridLayout" name="gridLayout">
384-
<item row="0" column="1">
385-
<widget class="QPushButton" name="board_config_button">
383+
<layout class="QVBoxLayout" name="verticalLayout_14">
384+
<item>
385+
<widget class="QCheckBox" name="disable_board_check">
386+
<property name="toolTip">
387+
<string extracomment="Disable board initialization"/>
388+
</property>
389+
<property name="statusTip">
390+
<string/>
391+
</property>
392+
<property name="whatsThis">
393+
<string extracomment="Disable board initialization"/>
394+
</property>
395+
<property name="accessibleDescription">
396+
<string/>
397+
</property>
386398
<property name="text">
387-
<string>Configure</string>
399+
<string>Disable board</string>
388400
</property>
389401
</widget>
390402
</item>
391-
<item row="0" column="0">
392-
<widget class="QLabel" name="label_16">
393-
<property name="text">
394-
<string>Board:</string>
403+
<item>
404+
<layout class="QHBoxLayout" name="board_group">
405+
<property name="topMargin">
406+
<number>6</number>
395407
</property>
396-
</widget>
408+
<property name="bottomMargin">
409+
<number>6</number>
410+
</property>
411+
<item>
412+
<widget class="QLabel" name="board_label">
413+
<property name="text">
414+
<string>Board:</string>
415+
</property>
416+
</widget>
417+
</item>
418+
<item>
419+
<widget class="QPushButton" name="board_config_button">
420+
<property name="text">
421+
<string>Configure</string>
422+
</property>
423+
</widget>
424+
</item>
425+
</layout>
397426
</item>
398427
</layout>
399428
</widget>
@@ -865,8 +894,8 @@
865894
<slot>on_next_gen_button_clicked()</slot>
866895
<hints>
867896
<hint type="sourcelabel">
868-
<x>878</x>
869-
<y>121</y>
897+
<x>922</x>
898+
<y>148</y>
870899
</hint>
871900
<hint type="destinationlabel">
872901
<x>480</x>
@@ -881,8 +910,8 @@
881910
<slot>on_save_config_button_clicked()</slot>
882911
<hints>
883912
<hint type="sourcelabel">
884-
<x>921</x>
885-
<y>507</y>
913+
<x>479</x>
914+
<y>647</y>
886915
</hint>
887916
<hint type="destinationlabel">
888917
<x>277</x>
@@ -897,8 +926,8 @@
897926
<slot>on_dimension_check_clicked()</slot>
898927
<hints>
899928
<hint type="sourcelabel">
900-
<x>835</x>
901-
<y>241</y>
929+
<x>922</x>
930+
<y>283</y>
902931
</hint>
903932
<hint type="destinationlabel">
904933
<x>480</x>
@@ -913,8 +942,8 @@
913942
<slot>on_show_all_check_clicked()</slot>
914943
<hints>
915944
<hint type="sourcelabel">
916-
<x>835</x>
917-
<y>215</y>
945+
<x>922</x>
946+
<y>253</y>
918947
</hint>
919948
<hint type="destinationlabel">
920949
<x>480</x>
@@ -945,8 +974,8 @@
945974
<slot>on_log_check_clicked()</slot>
946975
<hints>
947976
<hint type="sourcelabel">
948-
<x>835</x>
949-
<y>189</y>
977+
<x>922</x>
978+
<y>223</y>
950979
</hint>
951980
<hint type="destinationlabel">
952981
<x>480</x>
@@ -977,8 +1006,8 @@
9771006
<slot>on_test_button_clicked()</slot>
9781007
<hints>
9791008
<hint type="sourcelabel">
980-
<x>918</x>
981-
<y>251</y>
1009+
<x>922</x>
1010+
<y>272</y>
9821011
</hint>
9831012
<hint type="destinationlabel">
9841013
<x>277</x>
@@ -993,8 +1022,8 @@
9931022
<slot>on_prev_gen_button_clicked()</slot>
9941023
<hints>
9951024
<hint type="sourcelabel">
996-
<x>792</x>
997-
<y>121</y>
1025+
<x>836</x>
1026+
<y>148</y>
9981027
</hint>
9991028
<hint type="destinationlabel">
10001029
<x>480</x>
@@ -1041,8 +1070,8 @@
10411070
<slot>on_start_button_clicked()</slot>
10421071
<hints>
10431072
<hint type="sourcelabel">
1044-
<x>918</x>
1045-
<y>376</y>
1073+
<x>922</x>
1074+
<y>519</y>
10461075
</hint>
10471076
<hint type="destinationlabel">
10481077
<x>205</x>
@@ -1057,8 +1086,8 @@
10571086
<slot>on_chart_config_changed(QString)</slot>
10581087
<hints>
10591088
<hint type="sourcelabel">
1060-
<x>278</x>
1061-
<y>437</y>
1089+
<x>341</x>
1090+
<y>580</y>
10621091
</hint>
10631092
<hint type="destinationlabel">
10641093
<x>480</x>
@@ -1073,8 +1102,8 @@
10731102
<slot>on_chart_config_changed(QString)</slot>
10741103
<hints>
10751104
<hint type="sourcelabel">
1076-
<x>278</x>
1077-
<y>465</y>
1105+
<x>341</x>
1106+
<y>612</y>
10781107
</hint>
10791108
<hint type="destinationlabel">
10801109
<x>480</x>
@@ -1089,8 +1118,8 @@
10891118
<slot>on_chart_config_changed(QString)</slot>
10901119
<hints>
10911120
<hint type="sourcelabel">
1092-
<x>599</x>
1093-
<y>372</y>
1121+
<x>647</x>
1122+
<y>580</y>
10941123
</hint>
10951124
<hint type="destinationlabel">
10961125
<x>480</x>
@@ -1105,8 +1134,8 @@
11051134
<slot>on_chart_config_changed(QString)</slot>
11061135
<hints>
11071136
<hint type="sourcelabel">
1108-
<x>403</x>
1109-
<y>400</y>
1137+
<x>647</x>
1138+
<y>612</y>
11101139
</hint>
11111140
<hint type="destinationlabel">
11121141
<x>480</x>
@@ -1121,8 +1150,8 @@
11211150
<slot>on_chart_config_changed(QString)</slot>
11221151
<hints>
11231152
<hint type="sourcelabel">
1124-
<x>403</x>
1125-
<y>428</y>
1153+
<x>647</x>
1154+
<y>644</y>
11261155
</hint>
11271156
<hint type="destinationlabel">
11281157
<x>480</x>
@@ -1137,8 +1166,8 @@
11371166
<slot>on_chart_config_changed(QString)</slot>
11381167
<hints>
11391168
<hint type="sourcelabel">
1140-
<x>403</x>
1141-
<y>372</y>
1169+
<x>647</x>
1170+
<y>548</y>
11421171
</hint>
11431172
<hint type="destinationlabel">
11441173
<x>480</x>
@@ -1153,8 +1182,8 @@
11531182
<slot>on_chart_config_changed(QString)</slot>
11541183
<hints>
11551184
<hint type="sourcelabel">
1156-
<x>203</x>
1157-
<y>372</y>
1185+
<x>341</x>
1186+
<y>548</y>
11581187
</hint>
11591188
<hint type="destinationlabel">
11601189
<x>480</x>
@@ -1169,8 +1198,8 @@
11691198
<slot>on_chart_config_changed(QString)</slot>
11701199
<hints>
11711200
<hint type="sourcelabel">
1172-
<x>203</x>
1173-
<y>428</y>
1201+
<x>341</x>
1202+
<y>644</y>
11741203
</hint>
11751204
<hint type="destinationlabel">
11761205
<x>480</x>
@@ -1185,8 +1214,8 @@
11851214
<slot>on_genealogy_button_clicked()</slot>
11861215
<hints>
11871216
<hint type="sourcelabel">
1188-
<x>835</x>
1189-
<y>488</y>
1217+
<x>922</x>
1218+
<y>533</y>
11901219
</hint>
11911220
<hint type="destinationlabel">
11921221
<x>480</x>
@@ -1201,8 +1230,8 @@
12011230
<slot>on_best_indiv_button_clicked()</slot>
12021231
<hints>
12031232
<hint type="sourcelabel">
1204-
<x>835</x>
1205-
<y>433</y>
1233+
<x>922</x>
1234+
<y>469</y>
12061235
</hint>
12071236
<hint type="destinationlabel">
12081237
<x>480</x>
@@ -1217,8 +1246,8 @@
12171246
<slot>on_convergence_button_clicked()</slot>
12181247
<hints>
12191248
<hint type="sourcelabel">
1220-
<x>835</x>
1221-
<y>461</y>
1249+
<x>922</x>
1250+
<y>501</y>
12221251
</hint>
12231252
<hint type="destinationlabel">
12241253
<x>480</x>
@@ -1233,8 +1262,8 @@
12331262
<slot>on_board_config_button_clicked()</slot>
12341263
<hints>
12351264
<hint type="sourcelabel">
1236-
<x>864</x>
1237-
<y>434</y>
1265+
<x>921</x>
1266+
<y>632</y>
12381267
</hint>
12391268
<hint type="destinationlabel">
12401269
<x>480</x>
@@ -1249,8 +1278,8 @@
12491278
<slot>on_edit_config_button_clicked()</slot>
12501279
<hints>
12511280
<hint type="sourcelabel">
1252-
<x>702</x>
1253-
<y>517</y>
1281+
<x>925</x>
1282+
<y>647</y>
12541283
</hint>
12551284
<hint type="destinationlabel">
12561285
<x>480</x>
@@ -1265,8 +1294,8 @@
12651294
<slot>on_import_config_button_clicked()</slot>
12661295
<hints>
12671296
<hint type="sourcelabel">
1268-
<x>258</x>
1269-
<y>489</y>
1297+
<x>288</x>
1298+
<y>615</y>
12701299
</hint>
12711300
<hint type="destinationlabel">
12721301
<x>480</x>
@@ -1281,8 +1310,8 @@
12811310
<slot>on_export_config_button_clicked()</slot>
12821311
<hints>
12831312
<hint type="sourcelabel">
1284-
<x>702</x>
1285-
<y>489</y>
1313+
<x>925</x>
1314+
<y>615</y>
12861315
</hint>
12871316
<hint type="destinationlabel">
12881317
<x>480</x>
@@ -1313,8 +1342,8 @@
13131342
<slot>on_first_add_indiv_from_textfile_button_clicked()</slot>
13141343
<hints>
13151344
<hint type="sourcelabel">
1316-
<x>826</x>
1317-
<y>121</y>
1345+
<x>922</x>
1346+
<y>148</y>
13181347
</hint>
13191348
<hint type="destinationlabel">
13201349
<x>480</x>
@@ -1345,8 +1374,8 @@
13451374
<slot>on_gen_cut_button_clicked()</slot>
13461375
<hints>
13471376
<hint type="sourcelabel">
1348-
<x>835</x>
1349-
<y>309</y>
1377+
<x>922</x>
1378+
<y>360</y>
13501379
</hint>
13511380
<hint type="destinationlabel">
13521381
<x>480</x>
@@ -1361,8 +1390,8 @@
13611390
<slot>on_gen_start_over_button_clicked()</slot>
13621391
<hints>
13631392
<hint type="sourcelabel">
1364-
<x>835</x>
1365-
<y>337</y>
1393+
<x>922</x>
1394+
<y>392</y>
13661395
</hint>
13671396
<hint type="destinationlabel">
13681397
<x>480</x>
@@ -1377,15 +1406,31 @@
13771406
<slot>on_test_preev_indiv_button_clicked()</slot>
13781407
<hints>
13791408
<hint type="sourcelabel">
1380-
<x>860</x>
1381-
<y>359</y>
1409+
<x>922</x>
1410+
<y>395</y>
13821411
</hint>
13831412
<hint type="destinationlabel">
13841413
<x>482</x>
13851414
<y>304</y>
13861415
</hint>
13871416
</hints>
13881417
</connection>
1418+
<connection>
1419+
<sender>disable_board_check</sender>
1420+
<signal>toggled(bool)</signal>
1421+
<receiver>ExperimentWindow</receiver>
1422+
<slot>on_disable_arduino_toggle()</slot>
1423+
<hints>
1424+
<hint type="sourcelabel">
1425+
<x>736</x>
1426+
<y>588</y>
1427+
</hint>
1428+
<hint type="destinationlabel">
1429+
<x>956</x>
1430+
<y>682</y>
1431+
</hint>
1432+
</hints>
1433+
</connection>
13891434
</connections>
13901435
<slots>
13911436
<slot>on_closed_dialog()</slot>
@@ -1416,5 +1461,6 @@
14161461
<slot>on_gen_cut_button_clicked()</slot>
14171462
<slot>on_gen_start_over_button_clicked()</slot>
14181463
<slot>on_test_preev_indiv_button_clicked()</slot>
1464+
<slot>on_disable_arduino_toggle()</slot>
14191465
</slots>
14201466
</ui>

0 commit comments

Comments
 (0)