Skip to content
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

Shuffled lines in uploaded lua code #3

Open
cmatei opened this issue Jan 13, 2020 · 5 comments
Open

Shuffled lines in uploaded lua code #3

cmatei opened this issue Jan 13, 2020 · 5 comments

Comments

@cmatei
Copy link

cmatei commented Jan 13, 2020

I am using the http://chilipeppr.com/esp32 workspace. Uploading the code in the 'intended' attached image, then clicking 'Capture the contents of the file and open it in the LUA editor' produces the 'result'. It seems the upload shuffles the lines in the file.

It seems the reshuffle is particularly sensitive to "node.restart()", other code seems to go in fine. The only occurence of node.restart() in the workspace code seems to be as an event handler for the reset button, I can't spot any other magic related to it.

After spending quite a few hours trying to figure out why the device resets continuosly, this is amusing :))

Intended:

intended

Result:

result

@chilipeppr
Copy link
Owner

chilipeppr commented Jan 13, 2020 via email

@cmatei
Copy link
Author

cmatei commented Jan 13, 2020

The problem is not with editing the fle back, it's rather that it gets garbled on upload. The culprit seems to be in bufferflow_nodemcu.go actually, in serial-port-json-server. That's looking for the node.restart() sequence in the buffer, presumably to handle reset.

@chilipeppr
Copy link
Owner

chilipeppr commented Jan 13, 2020 via email

@chilipeppr
Copy link
Owner

chilipeppr commented Jan 13, 2020 via email

@cmatei
Copy link
Author

cmatei commented Jan 13, 2020

That was my workaround as well, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants