From 68fbf7e2dfcdeeb2f8cc6d6d0ef78ecfbea4fe41 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 16 May 2015 14:59:43 +0200 Subject: Complete initialize sequence --- cutter.go | 6 +++--- robo.go | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cutter.go b/cutter.go index 6c6b384..5c5ba7e 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 Direction) { + c.Esc(NUL, byte(dir)) +} func (c Cutter) TestCut() { c.Send("FH") diff --git a/robo.go b/robo.go index 769e145..2344a50 100644 --- a/robo.go +++ b/robo.go @@ -190,6 +190,7 @@ func Initialize(c *bufio.ReadWriter, mid int, o Orientation) { if !Ready(c) { fmt.Println("not ready") } + GoHome(c.Writer) fmt.Println(craftRobo, "Ver.", Version(c)) @@ -199,6 +200,10 @@ func Initialize(c *bufio.ReadWriter, mid int, o Orientation) { Unit(0).TrackEnhancing(c.Writer) Unit(0).UnknownFE(c.Writer) + + fmt.Println("Calibration", Calibration(c)) + fmt.Println("Correction ", DistanceCorrection(c)) + Unit(400).RegMarkLen(c.Writer) o.Orientation(c.Writer) } -- cgit v1.2.3