This is an automated email from the ASF dual-hosted git repository. pkarashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit acde5fed49ef291bbf524c5bc0b5c31a7c8ff136 Author: SPRESENSE <[email protected]> AuthorDate: Tue Mar 29 11:00:30 2022 +0900 drivers/video/isx012: Fix getting the value of auto exposure Fix bug to get the current setting value at AE auto mode. --- drivers/video/isx012.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/video/isx012.c b/drivers/video/isx012.c index e31b7902ce..8c8389b327 100644 --- a/drivers/video/isx012.c +++ b/drivers/video/isx012.c @@ -1841,6 +1841,8 @@ static int isx012_get_value(uint32_t id, uint16_t read_src; uint16_t *read_dst; int ret = OK; + uint16_t exposure_time_lsb; + uint16_t exposure_time_msb; ASSERT(value); @@ -2001,6 +2003,21 @@ static int isx012_get_value(uint32_t id, ISX012_REG_EXPOSURETIME, ISX012_SIZE_EXPOSURETIME); + if (value->value32 == REGVAL_EXPOSURETIME_AUTO) + { + exposure_time_lsb = isx012_getreg + (priv, + ISX012_REG_EXPOSUREAUTOVALUE_LSB, + ISX012_SIZE_EXPOSUREAUTOVALUE); + exposure_time_msb = isx012_getreg + (priv, + ISX012_REG_EXPOSUREAUTOVALUE_MSB, + ISX012_SIZE_EXPOSUREAUTOVALUE); + + value->value32 = (uint16_t)(((exposure_time_msb << 16) + | exposure_time_lsb) + / ISX012_UNIT_EXPOSURETIME_US); + } break; case IMGSENSOR_ID_AUTO_N_PRESET_WB:
