mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-30 19:52:13 +01:00
forgot to move serialRate field to SerialMonitor subclass
This commit is contained in:
parent
b8486c287f
commit
69e6419394
@ -24,7 +24,6 @@ public abstract class AbstractMonitor extends JFrame implements MessageConsumer
|
|||||||
protected JCheckBox autoscrollBox;
|
protected JCheckBox autoscrollBox;
|
||||||
protected JComboBox lineEndings;
|
protected JComboBox lineEndings;
|
||||||
protected JComboBox serialRates;
|
protected JComboBox serialRates;
|
||||||
protected int serialRate;
|
|
||||||
|
|
||||||
public AbstractMonitor(String title) {
|
public AbstractMonitor(String title) {
|
||||||
super(title);
|
super(title);
|
||||||
@ -110,8 +109,6 @@ public abstract class AbstractMonitor extends JFrame implements MessageConsumer
|
|||||||
for (int i = 0; i < serialRateStrings.length; i++)
|
for (int i = 0; i < serialRateStrings.length; i++)
|
||||||
serialRates.addItem(serialRateStrings[i] + " " + _("baud"));
|
serialRates.addItem(serialRateStrings[i] + " " + _("baud"));
|
||||||
|
|
||||||
serialRate = Preferences.getInteger("serial.debug_rate");
|
|
||||||
serialRates.setSelectedItem(serialRate + " " + _("baud"));
|
|
||||||
serialRates.setMaximumSize(serialRates.getMinimumSize());
|
serialRates.setMaximumSize(serialRates.getMinimumSize());
|
||||||
|
|
||||||
pane.add(autoscrollBox);
|
pane.add(autoscrollBox);
|
||||||
|
@ -24,6 +24,8 @@ import java.awt.event.ActionEvent;
|
|||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import static processing.app.I18n._;
|
||||||
|
|
||||||
public class SerialMonitor extends AbstractMonitor {
|
public class SerialMonitor extends AbstractMonitor {
|
||||||
|
|
||||||
private final String port;
|
private final String port;
|
||||||
@ -35,6 +37,8 @@ public class SerialMonitor extends AbstractMonitor {
|
|||||||
|
|
||||||
this.port = port;
|
this.port = port;
|
||||||
|
|
||||||
|
serialRate = Preferences.getInteger("serial.debug_rate");
|
||||||
|
serialRates.setSelectedItem(serialRate + " " + _("baud"));
|
||||||
onSerialRateChange(new ActionListener() {
|
onSerialRateChange(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent event) {
|
public void actionPerformed(ActionEvent event) {
|
||||||
String wholeString = (String) serialRates.getSelectedItem();
|
String wholeString = (String) serialRates.getSelectedItem();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user