1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

Serial flushing now works (added Processing's Serial library as found in the

Wiring repository).
This commit is contained in:
David A. Mellis
2005-11-28 14:04:07 +00:00
parent 30999fdcfd
commit 0837e89f15
2 changed files with 629 additions and 1 deletions

View File

@ -105,6 +105,7 @@ public class Uploader implements MessageConsumer {
commandDownloader.add((!Base.isMacOS() ? "" : userdir) + "tools/avr/bin/uisp");
commandDownloader.add("-dprog=" + Preferences.get("upload.programmer"));
commandDownloader.add("-dpart=" + Preferences.get("build.mcu"));
//commandDownloader.add("-v=4"); // extra verbosity for help debugging.
if (Preferences.get("upload.programmer").equals("dapa"))
commandDownloader.add("-dlpt=" + Preferences.get("parallel.port"));
else {
@ -126,7 +127,7 @@ public class Uploader implements MessageConsumer {
}*/
// Cleanup the serial buffer
serialPort = new Serial();
Serial serialPort = new Serial();
byte[] readBuffer;
while(serialPort.available() > 0) {
readBuffer = serialPort.readBytes();