aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cutter.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/cutter.go b/cutter.go
index 11f3918..f056072 100644
--- a/cutter.go
+++ b/cutter.go
@@ -241,6 +241,11 @@ func (c Cutter) UnknownFE(n int) {
c.Emit()
}
+func parseDigit(s string) (n int) {
+ fmt.Sscanf(s, "%v", &n)
+ return
+}
+
func parsePoint(s string) (p Point) {
fmt.Sscanf(s, "%v,%v", &p.X, &p.Y)
return
@@ -264,6 +269,14 @@ func (c Cutter) GetCalibration() Point {
return parsePoint(s)
}
+// Emited after calibration
+func (c Cutter) UnknownFQ5() int {
+ fmt.Fprint(c, "FQ5")
+ c.Emit()
+ s, _ := c.readResponse()
+ return parseDigit(s)
+}
+
func (c Cutter) SetCalibration(p Point) {
if p.X > 40 || p.Y > 40 || p.X < -40 || p.Y < -40 {
return