File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed
arduino-core/src/cc/arduino/packages/discoverers/serial Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -76,10 +76,6 @@ public void setSerialBoardPorts(List<BoardPort> newSerialBoardPorts) {
7676 serialBoardPorts .addAll (newSerialBoardPorts );
7777 }
7878
79- public void forceRefresh () {
80- retriggerDiscovery (false );
81- }
82-
8379 public void setUploadInProgress (boolean param ) {
8480 uploadInProgress = param ;
8581 }
@@ -99,9 +95,9 @@ public void start() {
9995 serialBoardsListerTimer .schedule (new TimerTask () {
10096 @ Override
10197 public void run () {
102- if (BaseNoGui .packages != null ) {
103- retriggerDiscovery ( true );
104- }
98+ if (BaseNoGui .packages != null && ! pausePolling ) {
99+ forceRefresh ( );
100+ }
105101 }
106102 }, 0 , 1000 );
107103 }
@@ -111,16 +107,12 @@ public void stop() {
111107 serialBoardsListerTimer .cancel ();
112108 }
113109
114- public synchronized void retriggerDiscovery ( boolean polled ) {
110+ public synchronized void forceRefresh ( ) {
115111 Platform platform = BaseNoGui .getPlatform ();
116112 if (platform == null ) {
117113 return ;
118114 }
119115
120- if (polled && pausePolling ) {
121- return ;
122- }
123-
124116 List <String > ports = platform .listSerials ();
125117 if (ports .equals (oldPorts )) {
126118 return ;
You can’t perform that action at this time.
0 commit comments