Skip to content

Commit

Permalink
Fixed the proper behavior when the detection is aborted by the user
Browse files Browse the repository at this point in the history
  • Loading branch information
Linestro authored May 30, 2018
1 parent b377a17 commit 0112437
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions OSCGUI.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,17 @@
obj.f.Visible = 'on';
set(obj.f,'CloseRequestFcn',@(h,e)obj.CloseRequestCallback);

while(obj.os.GetBoardSerials() == "No connected devices")
pause(1);
temp = obj.os.GetBoardSerials();
if(temp ~= "No connected devices")
set(obj.serial_selector, 'String', temp);
try
while(1)
pause(1);
temp = obj.os.GetBoardSerials();
if(temp ~= "No connected devices")
set(obj.serial_selector, 'String', temp);
break;
end
end
catch
fprintf("Detection of Board was aborted by the user.\n");
end
end

Expand Down

0 comments on commit 0112437

Please sign in to comment.