aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-05-02 21:25:16 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-05-02 21:25:16 +0200
commit92fdda1865ea405df00416566943034d7e974888 (patch)
tree9f17304133418ab444ca97a4976a2d19cc7e228c
parent8bd416c234ec6b238b09660ae35b640d3ade470b (diff)
SearchMarks
-rw-r--r--cutter.go23
-rw-r--r--marks.go8
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)
- }
-}