Rename msgpackpp->msgpack, merge device+protocol->wire, absorb picoserial into client
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/theater/picomap/lib/client"
|
||||
"github.com/theater/picomap/lib/picoserial"
|
||||
"github.com/theater/picomap/lib/picotool"
|
||||
)
|
||||
|
||||
@@ -35,17 +34,17 @@ func run(buildDir string) error {
|
||||
return fmt.Errorf("build failed: %w", err)
|
||||
}
|
||||
|
||||
dev, err := picoserial.FindDevice()
|
||||
devs, err := client.ListSerial()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if dev != "" {
|
||||
if len(devs) > 0 {
|
||||
dev := devs[0]
|
||||
fmt.Printf("Sending PICOBOOT request to %s...\n", dev)
|
||||
t, err := picoserial.Open(dev)
|
||||
c, err := client.NewSerial(dev, 2*time.Second)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
c := client.New(t, 2*time.Second)
|
||||
err = c.PICOBOOT()
|
||||
c.Close()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user