-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
Awaiting More InfoAwaiting More Information from the reporterAwaiting More Information from the reporterfeatureNew feature or requestNew feature or request
Description
I'm trying to read some record data to do the data replay like this:
-- start at the simulator config:
rec_file = "data/400m.csv"
data = {}
for line in io.lines(rec_file) do
table.insert(data, split(line, ","))
end
-- in onLBSimulatorTick function:
simulator:setInputNumber(11, data[ticks % #data + 1][1])
simulator:setInputNumber(12, data[ticks % #data + 1][2])
simulator:setInputNumber(13, data[ticks % #data + 1][3])It worked fine on earlier version. But on latest version, it pops up a exception:
Exception has occurred: MyMicrocontroller.lua:22: attempt to index a nil value (global 'io')
stack traceback:
MyMicrocontroller.lua:22: in field '?'
.../Common/LifeBoatAPI/Tools/Simulator/SimulatorSandbox.lua:67: in field 'require'
_build/_simulator.lua:29: in main chunk
[C]: in ?
I tried to manually require io or iolib, but it turned to Could not find require: io.
How can I fix this? Or is it possible to provide a data read interface?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Awaiting More InfoAwaiting More Information from the reporterAwaiting More Information from the reporterfeatureNew feature or requestNew feature or request