rs232-sigmakoki 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/rs232-sigmakoki.rb +13 -1
  2. metadata +4 -4
@@ -45,7 +45,19 @@ class SigmaKoki
45
45
  move step1, step2
46
46
  wait
47
47
  end
48
+
49
+ def amove *step_args
50
+ move *self.position.map { |x|
51
+ y = step_args.shif
52
+ y.is_a? Fixnum ? 0 : y-x
53
+ }
54
+ end
48
55
 
56
+ def amove! *step_args
57
+ move_absolute *step_args
58
+ wait
59
+ end
60
+
49
61
  def position
50
62
  self.status.gsub(' ','').split(',').map{|x| x.to_i}[0..1]
51
63
  end
@@ -60,4 +72,4 @@ class SigmaKoki
60
72
 
61
73
  attr_reader :comm
62
74
 
63
- end
75
+ 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.0
4
+ version: 0.1.1
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: &21722160 !ruby/object:Gem::Requirement
16
+ requirement: &22596920 !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: *21722160
24
+ version_requirements: *22596920
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
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
53
  version: '0'
54
54
  requirements: []
55
55
  rubyforge_project:
56
- rubygems_version: 1.8.16
56
+ rubygems_version: 1.8.11
57
57
  signing_key:
58
58
  specification_version: 3
59
59
  summary: Ruby interface to SigmaKoki step motor controllers over the serial interface