Skip to content

More useability for serial monitor / editor #5921

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed

More useability for serial monitor / editor #5921

wants to merge 5 commits into from

Conversation

MichalSy
Copy link
Contributor

@MichalSy MichalSy commented Jan 28, 2017

added "clear output" button to serial monitor
added "show timestamp" checkbox to serial monitor
added configurable shortcut for comment / uncomment
added setting to show always file extensions

added "show timestamp" checkbox to serial monitor
@mastrolinux mastrolinux added the in progress Work on this item is in progress label Jan 28, 2017
@MichalSy MichalSy changed the title More useability for serial monitor More useability for serial monitor / editor Jan 28, 2017
@facchinm
Copy link
Member

facchinm commented Jan 30, 2017

LGTM! Did you measure if there is any performance issue with the timestamp enabled, using a sketch like this one

void setup() {
SerialUSB.begin(9600);
while (!SerialUSB) ; // wait
delay(250);
}
unsigned long count=1;
void loop() {
SerialUSB.print("Printing simple text, count # ");
SerialUSB.println(count++);
}

on a board with native USB serial?

@facchinm facchinm added Component: IDE Serial monitor Tools > Serial Monitor Component: IDE user interface The Arduino IDE's user interface Waiting for feedback More information must be provided before we can proceed labels Jan 30, 2017
@PaulStoffregen
Copy link
Contributor

@ArduinoBot build this please

@MichalSy
Copy link
Contributor Author

@facchinm, I tested it with a NodeMCU. All works fine without performance issues...

@MichalSy
Copy link
Contributor Author

added a custom title setting:
editor.custom_title_format=Arduino {version} | {folder}{file}

If the setting is not available, the default style will be used.

possible options:
{file} = filename
{folder} = absolute folder name
{path} = absolute folder name
{project} = project (sketch) name
{version} = IDE Version

@facchinm
Copy link
Member

@Michaelsy unfortunately nodeMCU uses an USB to serial converter so the speed is capped (instead, on boards with serial over USB, the speed is much faster) . I'll test your PR on a Zero, just wondering why @ArduinoBot is still asleep...

@facchinm
Copy link
Member

With the timestamp enabled, on the sample sketch I posted earlier with a Zero, the heap usage ramps to 900MB but then the garbage collector acts good. CPU usage increases from 2-3% to 20% but this is an hardcore test so overall it looks good from a performance POW.
I'm attaching a screenshot for @00alis so we can get some suggestions on UI elements placements
2017-01-31-151940_863x338_scrot

@00alis
Copy link
Contributor

00alis commented Jan 31, 2017

Hi,
All good UI wise for the timestamp! I think the option should be unchecked by default.

I am wondering about the 'Clear Output' feature, is it really needed? Closing the serial monitor will clear the output anyway.
If we feel that is needed the button will be better placed on the bottom right corner, pushing the 2 dropdowns on the left, since now it is too attached to the Timestamp option and it feels somewhat related to it.

@MichalSy
Copy link
Contributor Author

@00alis the default is unchecked. It will be saved in the preferences. I think the button don't disturb the user and its easier to clear the output then "closing window and reopen". I will change the position to the right side.

@PaulStoffregen
Copy link
Contributor

I'm very concerned about this PR's performance. Testing is really needed with a fast native USB board like Arduino Due or Teensy 3.x. Arduino Micro & Zero are native USB, but they lack the optimized USB code and/or CPU performance to fully utilize even 12 Mbit/sec USB.

@facchinm
Copy link
Member

facchinm commented Feb 1, 2017

@PaulStoffregen I'll test again with a Due and report the results here 😉

…ch menu item)

ADDED: setting for autoformat before saving (editor.autoformat_currentfile_before_saving")
CHANGED: move "clear ouput" button from left to right side (Serial Monitor)
@MichalSy
Copy link
Contributor Author

MichalSy commented Feb 1, 2017

I moved the button from left to right. @00alis
If the performance is a big issue. Maybe we can show the checkbox only for NodeMCU?
tmp

@PaulStoffregen
Copy link
Contributor

Anyone know what happened to @ArduinoBot ?

@facchinm
Copy link
Member

facchinm commented Feb 2, 2017

Anyone know what happened to @ArduinoBot ?

We are investigating, it seems that github changed something so the jenkins plugin is unable to be triggered by @mentioning it. I'd prefer to avoid updating the plugin since the last time it replied to ~120 PRs but maybe it's the only way 😄

@facchinm
Copy link
Member

@ArduinoBot build this please.

@ArduinoBot
Copy link
Contributor

@FernandoGarcia
Copy link

Hi!

How about add a reset button to serial monitor to prevent open and close the window to reset the board?

Best regards.

@cmaglie
Copy link
Member

cmaglie commented Apr 10, 2017

I've merged (cherry picked) into master the commits for:

  • configurable shortcut for comment / uncomment
  • setting to show always file extensions
  • setting for custom title

(I've also slightly amended them to remove extra whitespaces)

I'm now rebasing the remaining changes to master and resolve conflicts.

Anyway, it's better to not have multiple changes in a single PR, please push them into many different branches/PR so we can review and merge each one separately, even if it seems cumbersome it definitely makes things easier.

@cmaglie
Copy link
Member

cmaglie commented Apr 11, 2017

The last commit in this PR, that has been added later I presume, is:

CHANGED: use cache for editor tools (don't create new instance for each menu item)
ADDED: setting for autoformat before saving (editor.autoformat_currentfile_before_saving")
CHANGED: move "clear ouput" button from left to right side (Serial Monitor)

This kind of "cumulative patch" commits must be absolutely avoided because, without extra editing/amending, it forces to pick the patch altogether.
For example I'm not sure I understand the usefulness of the "use cache for editor tools", but this is another unrelated patch that would block the serial monitor enhancement.

BTW this is just a note for the future, now I've spitted the commit into three smaller commits in #6178 so let's continue the discussion there.

@cmaglie cmaglie closed this Apr 11, 2017
@mastrolinux mastrolinux removed in progress Work on this item is in progress Waiting for feedback More information must be provided before we can proceed labels Apr 11, 2017
@PaulStoffregen
Copy link
Contributor

I am wondering about the 'Clear Output' feature, is it really needed?

Github has a saying "anything added dilutes everything else".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE Serial monitor Tools > Serial Monitor Component: IDE user interface The Arduino IDE's user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants