mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-25 11:46:31 +00:00
Merge pull request #13868 from s-hadinger/berry_devices_present
Berry add `tasmota.global.devices_present`
This commit is contained in:
commit
03606b9267
@ -33,9 +33,10 @@ extern "C" {
|
||||
|
||||
extern const be_ctypes_structure_t be_tasmota_global_struct = {
|
||||
sizeof(TasmotaGlobal), /* size in bytes */
|
||||
1, /* number of elements */
|
||||
2, /* number of elements */
|
||||
nullptr,
|
||||
(const be_ctypes_structure_item_t[2]) {
|
||||
{ "devices_present", offsetof(TasmotaGlobal_t, devices_present), 0, 0, ctypes_u8, 0 },
|
||||
{ "sleep", offsetof(TasmotaGlobal_t, sleep), 0, 0, ctypes_u8, 0 },
|
||||
}};
|
||||
|
||||
@ -43,7 +44,7 @@ extern "C" {
|
||||
sizeof(TSettings), /* size in bytes */
|
||||
1, /* number of elements */
|
||||
nullptr,
|
||||
(const be_ctypes_structure_item_t[2]) {
|
||||
(const be_ctypes_structure_item_t[1]) {
|
||||
{ "sleep", offsetof(TSettings, sleep), 0, 0, ctypes_u8, 0 },
|
||||
}};
|
||||
|
||||
|
@ -811,8 +811,9 @@ bool Xdrv52(uint8_t function)
|
||||
case FUNC_EVERY_SECOND:
|
||||
callBerryEventDispatcher(PSTR("every_second"), nullptr, 0, nullptr);
|
||||
break;
|
||||
// case FUNC_SET_POWER:
|
||||
// break;
|
||||
case FUNC_SET_POWER:
|
||||
callBerryEventDispatcher(PSTR("set_power_handler"), nullptr, XdrvMailbox.index, nullptr);
|
||||
break;
|
||||
#ifdef USE_WEBSERVER
|
||||
case FUNC_WEB_ADD_CONSOLE_BUTTON:
|
||||
if (XdrvMailbox.index) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user