aboutsummaryrefslogtreecommitdiff
path: root/robo.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-05-15 14:31:57 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-05-15 14:31:57 +0200
commit3b119e80968d9267da4753687a6740d1189daa80 (patch)
treed053ec4b02132e17d196bf8553dd68d42f7d8f9f /robo.go
parented5812bfb8e7092fe4f6446abf957e8dbc80be21 (diff)
Reorganize definitions
Diffstat (limited to 'robo.go')
-rw-r--r--robo.go26
1 files changed, 24 insertions, 2 deletions
diff --git a/robo.go b/robo.go
index bd96931..825ab8e 100644
--- a/robo.go
+++ b/robo.go
@@ -127,9 +127,31 @@ 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") }
+type Orientation int
+
+const (
+ Portrait Orientation = iota
+ Landscape
+)
+
func (o Orientation) Orientation(c *bufio.Writer) { send(c, "FN", o) }
-func (l LineStyle) LineStyle(c *bufio.Writer) { send(c, "L", l) }
-func (p Point) LineStyle(c *bufio.Writer) { p.send(c, "L100,1,") }
+
+type LineStyle int
+
+const (
+ Solid LineStyle = iota
+ Dots
+ ShortDash
+ Dash
+ LongDash
+ DashDot
+ DashLongDot
+ DashDoubleDot
+ DashLongDoubleDot
+)
+
+func (l LineStyle) LineStyle(c *bufio.Writer) { send(c, "L", l) }
+func (p Point) LineStyle(c *bufio.Writer) { p.send(c, "L100,1,") }
func triple(c *bufio.ReadWriter, cmd string) Triple {
send(c.Writer, cmd)