Browse Source

remove CONFIG_ENABLE_TEST_PATTERN

pull/88/head
jjsch-dev 6 years ago
parent
commit
c92fd45c4b
  1. 11
      Kconfig
  2. 22
      driver/camera.c
  3. 11
      driver/private_include/camera_common.h

11
Kconfig

@ -35,17 +35,6 @@ config SCCB_HARDWARE_I2C @@ -35,17 +35,6 @@ config SCCB_HARDWARE_I2C
Enable this option if you want to use hardware I2C to control the camera.
Disable this option to use software I2C.
config ENABLE_TEST_PATTERN
bool "Enable test pattern on camera output"
default n
help
Configure the camera module to output test pattern instead of live image.
Use this option to troubleshoot image issues like noise,
distortion, not legible and missing live image.
Instead, module will generate regular vertical bars
in shades from dark to white.
choice CAMERA_TASK_PINNED_TO_CORE
bool "Camera task pinned to core"
default CAMERA_CORE0

22
driver/camera.c

@ -19,7 +19,6 @@ @@ -19,7 +19,6 @@
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "esp32/rom/lldesc.h"
#include "soc/soc.h"
#include "soc/gpio_sig_map.h"
#include "soc/i2s_reg.h"
@ -34,6 +33,15 @@ @@ -34,6 +33,15 @@
#include "esp_camera.h"
#include "camera_common.h"
#include "xclk.h"
#ifdef ESP_IDF_VERSION_MAJOR // IDF 4+
#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
#include "esp32/rom/lldesc.h"
#else
#error Target CONFIG_IDF_TARGET is not supported
#endif
#else
#include "rom/lldesc.h" // ESP32 Before IDF 4.0
#endif
#if CONFIG_OV2640_SUPPORT
#include "ov2640.h"
#endif
@ -47,8 +55,6 @@ @@ -47,8 +55,6 @@
#include "ov7670.h"
#endif
#define ENABLE_TEST_PATTERN CONFIG_ENABLE_TEST_PATTERN
typedef enum {
CAMERA_NONE = 0,
CAMERA_UNKNOWN = 1,
@ -1244,16 +1250,6 @@ esp_err_t camera_init(const camera_config_t* config) @@ -1244,16 +1250,6 @@ esp_err_t camera_init(const camera_config_t* config)
}
s_state->sensor.set_pixformat(&s_state->sensor, pix_format);
#if ENABLE_TEST_PATTERN
/* Test pattern may get handy
if you are unable to get the live image right.
Once test pattern is enable, sensor will output
vertical shaded bars instead of live image.
*/
s_state->sensor.set_colorbar(&s_state->sensor, 1);
ESP_LOGD(TAG, "Test pattern enabled");
#endif
if (s_state->sensor.id.PID == OV2640_PID) {
s_state->sensor.set_gainceiling(&s_state->sensor, GAINCEILING_2X);
s_state->sensor.set_bpc(&s_state->sensor, false);

11
driver/private_include/camera_common.h

@ -3,7 +3,6 @@ @@ -3,7 +3,6 @@
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include "esp32/rom/lldesc.h"
#include "esp_err.h"
#include "esp_intr_alloc.h"
#include "freertos/FreeRTOS.h"
@ -12,6 +11,16 @@ @@ -12,6 +11,16 @@
#include "esp_camera.h"
#include "sensor.h"
#ifdef ESP_IDF_VERSION_MAJOR // IDF 4+
#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
#include "esp32/rom/lldesc.h"
#else
#error Target CONFIG_IDF_TARGET is not supported
#endif
#else
#include "rom/lldesc.h" // ESP32 Before IDF 4.0
#endif
typedef union {
struct {
uint8_t sample2;

Loading…
Cancel
Save