meshtastic 0.0.138 → 0.0.140
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/lib/meshtastic/mqtt.rb +3 -2
 - data/lib/meshtastic/version.rb +1 -1
 - metadata +1 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: f5ae9302b0d39d98475817016ba6210d2b1cd8b7fe7a2246ce73cb259b11cd1b
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 334abbedf9c9d26b22ca1a24f948968289ed06dbec614c5c6d0333b83f02afca
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: d36e5ccd701fdd14082c3c2dcf5315f38255d65df5fac7313d5b29376dcd9c7641f6cca582705ad35b883433fbbb5bdd257ffcc4f70abb965302209f4c37d27c
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 46022207ded5585667022f551ed6914e1562267710f7d12d57d9397a59b53ee76dc98e6ed2e475666f84c50716dfa6cf9e2af5f2d9819973bedfc407230a5e58
         
     | 
    
        data/lib/meshtastic/mqtt.rb
    CHANGED
    
    | 
         @@ -286,7 +286,7 @@ module Meshtastic 
     | 
|
| 
       286 
286 
     | 
    
         
             
                    total_chunks = (text.bytesize.to_f / max_bytes).ceil
         
     | 
| 
       287 
287 
     | 
    
         
             
                    total_chunks.times do |i|
         
     | 
| 
       288 
288 
     | 
    
         
             
                      chunk_num = i + 1
         
     | 
| 
       289 
     | 
    
         
            -
                      chunk_prefix = "(#{chunk_num} of #{total_chunks})"
         
     | 
| 
      
 289 
     | 
    
         
            +
                      chunk_prefix = " (#{chunk_num} of #{total_chunks})"
         
     | 
| 
       290 
290 
     | 
    
         
             
                      chunk_prefix_len = chunk_prefix.bytesize
         
     | 
| 
       291 
291 
     | 
    
         
             
                      start_index = i * (max_bytes - chunk_prefix_len)
         
     | 
| 
       292 
292 
     | 
    
         
             
                      end_index = (start_index + (max_bytes - chunk_prefix_len)) - 1
         
     | 
| 
         @@ -294,9 +294,10 @@ module Meshtastic 
     | 
|
| 
       294 
294 
     | 
    
         
             
                      # This addresses a weird bug in the protocal if the first byte
         
     | 
| 
       295 
295 
     | 
    
         
             
                      # is an h or H followed by a single byte, which returns
         
     | 
| 
       296 
296 
     | 
    
         
             
                      # {} or {bitfiled: INT}
         
     | 
| 
       297 
     | 
    
         
            -
                      opts[:text] =  
     | 
| 
      
 297 
     | 
    
         
            +
                      opts[:text] = chunk
         
     | 
| 
       298 
298 
     | 
    
         
             
                      protobuf_chunk = mui.send_text(opts)
         
     | 
| 
       299 
299 
     | 
    
         
             
                      mqtt_obj.publish(absolute_topic, protobuf_chunk)
         
     | 
| 
      
 300 
     | 
    
         
            +
                      sleep 0.3
         
     | 
| 
       300 
301 
     | 
    
         
             
                    end
         
     | 
| 
       301 
302 
     | 
    
         
             
                  else
         
     | 
| 
       302 
303 
     | 
    
         
             
                    opts[:text] = " #{text}"
         
     | 
    
        data/lib/meshtastic/version.rb
    CHANGED