Example #1
0
File: main.go Project: miters/gdmux
func main() {
	flag.Parse()

	log.Println("Opening ", *ttyData)
	s, err := serial.OpenPort(&serial.Config{Name: *ttyData, Baud: *baudData})
	if err != nil {
		log.Fatal(err)
	}
	arm := staubli.NewStaubli(s)

	if err := arm.MoveRel(*x, *y, *z); err != nil {
		log.Fatal(" %s", err)
	}
}
Example #2
0
File: main.go Project: miters/gdmux
func initArm() {
	origin.x, origin.y, origin.z = *originx, *originy, *originz

	if *dummy {
		arm = staubli.Dummy
	} else {
		log.Println("Opening ", *ttyData)
		s, err := serial.OpenPort(&serial.Config{Name: *ttyData, Baud: *baudData})
		if err != nil {
			log.Fatal(err)
		}
		arm = staubli.NewStaubli(s)
	}

	if *sendvplus {
		sendPg()
	}
}