mirror of
https://github.com/markqvist/RNode_Firmware.git
synced 2025-05-05 08:05:18 -04:00
Cleaned up whitespace
This commit is contained in:
parent
a683e2df4d
commit
02525cee55
2 changed files with 449 additions and 449 deletions
|
@ -7,13 +7,15 @@ from RNode import RNodeInterface
|
|||
# We'll also define which serial port the
|
||||
# RNode is attached to.
|
||||
serialPort = "/dev/ttyUSB0"
|
||||
# TODO: Remove
|
||||
serialPort = "/dev/tty.usbserial-DN03E0FQ"
|
||||
|
||||
# This function gets called every time a
|
||||
# packet is received
|
||||
def gotPacket(data, rnode):
|
||||
print "Received a packet: "+data
|
||||
print "RSSI: "+str(rnode.r_stat_rssi)+" dBm"
|
||||
print "SNR: "+str(rnode.r_stat_snr)+" dB"
|
||||
print("Received a packet: "+data)
|
||||
print("RSSI: "+str(rnode.r_stat_rssi)+" dBm")
|
||||
print("SNR: "+str(rnode.r_stat_snr)+" dB")
|
||||
|
||||
# Create an RNode instance. This configures
|
||||
# and powers up the radio.
|
||||
|
@ -30,10 +32,10 @@ rnode = RNodeInterface(
|
|||
|
||||
# Enter a loop waiting for user input.
|
||||
try:
|
||||
print "Waiting for packets, hit enter to send a packet, Ctrl-C to exit"
|
||||
print("Waiting for packets, hit enter to send a packet, Ctrl-C to exit")
|
||||
while True:
|
||||
raw_input()
|
||||
input()
|
||||
rnode.send("Hello World!")
|
||||
except KeyboardInterrupt as e:
|
||||
print ""
|
||||
print("")
|
||||
exit()
|
Loading…
Add table
Add a link
Reference in a new issue