Skip to content

Commit

Permalink
add new define: ENABLE_OBK_SCRIPTING (#1503)
Browse files Browse the repository at this point in the history
* add new define: ENABLE_OBK_SCRIPTING

* cmd_script
  • Loading branch information
openshwprojects authored Jan 10, 2025
1 parent eb5b1ca commit ba153bd
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions platforms/W800/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ CSRCS += $(_SHARED_APP)/cmnds/cmd_test.c
CSRCS += $(_SHARED_APP)/cmnds/cmd_tcp.c
CSRCS += $(_SHARED_APP)/cmnds/cmd_tokenizer.c
CSRCS += $(_SHARED_APP)/cmnds/cmd_if.c
CSRCS += $(_SHARED_APP)/cmnds/cmd_script.c
CSRCS += $(_SHARED_APP)/cJSON/cJSON.c
CSRCS += $(_SHARED_APP)/base64/base64.c
CSRCS += $(_SHARED_APP)/hal/w800/hal_adc_w800.c
Expand Down
3 changes: 1 addition & 2 deletions src/cmnds/cmd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,8 +876,7 @@ void CMD_Init_Early() {
CMD_RegisterCommand("IndexRefreshInterval", CMD_IndexRefreshInterval, NULL);


#if (defined WINDOWS) || (defined PLATFORM_BEKEN) || (defined PLATFORM_BL602) || (defined PLATFORM_LN882H) \
|| (defined PLATFORM_ESPIDF) || defined(PLATFORM_TR6260) || defined(PLATFORM_RTL87X0C)
#if ENABLE_OBK_SCRIPTING
CMD_InitScripting();
#endif
if (!bSafeMode) {
Expand Down
11 changes: 9 additions & 2 deletions src/obk_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#define ENABLE_DRIVER_BMP280 1
#define OBK_OTA_EXTENSION ".img"
#define ENABLE_I2C 1
#define ENABLE_OBK_SCRIPTING 1


#elif WINDOWS
Expand Down Expand Up @@ -113,7 +114,7 @@
#define ENABLE_DRIVER_ADCSMOOTHER 1
#define ENABLE_DRIVER_SGP 1
#define ENABLE_DRIVER_SHIFTREGISTER 1

#define ENABLE_OBK_SCRIPTING 1

#elif PLATFORM_BL602

Expand All @@ -140,6 +141,7 @@
#define ENABLE_DRIVER_SSDP 1
#define ENABLE_DRIVER_CHT83XX 1
#define ENABLE_DRIVER_DS1820 1
#define ENABLE_OBK_SCRIPTING 1
#define OBK_OTA_EXTENSION ".bin.xz.ota"
//#define ENABLE_I2C 1

Expand Down Expand Up @@ -200,6 +202,7 @@
#define ENABLE_DRIVER_CHT83XX 1
#define ENABLE_DRIVER_KP18058 1
#define ENABLE_DRIVER_ADCSMOOTHER 1
#define ENABLE_OBK_SCRIPTING 1
//#define ENABLE_DRIVER_OPENWEATHERMAP 1
#define OBK_OTA_EXTENSION ".rbl"

Expand Down Expand Up @@ -229,6 +232,7 @@
//#define ENABLE_DRIVER_TMGN 1
#define ENABLE_TASMOTA_JSON 1
#define ENABLE_DRIVER_DS1820 1
#define ENABLE_OBK_SCRIPTING 1
#define OBK_OTA_EXTENSION ".bin"
#define OBK_OTA_NAME_EXTENSION "_OTA"

Expand Down Expand Up @@ -259,6 +263,7 @@
#define ENABLE_DRIVER_DDP 1
#define ENABLE_DRIVER_SSDP 1
#define ENABLE_DRIVER_CHT83XX 1
#define ENABLE_OBK_SCRIPTING 1
#define OBK_OTA_EXTENSION ".img"

#elif PLATFORM_TR6260
Expand All @@ -276,7 +281,8 @@
#define ENABLE_DRIVER_DS1820 1
#define ENABLE_DRIVER_LED 1
#define ENABLE_DRIVER_WEMO 1
#define ENABLE_DRIVER_SSDP 1
#define ENABLE_DRIVER_SSDP 1
#define ENABLE_OBK_SCRIPTING 1

#elif PLATFORM_RTL87X0C

Expand All @@ -303,6 +309,7 @@
#define ENABLE_DRIVER_BL0942 1
#define ENABLE_DRIVER_BL0937 1
#define ENABLE_DRIVER_CSE7766 1
#define ENABLE_OBK_SCRIPTING 1

#else

Expand Down
4 changes: 1 addition & 3 deletions src/user_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -958,9 +958,7 @@ void QuickTick(void* param)
g_last_time = g_time;


#if (defined WINDOWS) || (defined PLATFORM_BEKEN) || (defined PLATFORM_BL602) \
|| (defined PLATFORM_LN882H) || (defined PLATFORM_ESPIDF) || (defined PLATFORM_TR6260) \
|| (defined PLATFORM_RTL87X0C)
#if ENABLE_OBK_SCRIPTING
SVM_RunThreads(g_deltaTimeMS);
#endif
RepeatingEvents_RunUpdate(g_deltaTimeMS * 0.001f);
Expand Down

0 comments on commit ba153bd

Please sign in to comment.