This commit is contained in:
唐杰 2026-01-12 01:51:15 +00:00 committed by GitHub
commit 3c8209998f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 26 additions and 5 deletions

View File

@ -30,8 +30,24 @@ Xiaozhi Assistant -> Board Type -> DFRobot 行空板 K10
Component config -> ESP PSRAM -> SPI RAM config -> Mode (QUAD/OCT) -> Octal Mode PSRAM
```
**使能摄像头缓冲区大小端交换:**
```
Xiaozhi Assistant -> Camera Configuration -> Enable software camera buffer endianness swapping
```
**配置摄像头:**
```
Component config -> Espressif Camera Sensors Configurations -> Camera Sensor Configuration -> Select and Set Camera Sensor -> GC2145 -> Select default output format for DVP interface (RGB565 800x600 20fps, DVP 8-bit, 20M input) -> RGB565 800x600 20fps, DVP 8-bit, 20M input
```
**编译:**
```bash
idf.py build
```
```

View File

@ -71,6 +71,6 @@
#define CAMERA_PIN_HREF HREF_GPIO_NUM
#define CAMERA_PIN_PCLK PCLK_GPIO_NUM
#define XCLK_FREQ_HZ 20000000
#define XCLK_FREQ_HZ 6000000
#endif // _BOARD_CONFIG_H_

View File

@ -84,12 +84,17 @@ private:
if (ret != ESP_OK) {
ESP_LOGE(TAG, "Print state failed: %s", esp_err_to_name(ret));
}
ret = esp_io_expander_set_dir(io_expander, IO_EXPANDER_PIN_NUM_0,
IO_EXPANDER_OUTPUT);
ret = esp_io_expander_set_dir(io_expander, IO_EXPANDER_PIN_NUM_0 | IO_EXPANDER_PIN_NUM_1, IO_EXPANDER_OUTPUT);
if (ret != ESP_OK) {
ESP_LOGE(TAG, "Set direction failed: %s", esp_err_to_name(ret));
}
ret = esp_io_expander_set_level(io_expander, 0, 1);
ret = esp_io_expander_set_level(io_expander, IO_EXPANDER_PIN_NUM_0 | IO_EXPANDER_PIN_NUM_1, 0);
if (ret != ESP_OK) {
ESP_LOGE(TAG, "Set level failed: %s", esp_err_to_name(ret));
}
vTaskDelay(100 / portTICK_PERIOD_MS);
ret = esp_io_expander_set_level(io_expander, IO_EXPANDER_PIN_NUM_0 | IO_EXPANDER_PIN_NUM_1, 1);
if (ret != ESP_OK) {
ESP_LOGE(TAG, "Set level failed: %s", esp_err_to_name(ret));
}