meshtastic 0.0.86 → 0.0.88

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: 708e04cee865ae3b9fdaee52fa9be682f6d2c57a2764b1b4ba43fb5b6cff0397
4
- data.tar.gz: f4da627c0ae92fa039722bdd8e320cca5388a6158bd61b1acee2c4866de2b066
3
+ metadata.gz: bd31b5db429824fb074a2a3fbb5286e02d22498b12af84c84548cf8dbef37e88
4
+ data.tar.gz: 2582842c8144986b087ec8ce797282edfa0e4f86e9a253c1842c907be985700d
5
5
  SHA512:
6
- metadata.gz: cfc0314cdbd69e3b41a3f5caf6b8d094210d9d0e91022ce29ee536c6dc5d713bfc38a5aab31b9f74a28fe6f8c1c39d57c2889ba7c39db9ba547d947f1c1a83ae
7
- data.tar.gz: 494de489ecf82f4927614bb82730c5dddb565155260f29dc29851fc9aee0be6f00272b801d991732934f7b351661ca97b63c2ca14b187a9033f8235f15ac315d
6
+ metadata.gz: 55ca3d661b052a8f64db05ae26e81959d50e59987a6f9f5659071ed85e2f86ffc568289167d2af1da3833d8c283dc94fc0a2a078ab3762d06d33f5002b54a9ac
7
+ data.tar.gz: bb3a5094d26b2bfbffa2d5647b972d536dcab7782e6c78f9c08372922483bf04c72aa5479957e4a7d29f5e3d196ef0ad80ceb1e8c1e8b6f0c450c01bd082f41a
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Meshtastic
4
- VERSION = '0.0.86'
4
+ VERSION = '0.0.88'
5
5
  end
data/lib/meshtastic.rb CHANGED
@@ -66,12 +66,14 @@ module Meshtastic
66
66
  public_class_method def self.send_text(opts = {})
67
67
  # Send a text message to a node
68
68
  from = opts[:from]
69
- from_hex = from.delete('!').bytes.map { |b| b.to_s(16).rjust(2, '0') }.join if from.is_a?(String)
69
+ # from_hex = from.delete('!').bytes.map { |b| b.to_s(16).rjust(2, '0') }.join if from.is_a?(String)
70
+ from_hex = from.delete('!') if from.is_a?(String)
70
71
  from = from_hex.to_i(16) if from_hex
71
72
  raise 'ERROR: from parameter is required.' unless from
72
73
 
73
74
  to = opts[:to] ||= 0xFFFFFFFF
74
- to_hex = to.delete('!').bytes.map { |b| b.to_s(16).rjust(2, '0') }.join if to.is_a?(String)
75
+ # to_hex = to.delete('!').bytes.map { |b| b.to_s(16).rjust(2, '0') }.join if to.is_a?(String)
76
+ to_hex = to.delete('!') if to.is_a?(String)
75
77
  to = to_hex.to_i(16) if to_hex
76
78
 
77
79
  last_packet_id = opts[:last_packet_id] ||= 0
@@ -135,12 +137,14 @@ module Meshtastic
135
137
  public_class_method def self.send_data(opts = {})
136
138
  # Send a text message to a node
137
139
  from = opts[:from]
138
- from_hex = from.delete('!').bytes.map { |b| b.to_s(16).rjust(2, '0') }.join if from.is_a?(String)
140
+ # from_hex = from.delete('!').bytes.map { |b| b.to_s(16).rjust(2, '0') }.join if from.is_a?(String)
141
+ from_hex = from.delete('!') if from.is_a?(String)
139
142
  from = from_hex.to_i(16) if from_hex
140
143
  raise 'ERROR: from parameter is required.' unless from
141
144
 
142
145
  to = opts[:to] ||= 0xFFFFFFFF
143
- to_hex = to.delete('!').bytes.map { |b| b.to_s(16).rjust(2, '0') }.join if to.is_a?(String)
146
+ # to_hex = to.delete('!').bytes.map { |b| b.to_s(16).rjust(2, '0') }.join if to.is_a?(String)
147
+ to_hex = to.delete('!') if to.is_a?(String)
144
148
  to = to_hex.to_i(16) if to_hex
145
149
 
146
150
  last_packet_id = opts[:last_packet_id] ||= 0
@@ -196,12 +200,14 @@ module Meshtastic
196
200
  public_class_method def self.send_packet(opts = {})
197
201
  mesh_packet = opts[:mesh_packet]
198
202
  from = opts[:from]
199
- from_hex = from.delete('!').bytes.map { |b| b.to_s(16).rjust(2, '0') }.join if from.is_a?(String)
203
+ # from_hex = from.delete('!').bytes.map { |b| b.to_s(16).rjust(2, '0') }.join if from.is_a?(String)
204
+ from_hex = from.delete('!') if from.is_a?(String)
200
205
  from = from_hex.to_i(16) if from_hex
201
206
  raise 'ERROR: from parameter is required.' unless from
202
207
 
203
208
  to = opts[:to] ||= 0xFFFFFFFF
204
- to_hex = to.delete('!').bytes.map { |b| b.to_s(16).rjust(2, '0') }.join if to.is_a?(String)
209
+ # to_hex = to.delete('!').bytes.map { |b| b.to_s(16).rjust(2, '0') }.join if to.is_a?(String)
210
+ to_hex = to.delete('!') if to.is_a?(String)
205
211
  to = to_hex.to_i(16) if to_hex
206
212
 
207
213
  last_packet_id = opts[:last_packet_id] ||= 0
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.86
4
+ version: 0.0.88
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.