From 25af5ab7c61f15e61212da6d0963651da66c2368 Mon Sep 17 00:00:00 2001 From: Oxan van Leeuwen Date: Mon, 31 May 2021 12:27:41 +0200 Subject: [PATCH] Drop 128x160 ESP-32 camera resolution (#1813) --- esphome/components/esp32_camera/__init__.py | 2 -- .../components/esp32_camera/esp32_camera.cpp | 6 ------ esphome/components/esp32_camera/esp32_camera.h | 1 - tests/test4.yaml | 17 +++++++++++++++++ 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/esphome/components/esp32_camera/__init__.py b/esphome/components/esp32_camera/__init__.py index f3c0e0f165..abbb4b1b7e 100644 --- a/esphome/components/esp32_camera/__init__.py +++ b/esphome/components/esp32_camera/__init__.py @@ -25,8 +25,6 @@ ESP32CameraFrameSize = esp32_camera_ns.enum("ESP32CameraFrameSize") FRAME_SIZES = { "160X120": ESP32CameraFrameSize.ESP32_CAMERA_SIZE_160X120, "QQVGA": ESP32CameraFrameSize.ESP32_CAMERA_SIZE_160X120, - "128X160": ESP32CameraFrameSize.ESP32_CAMERA_SIZE_128X160, - "QQVGA2": ESP32CameraFrameSize.ESP32_CAMERA_SIZE_128X160, "176X144": ESP32CameraFrameSize.ESP32_CAMERA_SIZE_176X144, "QCIF": ESP32CameraFrameSize.ESP32_CAMERA_SIZE_176X144, "240X176": ESP32CameraFrameSize.ESP32_CAMERA_SIZE_240X176, diff --git a/esphome/components/esp32_camera/esp32_camera.cpp b/esphome/components/esp32_camera/esp32_camera.cpp index 1d9faf7ea2..6bb57a8304 100644 --- a/esphome/components/esp32_camera/esp32_camera.cpp +++ b/esphome/components/esp32_camera/esp32_camera.cpp @@ -55,9 +55,6 @@ void ESP32Camera::dump_config() { case FRAMESIZE_QQVGA: ESP_LOGCONFIG(TAG, " Resolution: 160x120 (QQVGA)"); break; - case FRAMESIZE_QQVGA2: - ESP_LOGCONFIG(TAG, " Resolution: 128x160 (QQVGA2)"); - break; case FRAMESIZE_QCIF: ESP_LOGCONFIG(TAG, " Resolution: 176x155 (QCIF)"); break; @@ -209,9 +206,6 @@ void ESP32Camera::set_frame_size(ESP32CameraFrameSize size) { case ESP32_CAMERA_SIZE_160X120: this->config_.frame_size = FRAMESIZE_QQVGA; break; - case ESP32_CAMERA_SIZE_128X160: - this->config_.frame_size = FRAMESIZE_QQVGA2; - break; case ESP32_CAMERA_SIZE_176X144: this->config_.frame_size = FRAMESIZE_QCIF; break; diff --git a/esphome/components/esp32_camera/esp32_camera.h b/esphome/components/esp32_camera/esp32_camera.h index fd8597d0c1..03272d3b32 100644 --- a/esphome/components/esp32_camera/esp32_camera.h +++ b/esphome/components/esp32_camera/esp32_camera.h @@ -37,7 +37,6 @@ class CameraImageReader { enum ESP32CameraFrameSize { ESP32_CAMERA_SIZE_160X120, // QQVGA - ESP32_CAMERA_SIZE_128X160, // QQVGA2 ESP32_CAMERA_SIZE_176X144, // QCIF ESP32_CAMERA_SIZE_240X176, // HQVGA ESP32_CAMERA_SIZE_320X240, // QVGA diff --git a/tests/test4.yaml b/tests/test4.yaml index fb2bce82a4..08213fab87 100644 --- a/tests/test4.yaml +++ b/tests/test4.yaml @@ -183,6 +183,23 @@ display: lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); +esp32_camera: + name: ESP-32 Camera + data_pins: [GPIO17, GPIO35, GPIO34, GPIO5, GPIO39, GPIO18, GPIO36, GPIO19] + vsync_pin: GPIO22 + href_pin: GPIO26 + pixel_clock_pin: GPIO21 + external_clock: + pin: GPIO27 + frequency: 20MHz + i2c_pins: + sda: GPIO25 + scl: GPIO23 + reset_pin: GPIO15 + power_down_pin: GPIO1 + resolution: 640x480 + jpeg_quality: 10 + external_components: - source: github://esphome/esphome@dev refresh: 1d