From aaf5ffedec0befd9ee38c5c82ccc112d1b9c9672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=AB=8B=E5=B8=AE?= <3294713004@qq.com> Date: Sun, 19 Oct 2025 19:46:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(boards):=20=E4=BF=AE=E5=A4=8Darduino?= =?UTF-8?q?=E4=B8=8B=E5=8F=98=E9=87=8F=E5=90=8D=E5=A4=A7=E5=B0=8F=E5=86=99?= =?UTF-8?q?=E4=B8=8D=E6=95=8F=E6=84=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- boards/default_src/arduino/others/names.js | 4 ++-- boards/default_src/arduino/others/variables.js | 4 ++-- boards/default_src/python/others/names.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/boards/default_src/arduino/others/names.js b/boards/default_src/arduino/others/names.js index da69869b..2e69c902 100644 --- a/boards/default_src/arduino/others/names.js +++ b/boards/default_src/arduino/others/names.js @@ -121,7 +121,7 @@ Names.prototype.getName = function (name, type) { name = varName; } } - var normalized = name.toLowerCase() + '_' + type; + var normalized = name + '_' + type; var isVarType = type == Variables.NAME_TYPE || type == Names.DEVELOPER_VARIABLE_TYPE; @@ -193,7 +193,7 @@ Names.prototype.safeName_ = function (name) { * @return {boolean} True if names are the same. */ Names.equals = function (name1, name2) { - return name1.toLowerCase() == name2.toLowerCase(); + return name1 == name2; }; export default Names; \ No newline at end of file diff --git a/boards/default_src/arduino/others/variables.js b/boards/default_src/arduino/others/variables.js index e1ef5db9..c210e042 100644 --- a/boards/default_src/arduino/others/variables.js +++ b/boards/default_src/arduino/others/variables.js @@ -90,7 +90,7 @@ Variables.allVariables = function (root) { var varName = blockVariables[y]; // Variable name may be null if the block is only half-built. if (varName) { - variableHash[varName.toLowerCase()] = varName; + variableHash[varName] = varName; } } } @@ -222,7 +222,7 @@ Variables.generateUniqueName = function (workspace) { while (!newName) { var inUse = false; for (var i = 0; i < variableList.length; i++) { - if (variableList[i].toLowerCase() == potName) { + if (variableList[i] == potName) { // This potential name is already used. inUse = true; break; diff --git a/boards/default_src/python/others/names.js b/boards/default_src/python/others/names.js index 376c96f0..5361c676 100644 --- a/boards/default_src/python/others/names.js +++ b/boards/default_src/python/others/names.js @@ -52,7 +52,7 @@ class Names { * @return {boolean} True if names are the same. */ static equals(name1, name2) { - return name1.toLowerCase() == name2.toLowerCase(); + return name1 == name2; } /** * When JavaScript (or most other languages) is generated, variable 'foo' and