forked from Telos4/LoRa-Workshop
changed output message
This commit is contained in:
parent
ecea52cf56
commit
f05b583ae4
|
@ -49,20 +49,20 @@ class LoRaTransceiver:
|
|||
"""
|
||||
data_hex = " ".join(list(map(lambda x: "{0:02x}".format(x), data))).upper()
|
||||
print("Sending data {}".format(data_hex))
|
||||
if self.display is not None:
|
||||
self.display.show_text_wrap("Sending data {}".format(data_hex))
|
||||
self.lora.println_raw(data)
|
||||
|
||||
if self.display is not None:
|
||||
self.display.show_text_wrap("Message {} sent.".format(data))
|
||||
|
||||
def send_string(self, message):
|
||||
""" send a message
|
||||
message should be a string
|
||||
"""
|
||||
print("Sending string {}".format(message))
|
||||
if self.display is not None:
|
||||
self.display.show_text_wrap("Sending string {}".format(message))
|
||||
self.lora.println(message)
|
||||
|
||||
if self.display is not None:
|
||||
self.display.show_text_wrap("Message {} sent.".format(message))
|
||||
|
||||
def recv(self):
|
||||
""" start listening for messages and output them on the console """
|
||||
|
|
Loading…
Reference in New Issue
Block a user