Fix: 修复arduino板卡下图形块显示异常

This commit is contained in:
王立帮
2024-08-13 13:48:43 +08:00
parent d7094cbc44
commit e13651c4ab
9 changed files with 71 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
<script defer=defer src=main.bundle.js></script><link href=styles/main.8fa91583.css rel=stylesheet><xml></xml> <script defer=defer src=main.bundle.js></script><link href=styles/main.39e10414.css rel=stylesheet><xml></xml>

File diff suppressed because one or more lines are too long

View File

@@ -32,7 +32,23 @@ export const ir_recv = {
//红外发射模块NEC //红外发射模块NEC
export const ir_send_nec = { export const ir_send_nec = {
init: function () { 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.setColour(COMMUNICATE_HUE);
this.appendDummyInput("") this.appendDummyInput("")
.appendField(Blockly.Msg.MIXLY_IR_SEND_NEC1) .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); this.setTooltip(Blockly.Msg.MIXLY_TOOLTIP_I2C_SLAVE_WRITE_ARRAY);
} }
}; };
// IIC从机读取字节数 // IIC从机读取字节数
export const i2c_howmany = { export const i2c_howmany = {
init: function () { init: function () {
@@ -289,10 +306,10 @@ export const i2c_master_writer = {
.appendField(Blockly.Msg.HTML_VALUE); .appendField(Blockly.Msg.HTML_VALUE);
this.setPreviousStatement(true); this.setPreviousStatement(true);
this.setNextStatement(true); this.setNextStatement(true);
this.setTooltip(Blockly.Msg.MIXLY_TOOLTIP_I2C_MASTER_WRITE); this.setTooltip(Blockly.Msg.MIXLY_TOOLTIP_I2C_MASTER_WRITE);
} }
}; };
export const i2c_master_reader = { export const i2c_master_reader = {
init: function () { init: function () {
this.setColour(COMMUNICATE_HUE); this.setColour(COMMUNICATE_HUE);
@@ -309,6 +326,7 @@ export const i2c_master_reader = {
this.setTooltip(Blockly.Msg.MIXLY_TOOLTIP_I2C_MASTER_READ); this.setTooltip(Blockly.Msg.MIXLY_TOOLTIP_I2C_MASTER_READ);
} }
}; };
export const i2c_master_reader2 = { export const i2c_master_reader2 = {
init: function () { init: function () {
this.setColour(COMMUNICATE_HUE); this.setColour(COMMUNICATE_HUE);
@@ -477,7 +495,6 @@ export const RFID_readcarddata = {
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_DATA_FROM) .appendField(Blockly.Msg.MIXLY_COMMUNICATION_DATA_FROM)
this.setOutput(true, Number); this.setOutput(true, Number);
this.setTooltip(Blockly.Msg.MIXLY_TOOLTIP_RFID_READBLOCK); this.setTooltip(Blockly.Msg.MIXLY_TOOLTIP_RFID_READBLOCK);
} }
}; };

View File

@@ -747,7 +747,13 @@ export const WeatherGetToday = {
this.setColour(ETHERNET_HUE); this.setColour(ETHERNET_HUE);
this.appendDummyInput("") this.appendDummyInput("")
.appendField(Blockly.Msg.WeatherGetToday) .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.setOutput(true, Number);
this.setTooltip("返回对应数据 字符串型。"); this.setTooltip("返回对应数据 字符串型。");
} }
@@ -759,7 +765,17 @@ export const WeatherGetForecast = {
this.setColour(ETHERNET_HUE); this.setColour(ETHERNET_HUE);
this.appendDummyInput("") this.appendDummyInput("")
.appendField(Blockly.Msg.WeatherGetForecast) .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) this.appendValueInput('date', Number)
.appendField(Blockly.Msg.MIXLY_GPS_DATE + '(0~14)'); .appendField(Blockly.Msg.MIXLY_GPS_DATE + '(0~14)');
this.setOutput(true, Number); this.setOutput(true, Number);

View File

@@ -24,6 +24,9 @@ ZhHant.MSG = {
catSocket: "無線插座", catSocket: "無線插座",
catRFID: "RFID", catRFID: "RFID",
catStorage: "存儲", catStorage: "存儲",
catStorageSD: 'SD',
catStorageSPIFFS: 'SPIFFS',
catStorageEEPROM: 'EEPROM',
catME_GO:"ME GO", catME_GO:"ME GO",
catME_G1:"ME G1", catME_G1:"ME G1",
catPE_G1:"PE G1", catPE_G1:"PE G1",
@@ -3003,6 +3006,21 @@ ZhHant.MIXLY_SD_clusterCount = "簇數";
ZhHant.MIXLY_SD_blocksPerCluster = "每簇扇區數"; ZhHant.MIXLY_SD_blocksPerCluster = "每簇扇區數";
ZhHant.MIXLY_SD_TOTAL_blocks = "總扇區數"; ZhHant.MIXLY_SD_TOTAL_blocks = "總扇區數";
ZhHant.MIXLY_PRINT_INLINE = "不換行"; ZhHant.MIXLY_PRINT_INLINE = "不換行";
ZhHant.MIXLY_STM32_TFT_GREENTAB = "綠色標籤";
ZhHant.MIXLY_STM32_TFT_REDTAB = "紅色標籤";
ZhHant.MIXLY_STM32_TFT_BLACKTAB = "黑色標籤";
ZhHant.MIXLY_STM32_TFT_FONT_COLOR = "字體顏色";
ZhHant.MIXLY_STM32_TFT_BACKGROUND_COLOR = "背景顏色";
ZhHant.MIXLY_STM32_TFT_BACKGROUND = "背景";
ZhHant.MIXLY_STM32_TFT_SIZE = "尺寸";
ZhHant.MIXLY_TOOLTIP_STORE_EEPROM_PUT = '寫入任何類型資料到EEPROM特定位址';
ZhHant.MIXLY_TOOLTIP_STORE_EEPROM_GET = '從EEPROM的特定位址讀取任何類型資料';
ZhHant.MIXLY_WIFI_LINK_DEVICE = '連結設備';
ZhHant.MIXLY_STM32_SPI_REMAP = '重新映射';
ZhHant.MIXLY_RFID_READ_CARD_UID = '讀取卡號';
ZhHant.MIXLY_RFID_WRITE_CARD = '寫卡片';
ZhHant.MIXLY_RFID_READ_CARD = '讀卡';
ZhHant.MIXLY_RFID_BYTE_ARRAY = '位元組陣列';
ZhHant.MIXLY_STM32_OLED_DRAW_ARC = "畫圓弧"; ZhHant.MIXLY_STM32_OLED_DRAW_ARC = "畫圓弧";
ZhHant.MIXLY_STM32_OLED_ARC = "弧段"; ZhHant.MIXLY_STM32_OLED_ARC = "弧段";
ZhHant.MIXLY_NominalResistance = '常溫電阻值'; ZhHant.MIXLY_NominalResistance = '常溫電阻值';
@@ -3082,6 +3100,18 @@ ZhHant.ADS1015_Get_Value = 'ADS1015模数转换模块';
ZhHant.ADS1015_setGain = "ADS1015采样范围和精度"; ZhHant.ADS1015_setGain = "ADS1015采样范围和精度";
ZhHant.MIXLY_MP3_UDISK = '优盘'; ZhHant.MIXLY_MP3_UDISK = '优盘';
ZhHant.MIXLY_MP3_SOURCE = '播放来源'; ZhHant.MIXLY_MP3_SOURCE = '播放来源';
ZhHant.MIXLY_DewPoint = '結露點';
ZhHant.WeatherGet = '刷新天氣 城市 ';
ZhHant.WeatherGetToday = '取得今日資料';
ZhHant.TodayQuality = '空氣品質';
ZhHant.WeatherGetForecast = '取得15日報資料';
ZhHant.ForecastHigh = '最高溫度';
ZhHant.ForecastLow = '最低溫度';
ZhHant.ForecastYmd = '年月日';
ZhHant.ForecastAqi = '空氣指數';
ZhHant.ForecastFx = '風向';
ZhHant.ForecastFl = '風力';
ZhHant.ForecastType = '天氣';
ZhHant.SPACE_ALLOCATION = '空間分配'; ZhHant.SPACE_ALLOCATION = '空間分配';
ZhHant.MIXLY_IR_RANGE = '雙紅外測距'; ZhHant.MIXLY_IR_RANGE = '雙紅外測距';
ZhHant.MIXLY_LASER_RANGE = '鐳射測距儀'; ZhHant.MIXLY_LASER_RANGE = '鐳射測距儀';