lorawan conditional build
This commit is contained in:
parent
46ed2b645b
commit
01c2c0d819
|
|
@ -1,11 +1,18 @@
|
||||||
include(${CMAKE_CURRENT_LIST_DIR}/extlibs/jReadWrite/include.cmake)
|
include(${CMAKE_CURRENT_LIST_DIR}/extlibs/jReadWrite/include.cmake)
|
||||||
include(${CMAKE_CURRENT_LIST_DIR}/extlibs/libespfs/cmake/include.cmake)
|
include(${CMAKE_CURRENT_LIST_DIR}/extlibs/libespfs/cmake/include.cmake)
|
||||||
|
|
||||||
|
if(CONFIG_WEBGUIAPP_LORAWAN_ENABLE)
|
||||||
|
set(lora_SRCS "src/LoRaWAN.c")
|
||||||
|
set(lora_REQUIRES ttn-esp32)
|
||||||
|
endif()
|
||||||
|
|
||||||
idf_component_register(
|
idf_component_register(
|
||||||
|
|
||||||
SRCS ${jreadwrite_SRCS}
|
SRCS ${jreadwrite_SRCS}
|
||||||
INCLUDE_DIRS ${jreadwrite_INCLUDE_DIRS}
|
INCLUDE_DIRS ${jreadwrite_INCLUDE_DIRS}
|
||||||
|
|
||||||
|
SRCS ${lora_SRCS}
|
||||||
|
|
||||||
SRCS ${libespfs_SRCS}
|
SRCS ${libespfs_SRCS}
|
||||||
INCLUDE_DIRS ${libespfs_INCLUDE_DIRS}
|
INCLUDE_DIRS ${libespfs_INCLUDE_DIRS}
|
||||||
PRIV_INCLUDE_DIRS ${libespfs_PRIV_INCLUDE_DIRS}
|
PRIV_INCLUDE_DIRS ${libespfs_PRIV_INCLUDE_DIRS}
|
||||||
|
|
@ -23,12 +30,12 @@ idf_component_register(
|
||||||
"src/WiFiTransport.c"
|
"src/WiFiTransport.c"
|
||||||
"src/GSMTransport.c"
|
"src/GSMTransport.c"
|
||||||
"src/ETHTransport.c"
|
"src/ETHTransport.c"
|
||||||
"src/LoRaWAN.c"
|
|
||||||
"src/SNTP.c"
|
"src/SNTP.c"
|
||||||
"src/MQTT.c"
|
"src/MQTT.c"
|
||||||
"src/MQTTSysHandler.c"
|
"src/MQTTSysHandler.c"
|
||||||
"src/OTA.c"
|
"src/OTA.c"
|
||||||
|
|
||||||
|
|
||||||
INCLUDE_DIRS "."
|
INCLUDE_DIRS "."
|
||||||
"include"
|
"include"
|
||||||
"src"
|
"src"
|
||||||
|
|
@ -37,7 +44,6 @@ idf_component_register(
|
||||||
EMBED_FILES "upload_script.html"
|
EMBED_FILES "upload_script.html"
|
||||||
|
|
||||||
REQUIRES nvs_flash
|
REQUIRES nvs_flash
|
||||||
#libespfs
|
|
||||||
spiffs
|
spiffs
|
||||||
esp_http_server
|
esp_http_server
|
||||||
mbedtls
|
mbedtls
|
||||||
|
|
@ -46,6 +52,6 @@ idf_component_register(
|
||||||
esp_modem
|
esp_modem
|
||||||
esp_https_ota
|
esp_https_ota
|
||||||
app_update
|
app_update
|
||||||
#jReadWrite
|
REQUIRES ${lora_REQUIRES}
|
||||||
ttn-esp32
|
|
||||||
)
|
)
|
||||||
|
|
@ -129,7 +129,7 @@ esp_err_t WebGuiAppInit(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*LoRaWAN start if enabled*/
|
/*LoRaWAN start if enabled*/
|
||||||
#if !CONFIG_TTN_LORA_FREQ_DISABLED
|
#if CONFIG_WEBGUIAPP_LORAWAN_ENABLE
|
||||||
if (GetSysConf()->lorawanSettings.Flags1.bIsLoRaWANEnabled)
|
if (GetSysConf()->lorawanSettings.Flags1.bIsLoRaWANEnabled)
|
||||||
{
|
{
|
||||||
LoRaWANStart();
|
LoRaWANStart();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user