Arduino
Arduino copied to clipboard
Serial plotter remote commands
This adds remote command to set the size and clear the plot area.
The commands are send like this:
#CLEAR
#SIZE:
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.
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")) {
toif ("CLEAR".equals(commands)) {
Both are trivial to fix
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.
Thanks for adding the Serial Plotter with Labels and Commands to the Arduino IDE!
- I am trying to find the Serial Plotter protocol documentation time and again. Here is PDF documentation by @chromhelm and here are the official markdown docs as well as a suggestion by @per1234 to enhance / update existing examples with labels
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 .