From 3b119e80968d9267da4753687a6740d1189daa80 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Fri, 15 May 2015 14:31:57 +0200 Subject: Reorganize definitions --- robo.go | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'robo.go') 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) -- cgit v1.2.3