更新其他后台播放音乐,C3支持v1.25.0,修改sant的es-dl

This commit is contained in:
dahanzimin
2025-10-23 19:21:56 +08:00
parent 7b15abef9c
commit b1b24b27a6
15 changed files with 239 additions and 1080 deletions

View File

@@ -553,15 +553,17 @@ class FrameBuffer_Uincode(FrameBuffer_Base):
self.show()
time.sleep_ms(speed)
def qrcode(self, data, x=0, y=0, size=None, bold=0, type=None, correct=0, color=0xffff, bg_color=0x0, sync=True):
def qrcode(self, data, x=None, y=None, size=None, bold=0, type=None, correct=0, color=0xffff, bg_color=0x0, sync=True):
if self._miniqr is None:
from adafruit_miniqr import QRCode
self._miniqr = QRCode
_qr = self._miniqr(qr_type=type, error_correct=correct)
_qr.add_data(data)
_qr.add_data(str(data))
_qr.make()
if sync: self.fill(bg_color, sync=False)
size = min(self.height // _qr.matrix.height, self.width // _qr.matrix.width) if size is None else size
x = (self.width - _qr.matrix.width * size) // 2 if x is None else x
y = (self.height - _qr.matrix.height * size) // 2 if y is None else y
for j in range(_qr.matrix.height):
for i in range(_qr.matrix.width):
if _qr.matrix[i, j]: