diff --git a/src/data_nodes.cpp b/src/data_nodes.cpp index 88468e4..193a174 100644 --- a/src/data_nodes.cpp +++ b/src/data_nodes.cpp @@ -48,10 +48,10 @@ static char auth_password[11]; #define solar_bus lv_bus #endif -bool pub_serial_enable = false; +bool pub_serial_enable = IS_ENABLED(CONFIG_THINGSET_SERIAL_PUB_DEFAULT); #if CONFIG_THINGSET_CAN -bool pub_can_enable = false; +bool pub_can_enable = IS_ENABLED(CONFIG_THINGSET_CAN_PUB_DEFAULT); uint16_t can_node_addr = CONFIG_THINGSET_CAN_DEFAULT_NODE_ID; #endif diff --git a/zephyr/Kconfig b/zephyr/Kconfig index e00f04d..6c582de 100644 --- a/zephyr/Kconfig +++ b/zephyr/Kconfig @@ -351,10 +351,20 @@ config THINGSET_SERIAL_TX_BUF_SIZE range 256 2048 default 1024 +config THINGSET_SERIAL_PUB_DEFAULT + bool "Enable serial publication messages at startup" + depends on THINGSET_SERIAL + default y + config THINGSET_CAN depends on CAN bool "ThingSet CAN interface" +config THINGSET_CAN_PUB_DEFAULT + bool "Enable CAN publication messages at startup" + depends on THINGSET_CAN + default y + config THINGSET_CAN_DEFAULT_NODE_ID depends on THINGSET_CAN int "ThingSet CAN default node ID"