meshtastic 0.0.56 → 0.0.58

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: 587ec9cf838d9bc00fb0881bfb06e5baaf32b76cf92be0f1687dee8397cc372e
4
- data.tar.gz: 4bf94458eae35a86738318fff4931094f943bd3afcacb967e2022809c0e211ac
3
+ metadata.gz: a264d9893fbd8e3aa81eee241844cdf976374859a1e43c8bbca68e6b8e906781
4
+ data.tar.gz: 77849c92d27e23c9aabc8ac69c4b56add82a6204207622c3383ab15cdef48c19
5
5
  SHA512:
6
- metadata.gz: 1cb23efe67552373a15b746b6553951f6694fe64fd03a68f4db730b2c477a769999dba92146b8a40d85cd3c29ea71c931a5406b1d081367a3699eaf8358af8b2
7
- data.tar.gz: 9c2733116cfaebcfa388a4211d519e0216ca1709d2752d197bc7175cb92e4a1246c4e5ff7baea6fcd5314ff69af458b90b24094eb5ff749861ad2d116aae1844
6
+ metadata.gz: a12dc68ece20d389402fe79492ec2ebcf109ac30eecc2d0d4e1ed228b2b3292a355bed10ddf0397f7589a41780765599e0a88fabc5944ccb4d979e14d87cbb1b
7
+ data.tar.gz: 61f56c89bca4d7fee23336a1502b196b711f39190b31acc0667e672456ed5194fb20122bbdc323d22491dfec25d7e6d9c2315b63de4961e90871819d0c4cbad8
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Meshtastic
4
- VERSION = '0.0.56'
4
+ VERSION = '0.0.58'
5
5
  end
data/lib/meshtastic.rb CHANGED
@@ -221,7 +221,7 @@ module Meshtastic
221
221
  packet_id = 0
222
222
  if mesh_packet.id.zero?
223
223
  packet_id = generate_packet_id(
224
- last_packet_id: packet_id
224
+ last_packet_id: mesh_packet.id
225
225
  )
226
226
  end
227
227
  mesh_packet.id = packet_id
@@ -273,8 +273,10 @@ module Meshtastic
273
273
  last_packet_id = opts[:last_packet_id] ||= 0
274
274
  last_packet_id = 0 if last_packet_id.negative?
275
275
 
276
- Random.rand(0xffffffff) if last_packet_id.zero?
277
- (last_packet_id + 1) & 0xffffffff if last_packet_id.positive?
276
+ packet_id = Random.rand(0xffffffff) if last_packet_id.zero?
277
+ packet_id = (last_packet_id + 1) & 0xffffffff if last_packet_id.positive?
278
+
279
+ packet_id
278
280
  end
279
281
 
280
282
  # Supported Method Parameters::
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.56
4
+ version: 0.0.58
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.