File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -106,12 +106,19 @@ def qrcode(
106
106
): # pylint: disable=invalid-name
107
107
"""Display a QR code
108
108
109
- :param qr_data: The data for the QR code.
109
+ :param qr_data: The data for the QR code, None to remove .
110
110
:param int qr_size: The scale of the QR code.
111
111
:param x: The x position of upper left corner of the QR code on the display.
112
112
:param y: The y position of upper left corner of the QR code on the display.
113
113
114
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
+
115
122
import adafruit_miniqr # pylint: disable=import-outside-toplevel
116
123
117
124
# generate the QR code
You can’t perform that action at this time.
0 commit comments