Skip to content

Commit

Permalink
Implemented Client "Compile" call on Daemon/Client
Browse files Browse the repository at this point in the history
  • Loading branch information
Rocketct committed Mar 27, 2019
1 parent 9dcf531 commit 6555b10
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion daemon/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func main() {
if len(os.Args) != 2 {
if len(os.Args) != 3 {
fmt.Println("Please specify Arduino DATA_DIR as first argument")
os.Exit(1)
}
Expand Down Expand Up @@ -50,6 +50,17 @@ func main() {
fmt.Println("Board name: ", details.GetName())
}

compResp, err := client.Compile(context.Background(), &rpc.CompileReq{
Instance: instance,
Fqbn: "arduino:samd:mkr1000",
SketchPath: os.Args[2],
})

if err != nil {
fmt.Println(compResp.GetResult().Message, err)
os.Exit(1)
}

destroyResp, err := client.Destroy(context.Background(), &rpc.DestroyReq{
Instance: instance,
})
Expand Down

0 comments on commit 6555b10

Please sign in to comment.