From e4b3c3be5b34cc84afd380bf3e359b004745158a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=AB=8B=E5=B8=AE?= <3294713004@qq.com> Date: Fri, 30 May 2025 00:36:09 +0800 Subject: [PATCH] =?UTF-8?q?chore(boards):=20=E7=A7=BB=E9=99=A4micropython?= =?UTF-8?q?=20generator=E4=B8=8B=E6=9C=AA=E4=BD=BF=E7=94=A8=E7=9A=84functi?= =?UTF-8?q?on?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- boards/default_src/micropython/python_generator.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/boards/default_src/micropython/python_generator.js b/boards/default_src/micropython/python_generator.js index 10fa8c35..52f02367 100644 --- a/boards/default_src/micropython/python_generator.js +++ b/boards/default_src/micropython/python_generator.js @@ -139,11 +139,6 @@ Python.init = function () { } } -function optimizeShowCalls(code) { - const regex = /onboard_tft\.show\(\)\s*(?=.*?onboard_tft\.[hline|vline|line|rect|fill_rect|ellipse|pixel])/gm; - return code.replace(regex, ''); -} - Python.finish = function (code) { // Convert the definitions dictionary into a list. if (code !== "") { @@ -205,11 +200,6 @@ Python.finish = function (code) { text = imports.join('\n') + definitions_var.join('\n') + definitions_fun.join('\n') + functions.join('\n') + setups.join('') + code + codeEnd.join('\n'); } - // try { - // text = optimizeShowCalls(text); - // } catch (error) { - // console.log(error); - // } return text; }