meshtastic 0.0.61 → 0.0.63

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: dceeac29deeac96282b54784e35f07c58b94eefa80d90e52c99fa13d34abe359
4
- data.tar.gz: 8a30e46f08215d9c681506e9e138856b442f97af1f9bdcb28b3a2c3defd02a14
3
+ metadata.gz: 393fb0ec1c1f1db3c65fb545a985f9073906b6e782be9aa0b8d95f4eb44c4943
4
+ data.tar.gz: 6e1f4b3aae8d04f31dfefc73dad7d43f21a70f076309393f780c29609dc39d67
5
5
  SHA512:
6
- metadata.gz: ac41b52aa5c8069b6da7b8ce6e27f09643604c0b2978230dde661612e50a1656e6740d7ede4f4c8bf27a0230b807e4b98f305897e293053f0450d5f8a793aa52
7
- data.tar.gz: 760a90c99e4618a3b1448e13d5a2fd0434a5c169d7235629c8c18a128bc8761bd81135a131e6aa4cce84f823dd27eb15aa77a077a1b3ed4fd761e2cf3a54e6e8
6
+ metadata.gz: 1b699b81eaa21d2bafa7b35cf5e5454c306cbb141652d27c5331f095d44be0be4c822ce0688e8ff3e75c88de6d12b928c5266967e7fdd12ac4bb9a360bb98430
7
+ data.tar.gz: af285cce37bee8b48f064ae20022205149bda285b9f2c80476986e035f9402770494868f68725ecee476c7e5f21a664f71e28a31fc58f5b9cee2fdbc69b451d4
@@ -215,7 +215,7 @@ module Meshtastic
215
215
 
216
216
  filter_arr = filter.to_s.split(',').map(&:strip)
217
217
  mqtt_obj.get_packet do |packet_bytes|
218
- raw_packet = packet_bytes.to_s.b if include_raw
218
+ raw_packet = packet_bytes.to_s if include_raw
219
219
  raw_topic = packet_bytes.topic ||= ''
220
220
  raw_payload = packet_bytes.payload ||= ''
221
221
 
@@ -436,6 +436,20 @@ module Meshtastic
436
436
  lon: 'required - longitude float (e.g. -122.4194)',
437
437
  )
438
438
 
439
+ #{self}.send_text(
440
+ mqtt_obj: 'required - mqtt_obj returned from #connect method',
441
+ from: ' required - From ID (String or Integer)',
442
+ to: 'optional - Destination ID (Default: 0xFFFFFFFF)',
443
+ topic: 'optional - topic to publish to (default: 'msh/US/2/e/LongFast/1')',
444
+ channel: 'optional - channel ID (Default: 6)',
445
+ text: 'optional - Text Message (Default: SYN)',
446
+ want_ack: 'optional - Want Acknowledgement (Default: false)',
447
+ want_response: 'optional - Want Response (Default: false)',
448
+ hop_limit: 'optional - Hop Limit (Default: 3)',
449
+ on_response: 'optional - Callback on Response',
450
+ psks: 'optional - hash of :channel => psk key value pairs (default: { LongFast: 'AQ==' })'
451
+ )
452
+
439
453
  mqtt_obj = #{self}.disconnect(
440
454
  mqtt_obj: 'required - mqtt_obj object returned from #connect method'
441
455
  )
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Meshtastic
4
- VERSION = '0.0.61'
4
+ VERSION = '0.0.63'
5
5
  end
data/lib/meshtastic.rb CHANGED
@@ -96,7 +96,7 @@ module Meshtastic
96
96
  port_num = Meshtastic::PortNum::TEXT_MESSAGE_APP
97
97
 
98
98
  data = Meshtastic::Data.new
99
- data.payload = text
99
+ data.payload = text.encode('UTF-8')
100
100
  data.portnum = port_num
101
101
  data.want_response = want_response
102
102
  # puts data.to_h
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.61
4
+ version: 0.0.63
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-05-13 00:00:00.000000000 Z
11
+ date: 2024-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler