jung6717 / arduino

Automatically exported from code.google.com/p/arduino
0 stars 0 forks source link

Serial monitor window enhancements #90

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I like very much that the serial monitor is in a separate window in 0017.

Here are a few suggestions for the MacOS version, at least. Not sure if they 
apply to other 
platforms.

1. window resizing not obvious
The baud rate selector popup in the lower right corner obscures the window 
resizing indicator 
(the diagonal lines in a triangle). Or maybe it is not there at all? In either 
case, the fact that the 
window can be resized is not so obvious.

2. remember window attributes
It would be nice if the IDE remembered the size and position of the serial 
monitor window across 
invocations, like it does for the sketch window.

3. stop serial monitor
I see no way to pause, freeze, or otherwise stop the scrolling of the output in 
the serial monitor 
window. This is useful when debugging and you want to examine the results 
displayed in the 
window, of course.

You can close the window, or re-upload the sketch, but when a new serial 
monitor window 
opens, you have lost the output of the prior one and, thus, the data you are 
trying to examine.

You can disconnect the USB connection, which halts the output and leaves the 
window open, but 
this is crude. At a minimum, it generates an error message on screen, but it 
can also brutally 
crash the Mac.

According to the docs for the IDE, clicking the STOP button in the sketch 
window should stop the 
serial monitor, but it does not for me.

It would be nice to have a PAUSE/CONTINUE function for the serial window.

Original issue reported on code.google.com by ahdavids...@gmail.com on 25 Aug 2009 at 10:37

GoogleCodeExporter commented 9 years ago
It seems that (3) above is possible (at least in Arduino 0017 on Mac OS X 
10.5.8 with
JVM 1.5.0_19).  Sliding the scroll bar for the output text area stops 
scrolling.  

Unfortunately, I cannot find a way to re-enable auto-scrolling for the Serial 
Monitor
without closing and re-opening the Serial Monitor window.

A way to solve this is to re-enable auto-scrolling when serial data is sent by 
the
user.  The patch below is one way to do this: 

--
% diff -u app/src/processing/app/SerialMonitor.java
app/src/processing/app/SerialMonitor-tod.java
--- app/src/processing/app/SerialMonitor.java   2009-10-12 16:30:55.000000000 
-0700
+++ app/src/processing/app/SerialMonitor-tod.java   2009-10-12 16:34:26.000000000 
-0700
@@ -74,6 +74,7 @@
       public void actionPerformed(ActionEvent e) {
         send(textField.getText());
         textField.setText("");
+        textArea.setCaretPosition(textArea.getDocument().getLength());
       }});

     sendButton = new JButton("Send");
@@ -81,6 +82,7 @@
       public void actionPerformed(ActionEvent e) {
         send(textField.getText());
         textField.setText("");
+        textArea.setCaretPosition(textArea.getDocument().getLength());
       }});

     pane.add(textField, BorderLayout.CENTER);

Original comment by tod.k...@gmail.com on 12 Oct 2009 at 11:46

GoogleCodeExporter commented 9 years ago
This issue has been replaced with individual one for the various suggestions.

Original comment by dmel...@gmail.com on 1 Apr 2010 at 6:26