Arduino icon indicating copy to clipboard operation
Arduino copied to clipboard

Serial plotter remote commands

Open chromhelm opened this issue 6 years ago • 4 comments

This adds remote command to set the size and clear the plot area. The commands are send like this: #CLEAR #SIZE: size should be between 10 and 5000. This are hard coded limits for the plot size right now.

chromhelm avatar Apr 12 '18 20:04 chromhelm

Is there a consensus about adding "remote commands" (this patch include them)", vs. e.g. the ability to be able to ignore some lines? Traditionally, "#" is often used to indicate a comment in text based data files. An initial suggestion could be to expand the SerialPlotter protocol to

  • Ignore any line starting with "#"
  • Interprent any line starting with "$" as a command to the serial plotter.

The reason for "$" being that it is often used indicate a command prompt.

madsdyd avatar Apr 07 '20 10:04 madsdyd

Status of the QA check is that it fails because

  • The method setNewBufferCapacity assigns to one of its parameters.
  • Line 326 needs to be changed from if (commands.equals("CLEAR")) { to if ("CLEAR".equals(commands)) {

Both are trivial to fix

madsdyd avatar Apr 07 '20 10:04 madsdyd

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: chromhelm
:x: Wilhelm Wiens


Wilhelm Wiens seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Apr 09 '21 13:04 CLAassistant

Thanks for adding the Serial Plotter with Labels and Commands to the Arduino IDE!

Regarding remote commands and comments as described in this PR:

Is there a consensus about adding "remote commands" (this patch include them)", vs. e.g. the ability to be able to ignore some lines? Traditionally, "#" is often used to indicate a comment in text based data files. An initial suggestion could be to expand the SerialPlotter protocol to

* Ignore any line starting with "#"
  • I agree that # is almost ubiquitious for comments along with optional // line comments and /* */ multiline comments.

  • The command line should be part of a comment, e.g. something like a shebang: # $ CLEAR; or #% $ SIZE 5000,500;

  • There are feature requests to ignore lines arduino/arduino-serial-plotter-webapp#28 and adding a filter / regex for plotting only specific interesting lines arduino/arduino-serial-plotter-webapp#21 .

stefan123t avatar Apr 14 '22 10:04 stefan123t