humble_rpi-plugin-ld3w 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data/lib/humble_rpi-plugin-ld3w.rb +34 -15
- data.tar.gz.sig +0 -0
- metadata +29 -46
- metadata.gz.sig +6 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5ad2476657aa4dece8784739f03ca107b588523eb8aa5f1e08ae3f37c353d359
|
4
|
+
data.tar.gz: 190d29e3e013a6eef51c51beba8de0f3f3cf156614a7dded9963b6376aabc36e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a23800ebcf691ecc1f783e6c68dbe477c5fe15a6eb5ab0364a1906949db56e8c11e09ca62d97415e11e2c76291f2285c9bd47bd45b215027e21266494c68bd40
|
7
|
+
data.tar.gz: 99164d6f72116b0e697c69dd85675eeebb08b18739ed47c4d4e80ff502c770f8743bfcbd0e8308a5f3f03627640b242b3d08bd481bfe2035a34c166f0dbd2b7b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -2,33 +2,52 @@
|
|
2
2
|
|
3
3
|
# file: humble_rpi-plugin-ld3w.rb
|
4
4
|
|
5
|
+
# Intended for using a Nokia LD-3W with a Raspberry Pi from the Humble_RPi gem
|
5
6
|
|
6
7
|
require 'ld3w'
|
7
|
-
require 'run_every'
|
8
|
-
|
9
8
|
|
10
|
-
# Intended for using a Nokia LD-3W with a Raspberry Pi from the Humble_RPi gem
|
11
9
|
|
12
10
|
|
13
11
|
class HumbleRPiPluginLd3W
|
12
|
+
using ColouredText
|
14
13
|
|
15
|
-
def initialize(settings: {}, variables: {})
|
14
|
+
def initialize(settings: {}, variables: {}, debug: false)
|
16
15
|
|
17
16
|
h = {rfdevice: 'rfcomm0', bdaddress: '', channel: '1',
|
18
|
-
refresh_rate:
|
19
|
-
device_id = variables[:device_id] || 'pi'
|
20
|
-
|
21
|
-
ld3w = Ld3w.new device: h[:rfdevice], bdaddress: h[:bdaddress],
|
22
|
-
channel: h[:channel]
|
23
|
-
|
24
|
-
RunEvery.new(seconds: h[:refresh_rate]) do
|
17
|
+
refresh_rate: 120}.merge settings
|
18
|
+
@device_id = variables[:device_id] || 'pi'
|
19
|
+
@debug, @h, @notifier = debug, h, variables[:notifier]
|
25
20
|
|
26
|
-
|
27
|
-
|
28
|
-
|
21
|
+
@ld3w = Ld3w.new device: h[:rfdevice], bdaddress: h[:bdaddress],
|
22
|
+
channel: h[:channel], verbose: false, affirmations: 5
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
def start()
|
27
|
+
|
28
|
+
while true do
|
29
|
+
|
30
|
+
begin
|
31
|
+
|
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]
|
37
|
+
|
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
|
47
|
+
|
48
|
+
sleep(@h[:refresh_rate])
|
29
49
|
end
|
30
50
|
|
31
|
-
|
32
51
|
end
|
33
52
|
|
34
53
|
alias on_start start
|
data.tar.gz.sig
CHANGED
Binary file
|
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.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
-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|
+
EmX+M1e76CCTUWxRri/MobnwIjn17oZtnYAT7aVg9ex8pikat5Qf1gWK1OkCAwEA
|
25
|
+
AaOBijCBhzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUEpUdnSZa
|
26
|
+
06kH2SJEH/zxX0B0vS0wJgYDVR0RBB8wHYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0
|
27
|
+
c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1hc3RlckBqYW1lc3JvYmVydHNvbi5ldTAN
|
28
|
+
BgkqhkiG9w0BAQsFAAOCAYEATSgAZp9Q9LlMTcF7DkRHsXUWC+DulKnFfFriAkYV
|
29
|
+
CRuKUMoQwvDuqCzy53GzleLhzhq0wjWzNclAZtuh9iMDBRyP7Hb9p51jSfZ9EWo/
|
30
|
+
5WxRAMtNIQcb0dXXYqBZuj2jnRvW39ffZO+8bgnxViF8MbtaqhUrFNqnVqX2sx6L
|
31
|
+
Xt1roFmm74RUsAyw9JMOPKxghBye/v55MNO/FqdLbe4VKhgnN1/R+7Atx9fPaXV3
|
32
|
+
tE7hxo4m1RQfjDQG1eu6lvpY/COoyIoqaClwSAYJoZiGl0Yn0nkjOyJwFSrTFkD2
|
33
|
+
ZruqFNAFuFSbOQAyS4ciuMrFo6WyoXGCzDNxRZwgJWPM+SSvdHdpcc5hlqXaGmlf
|
34
|
+
1ccdREA3/LjSOBvKEcKJuyOyhisv4cdS71NZdz6KvkQgtNFc3h7TfpBf6EkpeN3u
|
35
|
+
YkwMDDFSGDOBZp24titDJWkWd6moaxXL+ucZidQoQ68wvNU7boHYtcetRYwIc2FC
|
36
|
+
SzEeOPFECbntXfYY5qoDQso9
|
33
37
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
38
|
+
date: 2019-03-18 00:00:00.000000000 Z
|
35
39
|
dependencies:
|
36
40
|
- !ruby/object:Gem::Dependency
|
37
41
|
name: ld3w
|
@@ -42,7 +46,7 @@ dependencies:
|
|
42
46
|
version: '0.1'
|
43
47
|
- - ">="
|
44
48
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.
|
49
|
+
version: 0.2.1
|
46
50
|
type: :runtime
|
47
51
|
prerelease: false
|
48
52
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -52,27 +56,7 @@ dependencies:
|
|
52
56
|
version: '0.1'
|
53
57
|
- - ">="
|
54
58
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.
|
56
|
-
- !ruby/object:Gem::Dependency
|
57
|
-
name: run_every
|
58
|
-
requirement: !ruby/object:Gem::Requirement
|
59
|
-
requirements:
|
60
|
-
- - "~>"
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: '0.1'
|
63
|
-
- - ">="
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
version: 0.1.9
|
66
|
-
type: :runtime
|
67
|
-
prerelease: false
|
68
|
-
version_requirements: !ruby/object:Gem::Requirement
|
69
|
-
requirements:
|
70
|
-
- - "~>"
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
version: '0.1'
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 0.1.9
|
59
|
+
version: 0.2.1
|
76
60
|
description:
|
77
61
|
email: james@jamesrobertson.eu
|
78
62
|
executables: []
|
@@ -99,8 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
83
|
- !ruby/object:Gem::Version
|
100
84
|
version: '0'
|
101
85
|
requirements: []
|
102
|
-
|
103
|
-
rubygems_version: 2.6.8
|
86
|
+
rubygems_version: 3.0.1
|
104
87
|
signing_key:
|
105
88
|
specification_version: 4
|
106
89
|
summary: Intended for using a Nokia LD-3W with a Raspberry Pi from the Humble_RPi
|
metadata.gz.sig
CHANGED
@@ -1 +1,6 @@
|
|
1
|
-
|
1
|
+
u���פ�e|�0�6��JV��G�Q��݂w
|
2
|
+
Y N�K���}_����
|
3
|
+
ә>��6�2�8�ڊ�S�{�Zֵ��q0��v��[V��ol�s*t���,z 4#Ȱ�@���d
|
4
|
+
V� ��O���i�`8>��1��Ѝ!�LX��
|
5
|
+
1�/��N�xI+�#'j_V�Fp�TO������z�T1�Qq@z:r��5�)m����z��Ud�M i'_�Y������Q������^�g��>���_
|
6
|
+
���9ʶ ���B�[z�Ð?�w�9O���Ƴ-����S�0�9O��:8բ��h�US�_$\d �K`n��f�
|