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 +4 -4
- data/lib/sgs/{setup.rb → config.rb} +25 -13
- data/lib/sgs/version.rb +1 -1
- data/lib/sgslib.rb +1 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 150393d3e9e4974a01e790541a5a17bdbc48113e
|
4
|
+
data.tar.gz: 44b4a5a64942dff40b800ef93c4aa78ecdb78272
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3c4599a14dc294daec92f702337ab08569a91633f58bb44f1004a6c03b25d7460fa020b80ab9e6469fc271fd2fe69f317646ab0c40ddee83eee84372b8a06f1
|
7
|
+
data.tar.gz: 06cdfa60d3e2ccadafa79ba9ef3a65bcd2a9c24807745033b6a2ed36872b2fe0431fee52b524848f490a21ef53ed40161fbfc2910caf34957c1cd15a787addd7
|
@@ -1,6 +1,5 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
1
|
#
|
3
|
-
# Copyright (c)
|
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
|
-
|
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
|
-
|
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
|
-
#
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
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
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.
|
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
|