From 045d7efb7ddaf3ae05b6c4b51191abac31a96a8f Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Thu, 23 Apr 2015 21:19:40 +0200 Subject: Fix spelling --- cutter.go | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'cutter.go') diff --git a/cutter.go b/cutter.go index 9527ad7..9fe5d6a 100644 --- a/cutter.go +++ b/cutter.go @@ -167,14 +167,23 @@ func (c Cutter) ReadUpperRight() (string, error) { return c.readResponse() } +// Speed 10..100 mm/s func (c Cutter) Speed(n int) { - defer c.EOT() - fmt.Fprint(c, "!", n) + if n >= 1 && n <= 10 { + defer c.EOT() + fmt.Fprint(c, "!", n) + } +} + +func (c Cutter) Thickness(n int) { + if n >= 1 && n <= 30 { + defer c.EOT() + fmt.Fprint(c, "FX", n) + } } func (c Cutter) Force(n int) { - defer c.EOT() - fmt.Fprint(c, "FX", n) + c.Thickness(n) } func (c Cutter) Initialize() { -- cgit v1.2.3