We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b7252a4 + c4a42e9 commit 217af2bCopy full SHA for 217af2b
adafruit_portalbase/graphics.py
@@ -106,12 +106,19 @@ def qrcode(
106
): # pylint: disable=invalid-name
107
"""Display a QR code
108
109
- :param qr_data: The data for the QR code.
+ :param qr_data: The data for the QR code, None to remove.
110
:param int qr_size: The scale of the QR code.
111
:param x: The x position of upper left corner of the QR code on the display.
112
:param y: The y position of upper left corner of the QR code on the display.
113
114
"""
115
+ if qr_data is None:
116
+ if self._qr_group and self._qr_group in self.splash:
117
+ self.splash.remove(self._qr_group)
118
+ self._qr_group = None
119
+ gc.collect()
120
+ return
121
+
122
import adafruit_miniqr # pylint: disable=import-outside-toplevel
123
124
# generate the QR code
0 commit comments