aboutsummaryrefslogtreecommitdiff
path: root/robo.go
diff options
context:
space:
mode:
Diffstat (limited to 'robo.go')
-rw-r--r--robo.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/robo.go b/robo.go
index d7757ce..c705020 100644
--- a/robo.go
+++ b/robo.go
@@ -126,11 +126,6 @@ func Raw(c *bufio.Writer, a ...interface{}) {
}
}
-func Version(c *bufio.ReadWriter) string {
- send(c.Writer, "FG")
- return recv(c.Reader)
-}
-
func GoHome(c *bufio.Writer) { send(c, "TT") }
func Home(c *bufio.Writer) { send(c, "H") }
func Origin(c *bufio.Writer) { send(c, "FJ") }
@@ -147,9 +142,16 @@ func Calibration(c *bufio.ReadWriter) Point { return point(c, "TB71") }
func Offset(c *bufio.ReadWriter) Point { return point(c, "?") }
func LowerLeft(c *bufio.ReadWriter) Point { return point(c, "[") }
func UpperRight(c *bufio.ReadWriter) Point { return point(c, "U") }
-func StatusWord(c *bufio.ReadWriter) Point { return point(c, "@") }
func DistanceCorrection(c *bufio.ReadWriter) Point { return point(c, "FA") }
+func str(c *bufio.ReadWriter, cmd string) string {
+ send(c.Writer, cmd)
+ return recv(c.Reader)
+}
+
+func Version(c *bufio.ReadWriter) string { return str(c, "FG") }
+func StatusWord(c *bufio.ReadWriter) string { return str(c, "@") }
+
type Orientation int
const (