Skip to content

Commit 8ef70d0

Browse files
author
Jim Bennett
committed
PR review tweaks
1 parent bc1eda4 commit 8ef70d0

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

PyPortal_Azure_Plant_Monitor/azure_gfx_helper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __init__(self, is_celsius):
5656
self.temp_label.y = 65
5757
self._text_group.append(self.temp_label)
5858

59-
self.temp_text = Label(self.data_font, max_glyphs=10, text="")
59+
self.temp_text = Label(self.data_font, max_glyphs=10)
6060
self.temp_text.x = 200
6161
self.temp_text.y = 85
6262
self._text_group.append(self.temp_text)
@@ -66,12 +66,12 @@ def __init__(self, is_celsius):
6666
self.moisture_label.y = 135
6767
self._text_group.append(self.moisture_label)
6868

69-
self.moisture_text = Label(self.data_font, max_glyphs=10, text="")
69+
self.moisture_text = Label(self.data_font, max_glyphs=10)
7070
self.moisture_text.x = 200
7171
self.moisture_text.y = 175
7272
self._text_group.append(self.moisture_text)
7373

74-
self.azure_status_text = Label(self.main_font, max_glyphs=15, text="")
74+
self.azure_status_text = Label(self.main_font, max_glyphs=15)
7575
self.azure_status_text.x = 65
7676
self.azure_status_text.y = 225
7777
self._text_group.append(self.azure_status_text)

PyPortal_Azure_Plant_Monitor/code.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,14 @@
4242
# Set up the WiFi manager with a status light to show the WiFi connection status
4343
status_light = neopixel.NeoPixel(board.NEOPIXEL, 1, brightness=0.2)
4444
wifi = adafruit_esp32spi_wifimanager.ESPSPI_WiFiManager(esp, secrets, status_light)
45+
print("WiFi connecting...")
4546
wifi.connect()
47+
print("WiFi connected!")
4648

4749
# Time setup, needed to authenticate with Azure IoT Central
4850
ntp = NTP(esp)
4951
while not ntp.valid_time:
52+
print("Failed to obtain time, retrying in 5 seconds...")
5053
time.sleep(5)
5154
ntp.set_time()
5255

0 commit comments

Comments
 (0)