From fe9d9827db72699378e4925e2078a11df4fafcab Mon Sep 17 00:00:00 2001 From: Ilya Date: Thu, 29 May 2025 19:00:19 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BD=D1=8F=D0=B5=D0=BC=20=D0=B0?= =?UTF-8?q?=D0=BB=D0=B3=D0=BE=D1=80=D0=B8=D1=82=D0=BC=20=D0=B2=D1=8B=D0=B7?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=20getAPI=5F=20=D0=94=D0=BB=D1=8F=20=D0=B2?= =?UTF-8?q?=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD=D1=81=D0=BE=D1=82=D0=B8=20?= =?UTF-8?q?=D0=BE=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BA=D0=B8=20=D0=B1?= =?UTF-8?q?=D0=BB=D0=BE=D0=BA=D0=BE=D0=B2=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8?= =?UTF-8?q?=D0=B3=D1=83=D1=80=D0=B0=D1=86=D0=B8=D0=B9=20=D0=B2=D1=81=D0=B5?= =?UTF-8?q?=D1=85=20=D1=8D=D0=BB=D0=B5=D0=BC=D0=B5=D0=BD=D1=82=D0=BE=D0=B2?= =?UTF-8?q?=20=D0=B2=20=D0=BB=D1=8E=D0=B1=D0=BE=D0=BC=20=D0=BC=D0=BE=D0=B4?= =?UTF-8?q?=D1=83=D0=BB=D0=B5=20=D0=B4=D0=BB=D1=8F=20=D1=84=D0=BE=D1=80?= =?UTF-8?q?=D0=BC=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20=D1=80?= =?UTF-8?q?=D0=B0=D1=81=D1=88=D0=B8=D1=80=D0=B5=D0=BD=D0=BD=D1=8B=D1=85=20?= =?UTF-8?q?=D0=BC=D0=BE=D0=B4=D0=B8=D1=84=D0=B8=D0=BA=D0=B0=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=BE=D0=B2.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PrepareProject.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PrepareProject.py b/PrepareProject.py index 24bcdc5a..a848dbf7 100644 --- a/PrepareProject.py +++ b/PrepareProject.py @@ -223,12 +223,12 @@ allAPI_head = "" allAPI_exec = "" for activModuleName in activeModulesName: allAPI_head = allAPI_head + "\nvoid* getAPI_" + activModuleName + "(String subtype, String params);" - allAPI_exec = allAPI_exec + "\nif ((tmpAPI = getAPI_" + activModuleName + "(subtype, params)) != nullptr) return tmpAPI;" + allAPI_exec = allAPI_exec + "\nif ((tmpAPI = getAPI_" + activModuleName + "(subtype, params)) != nullptr) foundAPI = tmpAPI;" apicpp = '#include "ESPConfiguration.h"\n' apicpp = apicpp + allAPI_head -apicpp = apicpp + '\n\nvoid* getAPI(String subtype, String params) {\nvoid* tmpAPI;' +apicpp = apicpp + '\n\nvoid* getAPI(String subtype, String params) {\nvoid* tmpAPI; void* foundAPI = nullptr;' apicpp = apicpp + allAPI_exec -apicpp = apicpp + '\nreturn nullptr;\n}' +apicpp = apicpp + '\nreturn foundAPI;\n}' with open('src/modules/API.cpp', 'w') as f: f.write(apicpp)