diff --git a/micropython/lora_transceiver.py b/micropython/lora_transceiver.py index ec8874d..ef52a71 100644 --- a/micropython/lora_transceiver.py +++ b/micropython/lora_transceiver.py @@ -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 """