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

Thread error when "Save to ESP" #62

Open
tobyliu415 opened this issue Aug 11, 2017 · 2 comments
Open

Thread error when "Save to ESP" #62

tobyliu415 opened this issue Aug 11, 2017 · 2 comments
Labels

Comments

@tobyliu415
Copy link

My simple test program in Lua:
-------begin---------------
print('tobytest.lua ver 1.0')
wifi.setmode(wifi.STATION)
-------end-------------------

Termial window displays somthing like following:
--------begin---------------------------------------

file.remove("tobytest.lua");
file.open("tobytest.lua","w+");
w = file.writeline;
w([==[pr>> int('tobytest.lua ver 1.0')]==]);
w([==[wifi.setmode(wifi.STATION)]==]);
file.flush();file.close();
dofile("tobytest.lua");
tobytest.lua:2: '=' expected near 'int'
stack traceback:
[C]: in function 'dofile'
stdin:1: in main chunk
--------end-------------------------------------------

More information of the problem:
in ESPlorer.java line 12994
------- original code ---------------
delay = LineDelay.getValue();
------- original code end ----------
I found delay is 0 after this line.
If I increases delay, the problem will lessen, but won't solved . (Still similar error if the program saving has a very long line.)

@EnochTheWise
Copy link

Same problem:
`> file.remove("i2c_scan.lua");

file.open("i2c_scan.lua","w+");
).." "]==]);
w([==[ else]==]);
w([==[ row = row.."-- "]==]);
w([==[ end]==]);
w([==[ end]==]);
w([==[ print(row)]==]);
w([==[end]==]);
w([==[ ]==]);
w([==[return scanner]==]);
file.close();
dofile("i2c_scan.lua");
stdin:1: unexpected symbol near ')'`

Source:
`local scanner = {}

scanner.pins = {
sda = 1,
scl = 2
}

scanner.port = 0

scanner.scan = function()
print(" 0 1 2 3 4 5 6 7 8 9 a b c d e f")
i2c.setup(scanner.port, scanner.pins['sda'], scanner.pins['scl'], i2c.SLOW)
for addr = 0, 127 do
if addr == 0 or addr % 16 == 0 then
if addr ~= 0 then print(row) end
row = string.format("%02X", addr)..": "
end
i2c.start(scanner.port)
c = i2c.address(scanner.port, addr, i2c.TRANSMITTER)
i2c.stop(scanner.port)
if c == true then
row = row..string.format("%02X", addr).." "
else
row = row.."-- "
end
end
print(row)
end

return scanner`

@stale
Copy link

stale bot commented Aug 23, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Aug 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants