Skip to content

Commit

Permalink
fix payload struct format
Browse files Browse the repository at this point in the history
  • Loading branch information
joernesdohr committed Nov 22, 2015
1 parent ace215b commit b9d7bdd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion RPi/pyRF24Network/examples/helloworld_rx.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
network.update()
while network.available():
header, payload = network.read(12)
ms, number = unpack('<qi', payload)
ms, number = unpack('<LL', payload)
print 'Received payload # ', number, ' at ', ms, ' from ', oct(header.from_node)
time.sleep(1)

2 changes: 1 addition & 1 deletion RPi/pyRF24Network/examples/helloworld_tx.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
if ( now - last_sent >= interval ):
last_sent = now
print 'Sending ..',
payload = pack('<qi', millis(), packets_sent )
payload = pack('<LL', millis(), packets_sent )
packets_sent += 1
ok = network.write(RF24NetworkHeader(other_node), payload)
if ok:
Expand Down

0 comments on commit b9d7bdd

Please sign in to comment.