mirror of https://github.com/arendst/Tasmota.git
Merge pull request #12892 from s-hadinger/berry_remove_timer
Berry add `tasmota.remove_timer()`
This commit is contained in:
commit
28d8e7cb23
|
@ -101,6 +101,7 @@ BERRY_LOCAL const bntvmodule* const be_module_table[] = {
|
|||
extern void be_load_tasmota_ntvlib(bvm *vm);
|
||||
extern void be_load_wirelib(bvm *vm);
|
||||
extern void be_load_Driver_class(bvm *vm);
|
||||
extern void be_load_Timer_class(bvm *vm);
|
||||
extern void be_load_driver_i2c_lib(bvm *vm);
|
||||
extern void be_load_md5_lib(bvm *vm);
|
||||
extern void be_load_aes_gcm_lib(bvm *vm);
|
||||
|
@ -131,6 +132,7 @@ BERRY_API void be_load_custom_libs(bvm *vm)
|
|||
#if !BE_USE_PRECOMPILED_OBJECT
|
||||
/* be_load_xxxlib(vm); */
|
||||
#endif
|
||||
be_load_Timer_class(vm);
|
||||
be_load_tasmota_ntvlib(vm);
|
||||
be_load_Driver_class(vm);
|
||||
be_load_md5_lib(vm);
|
||||
|
|
|
@ -925,48 +925,42 @@ const bclosure exec_rules_closure = {
|
|||
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
"def set_timer(delay,f) "
|
||||
"if !self._timers self._timers=[] end "
|
||||
"self._timers.push([self.millis(delay),f]) "
|
||||
"end "
|
||||
********************************************************************/
|
||||
/********************************************************************
|
||||
** Solidified function: set_timer
|
||||
********************************************************************/
|
||||
be_local_closure(set_timer, /* name */
|
||||
be_nested_proto(
|
||||
9, /* nstack */
|
||||
3, /* argc */
|
||||
10, /* nstack */
|
||||
4, /* argc */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* upvals */
|
||||
{ { .s=be_nested_const_str("_timers", -1694866380, 7) }, BE_STRING},
|
||||
{ { .s=be_nested_const_str("push", -2022703139, 4) }, BE_STRING},
|
||||
{ { .s=be_nested_const_str("millis", 1214679063, 6) }, BE_STRING},
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
be_nested_string("_timers", -1694866380, 7), /* R256 - K0 */
|
||||
be_nested_string("push", -2022703139, 4), /* R257 - K1 */
|
||||
be_nested_string("Timer", -346839614, 5), /* R258 - K2 */
|
||||
be_nested_string("millis", 1214679063, 6), /* R259 - K3 */
|
||||
}),
|
||||
(be_nested_const_str("set_timer", 2135414533, 9)),
|
||||
(be_nested_const_str("string", 398550328, 6)),
|
||||
(be_nested_const_str("input", -103256197, 5)),
|
||||
( &(const binstruction[16]) { /* code */
|
||||
0x880C0100, // 0000 GETMBR R3 R0 R256
|
||||
0x740E0002, // 0001 JMPT R3 #0005
|
||||
0x600C000A, // 0002 GETGBL R3 G10
|
||||
0x7C0C0000, // 0003 CALL R3 0
|
||||
0x90020003, // 0004 SETMBR R0 R256 R3
|
||||
0x880C0100, // 0005 GETMBR R3 R0 R256
|
||||
0x8C0C0701, // 0006 GETMET R3 R3 R257
|
||||
0x6014000A, // 0007 GETGBL R5 G10
|
||||
0x7C140000, // 0008 CALL R5 0
|
||||
0x8C180102, // 0009 GETMET R6 R0 R258
|
||||
0x5C200200, // 000A MOVE R8 R1
|
||||
0x7C180400, // 000B CALL R6 2
|
||||
0x40180A06, // 000C CONNECT R6 R5 R6
|
||||
0x40180A02, // 000D CONNECT R6 R5 R2
|
||||
0x7C0C0400, // 000E CALL R3 2
|
||||
0x88100100, // 0000 GETMBR R4 R0 R256
|
||||
0x74120002, // 0001 JMPT R4 #0005
|
||||
0x6010000A, // 0002 GETGBL R4 G10
|
||||
0x7C100000, // 0003 CALL R4 0
|
||||
0x90020004, // 0004 SETMBR R0 R256 R4
|
||||
0x88100100, // 0005 GETMBR R4 R0 R256
|
||||
0x8C100901, // 0006 GETMET R4 R4 R257
|
||||
0xB81A0400, // 0007 GETNGBL R6 R258
|
||||
0x8C1C0103, // 0008 GETMET R7 R0 R259
|
||||
0x5C240200, // 0009 MOVE R9 R1
|
||||
0x7C1C0400, // 000A CALL R7 2
|
||||
0x5C200400, // 000B MOVE R8 R2
|
||||
0x5C240600, // 000C MOVE R9 R3
|
||||
0x7C180600, // 000D CALL R6 3
|
||||
0x7C100400, // 000E CALL R4 2
|
||||
0x80000000, // 000F RET 0 R0
|
||||
})
|
||||
)
|
||||
|
@ -985,16 +979,18 @@ be_local_closure(run_deferred, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 6]) { /* constants */
|
||||
( &(const bvalue[ 8]) { /* constants */
|
||||
be_nested_string("_timers", -1694866380, 7), /* R256 - K0 */
|
||||
be_const_int(0), /* R257 - K1 */
|
||||
be_nested_string("size", 597743964, 4), /* R258 - K2 */
|
||||
be_nested_string("time_reached", 2075136773, 12), /* R259 - K3 */
|
||||
be_const_int(1), /* R260 - K4 */
|
||||
be_nested_string("remove", -611183107, 6), /* R261 - K5 */
|
||||
be_nested_string("due", -399437003, 3), /* R260 - K4 */
|
||||
be_nested_string("f", -485742695, 1), /* R261 - K5 */
|
||||
be_nested_string("remove", -611183107, 6), /* R262 - K6 */
|
||||
be_const_int(1), /* R263 - K7 */
|
||||
}),
|
||||
(be_nested_const_str("run_deferred", 371594696, 12)),
|
||||
(be_nested_const_str("string", 398550328, 6)),
|
||||
(be_nested_const_str("input", -103256197, 5)),
|
||||
( &(const binstruction[27]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 R256
|
||||
0x78060017, // 0001 JMPF R1 #001A
|
||||
|
@ -1007,20 +1003,20 @@ be_local_closure(run_deferred, /* name */
|
|||
0x8C080103, // 0008 GETMET R2 R0 R259
|
||||
0x88100100, // 0009 GETMBR R4 R0 R256
|
||||
0x94100801, // 000A GETIDX R4 R4 R1
|
||||
0x94100901, // 000B GETIDX R4 R4 R257
|
||||
0x88100904, // 000B GETMBR R4 R4 R260
|
||||
0x7C080400, // 000C CALL R2 2
|
||||
0x780A0009, // 000D JMPF R2 #0018
|
||||
0x88080100, // 000E GETMBR R2 R0 R256
|
||||
0x94080401, // 000F GETIDX R2 R2 R1
|
||||
0x94080504, // 0010 GETIDX R2 R2 R260
|
||||
0x88080505, // 0010 GETMBR R2 R2 R261
|
||||
0x880C0100, // 0011 GETMBR R3 R0 R256
|
||||
0x8C0C0705, // 0012 GETMET R3 R3 R261
|
||||
0x8C0C0706, // 0012 GETMET R3 R3 R262
|
||||
0x5C140200, // 0013 MOVE R5 R1
|
||||
0x7C0C0400, // 0014 CALL R3 2
|
||||
0x5C0C0400, // 0015 MOVE R3 R2
|
||||
0x7C0C0000, // 0016 CALL R3 0
|
||||
0x70020000, // 0017 JMP #0019
|
||||
0x00040304, // 0018 ADD R1 R1 R260
|
||||
0x00040307, // 0018 ADD R1 R1 R263
|
||||
0x7001FFE8, // 0019 JMP #0003
|
||||
0x80000000, // 001A RET 0 R0
|
||||
})
|
||||
|
@ -1028,6 +1024,58 @@ be_local_closure(run_deferred, /* name */
|
|||
);
|
||||
/*******************************************************************/
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: remove_timer
|
||||
********************************************************************/
|
||||
be_local_closure(remove_timer, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
2, /* argc */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 7]) { /* constants */
|
||||
be_nested_string("tasmota", 424643812, 7), /* R256 - K0 */
|
||||
be_nested_string("_timers", -1694866380, 7), /* R257 - K1 */
|
||||
be_const_int(0), /* R258 - K2 */
|
||||
be_nested_string("size", 597743964, 4), /* R259 - K3 */
|
||||
be_nested_string("id", 926444256, 2), /* R260 - K4 */
|
||||
be_nested_string("remove", -611183107, 6), /* R261 - K5 */
|
||||
be_const_int(1), /* R262 - K6 */
|
||||
}),
|
||||
(be_nested_const_str("remove_timer", -153495081, 12)),
|
||||
(be_nested_const_str("input", -103256197, 5)),
|
||||
( &(const binstruction[23]) { /* code */
|
||||
0xB80A0000, // 0000 GETNGBL R2 R256
|
||||
0x88080501, // 0001 GETMBR R2 R2 R257
|
||||
0x780A0012, // 0002 JMPF R2 #0016
|
||||
0x58080002, // 0003 LDCONST R2 K2
|
||||
0xB80E0000, // 0004 GETNGBL R3 R256
|
||||
0x880C0701, // 0005 GETMBR R3 R3 R257
|
||||
0x8C0C0703, // 0006 GETMET R3 R3 R259
|
||||
0x7C0C0200, // 0007 CALL R3 1
|
||||
0x140C0403, // 0008 LT R3 R2 R3
|
||||
0x780E000B, // 0009 JMPF R3 #0016
|
||||
0x880C0101, // 000A GETMBR R3 R0 R257
|
||||
0x940C0602, // 000B GETIDX R3 R3 R2
|
||||
0x880C0704, // 000C GETMBR R3 R3 R260
|
||||
0x1C0C0601, // 000D EQ R3 R3 R1
|
||||
0x780E0004, // 000E JMPF R3 #0014
|
||||
0x880C0101, // 000F GETMBR R3 R0 R257
|
||||
0x8C0C0705, // 0010 GETMET R3 R3 R261
|
||||
0x5C140400, // 0011 MOVE R5 R2
|
||||
0x7C0C0400, // 0012 CALL R3 2
|
||||
0x70020000, // 0013 JMP #0015
|
||||
0x00080506, // 0014 ADD R2 R2 R262
|
||||
0x7001FFED, // 0015 JMP #0004
|
||||
0x80000000, // 0016 RET 0 R0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
/********************************************************************
|
||||
// Add command to list
|
||||
"def add_cmd(c,f) "
|
||||
|
@ -2106,6 +2154,7 @@ void be_load_tasmota_ntvlib(bvm *vm)
|
|||
{ "exec_rules", (bntvfunc) &exec_rules_closure },
|
||||
{ "set_timer", (bntvfunc) &set_timer_closure },
|
||||
{ "run_deferred", (bntvfunc) &run_deferred_closure },
|
||||
{ "remove_timer", (bntvfunc) &remove_timer_closure },
|
||||
{ "add_cmd", (bntvfunc) &add_cmd_closure },
|
||||
{ "remove_cmd", (bntvfunc) &remove_cmd_closure },
|
||||
{ "exec_cmd", (bntvfunc) &exec_cmd_closure },
|
||||
|
@ -2189,6 +2238,7 @@ class be_class_tasmota (scope: global, name: Tasmota) {
|
|||
exec_rules, closure(exec_rules_closure)
|
||||
set_timer, closure(set_timer_closure)
|
||||
run_deferred, closure(run_deferred_closure)
|
||||
remove_timer, closure(remove_timer_closure)
|
||||
add_cmd, closure(add_cmd_closure)
|
||||
remove_cmd, closure(remove_cmd_closure)
|
||||
exec_cmd, closure(exec_cmd_closure)
|
||||
|
|
|
@ -0,0 +1,108 @@
|
|||
/********************************************************************
|
||||
* Tasmota lib
|
||||
*
|
||||
* class Timer
|
||||
*******************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: tostring
|
||||
********************************************************************/
|
||||
be_local_closure(tostring, /* name */
|
||||
be_nested_proto(
|
||||
10, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 6]) { /* constants */
|
||||
be_nested_string("string", 398550328, 6), /* R256 - K0 */
|
||||
be_nested_string("format", -1180859054, 6), /* R257 - K1 */
|
||||
be_nested_string("<instance: %s(%s, %s, %s)", 257363333, 25), /* R258 - K2 */
|
||||
be_nested_string("due", -399437003, 3), /* R259 - K3 */
|
||||
be_nested_string("f", -485742695, 1), /* R260 - K4 */
|
||||
be_nested_string("id", 926444256, 2), /* R261 - K5 */
|
||||
}),
|
||||
(be_nested_const_str("tostring", -1995258651, 8)),
|
||||
(be_nested_const_str("input", -103256197, 5)),
|
||||
( &(const binstruction[19]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 R256
|
||||
0x8C080301, // 0001 GETMET R2 R1 R257
|
||||
0x58100002, // 0002 LDCONST R4 K2
|
||||
0x60140013, // 0003 GETGBL R5 G19
|
||||
0x60180004, // 0004 GETGBL R6 G4
|
||||
0x5C1C0000, // 0005 MOVE R7 R0
|
||||
0x7C180200, // 0006 CALL R6 1
|
||||
0x7C140200, // 0007 CALL R5 1
|
||||
0x60180013, // 0008 GETGBL R6 G19
|
||||
0x881C0103, // 0009 GETMBR R7 R0 R259
|
||||
0x7C180200, // 000A CALL R6 1
|
||||
0x601C0013, // 000B GETGBL R7 G19
|
||||
0x88200104, // 000C GETMBR R8 R0 R260
|
||||
0x7C1C0200, // 000D CALL R7 1
|
||||
0x60200013, // 000E GETGBL R8 G19
|
||||
0x88240105, // 000F GETMBR R9 R0 R261
|
||||
0x7C200200, // 0010 CALL R8 1
|
||||
0x7C080C00, // 0011 CALL R2 6
|
||||
0x80040400, // 0012 RET 1 R2
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(init, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
4, /* argc */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
be_nested_string("due", -399437003, 3), /* R256 - K0 */
|
||||
be_nested_string("f", -485742695, 1), /* R257 - K1 */
|
||||
be_nested_string("id", 926444256, 2), /* R258 - K2 */
|
||||
}),
|
||||
(be_nested_const_str("init", 380752755, 4)),
|
||||
(be_nested_const_str("input", -103256197, 5)),
|
||||
( &(const binstruction[ 4]) { /* code */
|
||||
0x90020001, // 0000 SETMBR R0 R256 R1
|
||||
0x90020202, // 0001 SETMBR R0 R257 R2
|
||||
0x90020403, // 0002 SETMBR R0 R258 R3
|
||||
0x80000000, // 0003 RET 0 R0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Timer
|
||||
********************************************************************/
|
||||
be_local_class(Timer,
|
||||
3,
|
||||
NULL,
|
||||
be_nested_map(5,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_nested_key("tostring", -1995258651, 8, 4), be_const_closure(tostring_closure) },
|
||||
{ be_nested_key("id", 926444256, 2, 2), be_const_index(2) },
|
||||
{ be_nested_key("f", -485742695, 1, -1), be_const_index(1) },
|
||||
{ be_nested_key("due", -399437003, 3, -1), be_const_index(0) },
|
||||
{ be_nested_key("init", 380752755, 4, -1), be_const_closure(init_closure) },
|
||||
})),
|
||||
(be_nested_const_str("Timer", -346839614, 5))
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_Timer_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_Timer);
|
||||
be_setglobal(vm, "Timer");
|
||||
be_pop(vm, 1);
|
||||
}
|
|
@ -1,6 +1,20 @@
|
|||
#- Native code used for testing and code solidification -#
|
||||
#- Do not use it -#
|
||||
|
||||
class Timer
|
||||
var due, f, id
|
||||
def init(due, f, id)
|
||||
self.due = due
|
||||
self.f = f
|
||||
self.id = id
|
||||
end
|
||||
def tostring()
|
||||
import string
|
||||
return string.format("<instance: %s(%s, %s, %s)", str(classof(self)),
|
||||
str(self.due), str(self.f), str(self.id))
|
||||
end
|
||||
end
|
||||
|
||||
class Tasmota
|
||||
|
||||
# add `chars_in_string(s:string,c:string) -> int``
|
||||
|
@ -127,9 +141,9 @@ class Tasmota
|
|||
return false
|
||||
end
|
||||
|
||||
def set_timer(delay,f)
|
||||
def set_timer(delay,f,id)
|
||||
if !self._timers self._timers=[] end
|
||||
self._timers.push([self.millis(delay),f])
|
||||
self._timers.push(Timer(self.millis(delay),f,id))
|
||||
end
|
||||
|
||||
# run every 50ms tick
|
||||
|
@ -137,8 +151,8 @@ class Tasmota
|
|||
if self._timers
|
||||
var i=0
|
||||
while i<self._timers.size()
|
||||
if self.time_reached(self._timers[i][0])
|
||||
f=self._timers[i][1]
|
||||
if self.time_reached(self._timers[i].due)
|
||||
f=self._timers[i].f
|
||||
self._timers.remove(i)
|
||||
f()
|
||||
else
|
||||
|
@ -148,6 +162,20 @@ class Tasmota
|
|||
end
|
||||
end
|
||||
|
||||
# remove timers by id
|
||||
def remove_timer(id)
|
||||
if tasmota._timers
|
||||
var i=0
|
||||
while i<tasmota._timers.size()
|
||||
if self._timers[i].id == id
|
||||
self._timers.remove(i)
|
||||
else
|
||||
i=i+1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Add command to list
|
||||
def add_cmd(c,f)
|
||||
if !self._ccmd
|
||||
|
|
|
@ -553,6 +553,7 @@ extern const bcstring be_const_str_gamma10;
|
|||
extern const bcstring be_const_str_RISING;
|
||||
extern const bcstring be_const_str_lv_draw_mask_line_param;
|
||||
extern const bcstring be_const_str_rand;
|
||||
extern const bcstring be_const_str_remove_timer;
|
||||
extern const bcstring be_const_str_Wire;
|
||||
extern const bcstring be_const_str_lv_dropdown;
|
||||
extern const bcstring be_const_str_setitem;
|
||||
|
|
|
@ -552,7 +552,8 @@ be_define_const_str(MHZ_TXD, "MHZ_TXD", 3310158233u, 0, 7, &be_const_str_gamma10
|
|||
be_define_const_str(gamma10, "gamma10", 3472052483u, 0, 7, NULL);
|
||||
be_define_const_str(RISING, "RISING", 1256404539u, 0, 6, &be_const_str_lv_draw_mask_line_param);
|
||||
be_define_const_str(lv_draw_mask_line_param, "lv_draw_mask_line_param", 2692990704u, 0, 23, NULL);
|
||||
be_define_const_str(rand, "rand", 2711325910u, 0, 4, NULL);
|
||||
be_define_const_str(rand, "rand", 2711325910u, 0, 4, &be_const_str_remove_timer);
|
||||
be_define_const_str(remove_timer, "remove_timer", 4141472215u, 0, 12, NULL);
|
||||
be_define_const_str(Wire, "Wire", 1938276536u, 0, 4, &be_const_str_lv_dropdown);
|
||||
be_define_const_str(lv_dropdown, "lv_dropdown", 2797165301u, 0, 11, &be_const_str_setitem);
|
||||
be_define_const_str(setitem, "setitem", 1554834596u, 0, 7, NULL);
|
||||
|
@ -971,6 +972,6 @@ static const bstring* const m_string_table[] = {
|
|||
|
||||
static const struct bconststrtab m_const_string_table = {
|
||||
.size = 315,
|
||||
.count = 630,
|
||||
.count = 631,
|
||||
.table = m_string_table
|
||||
};
|
||||
|
|
|
@ -1,71 +1,72 @@
|
|||
#include "be_constobj.h"
|
||||
|
||||
static be_define_const_map_slots(be_class_tasmota_map) {
|
||||
{ be_const_key(gc, -1), be_const_closure(gc_closure) },
|
||||
{ be_const_key(_cmd, -1), be_const_func(l_cmd) },
|
||||
{ be_const_key(event, -1), be_const_closure(event_closure) },
|
||||
{ be_const_key(millis, -1), be_const_func(l_millis) },
|
||||
{ be_const_key(eth, 23), be_const_func(l_eth) },
|
||||
{ be_const_key(try_rule, -1), be_const_closure(try_rule_closure) },
|
||||
{ be_const_key(resp_cmnd, -1), be_const_func(l_respCmnd) },
|
||||
{ be_const_key(set_light, -1), be_const_closure(set_light_closure) },
|
||||
{ be_const_key(remove_rule, -1), be_const_closure(remove_rule_closure) },
|
||||
{ be_const_key(get_light, -1), be_const_closure(get_light_closure) },
|
||||
{ be_const_key(_rules, -1), be_const_index(0) },
|
||||
{ be_const_key(add_driver, 0), be_const_closure(add_driver_closure) },
|
||||
{ be_const_key(save, 38), be_const_func(l_save) },
|
||||
{ be_const_key(set_timer, -1), be_const_closure(set_timer_closure) },
|
||||
{ be_const_key(yield, 48), be_const_func(l_yield) },
|
||||
{ be_const_key(resp_cmnd_done, -1), be_const_func(l_respCmndDone) },
|
||||
{ be_const_key(find_op, 4), be_const_closure(find_op_closure) },
|
||||
{ be_const_key(get_free_heap, -1), be_const_func(l_getFreeHeap) },
|
||||
{ be_const_key(remove_cmd, -1), be_const_closure(remove_cmd_closure) },
|
||||
{ be_const_key(exec_cmd, 20), be_const_closure(exec_cmd_closure) },
|
||||
{ be_const_key(add_cmd, -1), be_const_closure(add_cmd_closure) },
|
||||
{ be_const_key(log, -1), be_const_func(l_logInfo) },
|
||||
{ be_const_key(_get_cb, 18), be_const_func(l_get_cb) },
|
||||
{ be_const_key(_timers, 35), be_const_index(1) },
|
||||
{ be_const_key(wifi, 55), be_const_func(l_wifi) },
|
||||
{ be_const_key(_drivers, 10), be_const_index(2) },
|
||||
{ be_const_key(find_key_i, -1), be_const_closure(find_key_i_closure) },
|
||||
{ be_const_key(_cb, -1), be_const_index(3) },
|
||||
{ be_const_key(web_send, -1), be_const_func(l_webSend) },
|
||||
{ be_const_key(resp_cmnd_error, -1), be_const_func(l_respCmndError) },
|
||||
{ be_const_key(memory, 31), be_const_func(l_memory) },
|
||||
{ be_const_key(resp_cmnd_str, -1), be_const_func(l_respCmndStr) },
|
||||
{ be_const_key(time_str, 7), be_const_closure(time_str_closure) },
|
||||
{ be_const_key(set_power, 34), be_const_func(l_setpower) },
|
||||
{ be_const_key(get_option, 46), be_const_func(l_getoption) },
|
||||
{ be_const_key(rtc, -1), be_const_func(l_rtc) },
|
||||
{ be_const_key(response_append, -1), be_const_func(l_respAppend) },
|
||||
{ be_const_key(publish_result, -1), be_const_func(l_publish_result) },
|
||||
{ be_const_key(chars_in_string, 50), be_const_closure(chars_in_string_closure) },
|
||||
{ be_const_key(cmd, 2), be_const_closure(cmd_closure) },
|
||||
{ be_const_key(wire_scan, -1), be_const_closure(wire_scan_closure) },
|
||||
{ be_const_key(i2c_enabled, -1), be_const_func(l_i2cenabled) },
|
||||
{ be_const_key(resp_cmnd_failed, 1), be_const_func(l_respCmndFailed) },
|
||||
{ be_const_key(add_rule, 29), be_const_closure(add_rule_closure) },
|
||||
{ be_const_key(publish, -1), be_const_func(l_publish) },
|
||||
{ be_const_key(resolvecmnd, -1), be_const_func(l_resolveCmnd) },
|
||||
{ be_const_key(_ccmd, -1), be_const_index(4) },
|
||||
{ be_const_key(time_dump, -1), be_const_func(l_time_dump) },
|
||||
{ be_const_key(scale_uint, -1), be_const_func(l_scaleuint) },
|
||||
{ be_const_key(load, -1), be_const_closure(load_closure) },
|
||||
{ be_const_key(exec_rules, 37), be_const_closure(exec_rules_closure) },
|
||||
{ be_const_key(gen_cb, 36), be_const_closure(gen_cb_closure) },
|
||||
{ be_const_key(cb_dispatch, -1), be_const_closure(cb_dispatch_closure) },
|
||||
{ be_const_key(resp_cmnd_error, -1), be_const_func(l_respCmndError) },
|
||||
{ be_const_key(exec_rules, -1), be_const_closure(exec_rules_closure) },
|
||||
{ be_const_key(_cmd, -1), be_const_func(l_cmd) },
|
||||
{ be_const_key(gc, -1), be_const_closure(gc_closure) },
|
||||
{ be_const_key(remove_rule, -1), be_const_closure(remove_rule_closure) },
|
||||
{ be_const_key(event, -1), be_const_closure(event_closure) },
|
||||
{ be_const_key(log, 25), be_const_func(l_logInfo) },
|
||||
{ be_const_key(_drivers, -1), be_const_index(0) },
|
||||
{ be_const_key(set_light, -1), be_const_closure(set_light_closure) },
|
||||
{ be_const_key(wire2, 26), be_const_index(1) },
|
||||
{ be_const_key(get_free_heap, -1), be_const_func(l_getFreeHeap) },
|
||||
{ be_const_key(resp_cmnd_failed, -1), be_const_func(l_respCmndFailed) },
|
||||
{ be_const_key(publish_result, -1), be_const_func(l_publish_result) },
|
||||
{ be_const_key(wire1, -1), be_const_index(2) },
|
||||
{ be_const_key(set_power, 46), be_const_func(l_setpower) },
|
||||
{ be_const_key(cmd, -1), be_const_closure(cmd_closure) },
|
||||
{ be_const_key(get_light, 42), be_const_closure(get_light_closure) },
|
||||
{ be_const_key(_rules, 54), be_const_index(3) },
|
||||
{ be_const_key(run_deferred, 19), be_const_closure(run_deferred_closure) },
|
||||
{ be_const_key(try_rule, 18), be_const_closure(try_rule_closure) },
|
||||
{ be_const_key(remove_cmd, 41), be_const_closure(remove_cmd_closure) },
|
||||
{ be_const_key(add_driver, 0), be_const_closure(add_driver_closure) },
|
||||
{ be_const_key(get_power, 36), be_const_func(l_getpower) },
|
||||
{ be_const_key(remove_timer, -1), be_const_closure(remove_timer_closure) },
|
||||
{ be_const_key(_timers, -1), be_const_index(4) },
|
||||
{ be_const_key(add_rule, 33), be_const_closure(add_rule_closure) },
|
||||
{ be_const_key(time_reached, -1), be_const_func(l_timereached) },
|
||||
{ be_const_key(web_send_decimal, -1), be_const_func(l_webSendDecimal) },
|
||||
{ be_const_key(delay, 54), be_const_func(l_delay) },
|
||||
{ be_const_key(run_deferred, 9), be_const_closure(run_deferred_closure) },
|
||||
{ be_const_key(get_power, -1), be_const_func(l_getpower) },
|
||||
{ be_const_key(wire2, -1), be_const_index(5) },
|
||||
{ be_const_key(wire1, 52), be_const_index(6) },
|
||||
{ be_const_key(resp_cmnd_done, -1), be_const_func(l_respCmndDone) },
|
||||
{ be_const_key(time_dump, -1), be_const_func(l_time_dump) },
|
||||
{ be_const_key(resolvecmnd, -1), be_const_func(l_resolveCmnd) },
|
||||
{ be_const_key(millis, -1), be_const_func(l_millis) },
|
||||
{ be_const_key(get_option, 52), be_const_func(l_getoption) },
|
||||
{ be_const_key(eth, -1), be_const_func(l_eth) },
|
||||
{ be_const_key(wifi, 22), be_const_func(l_wifi) },
|
||||
{ be_const_key(response_append, 43), be_const_func(l_respAppend) },
|
||||
{ be_const_key(find_op, -1), be_const_closure(find_op_closure) },
|
||||
{ be_const_key(set_timer, 28), be_const_closure(set_timer_closure) },
|
||||
{ be_const_key(find_key_i, -1), be_const_closure(find_key_i_closure) },
|
||||
{ be_const_key(gen_cb, -1), be_const_closure(gen_cb_closure) },
|
||||
{ be_const_key(memory, 47), be_const_func(l_memory) },
|
||||
{ be_const_key(resp_cmnd_str, -1), be_const_func(l_respCmndStr) },
|
||||
{ be_const_key(chars_in_string, -1), be_const_closure(chars_in_string_closure) },
|
||||
{ be_const_key(resp_cmnd, -1), be_const_func(l_respCmnd) },
|
||||
{ be_const_key(web_send_decimal, 44), be_const_func(l_webSendDecimal) },
|
||||
{ be_const_key(load, -1), be_const_closure(load_closure) },
|
||||
{ be_const_key(web_send, 56), be_const_func(l_webSend) },
|
||||
{ be_const_key(_ccmd, -1), be_const_index(5) },
|
||||
{ be_const_key(i2c_enabled, 48), be_const_func(l_i2cenabled) },
|
||||
{ be_const_key(save, -1), be_const_func(l_save) },
|
||||
{ be_const_key(exec_cmd, 2), be_const_closure(exec_cmd_closure) },
|
||||
{ be_const_key(cb_dispatch, -1), be_const_closure(cb_dispatch_closure) },
|
||||
{ be_const_key(wire_scan, -1), be_const_closure(wire_scan_closure) },
|
||||
{ be_const_key(scale_uint, -1), be_const_func(l_scaleuint) },
|
||||
{ be_const_key(delay, -1), be_const_func(l_delay) },
|
||||
{ be_const_key(_cb, -1), be_const_index(6) },
|
||||
{ be_const_key(add_cmd, -1), be_const_closure(add_cmd_closure) },
|
||||
{ be_const_key(_get_cb, -1), be_const_func(l_get_cb) },
|
||||
{ be_const_key(yield, -1), be_const_func(l_yield) },
|
||||
{ be_const_key(time_str, -1), be_const_closure(time_str_closure) },
|
||||
};
|
||||
|
||||
static be_define_const_map(
|
||||
be_class_tasmota_map,
|
||||
60
|
||||
61
|
||||
);
|
||||
|
||||
BE_EXPORT_VARIABLE be_define_const_class(
|
||||
|
|
Loading…
Reference in New Issue