mirror of
https://github.com/esp8266/Arduino.git
synced 2025-08-05 13:16:13 +03:00
Added error messages for Leonardo upload
This commit is contained in:
@@ -125,25 +125,24 @@ public class AvrdudeUploader extends Uploader {
|
|||||||
Thread.sleep(500);
|
Thread.sleep(500);
|
||||||
elapsed += 500;
|
elapsed += 500;
|
||||||
|
|
||||||
// If after 4 seconds the selected port is active use that port
|
// If after 5 seconds the selected port is active use that port
|
||||||
if (elapsed == 4000) {
|
if (elapsed == 5000 && now.contains(uploadPort)) {
|
||||||
System.out.println("using selected port: " + uploadPort);
|
System.out.println("using selected port: " + uploadPort);
|
||||||
if (now.contains(uploadPort)) {
|
caterinaUploadPort = uploadPort;
|
||||||
caterinaUploadPort = uploadPort;
|
break;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (caterinaUploadPort == null)
|
if (caterinaUploadPort == null)
|
||||||
// Something happened while detecting port
|
// Something happened while detecting port
|
||||||
return false;
|
throw new RunnerException(
|
||||||
|
_("Couldn’t find the selected board. Try pressing the reset button after initiating the upload."));
|
||||||
|
|
||||||
uploadPort = caterinaUploadPort;
|
uploadPort = caterinaUploadPort;
|
||||||
} catch (SerialException ex) {
|
} catch (SerialException e) {
|
||||||
return false;
|
throw new RunnerException(e.getMessage());
|
||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException e) {
|
||||||
return false;
|
throw new RunnerException(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user