rs232-sigmakoki 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rs232-sigmakoki.rb +3 -2
- metadata +3 -3
data/lib/rs232-sigmakoki.rb
CHANGED
@@ -35,6 +35,7 @@ class SigmaKoki
|
|
35
35
|
|
36
36
|
#main command to rotate the plates
|
37
37
|
def move step1, step2 = 0
|
38
|
+
step1 = 0 if step1.nil?
|
38
39
|
s1, s2 = step1 > 0 ? "+" : "-", step2 > 0 ? "+" : "-"
|
39
40
|
command = "M:W%sP%i%sP%i" % [s1,step1.abs,s2,step2.abs]
|
40
41
|
@comm.write command
|
@@ -49,12 +50,12 @@ class SigmaKoki
|
|
49
50
|
def amove *step_args
|
50
51
|
move *self.position.map { |x|
|
51
52
|
y = step_args.shif
|
52
|
-
y.is_a? Fixnum ?
|
53
|
+
(y.is_a? Fixnum) ? y-x : 0
|
53
54
|
}
|
54
55
|
end
|
55
56
|
|
56
57
|
def amove! *step_args
|
57
|
-
|
58
|
+
amove *step_args
|
58
59
|
wait
|
59
60
|
end
|
60
61
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rs232-sigmakoki
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-07-10 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rs232
|
16
|
-
requirement: &
|
16
|
+
requirement: &20671920 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *20671920
|
25
25
|
description: Allows to script usage of the SigmaKoki step motor controllers with simple
|
26
26
|
commands and without serial port troubles
|
27
27
|
email: hugo.benichi@m4x.org
|