aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-05-16 14:29:20 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-05-16 14:29:20 +0200
commitb0881b54f30c60314d14e6b6812d966f1a77936b (patch)
treea5ef14bdcf5456a0a79eeb1c1beb18cb2e0b6a1d
parent0d0c55fafb5442f0ba11055b13fa54c983bd4a4c (diff)
Rename StepDirection
-rw-r--r--cutter.go6
-rw-r--r--robo.go14
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)) }