Add no change checks

This commit is contained in:
Kwabena W. Agyeman 2021-04-30 09:43:23 -07:00
parent fcbdb83e13
commit 6bfbec3f69
2 changed files with 20 additions and 0 deletions

View File

@ -786,6 +786,11 @@ bool sensor_get_vflip()
int sensor_set_transpose(bool enable)
{
if (sensor.transpose == enable) {
/* no change */
return 0;
}
if (sensor.pixformat == PIXFORMAT_JPEG) {
return -1;
}
@ -801,6 +806,11 @@ bool sensor_get_transpose()
int sensor_set_auto_rotation(bool enable)
{
if (sensor.auto_rotation == enable) {
/* no change */
return 0;
}
if (sensor.pixformat == PIXFORMAT_JPEG) {
return -1;
}

View File

@ -912,6 +912,11 @@ bool sensor_get_vflip()
int sensor_set_transpose(bool enable)
{
if (sensor.transpose == enable) {
/* no change */
return 0;
}
if (sensor.pixformat == PIXFORMAT_JPEG) {
return -1;
}
@ -927,6 +932,11 @@ bool sensor_get_transpose()
int sensor_set_auto_rotation(bool enable)
{
if (sensor.auto_rotation == enable) {
/* no change */
return 0;
}
if (sensor.pixformat == PIXFORMAT_JPEG) {
return -1;
}