Serial Plotter recovery from overload state #695
Labels
conclusion: resolved
Issue was resolved
topic: code
Related to content of the project itself
type: enhancement
Proposed improvement
Describe the current behavior
The Arduino IDE 2.x Serial Plotter has an undocumented maximum limit of 8 variables.
When this limit is exceeded, the plotter goes into an overload state (currently a blank window: #651).
The only way to recover from that overload state is to close and then reopen the Serial Plotter window.
To reproduce
Notice that the plotter goes into the overload state.
Notice that the plotter is now plotting the data as expected 🙂
Describe the request
Recover from the overloaded Serial Plotter state once the over limit data conditions no longer exist.
Desktop
Date: 2021-12-14T17:05:02.907Z
CLI Version: 0.20.2 [13783819]
Additional context
I chose to use the example of the user correcting the overload by uploading a new sketch that produces 8 or less plotted variables, since I think that would be the most common occurrence (and perhaps the easiest to recover from since the upload could be used as a trigger for a recovery attempt). However, it is also possible for the number of variables to drop below the limit at sketch run time.
That seems unlikely to occur in practice, but I have noticed that sometimes there are spurious extra plotted variables when the Serial Plotter starts, which I believe is caused either by parsing of the data starting in the middle of a set or else by the initial data being corrupted, as sometimes happens with serial data printed immediately on initialization.
If the number of legitimate variables is already close to the limit, these spurious variables might push the count over the limit, which would result in a confusing situation for the user. That would be mitigated by the ability to recover on the fly.
Here is a contrived demo of the variable count dropping below the limit at run time:
The text was updated successfully, but these errors were encountered: