meshtastic 0.0.135 → 0.0.137
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: a5d969e6959b0de1adbf9cf9bbf0b960c280d6807d6a15bc396a357644271058
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 88960eba0047ec2b99b8020af3860f4e4cb990e388454d8598df592b17991a98
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 5f6f235c2d08db5e814a922b01e3a8be9b82525738999d936b9edf0859502b065b2b90006ea5a5d52297072b0a3b8da3ff7efe5497c8be4ebfe3748830d189c4
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 52b3063c4ee550b7df970736131cd1494b163f32b67352c6d43daf3fe1746aca3983cfce8c2d295191cf92dd4b2323bc12b9254e4c38683b5d36fa47b39d9c69
         
     | 
    
        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 = 232
         
     | 
| 
       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.137
         
     | 
| 
       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
         
     |