Cleaned up whitespace

This commit is contained in:
Mark Qvist 2020-05-27 16:17:40 +02:00
parent a683e2df4d
commit 02525cee55
2 changed files with 449 additions and 449 deletions

View file

@ -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()