Merge pull request #14 from msh100/master
each send_packet() needs a unique count
This commit is contained in:
		
						commit
						61efc7ae29
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -129,6 +129,7 @@ class device:
 | 
			
		|||
    self.key = payload[0x04:0x14]
 | 
			
		||||
 | 
			
		||||
  def send_packet(self, command, payload):
 | 
			
		||||
    self.count = (self.count + 1) & 0xffff
 | 
			
		||||
    packet = bytearray(0x38)
 | 
			
		||||
    packet[0x00] = 0x5a
 | 
			
		||||
    packet[0x01] = 0xa5
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue