JoaoLopesF / RemoteDebug

Library for Arduino to debug projects over WiFi, with web app or telnet, with print commands like Serial Monitor
MIT License
613 stars 127 forks source link

Websocket interface not displaying correctly #58

Open sconwayaus opened 4 years ago

sconwayaus commented 4 years ago

Hi,

Ran into an issue where the string "27" is not been displayed correctly on the websocket interface. The serial port and telnet interfaces do not have this problem.

I'm using release 3.05 using PlatformIO, and the remote debug app from here: http://joaolopesf.net/remotedebugapp/

The following test code should reproduce the issue ` //cut down version of the original problem I observerd double tmp = 0.000043; tmp *= 6372795.0; Debug.printf("5, %f\n", tmp); rdebugE("6, %f\n", tmp);

//Other examples that don't display correctly on the websocket interface Debug.println("274.030185"); Debug.println(274.030185); Debug.println(274);`

And got the following on the websocket interface

(E) 5, 4.030185 (E) (distanceBetween) 6, 4.030185 (E) 4.030185 (E) 4.03 (E) 4

And this on the serial port and telnet interface

(E) 5, 274.030185 (E) (distanceBetween) 6, 274.030185 (E) 274.030185 (E) 274.03 (E) 274

Maybe 27 is being interpreted as an escape character or the like.