Fix: 修复arduino板卡下图形块显示异常
This commit is contained in:
@@ -32,7 +32,23 @@ export const ir_recv = {
|
||||
//红外发射模块(NEC)
|
||||
export const ir_send_nec = {
|
||||
init: function () {
|
||||
var TYPE = [['RC5', 'RC5'], ['RC6', 'RC6'], ['NEC', 'NEC'], ['Sony', 'Sony'], ['Panasonic', 'Panasonic'], ['JVC', 'JVC'], ['SAMSUNG', 'SAMSUNG'], ['Whynter', 'Whynter'], ['AiwaRCT501', 'AiwaRCT501'], ['LG', 'LG'], ['Sanyo', 'Sanyo'], ['Mitsubishi', 'Mitsubishi'], ['DISH', 'DISH'], ['SharpRaw', 'SharpRaw'], ['Denon', 'Denon']];
|
||||
var TYPE = [
|
||||
['RC5', 'RC5'],
|
||||
['RC6', 'RC6'],
|
||||
['NEC', 'NEC'],
|
||||
['Sony', 'Sony'],
|
||||
['Panasonic', 'Panasonic'],
|
||||
['JVC', 'JVC'],
|
||||
['SAMSUNG', 'SAMSUNG'],
|
||||
['Whynter', 'Whynter'],
|
||||
['AiwaRCT501', 'AiwaRCT501'],
|
||||
['LG', 'LG'],
|
||||
['Sanyo', 'Sanyo'],
|
||||
['Mitsubishi', 'Mitsubishi'],
|
||||
['DISH', 'DISH'],
|
||||
['SharpRaw', 'SharpRaw'],
|
||||
['Denon', 'Denon']
|
||||
];
|
||||
this.setColour(COMMUNICATE_HUE);
|
||||
this.appendDummyInput("")
|
||||
.appendField(Blockly.Msg.MIXLY_IR_SEND_NEC1)
|
||||
@@ -185,6 +201,7 @@ export const i2c_slave_write_array = {
|
||||
this.setTooltip(Blockly.Msg.MIXLY_TOOLTIP_I2C_SLAVE_WRITE_ARRAY);
|
||||
}
|
||||
};
|
||||
|
||||
// IIC从机读取字节数
|
||||
export const i2c_howmany = {
|
||||
init: function () {
|
||||
@@ -289,10 +306,10 @@ export const i2c_master_writer = {
|
||||
.appendField(Blockly.Msg.HTML_VALUE);
|
||||
this.setPreviousStatement(true);
|
||||
this.setNextStatement(true);
|
||||
|
||||
this.setTooltip(Blockly.Msg.MIXLY_TOOLTIP_I2C_MASTER_WRITE);
|
||||
}
|
||||
};
|
||||
|
||||
export const i2c_master_reader = {
|
||||
init: function () {
|
||||
this.setColour(COMMUNICATE_HUE);
|
||||
@@ -309,6 +326,7 @@ export const i2c_master_reader = {
|
||||
this.setTooltip(Blockly.Msg.MIXLY_TOOLTIP_I2C_MASTER_READ);
|
||||
}
|
||||
};
|
||||
|
||||
export const i2c_master_reader2 = {
|
||||
init: function () {
|
||||
this.setColour(COMMUNICATE_HUE);
|
||||
@@ -477,7 +495,6 @@ export const RFID_readcarddata = {
|
||||
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_DATA_FROM)
|
||||
this.setOutput(true, Number);
|
||||
this.setTooltip(Blockly.Msg.MIXLY_TOOLTIP_RFID_READBLOCK);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -747,7 +747,13 @@ export const WeatherGetToday = {
|
||||
this.setColour(ETHERNET_HUE);
|
||||
this.appendDummyInput("")
|
||||
.appendField(Blockly.Msg.WeatherGetToday)
|
||||
.appendField(new Blockly.FieldDropdown([[Blockly.Msg.MIXLY_Humidity, "0"], ['PM2.5', "1"], ['PM1.0', "2"], [Blockly.Msg.TodayQuality, "3"], [Blockly.Msg.MIXLY_TEMPERATURE, "4"]]), "type");
|
||||
.appendField(new Blockly.FieldDropdown([
|
||||
[Blockly.Msg.MIXLY_Humidity, "0"],
|
||||
['PM2.5', "1"],
|
||||
['PM1.0', "2"],
|
||||
[Blockly.Msg.TodayQuality, "3"],
|
||||
[Blockly.Msg.MIXLY_TEMPERATURE, "4"]
|
||||
]), "type");
|
||||
this.setOutput(true, Number);
|
||||
this.setTooltip("返回对应数据 字符串型。");
|
||||
}
|
||||
@@ -759,7 +765,17 @@ export const WeatherGetForecast = {
|
||||
this.setColour(ETHERNET_HUE);
|
||||
this.appendDummyInput("")
|
||||
.appendField(Blockly.Msg.WeatherGetForecast)
|
||||
.appendField(new Blockly.FieldDropdown([[Blockly.Msg.MIXLY_GPS_DATE, "ForecastDate"], [Blockly.Msg.ForecastHigh, "ForecastHigh"], [Blockly.Msg.ForecastLow, "ForecastLow"], [Blockly.Msg.ForecastYmd, "ForecastYmd"], [Blockly.Msg.MIXLY_WEEK, "ForecastWeek"], [Blockly.Msg.ForecastAqi, "ForecastAqi"], [Blockly.Msg.ForecastFx, "ForecastFx"], [Blockly.Msg.ForecastFl, "ForecastFl"], [Blockly.Msg.ForecastType, "ForecastType"]]), "type");
|
||||
.appendField(new Blockly.FieldDropdown([
|
||||
[Blockly.Msg.MIXLY_GPS_DATE, "ForecastDate"],
|
||||
[Blockly.Msg.ForecastHigh, "ForecastHigh"],
|
||||
[Blockly.Msg.ForecastLow, "ForecastLow"],
|
||||
[Blockly.Msg.ForecastYmd, "ForecastYmd"],
|
||||
[Blockly.Msg.MIXLY_WEEK, "ForecastWeek"],
|
||||
[Blockly.Msg.ForecastAqi, "ForecastAqi"],
|
||||
[Blockly.Msg.ForecastFx, "ForecastFx"],
|
||||
[Blockly.Msg.ForecastFl, "ForecastFl"],
|
||||
[Blockly.Msg.ForecastType, "ForecastType"]
|
||||
]), "type");
|
||||
this.appendValueInput('date', Number)
|
||||
.appendField(Blockly.Msg.MIXLY_GPS_DATE + '(0~14)');
|
||||
this.setOutput(true, Number);
|
||||
|
||||
Reference in New Issue
Block a user