fix: restore non-display psram usage and clean stale qrcode log

Signed-off-by: Bo <boironic@gmail.com>
This commit is contained in:
Bo
2026-02-19 17:40:00 +08:00
parent 0c256d7653
commit f0a2741e0c
5 changed files with 17 additions and 10 deletions

View File

@@ -7,6 +7,7 @@
#include "esp_log.h"
#include "esp_http_client.h"
#include "esp_crt_bundle.h"
#include "esp_heap_caps.h"
#include "nvs.h"
#include "cJSON.h"
@@ -255,8 +256,9 @@ esp_err_t tool_web_search_execute(const char *input_json, char *output, size_t o
snprintf(path, sizeof(path),
"/res/v1/web/search?q=%s&count=%d", encoded_query, SEARCH_RESULT_COUNT);
/* Allocate response buffer from PSRAM */
search_buf_t sb = {0};
sb.data = calloc(1, SEARCH_BUF_SIZE);
sb.data = heap_caps_calloc(1, SEARCH_BUF_SIZE, MALLOC_CAP_SPIRAM);
if (!sb.data) {
snprintf(output, output_size, "Error: Out of memory");
return ESP_ERR_NO_MEM;