diff --git a/modules/spin-tools/src/com/maccasoft/propeller/ConsoleView.java b/modules/spin-tools/src/com/maccasoft/propeller/ConsoleView.java index 228b834f..146c5513 100644 --- a/modules/spin-tools/src/com/maccasoft/propeller/ConsoleView.java +++ b/modules/spin-tools/src/com/maccasoft/propeller/ConsoleView.java @@ -44,6 +44,7 @@ public class ConsoleView { StyledText console; SerialPort serialPort; + int serialBaudRate; PrintStream os; Preferences preferences; @@ -383,6 +384,13 @@ public void setSerialPort(SerialPort serialPort) { if (this.serialPort != serialPort) { serialPort.addEventListener(serialEventListener); } + serialPort.setParams( + serialBaudRate, + SerialPort.DATABITS_8, + SerialPort.STOPBITS_1, + SerialPort.PARITY_NONE, + false, + false); } this.serialPort = serialPort; @@ -391,6 +399,10 @@ public void setSerialPort(SerialPort serialPort) { } } + public void setSerialBaudRate(int serialBaudRate) { + this.serialBaudRate = serialBaudRate; + } + public void setLogFile(File location, String fileName) { try { if (os != null) { diff --git a/modules/spin-tools/src/com/maccasoft/propeller/SpinTools.java b/modules/spin-tools/src/com/maccasoft/propeller/SpinTools.java index ef779625..b139d7a1 100644 --- a/modules/spin-tools/src/com/maccasoft/propeller/SpinTools.java +++ b/modules/spin-tools/src/com/maccasoft/propeller/SpinTools.java @@ -2968,6 +2968,7 @@ private void handleUpload(boolean writeToFlash, boolean openTerminal, boolean fo consoleToolItem.setSelection(true); centralSashForm.layout(); } + consoleView.setSerialBaudRate(((Spin2Object) obj).getDebugBaud()); } consoleView.setEnabled(isDebug);