bugfix and increment on touch
This commit is contained in:
parent
0c10ec8549
commit
620f60d69c
|
@ -52,7 +52,7 @@ function wait_for_components()
|
|||
system.timeout = false
|
||||
system.components = {}
|
||||
system.channels = {}
|
||||
system.index = {}
|
||||
system.index = 0
|
||||
|
||||
-- open initializer channel
|
||||
system.modem.open(1)
|
||||
|
@ -139,6 +139,9 @@ function get_messages(buffer)
|
|||
elseif event == 'timer' then
|
||||
system.timeout = true
|
||||
return
|
||||
elseif event == 'monitor_touch' then
|
||||
system.index = (system.index + 1) % #system.components
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user