meshtastic 0.0.18 → 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 95418c85d77e376647941a4ad72cb556f36917e3e08c38459e7d500ebc198fe8
4
- data.tar.gz: c25683cfd633e2aceb1a21c12b25bdaaaff2df1cca710457786e9721c9107971
3
+ metadata.gz: 118b74d5c53f38d6fcf05335c4fb5fb70a0caa6d8b46938a3d74769553a0bae8
4
+ data.tar.gz: 155ea6cecde9a3d2adade6cbe033598c074cfe45c71ad11122fde2e3427602ea
5
5
  SHA512:
6
- metadata.gz: 07ad4d65c7734479d9f97c8f4af7ffa7496b1bca97adc108d1fa617b9f1836a793836d702171358cbbccc23151a2479975b4bd62a1a9e77024bd925fbb850870
7
- data.tar.gz: 8a11bec783dd3b48dfc4c830b651771ec0f9aadb9d0fc4814fab478f20eaf1ff197ee79d91a2ea458f79a76c1a3a9815c848045fd6e93255606cc39041b83976
6
+ metadata.gz: 57cdde07d35c227e8135df98e225d62d0bf1c789db487356ea17d262a2d658d2f4139d92edfce9f1b8d66c3d048712c78be0d9ef29bf09ade051237d294c861c
7
+ data.tar.gz: 031e774028e1823a2624f7827565edeb93f2e36bfc58e005c3d8ebb8c6d9df869d609f2cd9eb9e6b326aeaf70f31d8c3ddc0c71f11949e7c17df19cc19aa5719
data/README.md CHANGED
@@ -30,7 +30,10 @@ At the moment the only module available is `Meshtastic::MQTT`. To view MQTT mes
30
30
  require 'meshtastic'
31
31
  Meshtastic::MQTT.help
32
32
  mqtt_obj = Meshastic::MQTT.connect
33
- Meshtastic::MQTT.subscribe(mqtt_obj: mqtt_obj)
33
+ Meshtastic::MQTT.subscribe(
34
+ mqtt_obj: mqtt_obj,
35
+ filter: 'NODEINFO_APP, LongFast'
36
+ )
34
37
  ```
35
38
 
36
39
  ## Contributing
@@ -50,7 +50,7 @@ module Meshtastic
50
50
  # psk: 'optional - channel pre-shared key (default: AQ==)',
51
51
  # qos: 'optional - quality of service (default: 0)',
52
52
  # json: 'optional - JSON output (default: false)',
53
- # filter: 'optional - comma-delimited string(s) to search for in the payload (default: nil)'
53
+ # filter: 'optional - comma-delimited string(s) to filter on in payload (default: nil)'
54
54
  # )
55
55
 
56
56
  public_class_method def self.subscribe(opts = {})
@@ -64,7 +64,6 @@ module Meshtastic
64
64
 
65
65
  # TODO: Find JSON URI for this
66
66
  root_topic = "msh/#{region}/2/json" if json
67
- # root_topic = "msh/#{region}/2/e" unless json
68
67
  root_topic = "msh/#{region}/2/c" unless json
69
68
  mqtt_obj.subscribe("#{root_topic}/#{channel}/#", qos)
70
69
 
@@ -130,7 +129,7 @@ module Meshtastic
130
129
  if disp
131
130
  puts "\n"
132
131
  puts '-' * 80
133
- puts "\n*** DEBUGGING ***"
132
+ puts "*** DEBUGGING ***"
134
133
  puts "Payload:\n#{payload}"
135
134
  # puts "\nMap Report: #{map_report.inspect}"
136
135
  puts "\nRaw Packet: #{raw_packet.inspect}"
@@ -143,7 +142,7 @@ module Meshtastic
143
142
  rescue Google::Protobuf::ParseError
144
143
  puts "\n"
145
144
  puts '-' * 80
146
- puts "\n*** DEBUGGING ***"
145
+ puts "*** DEBUGGING ***"
147
146
  puts "Payload:\n#{payload}"
148
147
  # puts "\nMap Report: #{map_report.inspect}"
149
148
  puts "\nRaw Packet: #{raw_packet.inspect}"
@@ -216,7 +215,14 @@ module Meshtastic
216
215
  region: 'optional - region (default: US)',
217
216
  channel: 'optional - channel name (default: LongFast)',
218
217
  psk: 'optional - channel pre-shared key (default: AQ==)',
219
- qos: 'optional - quality of service (default: 0)'
218
+ qos: 'optional - quality of service (default: 0)',
219
+ json: 'optional - JSON output (default: false)',
220
+ filter: 'optional - comma-delimited string(s) to filter on in payload (default: nil)'
221
+ )
222
+
223
+ #{self}.gps_search(
224
+ lat: 'required - latitude float (e.g. 37.7749)',
225
+ lon: 'required - longitude float (e.g. -122.4194)',
220
226
  )
221
227
 
222
228
  mqtt_obj = #{self}.disconnect(
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Meshtastic
4
- VERSION = '0.0.18'
4
+ VERSION = '0.0.20'
5
5
  end
data/lib/meshtastic.rb CHANGED
@@ -3,9 +3,6 @@
3
3
  # Plugin used to interact with Meshtastic nodes
4
4
  module Meshtastic
5
5
  # Protocol Buffers for Meshtastic
6
- # protobuf Modules commented out as a result of the following error:
7
- # undefined method `proto3_optional' for an instance of
8
- # Google::Protobuf::Internal::MessageBuilderContext (NoMethodError)
9
6
  require 'meshtastic/admin_pb'
10
7
  require 'nanopb_pb'
11
8
  require 'meshtastic/apponly_pb'
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.18
4
+ version: 0.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.