更新mini的固件(修复看门狗,门图模反问题,LED灯默认颜色为白)

This commit is contained in:
dahanzimin
2024-09-14 15:14:13 +08:00
parent c195171ae9
commit b451b48155
5 changed files with 52 additions and 52 deletions

View File

@@ -1025,15 +1025,15 @@ export const special_key = {
this.appendDummyInput("")
.appendField(Blockly.Msg.MIXLY_SPECIAL_KEY)
.appendField(new Blockly.FieldDropdown([
[Blockly.Msg.MIXLY_SPECIAL_KEY0,"0"],
[Blockly.Msg.MIXLY_SPECIAL_KEY1, "1"],
[Blockly.Msg.MIXLY_SPECIAL_KEY2, "2"],
[Blockly.Msg.MIXLY_SPECIAL_KEY1, "4"],
[Blockly.Msg.MIXLY_SPECIAL_KEY8, "8"],
[Blockly.Msg.MIXLY_SPECIAL_KEY16, "16"],
[Blockly.Msg.MIXLY_SPECIAL_KEY32, "32"],
[Blockly.Msg.MIXLY_SPECIAL_KEY64, "64"],
[Blockly.Msg.MIXLY_SPECIAL_KEY128, "128"]
[Blockly.Msg.MIXLY_SPECIAL_KEY0,"0x00"],
[Blockly.Msg.MIXLY_SPECIAL_KEY1, "0x01"],
[Blockly.Msg.MIXLY_SPECIAL_KEY2, "0x02"],
[Blockly.Msg.MIXLY_SPECIAL_KEY1, "0x04"],
[Blockly.Msg.MIXLY_SPECIAL_KEY8, "0x08"],
[Blockly.Msg.MIXLY_SPECIAL_KEY16, "0x10"],
[Blockly.Msg.MIXLY_SPECIAL_KEY32, "0x20"],
[Blockly.Msg.MIXLY_SPECIAL_KEY64, "0x40"],
[Blockly.Msg.MIXLY_SPECIAL_KEY128, "0x80"]
]), 'op')
this.setOutput(true);
}
@@ -1045,7 +1045,7 @@ export const general_key = {
this.appendDummyInput("")
.appendField(Blockly.Msg.MIXLY_GENERAL_KEY)
.appendField(new Blockly.FieldDropdown([
[Blockly.Msg.MIXLY_SPECIAL_KEY0,"0"],
[Blockly.Msg.MIXLY_SPECIAL_KEY0,"0x00"],
['A', "0x04"],
['B', "0x05"],
['C', "0x06"],
@@ -1072,32 +1072,32 @@ export const general_key = {
['X', "0x1B"],
['Y', "0x1C"],
['Z', "0x1D"],
['1', "0x1E"],
['2', "0x1F"],
['3', "0x20"],
['4', "0x21"],
['5', "0x22"],
['6', "0x23"],
['7', "0x24"],
['8', "0x25"],
['9', "0x26"],
['0', "0x27"],
['1 ', "0x1E"],
['2 @', "0x1F"],
['3 #', "0x20"],
['4 $', "0x21"],
['5 %', "0x22"],
['6 ^', "0x23"],
['7 &', "0x24"],
['8 *', "0x25"],
['9 (', "0x26"],
['0 )', "0x27"],
['ENTER', "0x28"],
['ESC', "0x29"],
['BACKSPACE', "0x2A"],
['TAB', "0x2B"],
['SPACE', "0x2C"],
['-', "0x2D"],
['=', "0x2E"],
['{', "0x2F"],
['}', "0x30"],
['\\', "0x31"],
[';', "0x33"],
['"', "0x34"],
['`', "0x35"],
[',', "0x36"],
['.', "0x37"],
['/', "0x38"],
['- _', "0x2D"],
['= +', "0x2E"],
['[ {', "0x2F"],
['] }', "0x30"],
['\\ |', "0x31"],
['; :', "0x33"],
["' "+' "', "0x34"],
['` ~', "0x35"],
[', <', "0x36"],
['. >', "0x37"],
['/ ?', "0x38"],
['CAPS_LOCK', "0x39"],
['F1', "0x3A"],
['F2', "0x3B"],
@@ -1332,10 +1332,10 @@ export const mouse_key = {
this.appendDummyInput("")
.appendField(Blockly.Msg.MIXLY_MOUSE_KEYS)
.appendField(new Blockly.FieldDropdown([
[Blockly.Msg.MIXLY_SPECIAL_KEY0,"0"],
[Blockly.Msg.MIXLY_MOUSE_LEFT_KEY, "1"],
[Blockly.Msg.MIXLY_MOUSE_RIGHT_KEY, "2"],
[Blockly.Msg.MIXLY_MOUSE_MID_KEY, "4"]
[Blockly.Msg.MIXLY_SPECIAL_KEY0,"0x00"],
[Blockly.Msg.MIXLY_MOUSE_LEFT_KEY, "0x01"],
[Blockly.Msg.MIXLY_MOUSE_RIGHT_KEY, "0x02"],
[Blockly.Msg.MIXLY_MOUSE_MID_KEY, "0x04"]
]), 'op')
this.setOutput(true);
}

View File

@@ -320,14 +320,14 @@ class BOT035(FrameBuffer):
print("Warning: Please upgrade the coprocessor firmware to use this feature")
"""Graph module"""
HEART=b'\x00\x0c\x1e?~\xfc~?\x1e\x0c\x00\x00'
HEART_SMALL=b'\x00\x00\x0c\x1e<x<\x1e\x0c\x00\x00\x00'
HAPPY=b'\x00\x06\x06\x10 @@ \x10\x06\x06\x00'
SAD=b'\x04\x02\x02B \x10\x10 B\x02\x02\x04'
SMILE=b'\x04\x02\x02$@\x80\x80@$\x02\x02\x04'
ANGRY=b'\x01\x02\x84B!\x10\x10!B\x84\x02\x01'
NO=b'\x00\x00\x00B$\x18\x18$B\x00\x00\x00'
YES=b'\x00\x00\x10 @@ \x10\x08\x04\x02\x00'
DOOR_OPEN=b'\x00\x00\xfe\x03\x03\x03\x13\x13\xff\xfe\x00\x00'
DOOR_OPENING=b'\x00\x00\xfe\x03\x03\x15\xf9\x01\x01\xfe\x00\x00'
DOOR_CLOSE=b'\x00\x00\xfe\xfd\x01\x01\x01\x01\x01\xfe\x00\x00'
HEART =b'\x00\x0c\x1e?~\xfc~?\x1e\x0c\x00\x00'
HEART_SMALL =b'\x00\x00\x0c\x1e<x<\x1e\x0c\x00\x00\x00'
HAPPY =b'\x00\x06\x06\x10 @@ \x10\x06\x06\x00'
SAD =b'\x04\x02\x02B \x10\x10 B\x02\x02\x04'
SMILE =b'\x04\x02\x02$@\x80\x80@$\x02\x02\x04'
ANGRY =b'\x01\x02\x84B!\x10\x10!B\x84\x02\x01'
NO =b'\x00\x00\x00B$\x18\x18$B\x00\x00\x00'
YES =b'\x00\x00\x10 @@ \x10\x08\x04\x02\x00'
DOOR_OPEN =b'\x00\x00\xfe\xfd\x01\x01\x01\x01\x01\xfe\x00\x00'
DOOR_OPENING =b'\x00\x00\xfe\x03\x03\x15\xf9\x01\x01\xfe\x00\x00'
DOOR_CLOSE =b'\x00\x00\xfe\x03\x03\x03\x13\x13\xff\xfe\x00\x00'

View File

@@ -125,15 +125,15 @@ class Button(KEYSensor):
return not self.key.value()
B1key = Button(9)
B2key = KEYSensor(0,0)
A1key = KEYSensor(0,2100)
A2key = KEYSensor(0,1500)
A3key = KEYSensor(0,800)
A4key = KEYSensor(0,2700)
B2key = KEYSensor(0, 0)
A1key = KEYSensor(0, 2100)
A2key = KEYSensor(0, 1500)
A3key = KEYSensor(0, 800)
A4key = KEYSensor(0, 2700)
'''2LED-Multiplex RGB'''
class LED:
def __init__(self, rgb, num=2, color=3):
def __init__(self, rgb, num=2, color=7):
self._rgb = rgb
self._col = [color] * num
self._color = ((0, 0, 0), (1, 0, 0), (0, 1, 0), (0, 0, 1), (1, 1, 0), (0, 1, 1), (1, 0, 1), (1, 1, 1))