Closed per1234 closed 2 years ago
Fixed by https://github.com/arduino/arduino-serial-plotter-webapp/pull/5 This eliminates the issue entirely by plotting only up to the maximum number of variables, so there is never an overload state to recover from. Even though that PR has not yet been merged, the fix there was already published to the npm registry and brought into Arduino IDE by https://github.com/arduino/arduino-ide/pull/698
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: https://github.com/arduino/arduino-ide/issues/651).
The only way to recover from that overload state is to close and then reopen the Serial Plotter window.
To reproduce
:bug: Notice that the Serial Plotter remains in the overload state, despite the data no longer exceeding its limitations.
Describe the request
Recover from the overloaded Serial Plotter state once the over limit data conditions no longer exist.
Desktop
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: