humble_rpi-plugin-ld3w 0.2.0 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ad2476657aa4dece8784739f03ca107b588523eb8aa5f1e08ae3f37c353d359
4
- data.tar.gz: 190d29e3e013a6eef51c51beba8de0f3f3cf156614a7dded9963b6376aabc36e
3
+ metadata.gz: bf35153e4bc31fdc8273984a976a024791c67a735970867126c447a568ee3f16
4
+ data.tar.gz: d6a8b1693018d146cb98ed9178b310fb3a2c4cce01f1b7fdcb867ded806666d1
5
5
  SHA512:
6
- metadata.gz: a23800ebcf691ecc1f783e6c68dbe477c5fe15a6eb5ab0364a1906949db56e8c11e09ca62d97415e11e2c76291f2285c9bd47bd45b215027e21266494c68bd40
7
- data.tar.gz: 99164d6f72116b0e697c69dd85675eeebb08b18739ed47c4d4e80ff502c770f8743bfcbd0e8308a5f3f03627640b242b3d08bd481bfe2035a34c166f0dbd2b7b
6
+ metadata.gz: '0827ea9d5105053692204e116d2f5f2df6a12dbc0572ea1b6bcb0a6c161b391c6bb3b5672f4bfb6f9fd39aa8c6e779df0bf5b1f076c352948d49fb22321be8dc'
7
+ data.tar.gz: 123baf44cf3d95133356f76b170ce7963abb6b641ce85b00a4978d06b0228210b6eac0bafb54cafa80a16657b6c09031c71dc8d8509d51b3575e1ec00ee4d154
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -7,7 +7,6 @@
7
7
  require 'ld3w'
8
8
 
9
9
 
10
-
11
10
  class HumbleRPiPluginLd3W
12
11
  using ColouredText
13
12
 
@@ -23,31 +22,28 @@ class HumbleRPiPluginLd3W
23
22
 
24
23
  end
25
24
 
26
- def start()
27
-
28
- while true do
29
-
30
- begin
25
+ def start()
31
26
 
32
- loc = @ld3w.locate
33
- puts ('loc: ' + loc.inspect).debug if @debug
34
- located = loc.is_a?(Array) ? loc.last : loc
35
- @notifier.notice "%s/gps: lat: %s lon: %s" %
36
- [@device_id, located.latitude, located.longitude]
27
+ begin
37
28
 
38
- rescue
39
-
40
- @notifier.notice "%s/gps/warning: %s" % [@device_id,
41
- 'unable to connect']
42
- `service bluetooth restart`
43
- sleep 6
44
- retry
45
-
46
- end
29
+ loc = @ld3w.locate
30
+ puts ('loc: ' + loc.inspect).debug if @debug
31
+ located = loc.is_a?(Array) ? loc.last : loc
32
+ @notifier.notice "%s/gps: lat: %s lon: %s" %
33
+ [@device_id, located.latitude, located.longitude]
34
+ sleep(@h[:refresh_rate])
35
+ rescue
47
36
 
48
- sleep(@h[:refresh_rate])
49
- end
37
+ @notifier.notice "%s/gps/warning: %s" % [@device_id,
38
+ 'unable to connect']
39
+ `service bluetooth restart`
40
+ sleep 6
41
+
42
+ end
50
43
 
44
+
45
+ start()
46
+
51
47
  end
52
48
 
53
49
  alias on_start start
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: humble_rpi-plugin-ld3w
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file