From 92fdda1865ea405df00416566943034d7e974888 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 2 May 2015 21:25:16 +0200 Subject: SearchMarks --- cutter.go | 23 +++++++++++++++-------- marks.go | 8 -------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/cutter.go b/cutter.go index a565959..71faec1 100644 --- a/cutter.go +++ b/cutter.go @@ -240,7 +240,7 @@ func (c Cutter) parsePoint() (p Point) { return } -func (c Cutter) RegistrationMarksLength(n int) { +func (c Cutter) RegMarkLen(n int) { c.Send("TB51,", n) } @@ -254,7 +254,7 @@ func (c Cutter) GetCalibration() Point { return c.parsePoint() } -// Emited after calibration +// Emited after auto calibration func (c Cutter) UnknownFQ5() int { c.Send("FQ5") return c.parseDigit() @@ -275,18 +275,13 @@ func (c Cutter) DistanseCorrection(n int) { c.Send(c, "FB", n, ",0") } -func (c Cutter) UnknownTB(n int) (string, error) { - c.Send("TB", n) - return c.readResponse() -} - func (c Cutter) UnknownFA() Point { c.Send("FA") return c.parsePoint() } // VersionUpgrade -func (c Cutter) BootVersion() (string, error) { +func (c Cutter) BootUpgrade() (string, error) { c.Esc(1) return c.ReadString(' ') } @@ -342,3 +337,15 @@ const ( func (c Cutter) TrackEnhancing(state OnOff) { c.Send("FY", state) } + +func (c Cutter) SearchMarks(p Point) { + c.Send("TB99") + c.Send("TB55,1") + c.Send("TB123,", p) +} + +func (c Cutter) ManualSearchMarks(p Point) { + c.Send("TB99") + c.Send("TB55,1") + c.Send("TB23,", p) +} diff --git a/marks.go b/marks.go index 92b62f0..fd75b29 100644 --- a/marks.go +++ b/marks.go @@ -50,11 +50,3 @@ func (c Cutter) DrawMarks() (string, error) { return c.readResponse() } - -func (c Cutter) SearchMarks() { - //cmd := []string{"TB99", "TB55,1", "TB123,3800,5240"} - cmd := []string{"TB99", "TB55,1", "TB23,3800,5240"} - for _, s := range cmd { - c.Send(s) - } -} -- cgit v1.2.3