更新mini的固件(修复看门狗,门图模反问题,LED灯默认颜色为白)
This commit is contained in:
@@ -1025,15 +1025,15 @@ export const special_key = {
|
|||||||
this.appendDummyInput("")
|
this.appendDummyInput("")
|
||||||
.appendField(Blockly.Msg.MIXLY_SPECIAL_KEY)
|
.appendField(Blockly.Msg.MIXLY_SPECIAL_KEY)
|
||||||
.appendField(new Blockly.FieldDropdown([
|
.appendField(new Blockly.FieldDropdown([
|
||||||
[Blockly.Msg.MIXLY_SPECIAL_KEY0,"0"],
|
[Blockly.Msg.MIXLY_SPECIAL_KEY0,"0x00"],
|
||||||
[Blockly.Msg.MIXLY_SPECIAL_KEY1, "1"],
|
[Blockly.Msg.MIXLY_SPECIAL_KEY1, "0x01"],
|
||||||
[Blockly.Msg.MIXLY_SPECIAL_KEY2, "2"],
|
[Blockly.Msg.MIXLY_SPECIAL_KEY2, "0x02"],
|
||||||
[Blockly.Msg.MIXLY_SPECIAL_KEY1, "4"],
|
[Blockly.Msg.MIXLY_SPECIAL_KEY1, "0x04"],
|
||||||
[Blockly.Msg.MIXLY_SPECIAL_KEY8, "8"],
|
[Blockly.Msg.MIXLY_SPECIAL_KEY8, "0x08"],
|
||||||
[Blockly.Msg.MIXLY_SPECIAL_KEY16, "16"],
|
[Blockly.Msg.MIXLY_SPECIAL_KEY16, "0x10"],
|
||||||
[Blockly.Msg.MIXLY_SPECIAL_KEY32, "32"],
|
[Blockly.Msg.MIXLY_SPECIAL_KEY32, "0x20"],
|
||||||
[Blockly.Msg.MIXLY_SPECIAL_KEY64, "64"],
|
[Blockly.Msg.MIXLY_SPECIAL_KEY64, "0x40"],
|
||||||
[Blockly.Msg.MIXLY_SPECIAL_KEY128, "128"]
|
[Blockly.Msg.MIXLY_SPECIAL_KEY128, "0x80"]
|
||||||
]), 'op')
|
]), 'op')
|
||||||
this.setOutput(true);
|
this.setOutput(true);
|
||||||
}
|
}
|
||||||
@@ -1045,7 +1045,7 @@ export const general_key = {
|
|||||||
this.appendDummyInput("")
|
this.appendDummyInput("")
|
||||||
.appendField(Blockly.Msg.MIXLY_GENERAL_KEY)
|
.appendField(Blockly.Msg.MIXLY_GENERAL_KEY)
|
||||||
.appendField(new Blockly.FieldDropdown([
|
.appendField(new Blockly.FieldDropdown([
|
||||||
[Blockly.Msg.MIXLY_SPECIAL_KEY0,"0"],
|
[Blockly.Msg.MIXLY_SPECIAL_KEY0,"0x00"],
|
||||||
['A', "0x04"],
|
['A', "0x04"],
|
||||||
['B', "0x05"],
|
['B', "0x05"],
|
||||||
['C', "0x06"],
|
['C', "0x06"],
|
||||||
@@ -1072,32 +1072,32 @@ export const general_key = {
|
|||||||
['X', "0x1B"],
|
['X', "0x1B"],
|
||||||
['Y', "0x1C"],
|
['Y', "0x1C"],
|
||||||
['Z', "0x1D"],
|
['Z', "0x1D"],
|
||||||
['1', "0x1E"],
|
['1 !', "0x1E"],
|
||||||
['2', "0x1F"],
|
['2 @', "0x1F"],
|
||||||
['3', "0x20"],
|
['3 #', "0x20"],
|
||||||
['4', "0x21"],
|
['4 $', "0x21"],
|
||||||
['5', "0x22"],
|
['5 %', "0x22"],
|
||||||
['6', "0x23"],
|
['6 ^', "0x23"],
|
||||||
['7', "0x24"],
|
['7 &', "0x24"],
|
||||||
['8', "0x25"],
|
['8 *', "0x25"],
|
||||||
['9', "0x26"],
|
['9 (', "0x26"],
|
||||||
['0', "0x27"],
|
['0 )', "0x27"],
|
||||||
['ENTER', "0x28"],
|
['ENTER', "0x28"],
|
||||||
['ESC', "0x29"],
|
['ESC', "0x29"],
|
||||||
['BACKSPACE', "0x2A"],
|
['BACKSPACE', "0x2A"],
|
||||||
['TAB', "0x2B"],
|
['TAB', "0x2B"],
|
||||||
['SPACE', "0x2C"],
|
['SPACE', "0x2C"],
|
||||||
['-', "0x2D"],
|
['- _', "0x2D"],
|
||||||
['=', "0x2E"],
|
['= +', "0x2E"],
|
||||||
['{', "0x2F"],
|
['[ {', "0x2F"],
|
||||||
['}', "0x30"],
|
['] }', "0x30"],
|
||||||
['\\', "0x31"],
|
['\\ |', "0x31"],
|
||||||
[';', "0x33"],
|
['; :', "0x33"],
|
||||||
['"', "0x34"],
|
["' "+' "', "0x34"],
|
||||||
['`', "0x35"],
|
['` ~', "0x35"],
|
||||||
[',', "0x36"],
|
[', <', "0x36"],
|
||||||
['.', "0x37"],
|
['. >', "0x37"],
|
||||||
['/', "0x38"],
|
['/ ?', "0x38"],
|
||||||
['CAPS_LOCK', "0x39"],
|
['CAPS_LOCK', "0x39"],
|
||||||
['F1', "0x3A"],
|
['F1', "0x3A"],
|
||||||
['F2', "0x3B"],
|
['F2', "0x3B"],
|
||||||
@@ -1332,10 +1332,10 @@ export const mouse_key = {
|
|||||||
this.appendDummyInput("")
|
this.appendDummyInput("")
|
||||||
.appendField(Blockly.Msg.MIXLY_MOUSE_KEYS)
|
.appendField(Blockly.Msg.MIXLY_MOUSE_KEYS)
|
||||||
.appendField(new Blockly.FieldDropdown([
|
.appendField(new Blockly.FieldDropdown([
|
||||||
[Blockly.Msg.MIXLY_SPECIAL_KEY0,"0"],
|
[Blockly.Msg.MIXLY_SPECIAL_KEY0,"0x00"],
|
||||||
[Blockly.Msg.MIXLY_MOUSE_LEFT_KEY, "1"],
|
[Blockly.Msg.MIXLY_MOUSE_LEFT_KEY, "0x01"],
|
||||||
[Blockly.Msg.MIXLY_MOUSE_RIGHT_KEY, "2"],
|
[Blockly.Msg.MIXLY_MOUSE_RIGHT_KEY, "0x02"],
|
||||||
[Blockly.Msg.MIXLY_MOUSE_MID_KEY, "4"]
|
[Blockly.Msg.MIXLY_MOUSE_MID_KEY, "0x04"]
|
||||||
]), 'op')
|
]), 'op')
|
||||||
this.setOutput(true);
|
this.setOutput(true);
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -320,14 +320,14 @@ class BOT035(FrameBuffer):
|
|||||||
print("Warning: Please upgrade the coprocessor firmware to use this feature")
|
print("Warning: Please upgrade the coprocessor firmware to use this feature")
|
||||||
|
|
||||||
"""Graph module"""
|
"""Graph module"""
|
||||||
HEART=b'\x00\x0c\x1e?~\xfc~?\x1e\x0c\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'
|
HEART_SMALL =b'\x00\x00\x0c\x1e<x<\x1e\x0c\x00\x00\x00'
|
||||||
HAPPY=b'\x00\x06\x06\x10 @@ \x10\x06\x06\x00'
|
HAPPY =b'\x00\x06\x06\x10 @@ \x10\x06\x06\x00'
|
||||||
SAD=b'\x04\x02\x02B \x10\x10 B\x02\x02\x04'
|
SAD =b'\x04\x02\x02B \x10\x10 B\x02\x02\x04'
|
||||||
SMILE=b'\x04\x02\x02$@\x80\x80@$\x02\x02\x04'
|
SMILE =b'\x04\x02\x02$@\x80\x80@$\x02\x02\x04'
|
||||||
ANGRY=b'\x01\x02\x84B!\x10\x10!B\x84\x02\x01'
|
ANGRY =b'\x01\x02\x84B!\x10\x10!B\x84\x02\x01'
|
||||||
NO=b'\x00\x00\x00B$\x18\x18$B\x00\x00\x00'
|
NO =b'\x00\x00\x00B$\x18\x18$B\x00\x00\x00'
|
||||||
YES=b'\x00\x00\x10 @@ \x10\x08\x04\x02\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_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_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'
|
DOOR_CLOSE =b'\x00\x00\xfe\x03\x03\x03\x13\x13\xff\xfe\x00\x00'
|
||||||
|
|||||||
@@ -125,15 +125,15 @@ class Button(KEYSensor):
|
|||||||
return not self.key.value()
|
return not self.key.value()
|
||||||
|
|
||||||
B1key = Button(9)
|
B1key = Button(9)
|
||||||
B2key = KEYSensor(0,0)
|
B2key = KEYSensor(0, 0)
|
||||||
A1key = KEYSensor(0,2100)
|
A1key = KEYSensor(0, 2100)
|
||||||
A2key = KEYSensor(0,1500)
|
A2key = KEYSensor(0, 1500)
|
||||||
A3key = KEYSensor(0,800)
|
A3key = KEYSensor(0, 800)
|
||||||
A4key = KEYSensor(0,2700)
|
A4key = KEYSensor(0, 2700)
|
||||||
|
|
||||||
'''2LED-Multiplex RGB'''
|
'''2LED-Multiplex RGB'''
|
||||||
class LED:
|
class LED:
|
||||||
def __init__(self, rgb, num=2, color=3):
|
def __init__(self, rgb, num=2, color=7):
|
||||||
self._rgb = rgb
|
self._rgb = rgb
|
||||||
self._col = [color] * num
|
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))
|
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))
|
||||||
|
|||||||
Reference in New Issue
Block a user