meshtastic 0.0.136 → 0.0.138
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 +4 -4
 - data/Gemfile +1 -1
 - data/lib/meshtastic/mqtt.rb +6 -2
 - data/lib/meshtastic/version.rb +1 -1
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: b47353f3b61249b059d054053f000ef6dca870659f46a1c99cc1873030d7e75a
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 794caf20fd4460d60576f869db88f378059c6a8107c4eb7687d56f83f7dc9673
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 1fa482c17b81cf808ef0b63f160bf2ee6b9dfce2e04c11db6846fc7414549d7d492349efce9c0a6f5b364b739b1ec2b1fcf1b66d9dff532309056386b338f2ea
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: aa8b0043c45ca698f8d84027cbaaa0be45229e36c5751b5ea118ba69dfc1252ccfe0746c42623c9d69575007f67e6c5926fd2e942d9edc17a718802a1447f74b
         
     | 
    
        data/Gemfile
    CHANGED
    
    
    
        data/lib/meshtastic/mqtt.rb
    CHANGED
    
    | 
         @@ -279,7 +279,7 @@ module Meshtastic 
     | 
|
| 
       279 
279 
     | 
    
         | 
| 
       280 
280 
     | 
    
         
             
                  # TODO: Implement chunked message to deal with large messages
         
     | 
| 
       281 
281 
     | 
    
         
             
                  text = opts[:text].to_s
         
     | 
| 
       282 
     | 
    
         
            -
                  max_bytes =  
     | 
| 
      
 282 
     | 
    
         
            +
                  max_bytes = 231
         
     | 
| 
       283 
283 
     | 
    
         
             
                  mui = Meshtastic::MeshInterface.new
         
     | 
| 
       284 
284 
     | 
    
         | 
| 
       285 
285 
     | 
    
         
             
                  if text.bytesize > max_bytes
         
     | 
| 
         @@ -291,11 +291,15 @@ module Meshtastic 
     | 
|
| 
       291 
291 
     | 
    
         
             
                      start_index = i * (max_bytes - chunk_prefix_len)
         
     | 
| 
       292 
292 
     | 
    
         
             
                      end_index = (start_index + (max_bytes - chunk_prefix_len)) - 1
         
     | 
| 
       293 
293 
     | 
    
         
             
                      chunk = "#{chunk_prefix} #{text.byteslice(start_index..end_index)}"
         
     | 
| 
       294 
     | 
    
         
            -
                       
     | 
| 
      
 294 
     | 
    
         
            +
                      # This addresses a weird bug in the protocal if the first byte
         
     | 
| 
      
 295 
     | 
    
         
            +
                      # is an h or H followed by a single byte, which returns
         
     | 
| 
      
 296 
     | 
    
         
            +
                      # {} or {bitfiled: INT}
         
     | 
| 
      
 297 
     | 
    
         
            +
                      opts[:text] = " #{chunk}"
         
     | 
| 
       295 
298 
     | 
    
         
             
                      protobuf_chunk = mui.send_text(opts)
         
     | 
| 
       296 
299 
     | 
    
         
             
                      mqtt_obj.publish(absolute_topic, protobuf_chunk)
         
     | 
| 
       297 
300 
     | 
    
         
             
                    end
         
     | 
| 
       298 
301 
     | 
    
         
             
                  else
         
     | 
| 
      
 302 
     | 
    
         
            +
                    opts[:text] = " #{text}"
         
     | 
| 
       299 
303 
     | 
    
         
             
                    protobuf_text = mui.send_text(opts)
         
     | 
| 
       300 
304 
     | 
    
         
             
                    mqtt_obj.publish(absolute_topic, protobuf_text)
         
     | 
| 
       301 
305 
     | 
    
         
             
                  end
         
     | 
    
        data/lib/meshtastic/version.rb
    CHANGED
    
    
    
        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. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.138
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - 0day Inc.
         
     | 
| 
         @@ -71,14 +71,14 @@ dependencies: 
     | 
|
| 
       71 
71 
     | 
    
         
             
                requirements:
         
     | 
| 
       72 
72 
     | 
    
         
             
                - - '='
         
     | 
| 
       73 
73 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       74 
     | 
    
         
            -
                    version: 1. 
     | 
| 
      
 74 
     | 
    
         
            +
                    version: 1.76.0
         
     | 
| 
       75 
75 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       76 
76 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       77 
77 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       78 
78 
     | 
    
         
             
                requirements:
         
     | 
| 
       79 
79 
     | 
    
         
             
                - - '='
         
     | 
| 
       80 
80 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       81 
     | 
    
         
            -
                    version: 1. 
     | 
| 
      
 81 
     | 
    
         
            +
                    version: 1.76.0
         
     | 
| 
       82 
82 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       83 
83 
     | 
    
         
             
              name: mqtt
         
     | 
| 
       84 
84 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     |