diff --git a/CMakeLists.txt b/CMakeLists.txt index db5f222..ff44468 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -set(PROJECT_VER "1.9.0") +set(PROJECT_VER "1.9.1") # Add this line to disable the specific warning add_compile_options(-Wno-missing-field-initializers) diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index e95e435..2527937 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -19,7 +19,7 @@ set(SOURCES "audio/audio_codec.cc" "protocols/websocket_protocol.cc" "mcp_server.cc" "system_info.cc" - + "application.cc" "ota.cc" "settings.cc" "device_state_event.cc" diff --git a/main/Kconfig.projbuild b/main/Kconfig.projbuild index 0c75ecc..538b10a 100644 --- a/main/Kconfig.projbuild +++ b/main/Kconfig.projbuild @@ -184,6 +184,9 @@ choice BOARD_TYPE config BOARD_TYPE_ATOMMATRIX_ECHO_BASE bool "AtomMatrix + Echo Base" depends on IDF_TARGET_ESP32 + config BOARD_TYPE_ESP32S3_AUDIO_BOARD + bool "Waveshare ESP32-S3-Audio-Board" + depends on IDF_TARGET_ESP32S3 config BOARD_TYPE_ESP32S3_Touch_AMOLED_1_8 bool "Waveshare ESP32-S3-Touch-AMOLED-1.8" depends on IDF_TARGET_ESP32S3 @@ -425,15 +428,27 @@ endchoice choice DISPLAY_ESP32S3_KORVO2_V3 depends on BOARD_TYPE_ESP32S3_KORVO2_V3 prompt "ESP32S3_KORVO2_V3 LCD Type" - default LCD_ST7789 + default ESP32S3_KORVO2_V3_LCD_ST7789 help 屏幕类型选择 - config LCD_ST7789 + config ESP32S3_KORVO2_V3_LCD_ST7789 bool "ST7789, 分辨率240*280" - config LCD_ILI9341 + config ESP32S3_KORVO2_V3_LCD_ILI9341 bool "ILI9341, 分辨率240*320" endchoice +choice DISPLAY_ESP32S3_AUDIO_BOARD + depends on BOARD_TYPE_ESP32S3_AUDIO_BOARD + prompt "ESP32S3_AUDIO_BOARD LCD Type" + default AUDIO_BOARD_LCD_JD9853 + help + 屏幕类型选择 + config AUDIO_BOARD_LCD_JD9853 + bool "JD9853, 分辨率320*172" + config AUDIO_BOARD_LCD_ST7789 + bool "ST7789, 分辨率240*320" +endchoice + config USE_WECHAT_MESSAGE_STYLE bool "Enable WeChat Message Style" default n @@ -541,4 +556,4 @@ choice I2S_TYPE_TAIJIPI_S3 bool "I2S Type PDM" endchoice -endmenu +endmenu \ No newline at end of file diff --git a/main/boards/common/esp32_music.cc b/main/boards/common/esp32_music.cc index da1c786..be564d3 100644 --- a/main/boards/common/esp32_music.cc +++ b/main/boards/common/esp32_music.cc @@ -1069,17 +1069,13 @@ void Esp32Music::PlayAudioStream() packet.payload.resize(pcm_size_bytes); memcpy(packet.payload.data(), final_pcm_data, pcm_size_bytes); - if (final_pcm_data_fft == nullptr) + if (final_pcm_data_fft != nullptr) { - final_pcm_data_fft = (int16_t *)heap_caps_malloc( - final_sample_count * sizeof(int16_t), - MALLOC_CAP_SPIRAM); + heap_caps_free(final_pcm_data_fft); } - - memcpy( - final_pcm_data_fft, - final_pcm_data, - final_sample_count * sizeof(int16_t)); + final_pcm_data_fft = (int16_t *)heap_caps_malloc( + final_sample_count * sizeof(int16_t), + MALLOC_CAP_SPIRAM); ESP_LOGD(TAG, "Sending %d PCM samples (%d bytes, rate=%d, channels=%d->1) to Application", final_sample_count, pcm_size_bytes, mp3_frame_info_.samprate, mp3_frame_info_.nChans); diff --git a/main/boards/esp32s3-korvo2-v3/config.h b/main/boards/esp32s3-korvo2-v3/config.h index b351ee8..3292477 100644 --- a/main/boards/esp32s3-korvo2-v3/config.h +++ b/main/boards/esp32s3-korvo2-v3/config.h @@ -26,7 +26,7 @@ #define VOLUME_UP_BUTTON_GPIO GPIO_NUM_NC #define VOLUME_DOWN_BUTTON_GPIO GPIO_NUM_NC -#ifdef CONFIG_LCD_ST7789 +#ifdef CONFIG_ESP32S3_KORVO2_V3_LCD_ST7789 #define DISPLAY_SDA_PIN GPIO_NUM_NC #define DISPLAY_SCL_PIN GPIO_NUM_NC #define DISPLAY_WIDTH 280 @@ -40,7 +40,7 @@ #define DISPLAY_OFFSET_Y 0 #endif -#ifdef CONFIG_LCD_ILI9341 +#ifdef CONFIG_ESP32S3_KORVO2_V3_LCD_ILI9341 #define LCD_TYPE_ILI9341_SERIAL #define DISPLAY_SDA_PIN GPIO_NUM_NC #define DISPLAY_SCL_PIN GPIO_NUM_NC @@ -78,4 +78,4 @@ #define CAMERA_PIN_PCLK 11 #define XCLK_FREQ_HZ 20000000 -#endif // _BOARD_CONFIG_H_ +#endif // _BOARD_CONFIG_H_ \ No newline at end of file diff --git a/main/boards/waveshare-s3-touch-lcd-3.5b/custom_lcd_display.cc b/main/boards/waveshare-s3-touch-lcd-3.5b/custom_lcd_display.cc index a864d52..c047611 100644 --- a/main/boards/waveshare-s3-touch-lcd-3.5b/custom_lcd_display.cc +++ b/main/boards/waveshare-s3-touch-lcd-3.5b/custom_lcd_display.cc @@ -3,7 +3,6 @@ #include "lcd_display.h" #include -#include #include #include #include