Skip to content

Non-comma separator not working in labeled data sets #15

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
per1234 opened this issue Sep 5, 2022 · 2 comments · Fixed by #16
Closed

Non-comma separator not working in labeled data sets #15

per1234 opened this issue Sep 5, 2022 · 2 comments · Fixed by #16
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Sep 5, 2022

Describe the problem

The official Arduino Serial Plotter protocol specification documents three supported data point separator characters:

  • space
  • tab
  • comma

🐛 Separators other than commas are not working in data sets that are labeled

To reproduce

Equipment

  • Arduino board
    You can also send the equivalent data directly to the web app if that is more convenient to you.

Steps

  1. Upload the following sketch to your Arduino board:
    void setup() {
      Serial.begin(9600);
    }
    void loop() {
      for (byte value = 0; value < 4; value++) {
        for (byte variableOffset = 0; variableOffset < 3; variableOffset++) {
          Serial.print("label");
          Serial.print(variableOffset);
          Serial.print(':');
          Serial.print(value + variableOffset);
          Serial.print("\t");
        }
        Serial.println();
      }
      delay(100);
    }
  2. Open "Serial Plotter"
  3. Select "9600 baud" from the dropdown baud rate menu at the bottom right corner of the "Serial Plotter" window.

🐛 Only a single variable is plotted:

image

Expected behavior

serial-plotter-labeled

  • Full support for all data point separators documented in the specification.
  • Supported separators are consistent regardless of whether or not data points are labeled.

OR

  • Clear documentation of breaking change
  • Comprehensive survey and repair of all important content broken by change

Version

eac6d39

Operating system

Windows

Operating system version

10

Additional context

The demo works as expected when using the Arduino IDE 1.8.19 Serial Plotter.


Examples of existing programs broken by this bug:

@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Sep 5, 2022
@nmzaheer
Copy link
Contributor

nmzaheer commented Sep 6, 2022

I think conforming to the protocol would be a better option. I think the second proposal would involve a lot more effort and unnecessary since it is also a part of legacy Arduino.

I'd like to take a stab at it

@nmzaheer
Copy link
Contributor

nmzaheer commented Sep 6, 2022

Looks like the relevant code is here https://github.com/arduino/Arduino/blob/69e91cab5cc6e0ee9280a1b8a3399d1b634a9eef/app/src/processing/app/SerialPlotter.java#L408

A regex expression is being used to include Space, Tab and Comma as delimiter values. I will try to replicate the same in React

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants