Skip to content

Commit

Permalink
changes struct format to two unsigned Long types in helloworld python…
Browse files Browse the repository at this point in the history
… examples
  • Loading branch information
joernesdohr committed Nov 14, 2015
1 parent 1dcd3f5 commit 736234c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions RPi/pyRF24Network/examples/helloworld_rx.python3.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
while 1:
network.update()
while network.available():
header, payload = network.read(12)
ms, number = unpack('<qi', payload)
header, payload = network.read(8)
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.python3.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,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 736234c

Please sign in to comment.