more esp32/esp32-s3 convergence

This commit is contained in:
philippe44
2023-05-17 23:55:28 +02:00
parent 9db17c8da8
commit 8ef3f8178b
15 changed files with 2323 additions and 19 deletions

View File

@@ -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)

View File

@@ -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