Skip to content

Commit 11aace8

Browse files
committed
Update code.py
1 parent 3a93a5e commit 11aace8

File tree

1 file changed

+5
-4
lines changed
  • Qualia/Qualia_S3_iOS_Photo_Frame

1 file changed

+5
-4
lines changed

Qualia/Qualia_S3_iOS_Photo_Frame/code.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,25 +53,26 @@ def decode_image(base64_msg):
5353
graphics.display.root_group = group
5454
graphics.display.refresh()
5555

56+
5657
# Define callback methods which are called when events occur
57-
def connected(client, userdata, flags, rc):
58+
def connected(client, userdata, flags, rc): # pylint: disable=unused-argument
5859
# This function will be called when the client is connected
5960
# successfully to the broker.
6061
print(f"Connected to Adafruit IO! Listening for topic changes on {camera_feed}")
6162
# Subscribe to all changes on the onoff_feed.
6263
client.subscribe(camera_feed)
6364

6465

65-
def disconnected(client, userdata, rc):
66+
def disconnected(client, userdata, rc): # pylint: disable=unused-argument
6667
# This method is called when the client is disconnected
6768
print("Disconnected from Adafruit IO!")
6869

6970

70-
def message(client, topic, message):
71+
def message(client, topic, msg): # pylint: disable=unused-argument
7172
# This method is called when a topic the client is subscribed to
7273
# has a new message.
7374
print(f"New message on topic {topic}")
74-
decode_image(message)
75+
decode_image(msg)
7576

7677
pool = socketpool.SocketPool(wifi.radio)
7778
ssl_context = ssl.create_default_context()

0 commit comments

Comments
 (0)