changed output message

This commit is contained in:
Simon Pirkelmann 2019-11-30 19:37:07 +01:00
parent ecea52cf56
commit f05b583ae4

View File

@ -49,20 +49,20 @@ class LoRaTransceiver:
""" """
data_hex = " ".join(list(map(lambda x: "{0:02x}".format(x), data))).upper() data_hex = " ".join(list(map(lambda x: "{0:02x}".format(x), data))).upper()
print("Sending data {}".format(data_hex)) 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) 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): def send_string(self, message):
""" send a message """ send a message
message should be a string message should be a string
""" """
print("Sending string {}".format(message)) print("Sending string {}".format(message))
if self.display is not None:
self.display.show_text_wrap("Sending string {}".format(message))
self.lora.println(message) self.lora.println(message)
if self.display is not None:
self.display.show_text_wrap("Message {} sent.".format(message))
def recv(self): def recv(self):
""" start listening for messages and output them on the console """ """ start listening for messages and output them on the console """