mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-11 05:56:57 +03:00
Reversed the changes in the directory of the esp32-cam: /components/esp32-camera-master upon request from jomjol
This commit is contained in:
@@ -399,7 +399,7 @@ static int set_awb_gain_dsp(sensor_t *sensor, int value)
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
ret = SCCB_Write(sensor->slv_addr, 0xa6, value);
|
ret = SCCB_Write(sensor->slv_addr, 0xa6, value);
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
ESP_LOGD(TAG, "Set awb gain threshold to: %d", value);
|
ESP_LOGD(TAG, "Set awb gain threthold to: %d", value);
|
||||||
sensor->status.awb_gain = value;
|
sensor->status.awb_gain = value;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ static int set_pixformat(sensor_t *sensor, pixformat_t pixformat)
|
|||||||
ret = set_reg_bits(sensor->slv_addr, 0x24, 0, 0x0f, 2); //yuv422 Y Cb Y Cr
|
ret = set_reg_bits(sensor->slv_addr, 0x24, 0, 0x0f, 2); //yuv422 Y Cb Y Cr
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ESP_LOGW(TAG, "unsupported format");
|
ESP_LOGW(TAG, "unsupport format");
|
||||||
ret = -1;
|
ret = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -330,7 +330,7 @@ static int get_reg(sensor_t *sensor, int reg, int mask)
|
|||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
if (mask > 0xFF) {
|
if (mask > 0xFF) {
|
||||||
ESP_LOGE(TAG, "mask should not be more than 0xff");
|
ESP_LOGE(TAG, "mask should not more than 0xff");
|
||||||
} else {
|
} else {
|
||||||
ret = read_reg(sensor->slv_addr, reg);
|
ret = read_reg(sensor->slv_addr, reg);
|
||||||
}
|
}
|
||||||
@@ -344,7 +344,7 @@ static int set_reg(sensor_t *sensor, int reg, int mask, int value)
|
|||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
if (mask > 0xFF) {
|
if (mask > 0xFF) {
|
||||||
ESP_LOGE(TAG, "mask should not be more than 0xff");
|
ESP_LOGE(TAG, "mask should not more than 0xff");
|
||||||
} else {
|
} else {
|
||||||
ret = read_reg(sensor->slv_addr, reg);
|
ret = read_reg(sensor->slv_addr, reg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ static int set_pixformat(sensor_t *sensor, pixformat_t pixformat)
|
|||||||
ret = set_reg_bits(sensor->slv_addr, 0x44, 0, 0x1f, 3);
|
ret = set_reg_bits(sensor->slv_addr, 0x44, 0, 0x1f, 3);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ESP_LOGW(TAG, "unsupported format");
|
ESP_LOGW(TAG, "unsupport format");
|
||||||
ret = -1;
|
ret = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -255,7 +255,7 @@ static int get_reg(sensor_t *sensor, int reg, int mask)
|
|||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
if (mask > 0xFF) {
|
if (mask > 0xFF) {
|
||||||
ESP_LOGE(TAG, "mask should not be more than 0xff");
|
ESP_LOGE(TAG, "mask should not more than 0xff");
|
||||||
} else {
|
} else {
|
||||||
ret = read_reg(sensor->slv_addr, reg);
|
ret = read_reg(sensor->slv_addr, reg);
|
||||||
}
|
}
|
||||||
@@ -269,7 +269,7 @@ static int set_reg(sensor_t *sensor, int reg, int mask, int value)
|
|||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
if (mask > 0xFF) {
|
if (mask > 0xFF) {
|
||||||
ESP_LOGE(TAG, "mask should not be more than 0xff");
|
ESP_LOGE(TAG, "mask should not more than 0xff");
|
||||||
} else {
|
} else {
|
||||||
ret = read_reg(sensor->slv_addr, reg);
|
ret = read_reg(sensor->slv_addr, reg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ static int set_pixformat(sensor_t *sensor, pixformat_t pixformat)
|
|||||||
ret = set_reg_bits(sensor->slv_addr, P0_OUTPUT_FORMAT, 0, 0x1f, 2); //yuv422
|
ret = set_reg_bits(sensor->slv_addr, P0_OUTPUT_FORMAT, 0, 0x1f, 2); //yuv422
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ESP_LOGW(TAG, "unsupported format");
|
ESP_LOGW(TAG, "unsupport format");
|
||||||
ret = -1;
|
ret = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -339,7 +339,7 @@ static int get_reg(sensor_t *sensor, int reg, int mask)
|
|||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
if (mask > 0xFF) {
|
if (mask > 0xFF) {
|
||||||
ESP_LOGE(TAG, "mask should not be more than 0xff");
|
ESP_LOGE(TAG, "mask should not more than 0xff");
|
||||||
} else {
|
} else {
|
||||||
ret = read_reg(sensor->slv_addr, reg);
|
ret = read_reg(sensor->slv_addr, reg);
|
||||||
}
|
}
|
||||||
@@ -353,7 +353,7 @@ static int set_reg(sensor_t *sensor, int reg, int mask, int value)
|
|||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
if (mask > 0xFF) {
|
if (mask > 0xFF) {
|
||||||
ESP_LOGE(TAG, "mask should not be more than 0xff");
|
ESP_LOGE(TAG, "mask should not more than 0xff");
|
||||||
} else {
|
} else {
|
||||||
ret = read_reg(sensor->slv_addr, reg);
|
ret = read_reg(sensor->slv_addr, reg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -468,14 +468,14 @@ static int set_lenc_dsp(sensor_t *sensor, int enable)
|
|||||||
|
|
||||||
static int get_agc_gain(sensor_t *sensor)
|
static int get_agc_gain(sensor_t *sensor)
|
||||||
{
|
{
|
||||||
ESP_LOGD(TAG, "get_agc_gain cannot be configured now");
|
ESP_LOGD(TAG, "get_agc_gain can not be configured at present");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//real gain
|
//real gain
|
||||||
static int set_agc_gain(sensor_t *sensor, int gain)
|
static int set_agc_gain(sensor_t *sensor, int gain)
|
||||||
{
|
{
|
||||||
ESP_LOGD(TAG, "set_agc_gain cannot be configured now");
|
ESP_LOGD(TAG, "set_agc_gain can not be configured at present");
|
||||||
// ESP_LOGD(TAG, "GAIN = %d\n", gain);
|
// ESP_LOGD(TAG, "GAIN = %d\n", gain);
|
||||||
int cnt = gain / 2;
|
int cnt = gain / 2;
|
||||||
|
|
||||||
@@ -515,13 +515,13 @@ static int set_agc_gain(sensor_t *sensor, int gain)
|
|||||||
|
|
||||||
static int get_aec_value(sensor_t *sensor)
|
static int get_aec_value(sensor_t *sensor)
|
||||||
{
|
{
|
||||||
ESP_LOGD(TAG, "get_aec_value can not be configured now");
|
ESP_LOGD(TAG, "get_aec_value can not be configured at present");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int set_aec_value(sensor_t *sensor, int value)
|
static int set_aec_value(sensor_t *sensor, int value)
|
||||||
{
|
{
|
||||||
ESP_LOGD(TAG, "set_aec_value cannot be configured now");
|
ESP_LOGD(TAG, "set_aec_value can not be configured at present");
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
// ESP_LOGD(TAG, " set_aec_value to: %d", value);
|
// ESP_LOGD(TAG, " set_aec_value to: %d", value);
|
||||||
ret = write_reg_bits(sensor->slv_addr, 0x3012, 0x00, (value >> 8) & 0xff);
|
ret = write_reg_bits(sensor->slv_addr, 0x3012, 0x00, (value >> 8) & 0xff);
|
||||||
@@ -537,7 +537,7 @@ static int set_aec_value(sensor_t *sensor, int value)
|
|||||||
|
|
||||||
static int set_ae_level(sensor_t *sensor, int level)
|
static int set_ae_level(sensor_t *sensor, int level)
|
||||||
{
|
{
|
||||||
ESP_LOGD(TAG, "set_ae_level cannot be configured now");
|
ESP_LOGD(TAG, "set_ae_level can not be configured at present");
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (level < 0) {
|
if (level < 0) {
|
||||||
@@ -814,7 +814,7 @@ static int set_sharpness(sensor_t *sensor, int level)
|
|||||||
|
|
||||||
static int set_gainceiling(sensor_t *sensor, gainceiling_t level)
|
static int set_gainceiling(sensor_t *sensor, gainceiling_t level)
|
||||||
{
|
{
|
||||||
ESP_LOGD(TAG, "set_gainceiling cannot be configured now");
|
ESP_LOGD(TAG, "set_gainceiling can not be configured at present");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -826,7 +826,7 @@ static int get_denoise(sensor_t *sensor)
|
|||||||
|
|
||||||
static int set_denoise(sensor_t *sensor, int level)
|
static int set_denoise(sensor_t *sensor, int level)
|
||||||
{
|
{
|
||||||
ESP_LOGD(TAG, "set_denoise cannot be configured now");
|
ESP_LOGD(TAG, "set_denoise can not be configured at present");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user