rs232-sigmakoki 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README +2 -2
- data/lib/rs232-sigmakoki.rb +6 -1
- metadata +4 -4
data/README
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
# author hugo benichi
|
8
8
|
# email hugo.benichi@m4x.org
|
9
9
|
# copyright 2012 hugo benichi
|
10
|
-
# version 0.1.
|
10
|
+
# version 0.1.3
|
11
11
|
#
|
12
12
|
##
|
13
13
|
|
@@ -36,4 +36,4 @@
|
|
36
36
|
move a, b # move stage 1 of a steps, and stage 2 of b steps (b optional)
|
37
37
|
move! a, b # same as move, but wait until the stages are ready
|
38
38
|
position # return the position of both stages
|
39
|
-
position_of i # return the position of stage i (1,2)
|
39
|
+
position_of i # return the position of stage i (1,2)
|
data/lib/rs232-sigmakoki.rb
CHANGED
@@ -49,7 +49,7 @@ class SigmaKoki
|
|
49
49
|
|
50
50
|
def amove *step_args
|
51
51
|
move *self.position.map { |x|
|
52
|
-
y = step_args.
|
52
|
+
y = step_args.shift
|
53
53
|
(y.is_a? Fixnum) ? y-x : 0
|
54
54
|
}
|
55
55
|
end
|
@@ -59,6 +59,11 @@ class SigmaKoki
|
|
59
59
|
wait
|
60
60
|
end
|
61
61
|
|
62
|
+
def home!
|
63
|
+
home
|
64
|
+
wait
|
65
|
+
end
|
66
|
+
|
62
67
|
def position
|
63
68
|
self.status.gsub(' ','').split(',').map{|x| x.to_i}[0..1]
|
64
69
|
end
|
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.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-07-
|
12
|
+
date: 2012-07-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rs232
|
16
|
-
requirement: &
|
16
|
+
requirement: &19211500 !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: *19211500
|
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
|