gpsd_baud_rate 0.1.14 → 0.1.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a9b9fd65c9b9e0c52da01957b2c0d710c0f34aa13fa4892baea96b5a97438e2e
4
- data.tar.gz: 964712785c7698331612c5158415a99047894de1301f67b9e7cf428fcaf58463
3
+ metadata.gz: 7edbb900b945ba5b1c98f95180fbee52539825772ac20e7721a4a2144fe89b2c
4
+ data.tar.gz: 3c8244a6189cfbfe055a3c1e6fb8c1429f542a594410e5e7efbe19c7399f223c
5
5
  SHA512:
6
- metadata.gz: c9acacbb7d5f0800ea0fff0a5ab3050c887297ac11e5394064527ec12a05360306e9bdf234c2150f622919118f03cf01a09dd0fdb9a3206e293a6b10cac5c2eb
7
- data.tar.gz: cc5edeeaa0b8655bcc40ab6347376da5a098ca9e55c0c56301d23dead23acdbe08db91f1ef12b8be0674eadd63d3337db6c0c464463f6efd433ec69015ed5f3f
6
+ metadata.gz: 3dfffb5e3d285fbbcda0eb2681345bfb0e62628167fe1cfb7ce62cf100d31da72cb3dd2637c38b5d000a55562bc90755eff34082e4692fc02530328b6592a9d6
7
+ data.tar.gz: 96ad8b521beb30ec7090beae1b254ce79d3db75280fa192c9e9a1a70bf60ee873137912163da65e11d72ae2581cbf1eb1b6ef3970618008eb5f8d1e7964740ae
@@ -29,37 +29,36 @@ class GpsdBaudRate
29
29
  end
30
30
  # pid= %x|pgrep -f "ruby /home/deploy/bin/set_baud.rb"|
31
31
  # @logger.debug "Pid: #{pid}, $$: #{$$}, $BASHPID: #{$BASHPID}"
32
- =begin
32
+
33
33
  @goal_rate = goal_rate.to_i
34
34
  @logger.debug "Goal_rate: #{@goal_rate}"
35
+ end #initiallize
35
36
 
36
-
37
+ def set_baud_rate b_rate = @goal_rate
37
38
  gpsd_start unless gpsd_active? #make sure it's running
38
39
 
39
40
  @logger.debug "Service Status: #{gpsd_active?}"
40
- @logger.debug "Baud Rate: #{@active_rate = baud_rate}"
41
+ @logger.debug "Baud Rate: #{active_rate = baud_rate}"
41
42
  gpsd_stop
42
43
  @logger.debug "Service Status: #{gpsd_active?}"
43
- @logger.debug "Baud Rate: #{@inactive_rate = baud_rate}"
44
-
45
- @logger.debug "\n~~~~~~~~~~~~ Read at #{@active_rate} baud ~~~~~~~~~~~~~~"
46
- if (read_from_device @active_rate) && (@active_rate != @goal_rate)
47
- @logger.debug "Setting Goal Rate (#{goal_rate})"
48
- set_PMTK_baud_rate @goal_rate
49
- if read_from_device @goal_rate
50
- @logger.debug "Goal Baud Rate (#{@goal_rate}) has been set"
44
+ @logger.debug "Baud Rate: #{inactive_rate = baud_rate}"
45
+
46
+ @logger.debug "\n~~~~~~~~~~~~ Read at #{active_rate} baud ~~~~~~~~~~~~~~"
47
+ if (read_from_device active_rate) && (active_rate != b_rate)
48
+ @logger.debug "Setting Goal Rate (#{b_rate})"
49
+ set_PMTK_baud_rate b_rate
50
+ if read_from_device b_rate
51
+ @logger.debug "Goal Baud Rate (#{b_rate}) has been set"
51
52
  end
52
53
  else
53
54
  @logger.debug "Already at Goal Baud Rate"
54
55
  end
55
-
56
-
57
56
  #
58
57
  # Cleanup
59
58
  gpsd_start
60
59
  @logger.debug "Service Status: #{gpsd_active?}"
61
- =end
62
- end #initiallize
60
+
61
+ end
63
62
 
64
63
  #~~~~~~~~~~~~~~~~~~~~~ gpsd_status ~~~~~~~~~~~~~~~~~
65
64
 
@@ -1,3 +1,3 @@
1
1
  class GpsdBaudRate
2
- VERSION = "0.1.14"
2
+ VERSION = "0.1.15"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gpsd_baud_rate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Finnegan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-28 00:00:00.000000000 Z
11
+ date: 2020-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler