sgslib 0.2.2 → 0.2.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a4b9d0e861effa307f0cad067e55eaad22ce34ce
4
- data.tar.gz: b1083ec9759a63d81c7f54a91d52bf654202014f
3
+ metadata.gz: 150393d3e9e4974a01e790541a5a17bdbc48113e
4
+ data.tar.gz: 44b4a5a64942dff40b800ef93c4aa78ecdb78272
5
5
  SHA512:
6
- metadata.gz: e3c3408505f7778683e5906fb0b26a1f6cffdcc973b04c01eb7bab9c1ea35cd9b3be5eb8c544f4cd942816fb9170203272a4d3b354d67e5d8b1d95cea2ce4b87
7
- data.tar.gz: d2afb323a757f78e1f82f21af90109d22db21dd85961b720905be302a3761c7d351f1684648f383fc0ada086625c274b3f03e5f91041e6c27f5cbaff7bd2439e
6
+ metadata.gz: a3c4599a14dc294daec92f702337ab08569a91633f58bb44f1004a6c03b25d7460fa020b80ab9e6469fc271fd2fe69f317646ab0c40ddee83eee84372b8a06f1
7
+ data.tar.gz: 06cdfa60d3e2ccadafa79ba9ef3a65bcd2a9c24807745033b6a2ed36872b2fe0431fee52b524848f490a21ef53ed40161fbfc2910caf34957c1cd15a787addd7
@@ -1,6 +1,5 @@
1
- #!/usr/bin/env ruby
2
1
  #
3
- # Copyright (c) 2013, Kalopa Research. All rights reserved. This is free
2
+ # Copyright (c) 2018, Kalopa Research. All rights reserved. This is free
4
3
  # software; you can redistribute it and/or modify it under the terms of the
5
4
  # GNU General Public License as published by the Free Software Foundation;
6
5
  # either version 2, or (at your option) any later version.
@@ -25,16 +24,29 @@
25
24
  # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
25
  # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
26
  #
28
- $: << '../sgslib'
27
+ module SGS
28
+ class Config < RedisBase
29
+ attr_accessor :otto_device, :gps_device, :comm_device
30
+ attr_accessor :otto_speed, :gps_speed, :comm_speed
29
31
 
30
- require 'sgslib'
32
+ def initialize
33
+ @otto_dev = "/dev/ttyU0"
34
+ @gps_dev = "/dev/ttyU1"
35
+ @comm_dev = "/dev/ttyU2"
36
+ @otto_speed = @gps_speed = @comm_speed = 9600
37
+ super()
38
+ end
31
39
 
32
- ##
33
- # Initialise the REDIS system.
34
- #
35
- SGS::Alarm.setup
36
- SGS::GPS.setup
37
- SGS::Otto.setup
38
- SGS::Timing.setup
39
- SGS::Waypoint.setup
40
- #SGS::Mission.setup
40
+ #
41
+ # Set up the Redis configuration with some basic data
42
+ def self.configure_all
43
+ Config.setup
44
+ Alarm.setup
45
+ GPS.setup
46
+ Otto.setup
47
+ Timing.setup
48
+ Waypoint.setup
49
+ Mission.setup
50
+ end
51
+ end
52
+ end
data/lib/sgs/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module SGS
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.4"
3
3
  end
data/lib/sgslib.rb CHANGED
@@ -29,6 +29,7 @@
29
29
  #
30
30
  require "sgs/version"
31
31
  require 'sgs/redis_base'
32
+ require 'sgs/config'
32
33
  require 'sgs/location'
33
34
  require 'sgs/nmea'
34
35
  require 'sgs/gps'
@@ -40,7 +41,3 @@ require 'sgs/otto'
40
41
  require 'sgs/course'
41
42
  require 'sgs/navigate'
42
43
  require 'sgs/mission'
43
-
44
- module SGS
45
- # Your code goes here...
46
- end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sgslib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dermot Tynan
@@ -86,6 +86,7 @@ files:
86
86
  - bin/setup
87
87
  - lib/sgs/alarm.rb
88
88
  - lib/sgs/command.rb
89
+ - lib/sgs/config.rb
89
90
  - lib/sgs/course.rb
90
91
  - lib/sgs/gps.rb
91
92
  - lib/sgs/location.rb
@@ -95,7 +96,6 @@ files:
95
96
  - lib/sgs/nmea.rb
96
97
  - lib/sgs/otto.rb
97
98
  - lib/sgs/redis_base.rb
98
- - lib/sgs/setup.rb
99
99
  - lib/sgs/timing.rb
100
100
  - lib/sgs/version.rb
101
101
  - lib/sgs/waypoint.rb