From b0881b54f30c60314d14e6b6812d966f1a77936b Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 16 May 2015 14:29:20 +0200 Subject: Rename StepDirection --- cutter.go | 6 +++--- robo.go | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cutter.go b/cutter.go index cff16c7..6c6b384 100644 --- a/cutter.go +++ b/cutter.go @@ -86,9 +86,9 @@ func (c Cutter) Esc(bytes ...byte) { c.Flush() } -func (c Cutter) Step(dir StepDirection) { - c.Esc(NUL, byte(dir)) -} +//func (c Cutter) Step(dir StepDirection) { +// c.Esc(NUL, byte(dir)) +//} func (c Cutter) TestCut() { c.Send("FH") diff --git a/robo.go b/robo.go index b1264ae..769e145 100644 --- a/robo.go +++ b/robo.go @@ -203,14 +203,14 @@ func Initialize(c *bufio.ReadWriter, mid int, o Orientation) { o.Orientation(c.Writer) } -type StepDirection byte +type Direction byte const ( - StepStop StepDirection = 1 << iota >> 1 - StepDown - StepUp - StepRight - StepLeft + Stop Direction = 1 << iota >> 1 + Down + Up + Right + Left ) -func (s StepDirection) Step(c *bufio.Writer) { esc(c, NUL, byte(s)) } +func (d Direction) Step(c *bufio.Writer) { esc(c, NUL, byte(d)) } -- cgit v1.2.3