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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/humble_rpi-plugin-ld3w.rb +18 -22
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bf35153e4bc31fdc8273984a976a024791c67a735970867126c447a568ee3f16
|
|
4
|
+
data.tar.gz: d6a8b1693018d146cb98ed9178b310fb3a2c4cce01f1b7fdcb867ded806666d1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0827ea9d5105053692204e116d2f5f2df6a12dbc0572ea1b6bcb0a6c161b391c6bb3b5672f4bfb6f9fd39aa8c6e779df0bf5b1f076c352948d49fb22321be8dc'
|
|
7
|
+
data.tar.gz: 123baf44cf3d95133356f76b170ce7963abb6b641ce85b00a4978d06b0228210b6eac0bafb54cafa80a16657b6c09031c71dc8d8509d51b3575e1ec00ee4d154
|
checksums.yaml.gz.sig
CHANGED
|
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
|
-
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
49
|
-
|
|
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
metadata.gz.sig
CHANGED
|
Binary file
|