@@ -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
7677pool = socketpool .SocketPool (wifi .radio )
7778ssl_context = ssl .create_default_context ()
0 commit comments