更新sowl的固件

This commit is contained in:
dahanzimin
2026-01-13 15:20:07 +08:00
parent 8f4f023ab3
commit f611ea95ee
3 changed files with 3 additions and 3 deletions

View File

@@ -83,7 +83,7 @@ except Exception as e:
print("Warning: Failed to communicate with CI1316XP (ASR) or", e) print("Warning: Failed to communicate with CI1316XP (ASR) or", e)
'''2RGB_WS2812''' '''2RGB_WS2812'''
onboard_rgb = NeoPixel(onboard_bot.rgb_sync, 3) onboard_rgb = NeoPixel(onboard_bot.rgb_sync, 2)
'''1Buzzer-Music''' '''1Buzzer-Music'''
onboard_music = MIDI(0, pa_ctrl=onboard_asr.pa_ctrl) onboard_music = MIDI(0, pa_ctrl=onboard_asr.pa_ctrl)

View File

@@ -8,12 +8,12 @@ Micropython library for the WS2812 NeoPixel-RGB(method inheritance)
from time import sleep from time import sleep
class NeoPixel: class NeoPixel:
def __init__(self, func, n, bpp=3, ORDER=(0, 1, 2, 3)): def __init__(self, func, n, bpp=3, ORDER=(0, 1, 2, 3), status=(0, 10 ,0)):
self.func = func self.func = func
self.bpp = bpp self.bpp = bpp
self.rgbs = n self.rgbs = n
self.ORDER = ORDER self.ORDER = ORDER
self.rgb_buf = bytearray(self.rgbs * bpp) self.rgb_buf = bytearray(self.rgbs * bpp) + bytes(status)
self.write() self.write()
def __len__(self): def __len__(self):