mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-01-27 04:40:48 +03:00
more esp32/esp32-s3 convergence
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
|
||||
set( WEBPACK_DIR webapp/webpack/dist )
|
||||
|
||||
# for the forgetful, REQUIRES cannot use CONFIG_XXX due to parsing order
|
||||
if(IDF_TARGET STREQUAL "esp32")
|
||||
set(target_requires "driver_bt")
|
||||
endif()
|
||||
|
||||
idf_component_register( SRC_DIRS . webapp UML-State-Machine-in-C/src
|
||||
INCLUDE_DIRS . webapp UML-State-Machine-in-C/src
|
||||
REQUIRES squeezelite-ota json mdns
|
||||
PRIV_REQUIRES tools services platform_config esp_common json newlib freertos spi_flash nvs_flash mdns pthread wpa_supplicant platform_console esp_http_server console driver_bt
|
||||
PRIV_REQUIRES tools services platform_config esp_common json newlib freertos spi_flash nvs_flash mdns pthread wpa_supplicant platform_console esp_http_server console ${target_requires}
|
||||
)
|
||||
|
||||
include(webapp/webapp.cmake)
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "network_status.h"
|
||||
#include <string.h>
|
||||
#ifdef BT_ENABLED
|
||||
#ifdef CONFIG_BT_ENABLED
|
||||
#include "bt_app_core.h"
|
||||
#endif
|
||||
#include "esp_log.h"
|
||||
@@ -266,7 +266,7 @@ cJSON* network_status_get_basic_info(cJSON** old) {
|
||||
*old = network_status_update_float(old, "Voltage", battery_value_svc());
|
||||
*old = network_update_cjson_number(old, "disconnect_count", nm->num_disconnect);
|
||||
*old = network_status_update_float(old, "avg_conn_time", nm->num_disconnect > 0 ? (nm->total_connected_time / nm->num_disconnect) : 0);
|
||||
#ifdef BT_ENABLED
|
||||
#ifdef CONFIG_BT_ENABLED
|
||||
*old = network_update_cjson_number(old, "bt_status", bt_app_source_get_a2d_state());
|
||||
*old = network_update_cjson_number(old, "bt_sub_status", bt_app_source_get_media_state());
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user