Skip to content

Commit 4b33ddd

Browse files
authored
Merge pull request #192 from mMerlin/new-sample
tweak output formatting
2 parents 1788f98 + d310104 commit 4b33ddd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/esp32spi_simpletest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@
6363

6464
if esp.status == adafruit_esp32spi.WL_IDLE_STATUS:
6565
print("ESP32 found and in idle mode")
66-
print("Firmware vers.", esp.firmware_version)
67-
print("MAC addr:", [hex(i) for i in esp.MAC_address])
66+
print("Firmware vers.", esp.firmware_version.decode("utf-8"))
67+
print("MAC addr:", ":".join("%02X" % byte for byte in esp.MAC_address))
6868

6969
for ap in esp.scan_networks():
70-
print("\t%s\t\tRSSI: %d" % (str(ap["ssid"], "utf-8"), ap["rssi"]))
70+
print("\t%-23s RSSI: %d" % (str(ap["ssid"], "utf-8"), ap["rssi"]))
7171

7272
print("Connecting to AP...")
7373
while not esp.is_connected:

0 commit comments

Comments
 (0)