Skip to content

Commit 67fa276

Browse files
committed
Fix error that wasn't showing the configured board on the GUI
The Due board was always selected
1 parent c4c6902 commit 67fa276

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

MLC/GUI/Experiment/ArduinoConfigManager/BoardConfigurationWindow.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,16 @@ def __init__(self, controller, boards, setup, parent=None):
2828
self.__setup = setup
2929
self.__board_idx = 0
3030

31+
current_board = 0
32+
3133
for i in boards:
3234
self.setup_board(
3335
self.__board_idx, i["NAME"], i["SHORT_NAME"] + ".png")
3436
self.__board_idx += 1
37+
if self.__setup.board_type["SHORT_NAME"] == i["SHORT_NAME"]:
38+
current_board = self.__board_idx - 1
3539

36-
self.__board_idx = 0
40+
self.__board_idx = current_board
3741
self.ui.arduinoBoard.setCurrentIndex(self.__board_idx)
3842

3943
self.update(self.__setup)

0 commit comments

Comments
 (0)