meshtastic 0.0.30 → 0.0.31

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: 0b134e7c284e1fe0a79c3c49b2079d04c6c9688d2960a6f3101a259a21e93cda
4
- data.tar.gz: cb282a94ffe80115beb6246d967b529a110adb0ab729d656649285eab4b67513
3
+ metadata.gz: c29f11f50b242a0557b383c1fb5d0302b65369875a3b7bf6850e2b4d18d37024
4
+ data.tar.gz: 8d6592149ce03f4dec19924c2c23fcae0d15a80acd44d565f9fec9c3f6565e88
5
5
  SHA512:
6
- metadata.gz: 0516e43e2568a890adf39af3253e63c32b5e1d8a7357ba40b1c993963894ad94bb6a27a4a8176ff58ab06248810739c18f54eff4cf13e18e7e175ec9a5bf853a
7
- data.tar.gz: 7319688485fadcf5d0085d2d04647d93e0dd062453030478a9df8197222be2c8c463f68da4d09d5c9727cfd1932912b7712e39b1e901abb6c48c5ee5c7c14530
6
+ metadata.gz: 2d9d04eee129e4ae7079c4c4797ec258748424beec4f144c9a7a722f537c9e9eed4d1c2ac11c26df73cc51be7ca1548e28982cac59494507a18be51fb2bf270c
7
+ data.tar.gz: 2786119cf83aac960dc378c8c86f776254057e6e2968436f818fe568fa91495e3df5824003868904d6442a2a5573d41c1a9ee70d753f61eebb665f6bd476c8f0
@@ -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(
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Meshtastic
4
- VERSION = '0.0.30'
4
+ VERSION = '0.0.31'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meshtastic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.30
4
+ version: 0.0.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.