11 lines
257 B
Fennel
11 lines
257 B
Fennel
(local link
|
|
{:switch
|
|
(fn [self name]
|
|
(set self.machine (require (.. "link." name)))
|
|
(set self.name name))})
|
|
|
|
(local serial (require :link.serial))
|
|
(link:switch (if (and (pcall #(serial:connect)) (serial:connected?)) :serial :gsplus))
|
|
|
|
link
|