meshtastic 0.0.87 → 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: '0449a6cfbd329bf29d9ab70e979f512b5804c23b042e44489ab295d99f992b43'
4
- data.tar.gz: 89aa67df0c714ace91f3404a574e315d0ae1e515451e5f60888c7c49cf8dbc3f
3
+ metadata.gz: bd31b5db429824fb074a2a3fbb5286e02d22498b12af84c84548cf8dbef37e88
4
+ data.tar.gz: 2582842c8144986b087ec8ce797282edfa0e4f86e9a253c1842c907be985700d
5
5
  SHA512:
6
- metadata.gz: 6e9307daac9a9237d9ed3a19cf40dc4891a8105b2864bd25d3312e0900a706c1644cc0b49c594e7589e71c7358f1b2207c593bc8383a9c2a1e7420571b09647e
7
- data.tar.gz: 395ea2d2475432c098bc8342005f9112bd9b1783692728a6e1ca65d5872457d782747498885fd8bf0ac9c3b3b26045d9d291addd5879d1e280997446ac8b025a
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.87'
4
+ VERSION = '0.0.88'
5
5
  end
data/lib/meshtastic.rb CHANGED
@@ -137,12 +137,14 @@ module Meshtastic
137
137
  public_class_method def self.send_data(opts = {})
138
138
  # Send a text message to a node
139
139
  from = opts[:from]
140
- 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)
141
142
  from = from_hex.to_i(16) if from_hex
142
143
  raise 'ERROR: from parameter is required.' unless from
143
144
 
144
145
  to = opts[:to] ||= 0xFFFFFFFF
145
- 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)
146
148
  to = to_hex.to_i(16) if to_hex
147
149
 
148
150
  last_packet_id = opts[:last_packet_id] ||= 0
@@ -198,12 +200,14 @@ module Meshtastic
198
200
  public_class_method def self.send_packet(opts = {})
199
201
  mesh_packet = opts[:mesh_packet]
200
202
  from = opts[:from]
201
- 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)
202
205
  from = from_hex.to_i(16) if from_hex
203
206
  raise 'ERROR: from parameter is required.' unless from
204
207
 
205
208
  to = opts[:to] ||= 0xFFFFFFFF
206
- 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)
207
211
  to = to_hex.to_i(16) if to_hex
208
212
 
209
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.87
4
+ version: 0.0.88
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.