Enhanced Serial Monitor - ESM4 new error reporting system

Hello Alan,

I have been using ESM v3 successfully for several years and just now decided to try upgrading to v4.0.3.0. I like the enhancements, especially the Project concept and the ability to put setup commands in the reset.txt file.

I wrote a simple sketch to try it out and observed a couple of issues.

-- In the reset.txt file, trying to set the Histogram interval (which I assume is the bin size) to 10, I was not able to get it to accept

#hist~int~10

or any variation on that, including upper case and other values. It gives me the error

[ERR]#hist~int~10
[EX]Check message parametersIndex was outside the bounds of the array.

-- I see that you now have a mechanism with @PORTopened and @PORTclosing to tell the sketch to stop sending data if the port is closed. I noticed that if I do not use that and just close the port so the sketch is continuing to try to send data, the ESM hangs when I re-open the port. Perhaps a buffer overflows if there is a lot of data waiting when you open the port. I have to kill ESM in the Task Manager and restart it to recover.

I am using a 32u4 based Arduino with its integrated USB controller in case that matters. A simple way to get the sketch to stop sending serial data for these processors is to use the undocumented Serial.dtr(), which returns true if the serial port is open and false otherwise.

Thanks for all your efforts on this.