meshtastic 0.0.32 → 0.0.34
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
- data/lib/meshtastic/mqtt.rb +11 -4
- data/lib/meshtastic/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8bc079b846550e65c15013b3926d0680fbbb77e393484b2c001cd9ad95777f00
|
|
4
|
+
data.tar.gz: 47cde9a565ac4815bbeccf179269e1be1c982c107774b2790b3a7a2bd4cf883c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1b864230b6ab3db1c78955be811421ae7910cdbfeb962483a2b9c1afa7e9a7ec170e0eb1aae5f05c5f94049c7b122cfe9e8f719deb1c98d6b308d5b8ad3568a7
|
|
7
|
+
data.tar.gz: 8b5ab00dab82fdd351c9c7634765a121c316dfd1f0fb9dc319ab451073986d8c1a822cc95f421accd36db42a6e0c2ced4610f49a305692e667061ecc8b43f15e
|
data/lib/meshtastic/mqtt.rb
CHANGED
|
@@ -166,16 +166,16 @@ module Meshtastic
|
|
|
166
166
|
pb_obj = Meshtastic::Routing.decode(payload)
|
|
167
167
|
when :SERIAL_APP
|
|
168
168
|
pb_obj = Meshtastic::SerialConnectionStatus.decode(payload)
|
|
169
|
-
when :SIMULATOR_APP
|
|
169
|
+
when :SIMULATOR_APP,
|
|
170
|
+
:TEXT_MESSAGE_COMPRESSED_APP
|
|
171
|
+
# Unsure if this is the correct protobuf object
|
|
172
|
+
# for TEXT_MESSAGE_COMPRESSED_APP
|
|
170
173
|
pb_obj = Meshtastic::Compressed.decode(payload)
|
|
171
174
|
when :STORE_FORWARD_APP
|
|
172
175
|
pb_obj = Meshtastic::StoreAndForward.decode(payload)
|
|
173
176
|
when :TEXT_MESSAGE_APP
|
|
174
177
|
# Unsure if this is the correct protobuf object
|
|
175
178
|
pb_obj = Meshtastic::MqttClientProxyMessage.decode(payload)
|
|
176
|
-
when :TEXT_MESSAGE_COMPRESSED_APP
|
|
177
|
-
# Unsure if this is the correct protobuf object
|
|
178
|
-
pb_obj = Meshtastic::Compressed.decode(payload)
|
|
179
179
|
when :TELEMETRY_APP
|
|
180
180
|
pb_obj = Meshtastic::Telemetry.decode(payload)
|
|
181
181
|
when :TRACEROUTE_APP
|
|
@@ -203,6 +203,13 @@ module Meshtastic
|
|
|
203
203
|
lon: longitude
|
|
204
204
|
).first.data
|
|
205
205
|
end
|
|
206
|
+
|
|
207
|
+
# If we there's a mac address, make it look like one.
|
|
208
|
+
if message[:decoded][:payload].keys.include?(:macaddr)
|
|
209
|
+
macaddr = message[:decoded][:payload][:macaddr]
|
|
210
|
+
macaddr_fmt = macaddr.bytes.map { |byte| byte.to_s(16).rjust(2, '0') }.join(':')
|
|
211
|
+
message[:decoded][:payload][:macaddr] = macaddr_fmt
|
|
212
|
+
end
|
|
206
213
|
# puts pb_obj.public_methods
|
|
207
214
|
# message[:decoded][:pb_obj] = pb_obj
|
|
208
215
|
end
|
data/lib/meshtastic/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: meshtastic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.34
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- 0day Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-05-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|