bugfix and increment on touch

This commit is contained in:
Baipyrus 2023-10-29 13:00:49 +01:00
parent 0c10ec8549
commit 620f60d69c

View File

@ -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