build(boards): xpython板卡执行 npm run build:prod
This commit is contained in:
@@ -15,6 +15,7 @@ _CI_ID_SET = const(0x03)
|
||||
_CI_ID_NUM = const(0x06)
|
||||
_CI_ID_CLE = const(0x07)
|
||||
_CI_ID_PACTRL = const(0x09)
|
||||
_CI_ID_ASREN = const(0x0A)
|
||||
_CI_ID_END = const(0x5A)
|
||||
_TIME_SNUM = const(0x75)
|
||||
|
||||
@@ -23,6 +24,7 @@ class CI130X:
|
||||
self._device = i2c_bus
|
||||
self._address = addr
|
||||
self._cmd_id = None
|
||||
self._enable = True
|
||||
try:
|
||||
self._rreg(_CI_ID_GET, 3)
|
||||
except:
|
||||
@@ -118,3 +120,10 @@ class CI130X:
|
||||
def pa_ctrl(self, value=True, delay=10):
|
||||
self._wreg(bytes([_CI_ID_PACTRL, int(value), 0, _CI_ID_END]))
|
||||
if value: time.sleep_ms(delay)
|
||||
|
||||
def asr_en(self, value=None):
|
||||
if value is None:
|
||||
return self._enable
|
||||
else:
|
||||
self._enable = bool(value)
|
||||
self._wreg(bytes([_CI_ID_ASREN, self._enable, 0, _CI_ID_END]))
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
"micropython"
|
||||
],
|
||||
"__file__": true,
|
||||
"__size__": 3484,
|
||||
"__size__": 3722,
|
||||
"__name__": "ci130x.py"
|
||||
},
|
||||
"debugnet": {
|
||||
@@ -946,7 +946,7 @@
|
||||
"framebuf"
|
||||
],
|
||||
"__file__": true,
|
||||
"__size__": 22364,
|
||||
"__size__": 22512,
|
||||
"__name__": "uframebuf.py"
|
||||
},
|
||||
"umqtt": {
|
||||
|
||||
@@ -417,6 +417,7 @@ class FrameBuffer_Uincode(FrameBuffer_Base):
|
||||
if sync: self.fill(bg_color, sync=False)
|
||||
self.set_buffer(data, sync)
|
||||
else:
|
||||
yy = y
|
||||
if size is None:
|
||||
font_len, font_buffer = self._take_buffer(str(data), space, 1)
|
||||
size = min((self.width // font_len) if font_len > 0 else 1, self.height // self._font.height)
|
||||
@@ -424,7 +425,11 @@ class FrameBuffer_Uincode(FrameBuffer_Base):
|
||||
font_len, font_buffer = self._take_buffer(str(data), space, size)
|
||||
x = (self.width - font_len + space) // 2 if center else x
|
||||
y = (self.height - self._font.height * size) // 2 if y is None else y
|
||||
if sync: self.fill(bg_color, sync=False)
|
||||
if sync:
|
||||
if yy is None:
|
||||
self.fill(bg_color, sync=False)
|
||||
else:
|
||||
self.fill_rect(0, y - 1, self.width, self._font.height * size + 2, bg_color, sync=False)
|
||||
for buffer in font_buffer: #Display character
|
||||
self.bitmap(buffer, x, y, size, bold, color)
|
||||
x = buffer[1][0] * size + x + space
|
||||
|
||||
Reference in New Issue
Block a user