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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1a810ada159c4d2bed444d0ef5e123a2959caec545ade37307ad621b885cb92f
4
- data.tar.gz: 00c1c0e5aceb9a75c009af4aedd730918f6d5a8c6acca8fc1df589a357df4510
3
+ metadata.gz: 8bc079b846550e65c15013b3926d0680fbbb77e393484b2c001cd9ad95777f00
4
+ data.tar.gz: 47cde9a565ac4815bbeccf179269e1be1c982c107774b2790b3a7a2bd4cf883c
5
5
  SHA512:
6
- metadata.gz: 9c01f0484f9b9da94d50c7d2f964eeffb9cb374e9993955337502081bcefab8af2a85a692fcb58ed6a2a2981528effd8189faf9f105eda3cb81b60704a60f492
7
- data.tar.gz: 940d4174955651ede2eb5938314076a0702ee4ff7eb2c2b56eae491704d7d691ece5c41bbb248cac35ff385d6df48029af3fa8d556c66e11bf09d38db0cb8698
6
+ metadata.gz: 1b864230b6ab3db1c78955be811421ae7910cdbfeb962483a2b9c1afa7e9a7ec170e0eb1aae5f05c5f94049c7b122cfe9e8f719deb1c98d6b308d5b8ad3568a7
7
+ data.tar.gz: 8b5ab00dab82fdd351c9c7634765a121c316dfd1f0fb9dc319ab451073986d8c1a822cc95f421accd36db42a6e0c2ced4610f49a305692e667061ecc8b43f15e
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Meshtastic
4
- VERSION = '0.0.32'
4
+ VERSION = '0.0.34'
5
5
  end
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.32
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-04-30 00:00:00.000000000 Z
11
+ date: 2024-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler