From d396877f510a813fcf494355c3e3360a89bbc650 Mon Sep 17 00:00:00 2001 From: Geoffrey Hunter Date: Mon, 29 Oct 2018 21:55:42 -0700 Subject: [PATCH 1/4] Started working on adding ability for user to specify custom baud rate. --- .../comPortSettings/ComPortSettings.java | 2 +- .../mbedded/ninjaterm/resources/style.css | 12 +++++- .../ninjaterm/util/comPort/ComPort.java | 6 +-- .../terminal/comSettings/ComSettingsView.fxml | 2 +- .../ComSettingsViewController.java | 40 +++++++++++++++++-- 5 files changed, 52 insertions(+), 10 deletions(-) diff --git a/src/main/java/ninja/mbedded/ninjaterm/model/terminal/comPortSettings/ComPortSettings.java b/src/main/java/ninja/mbedded/ninjaterm/model/terminal/comPortSettings/ComPortSettings.java index e8b77402..63d34130 100644 --- a/src/main/java/ninja/mbedded/ninjaterm/model/terminal/comPortSettings/ComPortSettings.java +++ b/src/main/java/ninja/mbedded/ninjaterm/model/terminal/comPortSettings/ComPortSettings.java @@ -19,7 +19,7 @@ public class ComPortSettings { public SimpleObjectProperty selComPortName = new SimpleObjectProperty<>(""); - public SimpleObjectProperty selBaudRate = new SimpleObjectProperty<>(BaudRates.BAUD_9600); + public SimpleObjectProperty selBaudRate = new SimpleObjectProperty<>(9600.0); public SimpleObjectProperty selNumDataBits = new SimpleObjectProperty<>(NumDataBits.EIGHT); public SimpleObjectProperty selParity = new SimpleObjectProperty<>(Parities.NONE); public SimpleObjectProperty selNumStopBits = new SimpleObjectProperty<>(NumStopBits.ONE); diff --git a/src/main/java/ninja/mbedded/ninjaterm/resources/style.css b/src/main/java/ninja/mbedded/ninjaterm/resources/style.css index 99e6dc89..2e5845ec 100644 --- a/src/main/java/ninja/mbedded/ninjaterm/resources/style.css +++ b/src/main/java/ninja/mbedded/ninjaterm/resources/style.css @@ -110,7 +110,8 @@ tab design has no other form of indication) */ /* Makes the width of the COM port parameter comboboxes all equal. */ .comSettings .comPortParameters .combo-box { - -fx-min-width: 100px; + -fx-min-width: 150px; + -fx-max-width: 150px; } /* ============================================================================================= */ @@ -250,4 +251,13 @@ tab design has no other form of indication) */ .about Hyperlink { -fx-fill: -colour-about-link; -glyph-size: 30; +} + +// ============================================================================================= */ +// GENERAL COMBO-BOX STYLING +// ============================================================================================= */ + +/* text-input targets editable combo-boxes only (e.g. baud rate combo-box) */ +.combo-box.error .text-input { + -fx-background-color: #FFCCCC; } \ No newline at end of file diff --git a/src/main/java/ninja/mbedded/ninjaterm/util/comPort/ComPort.java b/src/main/java/ninja/mbedded/ninjaterm/util/comPort/ComPort.java index 18e39ab4..8695db2a 100644 --- a/src/main/java/ninja/mbedded/ninjaterm/util/comPort/ComPort.java +++ b/src/main/java/ninja/mbedded/ninjaterm/util/comPort/ComPort.java @@ -145,12 +145,12 @@ public void open() throws ComPortException { } public void setParams( - BaudRates baudRate, + Double baudRate, NumDataBits numDataBits, Parities parity, NumStopBits numStopBits) { - this.baudRate = baudRate; + this.baudRate = BaudRates.BAUD_300; this.numDataBits = numDataBits; this.parity = parity; this.numStopBits = numStopBits; @@ -159,7 +159,7 @@ public void setParams( //====== APP BAUD RATE -> jSSC BAUD RATE =======// //==============================================// int jsscBaudRate; - switch (baudRate) { + switch (this.baudRate) { case BAUD_110: jsscBaudRate = 110; break; diff --git a/src/main/java/ninja/mbedded/ninjaterm/view/mainWindow/terminal/comSettings/ComSettingsView.fxml b/src/main/java/ninja/mbedded/ninjaterm/view/mainWindow/terminal/comSettings/ComSettingsView.fxml index 6f58790f..bc254401 100644 --- a/src/main/java/ninja/mbedded/ninjaterm/view/mainWindow/terminal/comSettings/ComSettingsView.fxml +++ b/src/main/java/ninja/mbedded/ninjaterm/view/mainWindow/terminal/comSettings/ComSettingsView.fxml @@ -34,7 +34,7 @@ - + diff --git a/src/main/java/ninja/mbedded/ninjaterm/view/mainWindow/terminal/comSettings/ComSettingsViewController.java b/src/main/java/ninja/mbedded/ninjaterm/view/mainWindow/terminal/comSettings/ComSettingsViewController.java index 0ba7c031..324e2e19 100644 --- a/src/main/java/ninja/mbedded/ninjaterm/view/mainWindow/terminal/comSettings/ComSettingsViewController.java +++ b/src/main/java/ninja/mbedded/ninjaterm/view/mainWindow/terminal/comSettings/ComSettingsViewController.java @@ -2,8 +2,13 @@ import javafx.collections.ListChangeListener; import javafx.fxml.FXML; +import javafx.geometry.Insets; import javafx.scene.control.Button; import javafx.scene.control.ComboBox; +import javafx.scene.layout.Background; +import javafx.scene.layout.BackgroundFill; +import javafx.scene.layout.CornerRadii; +import javafx.scene.paint.Color; import ninja.mbedded.ninjaterm.model.Model; import ninja.mbedded.ninjaterm.model.terminal.Terminal; import ninja.mbedded.ninjaterm.util.comPort.BaudRates; @@ -11,10 +16,15 @@ import ninja.mbedded.ninjaterm.util.comPort.NumStopBits; import ninja.mbedded.ninjaterm.util.comPort.Parities; import ninja.mbedded.ninjaterm.util.loggerUtils.LoggerUtils; +import ninja.mbedded.ninjaterm.util.tooltip.TooltipUtil; import org.controlsfx.glyphfont.FontAwesome; import org.controlsfx.glyphfont.GlyphFont; import org.slf4j.Logger; +import java.awt.*; +import java.util.ArrayList; +import java.util.List; + /** * Controller for the "COM Settings tab" which is part of the main window. * @@ -35,7 +45,7 @@ public class ComSettingsViewController { public ComboBox foundComPortsComboBox; @FXML - public ComboBox baudRateComboBox; + public ComboBox baudRateComboBox; @FXML public ComboBox numDataBitsComboBox; @@ -84,9 +94,16 @@ public void init(Model model, Terminal terminal, GlyphFont glyphFont) { terminal.comPortSettings.selComPortName.bind(foundComPortsComboBox.getSelectionModel().selectedItemProperty()); - baudRateComboBox.getItems().setAll(BaudRates.values()); - baudRateComboBox.getSelectionModel().select(BaudRates.BAUD_9600); - terminal.comPortSettings.selBaudRate.bind(baudRateComboBox.getSelectionModel().selectedItemProperty()); + List test = new ArrayList(); + test.add("123"); + + baudRateComboBox.getItems().setAll(test); + baudRateComboBox.getSelectionModel().select("124"); + // Don't add a listener to the combobox valueProperty(), as it is only called once the value is committed + // (i.e. enter is pressed). Instead, listen to the textProperty of the "editor" component of the combobox instead + baudRateComboBox.getEditor().textProperty().addListener((observable, oldValue, newValue) -> { + baudRateComboBoxChangeHandler(newValue); + }); numDataBitsComboBox.getItems().setAll(NumDataBits.values()); numDataBitsComboBox.getSelectionModel().select(NumDataBits.EIGHT); @@ -136,6 +153,21 @@ public void init(Model model, Terminal terminal, GlyphFont glyphFont) { }); } + private void baudRateComboBoxChangeHandler(String newValue) { + // Convert baud rate from string to double + try { + Double baudRateDouble = Double.parseDouble(newValue); + terminal.comPortSettings.selBaudRate.set(baudRateDouble); + if (baudRateComboBox.getStyleClass().contains("error")) { + baudRateComboBox.getStyleClass().remove("error"); + } + } catch (NumberFormatException e) { + model.status.addMsg("ERROR: Baud rate is not a valid number (must be convertable to double)."); + TooltipUtil.addDefaultTooltip(baudRateComboBox, "Baud rate is not a valid number (must be convertable to double)."); + baudRateComboBox.getStyleClass().add("error"); + } + } + /** * Enumerates the available styles for the open-close COM port button. * Used by setOpenCloseButtonStyle(). From 2922b12dcddd736327baa7911d9f4c4057240f98 Mon Sep 17 00:00:00 2001 From: Geoffrey Hunter Date: Wed, 31 Oct 2018 21:35:42 -0700 Subject: [PATCH 2/4] Custom baud rate feature now working. --- .../Baud027123Test/Baud027123Test.ino | 22 ++++ .../comPortSettings/ComPortSettings.java | 2 +- .../mbedded/ninjaterm/resources/style.css | 9 +- .../ninjaterm/util/comPort/BaudRates.java | 78 ++++++++----- .../ninjaterm/util/comPort/ComPort.java | 104 +++++++++--------- .../ninjaterm/util/javafx/CssTools.java | 25 +++++ .../ninjaterm/util/tooltip/TooltipUtil.java | 8 +- .../ComSettingsViewController.java | 41 ++++--- 8 files changed, 189 insertions(+), 100 deletions(-) create mode 100644 arduino-serial/Baud027123Test/Baud027123Test.ino create mode 100644 src/main/java/ninja/mbedded/ninjaterm/util/javafx/CssTools.java diff --git a/arduino-serial/Baud027123Test/Baud027123Test.ino b/arduino-serial/Baud027123Test/Baud027123Test.ino new file mode 100644 index 00000000..fb28d8b0 --- /dev/null +++ b/arduino-serial/Baud027123Test/Baud027123Test.ino @@ -0,0 +1,22 @@ +/** + * This code checks that NinjaTerm can handle custom baud rates. + * + * @author Geoffrey Hunter (www.mbedded.ninja) + * @since 2018-10-31 + * @last-modified 2018-10-31 + */ + +// the setup routine runs once when you press reset: +void setup() { + // Initialize serial communication + Serial.begin(27123); +} + +void loop() { + Serial.println("custom"); + // Wait until data is sent + Serial.flush(); +} + + + diff --git a/src/main/java/ninja/mbedded/ninjaterm/model/terminal/comPortSettings/ComPortSettings.java b/src/main/java/ninja/mbedded/ninjaterm/model/terminal/comPortSettings/ComPortSettings.java index 63d34130..afe4c5b6 100644 --- a/src/main/java/ninja/mbedded/ninjaterm/model/terminal/comPortSettings/ComPortSettings.java +++ b/src/main/java/ninja/mbedded/ninjaterm/model/terminal/comPortSettings/ComPortSettings.java @@ -19,7 +19,7 @@ public class ComPortSettings { public SimpleObjectProperty selComPortName = new SimpleObjectProperty<>(""); - public SimpleObjectProperty selBaudRate = new SimpleObjectProperty<>(9600.0); + public SimpleObjectProperty selBaudRate = new SimpleObjectProperty<>(9600); public SimpleObjectProperty selNumDataBits = new SimpleObjectProperty<>(NumDataBits.EIGHT); public SimpleObjectProperty selParity = new SimpleObjectProperty<>(Parities.NONE); public SimpleObjectProperty selNumStopBits = new SimpleObjectProperty<>(NumStopBits.ONE); diff --git a/src/main/java/ninja/mbedded/ninjaterm/resources/style.css b/src/main/java/ninja/mbedded/ninjaterm/resources/style.css index 2e5845ec..65fe9552 100644 --- a/src/main/java/ninja/mbedded/ninjaterm/resources/style.css +++ b/src/main/java/ninja/mbedded/ninjaterm/resources/style.css @@ -3,7 +3,7 @@ * * @author Geoffrey Hunter (www.mbedded.ninja) * @since 2016-07-15 -* @last-modified 2017-02-20 +* @last-modified 2018-10-31 **/ /* ============================================================================================= */ @@ -258,6 +258,11 @@ tab design has no other form of indication) */ // ============================================================================================= */ /* text-input targets editable combo-boxes only (e.g. baud rate combo-box) */ + .combo-box.error .text-input { - -fx-background-color: #FFCCCC; + -fx-background-color: #FFCCCC; /* Light red */ +} + +.combo-box.warning .text-input { + -fx-background-color: #FFCC99; /* Light orange */ } \ No newline at end of file diff --git a/src/main/java/ninja/mbedded/ninjaterm/util/comPort/BaudRates.java b/src/main/java/ninja/mbedded/ninjaterm/util/comPort/BaudRates.java index b36447c5..6a624c45 100644 --- a/src/main/java/ninja/mbedded/ninjaterm/util/comPort/BaudRates.java +++ b/src/main/java/ninja/mbedded/ninjaterm/util/comPort/BaudRates.java @@ -1,5 +1,8 @@ package ninja.mbedded.ninjaterm.util.comPort; +import java.util.ArrayList; +import java.util.List; + /** * Enumerates most of the popular baud rates. These will be shown by default * in the baud rate selection combobox. @@ -8,33 +11,52 @@ * @since 2016-07-16 * @last-modified 2016-07-17 */ -public enum BaudRates { - - BAUD_110("110"), - BAUD_300("300"), - BAUD_600("600"), - BAUD_1200("1200"), - BAUD_2400("2400"), - BAUD_4800("4800"), - BAUD_9600("9600"), - BAUD_14400("14400"), - BAUD_19200("19200"), - BAUD_38400("38400"), - BAUD_57600("57600"), - BAUD_115200("115200"), - BAUD_128000("128000"), - BAUD_256000("256000"), - ; - - private String label; - - BaudRates(String label) { - this.label = label; - } +//public enum BaudRates { +// +// BAUD_110("110"), +// BAUD_300("300"), +// BAUD_600("600"), +// BAUD_1200("1200"), +// BAUD_2400("2400"), +// BAUD_4800("4800"), +// BAUD_9600("9600"), +// BAUD_14400("14400"), +// BAUD_19200("19200"), +// BAUD_38400("38400"), +// BAUD_57600("57600"), +// BAUD_115200("115200"), +// BAUD_128000("128000"), +// BAUD_256000("256000"), +// ; +// +// private String label; +// +// BaudRates(String label) { +// this.label = label; +// } +// +// @Override +// public String toString() { +// return label; +// } +// +//} - @Override - public String toString() { - return label; - } +public class BaudRates { -} + public static final List baudRates = new ArrayList() {{ + add(300); + add(600); + add(1200); + add(2400); + add(4800); + add(9600); + add(14400); + add(19200); + add(38400); + add(57600); + add(115200); + add(128000); + add(256000); + }}; +} \ No newline at end of file diff --git a/src/main/java/ninja/mbedded/ninjaterm/util/comPort/ComPort.java b/src/main/java/ninja/mbedded/ninjaterm/util/comPort/ComPort.java index 8695db2a..7372b623 100644 --- a/src/main/java/ninja/mbedded/ninjaterm/util/comPort/ComPort.java +++ b/src/main/java/ninja/mbedded/ninjaterm/util/comPort/ComPort.java @@ -40,9 +40,9 @@ public boolean isPortOpen() { */ private SerialPort serialPort; - private BaudRates baudRate; + private Integer baudRate; - public BaudRates getBaudRate() { + public Integer getBaudRate() { return baudRate; } @@ -145,12 +145,12 @@ public void open() throws ComPortException { } public void setParams( - Double baudRate, + Integer baudRate, NumDataBits numDataBits, Parities parity, NumStopBits numStopBits) { - this.baudRate = BaudRates.BAUD_300; + this.baudRate = baudRate; this.numDataBits = numDataBits; this.parity = parity; this.numStopBits = numStopBits; @@ -158,53 +158,53 @@ public void setParams( //==============================================// //====== APP BAUD RATE -> jSSC BAUD RATE =======// //==============================================// - int jsscBaudRate; - switch (this.baudRate) { - case BAUD_110: - jsscBaudRate = 110; - break; - case BAUD_300: - jsscBaudRate = 300; - break; - case BAUD_600: - jsscBaudRate = 600; - break; - case BAUD_1200: - jsscBaudRate = 1200; - break; - case BAUD_2400: - jsscBaudRate = 2400; - break; - case BAUD_4800: - jsscBaudRate = 4800; - break; - case BAUD_9600: - jsscBaudRate = 9600; - break; - case BAUD_14400: - jsscBaudRate = 14400; - break; - case BAUD_19200: - jsscBaudRate = 19200; - break; - case BAUD_38400: - jsscBaudRate = 38400; - break; - case BAUD_57600: - jsscBaudRate = 57600; - break; - case BAUD_115200: - jsscBaudRate = 115200; - break; - case BAUD_128000: - jsscBaudRate = 128000; - break; - case BAUD_256000: - jsscBaudRate = 256000; - break; - default: - throw new RuntimeException("Baud rate unrecognised!"); - } +// int jsscBaudRate; +// switch (this.baudRate) { +// case BAUD_110: +// jsscBaudRate = 110; +// break; +// case BAUD_300: +// jsscBaudRate = 300; +// break; +// case BAUD_600: +// jsscBaudRate = 600; +// break; +// case BAUD_1200: +// jsscBaudRate = 1200; +// break; +// case BAUD_2400: +// jsscBaudRate = 2400; +// break; +// case BAUD_4800: +// jsscBaudRate = 4800; +// break; +// case BAUD_9600: +// jsscBaudRate = 9600; +// break; +// case BAUD_14400: +// jsscBaudRate = 14400; +// break; +// case BAUD_19200: +// jsscBaudRate = 19200; +// break; +// case BAUD_38400: +// jsscBaudRate = 38400; +// break; +// case BAUD_57600: +// jsscBaudRate = 57600; +// break; +// case BAUD_115200: +// jsscBaudRate = 115200; +// break; +// case BAUD_128000: +// jsscBaudRate = 128000; +// break; +// case BAUD_256000: +// jsscBaudRate = 256000; +// break; +// default: +// throw new RuntimeException("Baud rate unrecognised!"); +// } //==============================================// //====== APP DATA BITS -> jSSC DATA BITS =======// @@ -274,7 +274,7 @@ public void setParams( try { serialPort.setParams( - jsscBaudRate, + baudRate, jsscDataBits, jsscNumStopBits, jsscParity); diff --git a/src/main/java/ninja/mbedded/ninjaterm/util/javafx/CssTools.java b/src/main/java/ninja/mbedded/ninjaterm/util/javafx/CssTools.java new file mode 100644 index 00000000..e949308c --- /dev/null +++ b/src/main/java/ninja/mbedded/ninjaterm/util/javafx/CssTools.java @@ -0,0 +1,25 @@ +package ninja.mbedded.ninjaterm.util.javafx; + +import javafx.scene.control.Control; + +/** + * Contains a bunch of useful functions for manipulating the styles of javafx components. + * + * @author Geoffrey Hunter (www.mbedded.ninja) + * @last-modified 2018-10-31 + * @since 2018-10-31 + */ +public class CssTools { + + public static void addClass(Control control, String className) { + if (!control.getStyleClass().contains(className)) { + control.getStyleClass().add(className); + } + } + + public static void removeClass(Control control, String className) { + if (control.getStyleClass().contains(className)) { + control.getStyleClass().remove(className); + } + } +} diff --git a/src/main/java/ninja/mbedded/ninjaterm/util/tooltip/TooltipUtil.java b/src/main/java/ninja/mbedded/ninjaterm/util/tooltip/TooltipUtil.java index f455f3cf..eb347319 100644 --- a/src/main/java/ninja/mbedded/ninjaterm/util/tooltip/TooltipUtil.java +++ b/src/main/java/ninja/mbedded/ninjaterm/util/tooltip/TooltipUtil.java @@ -37,7 +37,7 @@ private static void hackStartTiming(javafx.scene.control.Tooltip tooltip, double } } - public static void addDefaultTooltip(Node node, String tooltipText) { + public static Tooltip addDefaultTooltip(Node node, String tooltipText) { /*Tooltip tooltip = new Tooltip(); tooltip.setText(tooltipText); @@ -69,6 +69,12 @@ public static void addDefaultTooltip(Node node, String tooltipText) { hackStartTiming(tooltip, 100.0); Tooltip.install(node, tooltip); + + return tooltip; + } + + public static void removeTooltip(Node node) { + Tooltip.uninstall(node, null); } } diff --git a/src/main/java/ninja/mbedded/ninjaterm/view/mainWindow/terminal/comSettings/ComSettingsViewController.java b/src/main/java/ninja/mbedded/ninjaterm/view/mainWindow/terminal/comSettings/ComSettingsViewController.java index 324e2e19..94549d91 100644 --- a/src/main/java/ninja/mbedded/ninjaterm/view/mainWindow/terminal/comSettings/ComSettingsViewController.java +++ b/src/main/java/ninja/mbedded/ninjaterm/view/mainWindow/terminal/comSettings/ComSettingsViewController.java @@ -5,6 +5,7 @@ import javafx.geometry.Insets; import javafx.scene.control.Button; import javafx.scene.control.ComboBox; +import javafx.scene.control.Tooltip; import javafx.scene.layout.Background; import javafx.scene.layout.BackgroundFill; import javafx.scene.layout.CornerRadii; @@ -15,21 +16,18 @@ import ninja.mbedded.ninjaterm.util.comPort.NumDataBits; import ninja.mbedded.ninjaterm.util.comPort.NumStopBits; import ninja.mbedded.ninjaterm.util.comPort.Parities; +import ninja.mbedded.ninjaterm.util.javafx.CssTools; import ninja.mbedded.ninjaterm.util.loggerUtils.LoggerUtils; import ninja.mbedded.ninjaterm.util.tooltip.TooltipUtil; import org.controlsfx.glyphfont.FontAwesome; import org.controlsfx.glyphfont.GlyphFont; import org.slf4j.Logger; -import java.awt.*; -import java.util.ArrayList; -import java.util.List; - /** * Controller for the "COM Settings tab" which is part of the main window. * * @author Geoffrey Hunter (www.mbedded.ninja) - * @last-modified 2017-02-08 + * @last-modified 2018-10-31 * @since 2016-07-10 */ public class ComSettingsViewController { @@ -94,11 +92,11 @@ public void init(Model model, Terminal terminal, GlyphFont glyphFont) { terminal.comPortSettings.selComPortName.bind(foundComPortsComboBox.getSelectionModel().selectedItemProperty()); - List test = new ArrayList(); - test.add("123"); + for(Integer baudRate: BaudRates.baudRates) { + baudRateComboBox.getItems().add(baudRate.toString()); + } - baudRateComboBox.getItems().setAll(test); - baudRateComboBox.getSelectionModel().select("124"); + baudRateComboBox.getSelectionModel().select("9600"); // Don't add a listener to the combobox valueProperty(), as it is only called once the value is committed // (i.e. enter is pressed). Instead, listen to the textProperty of the "editor" component of the combobox instead baudRateComboBox.getEditor().textProperty().addListener((observable, oldValue, newValue) -> { @@ -156,15 +154,26 @@ public void init(Model model, Terminal terminal, GlyphFont glyphFont) { private void baudRateComboBoxChangeHandler(String newValue) { // Convert baud rate from string to double try { - Double baudRateDouble = Double.parseDouble(newValue); - terminal.comPortSettings.selBaudRate.set(baudRateDouble); - if (baudRateComboBox.getStyleClass().contains("error")) { - baudRateComboBox.getStyleClass().remove("error"); + Integer baudRateInt = Integer.parseInt(newValue); + terminal.comPortSettings.selBaudRate.set(baudRateInt); + CssTools.removeClass(baudRateComboBox,"error"); + TooltipUtil.removeTooltip(baudRateComboBox); + + if (!BaudRates.baudRates.contains(baudRateInt)) { + String msg = "WARNING: " + newValue + " is a non-standard baud rate. Some software/hardware may not support this baud rate."; + model.status.addMsg(msg); + TooltipUtil.addDefaultTooltip(baudRateComboBox, msg); + CssTools.addClass(baudRateComboBox, "warning"); + } else { + CssTools.removeClass(baudRateComboBox, "warning"); } + } catch (NumberFormatException e) { - model.status.addMsg("ERROR: Baud rate is not a valid number (must be convertable to double)."); - TooltipUtil.addDefaultTooltip(baudRateComboBox, "Baud rate is not a valid number (must be convertable to double)."); - baudRateComboBox.getStyleClass().add("error"); + model.status.addMsg("ERROR: Baud rate (" + newValue + ") is not a valid number (must be convertable to integer)."); + // We want the tooltip to update with each new incorrect value + TooltipUtil.addDefaultTooltip(baudRateComboBox, "Baud rate (" + newValue + ") is not a valid number (must be convertable to integer)."); + CssTools.removeClass(baudRateComboBox, "warning"); + CssTools.addClass(baudRateComboBox, "error"); } } From 1672432c8326755110c22cfb137d8df9d3e6db88 Mon Sep 17 00:00:00 2001 From: Geoffrey Hunter Date: Wed, 31 Oct 2018 21:38:07 -0700 Subject: [PATCH 3/4] Updated docs with custom baud rate info. --- docs/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/index.html b/docs/index.html index 367e88b3..578c5904 100644 --- a/docs/index.html +++ b/docs/index.html @@ -106,6 +106,7 @@

Plus more handy stuff!

  • RX Freeze - The incoming RX data can be "frozen" (paused) without disconnecting from the COM port.
  • Adjustable Wrapping Width - The number of characters per line on the TX/RX displays can be adjusted.
  • "Always On Top" Feature - The NinjaTerm window stays on top of other windows, even if it loses focus.
  • +
  • Custom Baud Rates - NinjaTerm supports non-standard (custom) baud rates (as long as the underlying OS/hardware also supports it).
  • Installation

    From 5ea6f26c9e20f5384dd419f9afa73a670dee05bf Mon Sep 17 00:00:00 2001 From: Geoffrey Hunter Date: Wed, 31 Oct 2018 21:44:18 -0700 Subject: [PATCH 4/4] Updated files in preparation for release of v0.9.1. --- README.md | 4 ++-- build.gradle | 2 +- changelog.md | 5 +++++ docs/index.html | 2 +- updates.xml | 29 ++++++++++++++++++++++------- 5 files changed, 31 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 0f0d132b..be6e0c35 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ NinjaTerm - Maintainer/Primary Author: Geoffrey Hunter (http://www.mbedded.ninja) - Created: 2015-07-15 -- Last Modified: 2018-05-16 -- Version: v0.9.0 +- Last Modified: 2018-10-31 +- Version: v0.9.1 - Company: mbedded.ninja - Project: NinjaTerm - Language: Java, JavaFX diff --git a/build.gradle b/build.gradle index 0418a1e0..6ef13fb0 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ group = 'NinjaTerm' // This version number is the master version number which needs to be updated // manually. This version number is used to automatically set the one in the README, // index.html, and also the one install4j uses (which in turn is the one the app uses at runtime). -version = '0.9.0' +version = '0.9.1' // Project description, shown when // "gradle -q projects" is called diff --git a/changelog.md b/changelog.md index 8419b976..c3aea05c 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [v0.9.1] - 2018-10-31 + +### Added +- NinjaTerm now supports custom (non-standard) baud rates (as long as the underlying OS/hardware also supports it), closes #222. + ## [v0.9.0] - 2018-05-17 ### Changed diff --git a/docs/index.html b/docs/index.html index 578c5904..276da154 100644 --- a/docs/index.html +++ b/docs/index.html @@ -14,7 +14,7 @@ - +