From d7094cbc4403be647d51d8a7b3b245eaaa59010a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E7=AB=8B=E5=B8=AE?= <3294713004@qq.com>
Date: Tue, 13 Aug 2024 12:47:59 +0800
Subject: [PATCH] =?UTF-8?q?Fix:=20=E4=BF=AE=E5=A4=8Darduino=E6=9D=BF?=
=?UTF-8?q?=E5=8D=A1=E4=B8=8B=E5=9B=BE=E5=BD=A2=E5=9D=97=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=E5=BC=82=E5=B8=B8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
boards/default/arduino_avr/index.xml | 2 +-
.../{main.54c4f251.css => main.b1e92ec9.css} | 0
boards/default/arduino_esp32/index.xml | 2 +-
.../{main.bc297e32.css => main.8fa91583.css} | 0
boards/default/arduino_esp8266/index.xml | 2 +-
.../{main.feeb1aca.css => main.9297710f.css} | 0
.../default_src/arduino_avr/blocks/sensor.js | 91 ++++++++++---------
common/msg/blockly/zh-hant.js | 1 +
8 files changed, 53 insertions(+), 45 deletions(-)
rename boards/default/arduino_avr/styles/{main.54c4f251.css => main.b1e92ec9.css} (100%)
rename boards/default/arduino_esp32/styles/{main.bc297e32.css => main.8fa91583.css} (100%)
rename boards/default/arduino_esp8266/styles/{main.feeb1aca.css => main.9297710f.css} (100%)
diff --git a/boards/default/arduino_avr/index.xml b/boards/default/arduino_avr/index.xml
index 0e9433f8..94877c9d 100644
--- a/boards/default/arduino_avr/index.xml
+++ b/boards/default/arduino_avr/index.xml
@@ -1 +1 @@
-0010000000100011015001100010001100011001item++item12997millis11001100110011000helloaHelloMixlyABC123Mixlyysubstring036.6662StringStringsQStringsubstringsubstringsubstring0xff0000223a0hellohello000intmylist012123234array22{0,0},{0,0}array000array00array9600Serialprintln0a23220x77100003950100000x5A2345671201992230234A4A5800202011Jan/01/202020201112:34:56800DATE234567894800WHILElocationSeriallocation.latSeriallocation.lng45610054100100200215002121001012341001010100045452454545201000mySerial1011mySerial9600myPlayermySerial50015myPlayer0DFPLAYER_EQ_NORMALmyPlayer2DFPLAYER_DEVICE_SD1111myPlayerreadFileCounts2DFPLAYER_DEVICE_SD1#ff000000024220210002102552552220220clearabcd20234512300x2778910111211mylcd011clear910833ccff0000#000000TRUESTHeiti16米思齐0016480xFCDF33ccff02033ccff02033ccff12340000bitmap1643233ccff11152033ccff113033ccff11102033ccff111020333ccff3030633ccff1455453384333ccff0x3CSSD1306_128X64_NONAMEU8G2_R01098U8G2_R010U8G2_R0234567891011page10201234bitmap96TRUE122STHeiti164816米思齐0012864bitmap110020002064321115201130111020111020330306303061514554533843911111111Mixly300Mixly05ir_item0SerialprintlnHEXir_item30x89ABCDEF3233380800000000array1howMany10010AASPDRSPDR1013111291mylist161mylist164fileName.txtfileName.txtfileName.txtfileName.txthello worldTRUE000itemd9efdd0413ec4b74ab0057a0b8675654nd9efdd0413ec4b74ab0057a0b8675654wifi-ssidwifi-pass59d948d79fe642aab95c1577b1ad419d10V0Serialvpin_value1000V00#ff00000#ff0000example@blynk.ccSubjectContentNotifyV0Serialterminal_textHello,World!V0SerialhourSerialminuteSerialsecondV000923http://yourvideostream.urlTest rowhelloV0SerialindexSerialselectedV0SerialindexFromSerialindexTo0NameJohn0NameJohn000V0V00BLYNK_CONNECTEDV0n2KlfPGDyjDBluNi1G9DG5OEjqDT996L00BLYNK_CONNECTED10V0actionStringEQactionplayplay();45EQactionstoppause();45EQactionnextnext();45EQactionprevprev();45V0SeriallxV0SerialxSerialySerialzV0SerialxSerialySerialzV0
\ No newline at end of file
+0010000000100011015001100010001100011001item++item12997millis11001100110011000helloaHelloMixlyABC123Mixlyysubstring036.6662StringStringsQStringsubstringsubstringsubstring0xff0000223a0hellohello000intmylist012123234array22{0,0},{0,0}array000array00array9600Serialprintln0a23220x77100003950100000x5A2345671201992230234A4A5800202011Jan/01/202020201112:34:56800DATE234567894800WHILElocationSeriallocation.latSeriallocation.lng45610054100100200215002121001012341001010100045452454545201000mySerial1011mySerial9600myPlayermySerial50015myPlayer0DFPLAYER_EQ_NORMALmyPlayer2DFPLAYER_DEVICE_SD1111myPlayerreadFileCounts2DFPLAYER_DEVICE_SD1#ff000000024220210002102552552220220clearabcd20234512300x2778910111211mylcd011clear910833ccff0000#000000TRUESTHeiti16米思齐0016480xFCDF33ccff02033ccff02033ccff12340000bitmap1643233ccff11152033ccff113033ccff11102033ccff111020333ccff3030633ccff1455453384333ccff0x3CSSD1306_128X64_NONAMEU8G2_R01098U8G2_R010U8G2_R0234567891011page10201234bitmap96TRUE122STHeiti164816米思齐0012864bitmap110020002064321115201130111020111020330306303061514554533843911111111Mixly300Mixly05ir_item0SerialprintlnHEXir_item30x89ABCDEF3233380800000000array1howMany10010AASPDRSPDR1013111291mylist161mylist164fileName.txtfileName.txtfileName.txtfileName.txthello worldTRUE000itemd9efdd0413ec4b74ab0057a0b8675654nd9efdd0413ec4b74ab0057a0b8675654wifi-ssidwifi-pass59d948d79fe642aab95c1577b1ad419d10V0Serialvpin_value1000V00#ff00000#ff0000example@blynk.ccSubjectContentNotifyV0Serialterminal_textHello,World!V0SerialhourSerialminuteSerialsecondV000923http://yourvideostream.urlTest rowhelloV0SerialindexSerialselectedV0SerialindexFromSerialindexTo0NameJohn0NameJohn000V0V00BLYNK_CONNECTEDV0n2KlfPGDyjDBluNi1G9DG5OEjqDT996L00BLYNK_CONNECTED10V0actionStringEQactionplayplay();45EQactionstoppause();45EQactionnextnext();45EQactionprevprev();45V0SeriallxV0SerialxSerialySerialzV0SerialxSerialySerialzV0
\ No newline at end of file
diff --git a/boards/default/arduino_avr/styles/main.54c4f251.css b/boards/default/arduino_avr/styles/main.b1e92ec9.css
similarity index 100%
rename from boards/default/arduino_avr/styles/main.54c4f251.css
rename to boards/default/arduino_avr/styles/main.b1e92ec9.css
diff --git a/boards/default/arduino_esp32/index.xml b/boards/default/arduino_esp32/index.xml
index 86a4e8a1..56217134 100644
--- a/boards/default/arduino_esp32/index.xml
+++ b/boards/default/arduino_esp32/index.xml
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/boards/default/arduino_esp32/styles/main.bc297e32.css b/boards/default/arduino_esp32/styles/main.8fa91583.css
similarity index 100%
rename from boards/default/arduino_esp32/styles/main.bc297e32.css
rename to boards/default/arduino_esp32/styles/main.8fa91583.css
diff --git a/boards/default/arduino_esp8266/index.xml b/boards/default/arduino_esp8266/index.xml
index e4df4531..51167cec 100644
--- a/boards/default/arduino_esp8266/index.xml
+++ b/boards/default/arduino_esp8266/index.xml
@@ -1 +1 @@
-01000000010001101110001000111001item++item12997millis11001100110011000helloaHelloMixlyABC123Mixlyysubstring036.6662StringStringsQStringsubstringsubstringsubstring0xff0000223a0hellohello000intmylist012123234array22{0,0},{0,0}array000array00array96000a0x77100003950100000x5A2345671201992240234SDASCL800202011Jan/01/202020201112:34:568000245121314154800WHILElocationSeriallocation.latSeriallocation.lng45610054100100100001500121001012341001010100045452454545208830801000mySerial1011mySerial9600myPlayermySerial50015myPlayer0DFPLAYER_EQ_NORMALmyPlayer2DFPLAYER_DEVICE_SD1111myPlayerreadFileCounts2DFPLAYER_DEVICE_SD1#ff000000042020100010255255202020clearabcd20234530012300x270245121311mylcd011clear0x3CSSD1306_128X64_NONAMEU8G2_R01098U8G2_R010page1timR08_tr0201234bitmap96TRUE122STHeiti16hz_up0hz_left04816TRUE米思齐0012864bitmap1100200020643211152011301110201110203303063030615145545338431211SDASCL111111Mixly300Mixly05ir_item0SerialprintlnHEXir_item32021mylist161mylist164fileName.txtfileName.txtfileName.txtfileName.txthello worldTRUE000itemssidpasswordntp1.aliyun.com860030:AE:A4:58:9D:7CrandomMixly1100SerialSent with successSerialError sending the dataSerialmessagehttp://jsonplaceholder.typicode.com/posts/1SerialRequest_resultSerialInvalid response!http://jsonplaceholder.typicode.com/posts/1{\"name\":\"Mixly\"}SerialRequest_resultSerialInvalid response!0d9efdd0413ec4b74ab0057a0b8675654wifi-ssidwifi-passd9efdd0413ec4b74ab0057a0b8675654d9efdd0413ec4b74ab0057a0b8675654V0Serialvpin_valueV01000V00#ff00000#ff0000example@blynk.ccSubjectContentNotifyV0Serialterminal_textHello,World!V0SerialhourSerialminuteSerialsecondV000923http://yourvideostream.urlTest rowhelloV0SerialindexSerialselectedV0SerialindexFromSerialindexTo0NameJohn0NameJohn000BLYNK_CONNECTEDV0n2KlfPGDyjDBluNi1G9DG5OEjqDT996L00BLYNK_CONNECTED10V0actionStringEQactionplayplay();45EQactionstoppause();45EQactionnextnext();45EQactionprevprev();45V0SeriallxV0SerialxSerialySerialzV0SerialxSerialySerialzV039.98.114.1221883IDsiotsiot120Topic_0Serialmixio.mixly.cn188312345678@qq.comd86d2e60b813590963e2641b44945154testtextSerialprintlnmqtt_dataHellotext
\ No newline at end of file
+01000000010001101110001000111001item++item12997millis11001100110011000helloaHelloMixlyABC123Mixlyysubstring036.6662StringStringsQStringsubstringsubstringsubstring0xff0000223a0hellohello000intmylist012123234array22{0,0},{0,0}array000array00array96000a0x77100003950100000x5A2345671201992240234SDASCL800202011Jan/01/202020201112:34:568000245121314154800WHILElocationSeriallocation.latSeriallocation.lng45610054100100100001500121001012341001010100045452454545208830801000mySerial1011mySerial9600myPlayermySerial50015myPlayer0DFPLAYER_EQ_NORMALmyPlayer2DFPLAYER_DEVICE_SD1111myPlayerreadFileCounts2DFPLAYER_DEVICE_SD1#ff000000042020100010255255202020clearabcd20234530012300x270245121311mylcd011clear0x3CSSD1306_128X64_NONAMEU8G2_R01098U8G2_R010page1timR08_tr0201234bitmap96TRUE122STHeiti16hz_up0hz_left04816TRUE米思齐0012864bitmap1100200020643211152011301110201110203303063030615145545338431211SDASCL111111Mixly300Mixly05ir_item0SerialprintlnHEXir_item32021mylist161mylist164fileName.txtfileName.txtfileName.txtfileName.txthello worldTRUE000itemssidpasswordntp1.aliyun.com860030:AE:A4:58:9D:7CrandomMixly1100SerialSent with successSerialError sending the dataSerialmessagehttp://jsonplaceholder.typicode.com/posts/1SerialRequest_resultSerialInvalid response!http://jsonplaceholder.typicode.com/posts/1{\"name\":\"Mixly\"}SerialRequest_resultSerialInvalid response!0d9efdd0413ec4b74ab0057a0b8675654wifi-ssidwifi-passd9efdd0413ec4b74ab0057a0b8675654d9efdd0413ec4b74ab0057a0b8675654V0Serialvpin_valueV01000V00#ff00000#ff0000example@blynk.ccSubjectContentNotifyV0Serialterminal_textHello,World!V0SerialhourSerialminuteSerialsecondV000923http://yourvideostream.urlTest rowhelloV0SerialindexSerialselectedV0SerialindexFromSerialindexTo0NameJohn0NameJohn000BLYNK_CONNECTEDV0n2KlfPGDyjDBluNi1G9DG5OEjqDT996L00BLYNK_CONNECTED10V0actionStringEQactionplayplay();45EQactionstoppause();45EQactionnextnext();45EQactionprevprev();45V0SeriallxV0SerialxSerialySerialzV0SerialxSerialySerialzV039.98.114.1221883IDsiotsiot120Topic_0Serialmixio.mixly.cn188312345678@qq.comd86d2e60b813590963e2641b44945154testtextSerialprintlnmqtt_dataHellotext
\ No newline at end of file
diff --git a/boards/default/arduino_esp8266/styles/main.feeb1aca.css b/boards/default/arduino_esp8266/styles/main.9297710f.css
similarity index 100%
rename from boards/default/arduino_esp8266/styles/main.feeb1aca.css
rename to boards/default/arduino_esp8266/styles/main.9297710f.css
diff --git a/boards/default_src/arduino_avr/blocks/sensor.js b/boards/default_src/arduino_avr/blocks/sensor.js
index 114ee5ff..c40190f9 100644
--- a/boards/default_src/arduino_avr/blocks/sensor.js
+++ b/boards/default_src/arduino_avr/blocks/sensor.js
@@ -48,7 +48,11 @@ export const gps_xxx_isValid = {
this.setColour(SENSOR_HUE);
this.appendDummyInput()
.appendField("GPS")
- .appendField(new Blockly.FieldDropdown([[Blockly.Msg.MIXLY_GPS_LOCATION, "location"], [Blockly.Msg.MIXLY_GPS_DATE, "date"], [Blockly.Msg.MIXLY_GPS_TIME, "time"]]), "WHAT")
+ .appendField(new Blockly.FieldDropdown([
+ [Blockly.Msg.MIXLY_GPS_LOCATION, "location"],
+ [Blockly.Msg.MIXLY_GPS_DATE, "date"],
+ [Blockly.Msg.MIXLY_GPS_TIME, "time"]
+ ]), "WHAT")
.appendField(Blockly.Msg.MIXLY_GPS_ISVALID);
this.setOutput(true, Boolean);
this.setTooltip(Blockly.Msg.MIXLY_TOOLTIP_GPS_DATA_VAILD);
@@ -60,7 +64,17 @@ export const gps_getData_xxx = {
this.setColour(SENSOR_HUE);
this.appendDummyInput()
.appendField(Blockly.Msg.MIXLY_GPS_GET)
- .appendField(new Blockly.FieldDropdown([[Blockly.Msg.MIXLY_GPS_LOCATION_LAT, "location.lat"], [Blockly.Msg.MIXLY_GPS_LOCATION_LNG, "location.lng"], [Blockly.Msg.MIXLY_GPS_DATE_YEAR, "date.year"], [Blockly.Msg.MIXLY_GPS_DATE_MONTH, "date.month"], [Blockly.Msg.MIXLY_GPS_DATE_DAY, "date.day"], [Blockly.Msg.MIXLY_GPS_TIME_HOUR, "time.hour"], [Blockly.Msg.MIXLY_GPS_TIME_MINUTE, "time.minute"], [Blockly.Msg.MIXLY_GPS_TIME_SECOND, "time.second"], [Blockly.Msg.MIXLY_GPS_TIME_CENTISECOND, "time.centisecond"]]), "WHAT");
+ .appendField(new Blockly.FieldDropdown([
+ [Blockly.Msg.MIXLY_GPS_LOCATION_LAT, "location.lat"],
+ [Blockly.Msg.MIXLY_GPS_LOCATION_LNG, "location.lng"],
+ [Blockly.Msg.MIXLY_GPS_DATE_YEAR, "date.year"],
+ [Blockly.Msg.MIXLY_GPS_DATE_MONTH, "date.month"],
+ [Blockly.Msg.MIXLY_GPS_DATE_DAY, "date.day"],
+ [Blockly.Msg.MIXLY_GPS_TIME_HOUR, "time.hour"],
+ [Blockly.Msg.MIXLY_GPS_TIME_MINUTE, "time.minute"],
+ [Blockly.Msg.MIXLY_GPS_TIME_SECOND, "time.second"],
+ [Blockly.Msg.MIXLY_GPS_TIME_CENTISECOND, "time.centisecond"]
+ ]), "WHAT");
this.setOutput(true, Number);
this.setTooltip(Blockly.Msg.MIXLY_TOOLTIP_GPS_GETDATA.replace('%1', this.getFieldValue('WHAT')));
}
@@ -121,6 +135,7 @@ export const LM35 = {
this.setTooltip(Blockly.Msg.MIXLY_TOOLTIP_LM35);
}
};
+
//DS18B20温度传感器
export const ds18b20 = {
init: function () {
@@ -135,6 +150,7 @@ export const ds18b20 = {
this.setTooltip(Blockly.Msg.MIXLY_TOOLTIP_DS18);
}
};
+
//初始化MLX90614红外测温传感器
export const mlx90614_init = {
init: function () {
@@ -150,6 +166,7 @@ export const mlx90614_init = {
this.setHelpUrl("");
}
};
+
//MLX90614获取数据
export const mlx90614_get_data = {
init: function () {
@@ -169,6 +186,7 @@ export const mlx90614_get_data = {
this.setHelpUrl("");
}
};
+
//DF称重模块
export const weightSensor = {
init: function () {
@@ -191,6 +209,7 @@ export const weightSensor = {
// this.setFieldValue("4","SCK");
}
};
+
//DS1302 RTC
export const DS1302_init = {
init: function () {
@@ -237,43 +256,9 @@ export const DS1307_init = {
this.setNextStatement(true, null);
this.setInputsInline(true);
this.setTooltip(Blockly.Msg.MIXLY_TOOLTIP_DS1307_INIT);
- },
- //mutation有问题,暂时弃用
- /*mutationToDom: function() {
- var container = document.createElement('mutation');
- var RTCType = (this.getFieldValue('RTCType') == 'DS1302');
- console.log('======change in mutationToDom==========')
- console.log(RTCType);
- container.setAttribute('RTCType', RTCType);
- return container;
- },
- domToMutation: function(xmlElement) {
- var type = (xmlElement.getAttribute('RTCType') == 'true');
- console.log('======change in domToMutation==========')
- console.log(type);
- this.updateShape_(type);
- },
- updateShape_: function(type) {
- // Add or remove reset pin.
- console.log('======change in updateShape_==========')
- console.log(type);
- if (type) {
- console.log('why not me?')
- this.appendValueInput("RST")
- .appendField("RST#")
- .setCheck(Number);
- } else{
- /*if (this.childBlocks_.length > 0) {
- if (this.childBlocks_[length-1].type == 'Number') {
- this.childBlocks_[length-1].unplug();
- break;
- }
- }
- this.removeInput('RST');
}
- }*/
-
};
+
//传感器-实时时钟块_时间变量
var RTC_TIME_TYPE = [
[Blockly.Msg.MIXLY_YEAR, "Year"],
@@ -286,7 +271,6 @@ var RTC_TIME_TYPE = [
];
-
//传感器-实时时钟块_获取时间
export const RTC_get_time = {
init: function () {
@@ -305,6 +289,7 @@ export const RTC_get_time = {
this.setTooltip(Blockly.Msg.MIXLY_TOOLTIP_RTC_GETTIME.replace('%1', this.getFieldValue("TIME_TYPE")));
}
};
+
// //传感器-实时时钟块_设置时间
export const RTC_time = {
init: function () {
@@ -347,6 +332,7 @@ export const RTC_date = {
this.setTooltip(Blockly.Msg.MIXLY_TOOLTIP_RTC_SETTIME);
}
};
+
//设置时间
export const RTC_set_time = {
init: function () {
@@ -364,6 +350,7 @@ export const RTC_set_time = {
this.setHelpUrl("");
}
};
+
//获取烧录时间和日期
export const get_system_date_time = {
init: function () {
@@ -377,6 +364,7 @@ export const get_system_date_time = {
this.setHelpUrl("");
}
};
+
//传感器-实时时钟块_设置日期
export const RTC_set_date = {
init: function () {
@@ -396,6 +384,7 @@ var SHT20_TYPE = [
[Blockly.Msg.MIXLY_TEMPERATURE, "sht20.readTemperature()"],
[Blockly.Msg.MIXLY_Humidity, "sht20.readHumidity()"],
];
+
export const SHT20 = {
init: function () {
this.setColour(SENSOR_HUE);
@@ -409,6 +398,7 @@ export const SHT20 = {
this.setTooltip();
}
};
+
var ADXL345_GETAB = [
[Blockly.Msg.MixGo_MPU9250_AX, "accel.getAccelerationX()"],
[Blockly.Msg.MixGo_MPU9250_AY, "accel.getAccelerationY()"],
@@ -417,6 +407,7 @@ var ADXL345_GETAB = [
[Blockly.Msg.MixGo_MPU9250_AY + "(g)", "accel.getAccelerationY()/256.0"],
[Blockly.Msg.MixGo_MPU9250_AZ + "(g)", "accel.getAccelerationZ()/256.0"],
];
+
//传感器-重力感应块-获取数据
export const ADXL345 = {
init: function () {
@@ -431,12 +422,14 @@ export const ADXL345 = {
this.setTooltip();
}
};
+
var LIS3DHTR_GETDATA = [
[Blockly.Msg.MixGo_MPU9250_AX, "LIS.getAccelerationX()"],
[Blockly.Msg.MixGo_MPU9250_AY, "LIS.getAccelerationY()"],
[Blockly.Msg.MixGo_MPU9250_AZ, "LIS.getAccelerationZ()"],
[Blockly.Msg.MIXLY_TEMPERATURE, "LIS.getTemperature()"],
];
+
export const LIS3DHTR = {
init: function () {
this.setColour(SENSOR_HUE);
@@ -450,6 +443,7 @@ export const LIS3DHTR = {
this.setTooltip();
}
};
+
export const ADXL345_setOffset = {
init: function () {
this.setColour(SENSOR_HUE);
@@ -507,6 +501,7 @@ var Encoder_NO = [
[Blockly.Msg.MIXLY_ENCODER + 3, "3"],
[Blockly.Msg.MIXLY_ENCODER + 4, "4"]
];
+
//旋转编码器定义
export const encoder_init = {
init: function () {
@@ -760,6 +755,7 @@ export const PS2_init = {
this.setFieldValue("12", "PS2_CLK");
}
};
+
export const PS2_update = {
init: function () {
this.setColour(SENSOR_HUE);
@@ -770,6 +766,7 @@ export const PS2_update = {
this.setInputsInline(true);
}
};
+
var PSBUTTON = [
[Blockly.Msg.PS2_TRIANGLE, "PSB_GREEN"],
[Blockly.Msg.PS2_CIRCLE, "PSB_RED"],
@@ -875,7 +872,11 @@ export const tcs230_Get_RGB = {
this.appendDummyInput()
.appendField("TCS230")
.appendField(Blockly.Msg.MIXLY_GET)
- .appendField(new Blockly.FieldDropdown([[Blockly.Msg.COLOUR_RGB_RED, "R"], [Blockly.Msg.COLOUR_RGB_GREEN, "G"], [Blockly.Msg.COLOUR_RGB_BLUE, "B"]]), "tcs230_color");
+ .appendField(new Blockly.FieldDropdown([
+ [Blockly.Msg.COLOUR_RGB_RED, "R"],
+ [Blockly.Msg.COLOUR_RGB_GREEN, "G"],
+ [Blockly.Msg.COLOUR_RGB_BLUE, "B"]
+ ]), "tcs230_color");
this.setInputsInline(true);
this.setOutput(true, null);
this.setColour(SENSOR_HUE);
@@ -1034,7 +1035,6 @@ export const arduino_keypad_event = {
}
};
-
var MixGo_MPU9250_GETAB = [
[Blockly.Msg.MixGo_MPU9250_AX, "a"],
[Blockly.Msg.MixGo_MPU9250_AY, "b"],
@@ -1092,8 +1092,15 @@ export const NTC_TEMP = {
export const AHT20_21 = {
init: function () {
this.setColour(SENSOR_HUE);
- this.appendDummyInput("").appendField("AHT20/21" + Blockly.Msg.MIXLY_TEM_HUM)
- this.appendDummyInput("").setAlign(Blockly.inputs.Align.RIGHT).appendField(new Blockly.FieldDropdown([[Blockly.Msg.MIXLY_TEMPERATURE, "AHT21.GetTemperature()"], [Blockly.Msg.MIXLY_Humidity, "AHT21.GetHumidity()"], [Blockly.Msg.MIXLY_DewPoint, "AHT21.GetDewPoint()"]]), "AHT21_TYPE");
+ this.appendDummyInput("")
+ .appendField("AHT20/21" + Blockly.Msg.MIXLY_TEM_HUM)
+ this.appendDummyInput("")
+ .setAlign(Blockly.inputs.Align.RIGHT)
+ .appendField(new Blockly.FieldDropdown([
+ [Blockly.Msg.MIXLY_TEMPERATURE, "AHT21.GetTemperature()"],
+ [Blockly.Msg.MIXLY_Humidity, "AHT21.GetHumidity()"],
+ [Blockly.Msg.MIXLY_DewPoint, "AHT21.GetDewPoint()"]
+ ]), "AHT21_TYPE");
this.setInputsInline(true);
this.setOutput(true);
this.setTooltip();
diff --git a/common/msg/blockly/zh-hant.js b/common/msg/blockly/zh-hant.js
index f5eb3619..ad4d72d9 100644
--- a/common/msg/blockly/zh-hant.js
+++ b/common/msg/blockly/zh-hant.js
@@ -3138,6 +3138,7 @@ ZhHant.MIXGO_CAR_KEEP_FORWARD = '持續向前';
ZhHant.MIXGO_CAR_KEEP_BACK = '持續後退';
ZhHant.MIXGO_CAR_KEEP_LEFT = '持續左轉';
ZhHant.MIXGO_CAR_KEEP_RIGHT = '持續右轉';
+ZhHant.MIXLY_DewPoint = '結露點';
ZhHant.MIXLY_LIVE_WEATHER = '天氣實況';
ZhHant.MIXLY_3_DAY_WEATHER_FORECAST = '3天天氣預報';
ZhHant.MIXLY_6_LIFE_INDEXES = '6項生活指數';