diff options
Diffstat (limited to 'software/communication')
-rw-r--r-- | software/communication/interface.go | 4 | ||||
-rw-r--r-- | software/communication/physical.go | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/software/communication/interface.go b/software/communication/interface.go index ebd8d6b..d124a48 100644 --- a/software/communication/interface.go +++ b/software/communication/interface.go @@ -20,6 +20,10 @@ func NewSerialInterface() (SerialInterface, error) { return iface, nil } +func (i *SerialInterface) Start() { + i.phy.start() +} + func (i *SerialInterface) Cat() { for { data := <-i.phy.rx diff --git a/software/communication/physical.go b/software/communication/physical.go index 0ba3690..e24c574 100644 --- a/software/communication/physical.go +++ b/software/communication/physical.go @@ -36,11 +36,14 @@ func newPhysical() (physical, error) { } p.rx = make(chan byte) - go p.Receive() return p, nil } +func (p *physical) start() { + go p.Receive() +} + func getStSerials() ([]string, error) { retval := make([]string, 0) |