123456789101112131415161718192021222324 |
- -- PATTERN: table of patterns to be sent on initialization and/or
- -- after "program" channel receives a pattern table
- -- Patterns individually sent on "setsort"
- -- Completion message sent on "status"
-
- function send()
- if mem.send > 0 then
- digiline_send("setsort", PATTERN[mem.send])
- mem.send = mem.send - 1
- interrupt(1.2)
- elseif mem.send == 0 then
- digiline_send("status", "Programming complete.")
- else
- mem.send = #PATTERN
- interrupt(1.2)
- end
- end
-
- if (event.type == "program" and PATTERN) or event.type == "interrupt" then
- send()
- elseif event.type == "digiline" and event.channel == "program" then
- PATTERN = event.msg
- send()
- end
|