Skip to content

Commit 6555b10

Browse files
committed
Implemented Client "Compile" call on Daemon/Client
1 parent 9dcf531 commit 6555b10

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

daemon/client/client.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
)
1212

1313
func main() {
14-
if len(os.Args) != 2 {
14+
if len(os.Args) != 3 {
1515
fmt.Println("Please specify Arduino DATA_DIR as first argument")
1616
os.Exit(1)
1717
}
@@ -50,6 +50,17 @@ func main() {
5050
fmt.Println("Board name: ", details.GetName())
5151
}
5252

53+
compResp, err := client.Compile(context.Background(), &rpc.CompileReq{
54+
Instance: instance,
55+
Fqbn: "arduino:samd:mkr1000",
56+
SketchPath: os.Args[2],
57+
})
58+
59+
if err != nil {
60+
fmt.Println(compResp.GetResult().Message, err)
61+
os.Exit(1)
62+
}
63+
5364
destroyResp, err := client.Destroy(context.Background(), &rpc.DestroyReq{
5465
Instance: instance,
5566
})

0 commit comments

Comments
 (0)