@@ -161,11 +161,6 @@ func main() {
161161 log .Println ("calling BoardSearch()" )
162162 callBoardSearch (client , instance )
163163
164- // Attach a board to a sketch.
165- // Uncomment if you do have an actual board connected.
166- // log.Println("calling BoardAttach(serial:///dev/ttyACM0)")
167- // callBoardAttach(client, instance)
168-
169164 // Compile a sketch
170165 log .Println ("calling Compile(arduino:samd:mkr1000, VERBOSE, hello.ino)" )
171166 callCompile (client , instance )
@@ -555,41 +550,6 @@ func callBoardSearch(client rpc.ArduinoCoreServiceClient, instance *rpc.Instance
555550 }
556551}
557552
558- func callBoardAttach (client rpc.ArduinoCoreServiceClient , instance * rpc.Instance ) {
559- currDir , _ := os .Getwd ()
560- boardattachresp , err := client .BoardAttach (context .Background (),
561- & rpc.BoardAttachRequest {
562- Instance : instance ,
563- BoardUri : "/dev/ttyACM0" ,
564- SketchPath : filepath .Join (currDir , "hello" ),
565- })
566-
567- if err != nil {
568- log .Fatalf ("Attach error: %s" , err )
569- }
570-
571- // Loop and consume the server stream until all the operations are done.
572- for {
573- attachResp , err := boardattachresp .Recv ()
574-
575- // The server is done.
576- if err == io .EOF {
577- log .Print ("Attach done" )
578- break
579- }
580-
581- // There was an error.
582- if err != nil {
583- log .Fatalf ("Attach error: %s\n " , err )
584- }
585-
586- // When an overall task is ongoing, log the progress
587- if attachResp .GetTaskProgress () != nil {
588- log .Printf ("TASK: %s" , attachResp .GetTaskProgress ())
589- }
590- }
591- }
592-
593553func callCompile (client rpc.ArduinoCoreServiceClient , instance * rpc.Instance ) {
594554 currDir , _ := os .Getwd ()
595555 compRespStream , err := client .Compile (context .Background (),
0 commit comments