From a08b54b29557ff687b3c40c6800833a4dc949be5 Mon Sep 17 00:00:00 2001
From: Stephan Hadinger
Date: Mon, 15 Nov 2021 19:14:35 +0100
Subject: [PATCH 1/4] Fix Berry compound assignment
---
lib/libesp32/Berry/src/be_code.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/lib/libesp32/Berry/src/be_code.c b/lib/libesp32/Berry/src/be_code.c
index 6a332bb07..3fac0bbcd 100644
--- a/lib/libesp32/Berry/src/be_code.c
+++ b/lib/libesp32/Berry/src/be_code.c
@@ -335,12 +335,15 @@ static void free_suffix(bfuncinfo *finfo, bexpdesc *e)
}
}
-static int suffix_destreg(bfuncinfo *finfo, bexpdesc *e1, int dst)
+static int suffix_destreg(bfuncinfo *finfo, bexpdesc *e1, int dst, bbool no_reg_reuse)
{
int cand_dst = dst; /* candidate for new dst */
int nlocal = be_list_count(finfo->local);
int reg1 = (e1->v.ss.tt == ETREG) ? e1->v.ss.obj : -1; /* check if obj is ETREG or -1 */
int reg2 = (!isK(e1->v.ss.idx) && e1->v.ss.idx >= nlocal) ? e1->v.ss.idx : -1; /* check if idx is ETREG or -1 */
+ if (no_reg_reuse) { /* if no_reg_reuse flag, then don't reuse any register, this is useful for compound assignments */
+ reg1 = reg2 = -1;
+ }
if (reg1 >= 0 && reg2 >= 0) {
/* both are ETREG, we keep the lowest and discard the other */
@@ -364,9 +367,9 @@ static int suffix_destreg(bfuncinfo *finfo, bexpdesc *e1, int dst)
return dst;
}
-static int code_suffix(bfuncinfo *finfo, bopcode op, bexpdesc *e, int dst)
+static int code_suffix(bfuncinfo *finfo, bopcode op, bexpdesc *e, int dst, bbool no_reg_reuse)
{
- dst = suffix_destreg(finfo, e, dst);
+ dst = suffix_destreg(finfo, e, dst, no_reg_reuse);
if (dst > finfo->freereg) {
dst = finfo->freereg;
}
@@ -400,6 +403,7 @@ static bbool constint(bfuncinfo *finfo, bint i)
/* At exit, If dst is `freereg`, the register is allocated */
static int var2reg(bfuncinfo *finfo, bexpdesc *e, int dst)
{
+ bbool no_reg_reuse = (dst >= 0); /* if dst reg is explicitly specified, do not optimize register allocation */
if (dst < 0) { /* if unspecified, allocate a new register if needed */
dst = finfo->freereg;
}
@@ -434,10 +438,10 @@ static int var2reg(bfuncinfo *finfo, bexpdesc *e, int dst)
codeABx(finfo, OP_GETUPV, dst, e->v.idx);
break;
case ETMEMBER:
- dst = code_suffix(finfo, OP_GETMBR, e, dst);
+ dst = code_suffix(finfo, OP_GETMBR, e, dst, no_reg_reuse);
break;
case ETINDEX:
- dst = code_suffix(finfo, OP_GETIDX, e, dst);
+ dst = code_suffix(finfo, OP_GETIDX, e, dst, no_reg_reuse);
break;
case ETLOCAL: case ETREG: case ETCONST:
return e->v.idx;
@@ -479,6 +483,7 @@ static int exp2reg(bfuncinfo *finfo, bexpdesc *e, int dst)
/* Returns the destination register, guaranteed to be ETREG */
static int codedestreg(bfuncinfo *finfo, bexpdesc *e1, bexpdesc *e2, int dst)
{
+ if (dst < 0) { dst = finfo->freereg; }
int cand_dst = dst;
int con1 = e1->type == ETREG, con2 = e2->type == ETREG;
@@ -506,7 +511,6 @@ static int codedestreg(bfuncinfo *finfo, bexpdesc *e1, bexpdesc *e2, int dst)
/* On exit, e1 is guaranteed to be ETREG, which may have been allocated */
static void binaryexp(bfuncinfo *finfo, bopcode op, bexpdesc *e1, bexpdesc *e2, int dst)
{
- if (dst < 0) { dst = finfo->freereg; }
int src1 = exp2reg(finfo, e1, dst); /* potentially force the target for src1 reg */
int src2 = exp2anyreg(finfo, e2);
dst = codedestreg(finfo, e1, e2, dst);
@@ -720,7 +724,7 @@ int be_code_getmethod(bfuncinfo *finfo, bexpdesc *e)
{
int dst = finfo->freereg;
be_assert(e->type == ETMEMBER);
- dst = code_suffix(finfo, OP_GETMET, e, dst);
+ dst = code_suffix(finfo, OP_GETMET, e, dst, bfalse);
/* method [object] args */
be_code_allocregs(finfo, dst == finfo->freereg ? 2 : 1);
return dst;
From a115f527a3b8b9ea2c6b6b844d4e0c5bbf4f8a60 Mon Sep 17 00:00:00 2001
From: StoyanDimitrov
Date: Mon, 15 Nov 2021 20:23:10 +0000
Subject: [PATCH 2/4] Update Bulgariant translation
Translation refinements.
---
tasmota/language/bg_BG.h | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/tasmota/language/bg_BG.h b/tasmota/language/bg_BG.h
index 4c8478ea0..d4015f984 100644
--- a/tasmota/language/bg_BG.h
+++ b/tasmota/language/bg_BG.h
@@ -249,7 +249,7 @@
#define D_REDIRECTED "Пренасочено към портала за настройка"
#define D_WIFIMANAGER_SET_ACCESSPOINT_AND_STATION "Wifimanager set AccessPoint and keep Station"
#define D_WIFIMANAGER_SET_ACCESSPOINT "Wifimanager set AccessPoint"
-#define D_TRYING_TO_CONNECT "Извършва се опит за свързване на устройството към мрежата"
+#define D_TRYING_TO_CONNECT "Oпит за свързване към избраната мрежа"
#define D_RESTART_IN "Рестарт след"
#define D_SECONDS "секунди"
@@ -336,7 +336,7 @@
#define D_SINGLE_DEVICE "едно устройство"
#define D_MULTI_DEVICE "много устройства"
-#define D_CONFIGURE_TEMPLATE "Настройка на шаблона"
+#define D_CONFIGURE_TEMPLATE "Настройки на шаблона"
#define D_TEMPLATE_PARAMETERS "Параметри на шаблона"
#define D_TEMPLATE_NAME "Име"
#define D_BASE_TYPE "Основан на"
@@ -364,7 +364,7 @@
#define D_ESP_CHIP_ID "ID на чипа на ESP"
#define D_FLASH_CHIP_ID "ID на чипа на флаш-паметта"
#define D_FLASH_CHIP_SIZE "Размер на флаш-паметта"
-#define D_FREE_PROGRAM_SPACE "Свободно пространство за програми"
+#define D_FREE_PROGRAM_SPACE "Свободно място за програми"
#define D_UPGRADE_BY_WEBSERVER "Обновяване от сървър"
#define D_OTA_URL "Адрес на сървър за OTA"
@@ -376,7 +376,7 @@
#define D_UPLOAD_TRANSFER "Upload transfer"
#define D_TRANSFER_STARTED "Transfer started"
#define D_UPLOAD_ERR_1 "Не е избран файл"
-#define D_UPLOAD_ERR_2 "Недостатъчно свободно пространство"
+#define D_UPLOAD_ERR_2 "Недостатъчно свободно място"
#define D_UPLOAD_ERR_3 "Недействителен подпис на файла"
#define D_UPLOAD_ERR_4 "Размерът на програмата е по-голям от размера на флаш-паметта"
#define D_UPLOAD_ERR_5 "Грешка при сравняване на буфери"
@@ -413,11 +413,11 @@
#define D_WEMO_BASIC_EVENT "Основно събитие на WeMo"
#define D_WEMO_EVENT_SERVICE "Услуга за събития на WeMo"
#define D_WEMO_META_SERVICE "Мета-услуга на WeMo"
-#define D_WEMO_SETUP "Настройка на WeMo"
+#define D_WEMO_SETUP "Настройки на WeMo"
#define D_RESPONSE_SENT "Отговорът е изпратен"
#define D_HUE "Hue"
-#define D_HUE_BRIDGE_SETUP "Настройка на Hue"
+#define D_HUE_BRIDGE_SETUP "Настройки на Hue"
#define D_HUE_API_NOT_IMPLEMENTED "ППИ на Hue не е реализиран"
#define D_HUE_API "ППИ на Hue"
#define D_HUE_POST_ARGS "Параметри на Hue по POST"
@@ -442,18 +442,18 @@
#define D_DOMOTICZ_UPDATE_TIMER "Период на обновяване"
// xdrv_09_timers.ino
-#define D_CONFIGURE_TIMER "Настройка на графика"
+#define D_CONFIGURE_TIMER "Настройки на график"
#define D_TIMER_PARAMETERS "Параметри на графиците"
#define D_TIMER_ENABLE "Използване на графици"
#define D_TIMER_ARM "Включване"
#define D_TIMER_TIME "Време"
#define D_TIMER_DAYS "Дни"
-#define D_TIMER_REPEAT "Периодичен"
+#define D_TIMER_REPEAT "Повтаряне"
#define D_TIMER_OUTPUT "Изход"
#define D_TIMER_ACTION "Действие"
// xdrv_10_knx.ino
-#define D_CONFIGURE_KNX "Настройка на KNX"
+#define D_CONFIGURE_KNX "Настройки на KNX"
#define D_KNX_PARAMETERS "Параметри на KNX"
#define D_KNX_GENERAL_CONFIG "Основни"
#define D_KNX_PHYSICAL_ADDRESS "Физически адрес"
@@ -513,7 +513,7 @@
#define D_DOMOTICZ_SHUTTER "Щора"
// xdrv_28_pcf8574.ino
-#define D_CONFIGURE_PCF8574 "Настройка на PCF8574"
+#define D_CONFIGURE_PCF8574 "Настройки на PCF8574"
#define D_PCF8574_PARAMETERS "Параметри на PCF8574"
#define D_INVERT_PORTS "Размяна на портовете"
#define D_DEVICE "Устройство"
@@ -563,7 +563,7 @@
#define D_HX_CAL_DONE "Калибрирано"
#define D_HX_CAL_FAIL "Грешка при калибриране"
#define D_RESET_HX711 "Нулиране на везната"
-#define D_CONFIGURE_HX711 "Настройка на везната"
+#define D_CONFIGURE_HX711 "Настройки на везната"
#define D_HX711_PARAMETERS "Параметри на везната"
#define D_ITEM_WEIGHT "Тегло"
#define D_REFERENCE_WEIGHT "Еталонна тежест"
@@ -608,7 +608,7 @@
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "Няма"
-#define D_SENSOR_USER "Потребител"
+#define D_SENSOR_USER "Потребителско"
#define D_SENSOR_OPTION "Настройки"
#define D_SENSOR_DHT11 "DHT11"
#define D_SENSOR_AM2301 "AM2301"
From 87490c5e94aa3377663d86d8b4a5abd3ac905827 Mon Sep 17 00:00:00 2001
From: Stephan Hadinger
Date: Mon, 15 Nov 2021 22:11:04 +0100
Subject: [PATCH 3/4] Renamed autoconf suffix
---
lib/libesp32/Berry/default/be_autoconf_lib.c | 149 +++++++++---------
.../Berry/default/embedded/autoconf.be | 20 +--
lib/libesp32/Berry/src/be_code.c | 5 +-
3 files changed, 89 insertions(+), 85 deletions(-)
diff --git a/lib/libesp32/Berry/default/be_autoconf_lib.c b/lib/libesp32/Berry/default/be_autoconf_lib.c
index bec1382ea..9f638d6d7 100644
--- a/lib/libesp32/Berry/default/be_autoconf_lib.c
+++ b/lib/libesp32/Berry/default/be_autoconf_lib.c
@@ -40,10 +40,10 @@ be_local_closure(page_autoconf_ctl, /* name */
/* K16 */ be_nested_string("arg", 1047474471, 3),
/* K17 */ be_nested_string("reset", 1695364032, 5),
/* K18 */ be_nested_string("format", -1180859054, 6),
- /* K19 */ be_nested_string("https://raw.githubusercontent.com/tasmota/autoconf/main/%s/%s_autoconf.zip", 2084253523, 74),
+ /* K19 */ be_nested_string("https://raw.githubusercontent.com/tasmota/autoconf/main/%s/%s.autoconf", -1551440987, 70),
/* K20 */ be_nested_string("arch", -1342162999, 4),
/* K21 */ be_nested_string("CFG: downloading '%s'", 589480701, 21),
- /* K22 */ be_nested_string("%s_autoconf.zip", -1148460718, 15),
+ /* K22 */ be_nested_string("%s.autoconf", -734583772, 11),
/* K23 */ be_nested_string("webclient", -218578150, 9),
/* K24 */ be_nested_string("begin", 1748273790, 5),
/* K25 */ be_nested_string("GET", -1763262857, 3),
@@ -453,7 +453,7 @@ be_local_closure(page_autoconf_mgr, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[38]) { /* constants */
+ ( &(const bvalue[39]) { /* constants */
/* K0 */ be_nested_string("webserver", 1572454038, 9),
/* K1 */ be_nested_string("string", 398550328, 6),
/* K2 */ be_nested_string("check_privileged_access", -602033328, 23),
@@ -464,34 +464,35 @@ be_local_closure(page_autoconf_mgr, /* name */
/* K7 */ be_nested_string(" (This feature requires an internet connection)
", -1575700810, 74),
/* K8 */ be_nested_string("get_current_module_path", -1088293888, 23),
/* K9 */ be_nested_string("tr", 1195724803, 2),
- /* K10 */ be_nested_string("_", -636741266, 1),
- /* K11 */ be_nested_string(" ", 621580159, 1),
- /* K12 */ be_nested_string("_error", 1132109656, 6),
- /* K13 */ be_nested_string("<Error: apply new or remove>", -1439459347, 34),
- /* K14 */ be_nested_string("<None>", -1692801798, 12),
- /* K15 */ be_nested_string("
", -748395557, 11),
- /* K23 */ be_nested_string("", 2052843416, 25),
- /* K24 */ be_nested_string("", 1926223891, 80),
- /* K25 */ be_nested_string("