meshtastic 0.0.30 → 0.0.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/meshtastic/mqtt.rb +7 -3
- data/lib/meshtastic/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c29f11f50b242a0557b383c1fb5d0302b65369875a3b7bf6850e2b4d18d37024
|
4
|
+
data.tar.gz: 8d6592149ce03f4dec19924c2c23fcae0d15a80acd44d565f9fec9c3f6565e88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d9d04eee129e4ae7079c4c4797ec258748424beec4f144c9a7a722f537c9e9eed4d1c2ac11c26df73cc51be7ca1548e28982cac59494507a18be51fb2bf270c
|
7
|
+
data.tar.gz: 2786119cf83aac960dc378c8c86f776254057e6e2968436f818fe568fa91495e3df5824003868904d6442a2a5573d41c1a9ee70d753f61eebb665f6bd476c8f0
|
data/lib/meshtastic/mqtt.rb
CHANGED
@@ -51,7 +51,8 @@ module Meshtastic
|
|
51
51
|
# psk: 'optional - channel pre-shared key (default: AQ==)',
|
52
52
|
# qos: 'optional - quality of service (default: 0)',
|
53
53
|
# json: 'optional - JSON output (default: false)',
|
54
|
-
# filter: 'optional - comma-delimited string(s) to filter on in message (default: nil)'
|
54
|
+
# filter: 'optional - comma-delimited string(s) to filter on in message (default: nil)',
|
55
|
+
# gps_metadata: 'optional - include GPS metadata in output (default: false)'
|
55
56
|
# )
|
56
57
|
|
57
58
|
public_class_method def self.subscribe(opts = {})
|
@@ -63,6 +64,7 @@ module Meshtastic
|
|
63
64
|
qos = opts[:qos] ||= 0
|
64
65
|
json = opts[:json] ||= false
|
65
66
|
filter = opts[:filter]
|
67
|
+
gps_metadata = opts[:gps_metadata] ||= false
|
66
68
|
|
67
69
|
# TODO: Find JSON URI for this
|
68
70
|
full_topic = "#{root_topic}/#{region}/2/json/#{channel}/#" if json
|
@@ -192,7 +194,8 @@ module Meshtastic
|
|
192
194
|
# message[:decoded][:payload] = pb_obj.to_h unless msg_type == :TRACEROUTE_APP
|
193
195
|
message[:decoded][:payload] = pb_obj.to_h
|
194
196
|
if message[:decoded][:payload].keys.include?(:latitude_i) &&
|
195
|
-
message[:decoded][:payload].keys.include?(:longitude_i)
|
197
|
+
message[:decoded][:payload].keys.include?(:longitude_i) &&
|
198
|
+
gps_metadata
|
196
199
|
|
197
200
|
latitude = pb_obj.to_h[:latitude_i] * 0.0000001
|
198
201
|
longitude = pb_obj.to_h[:longitude_i] * 0.0000001
|
@@ -301,7 +304,8 @@ module Meshtastic
|
|
301
304
|
psk: 'optional - channel pre-shared key (default: AQ==)',
|
302
305
|
qos: 'optional - quality of service (default: 0)',
|
303
306
|
json: 'optional - JSON output (default: false)',
|
304
|
-
filter: 'optional - comma-delimited string(s) to filter on in message (default: nil)'
|
307
|
+
filter: 'optional - comma-delimited string(s) to filter on in message (default: nil)',
|
308
|
+
gps_metadata: 'optional - include GPS metadata in output (default: false)'
|
305
309
|
)
|
306
310
|
|
307
311
|
#{self}.gps_search(
|
data/lib/meshtastic/version.rb
CHANGED