This is an automated email from the ASF dual-hosted git repository.

jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 33f7923d7247fdbb34fe92821c9ef9e418533361
Author: SPRESENSE <41312067+sprese...@users.noreply.github.com>
AuthorDate: Thu Dec 21 13:40:57 2023 +0900

    drivers/video/isx019: Fix bug that initial exposure time is not correct
    
    Because exposure time calculation needs the cxd56xx clock value,
    get the cxd56xx clock value before saving initial value.
---
 drivers/video/isx019.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/video/isx019.c b/drivers/video/isx019.c
index ea089bd0ad..a763328c94 100644
--- a/drivers/video/isx019.c
+++ b/drivers/video/isx019.c
@@ -1354,9 +1354,14 @@ static int isx019_init(FAR struct imgsensor_s *sensor)
   fpga_init(priv);
   initialize_wbmode(priv);
   initialize_jpg_quality(priv);
-  store_default_value(priv);
+
+  /* Because store_default_value() needs the clock ratio,
+   * clock_ratio has to be calculated first.
+   */
+
   clk = board_isx019_get_master_clock();
   priv->clock_ratio = (float)clk / ISX019_STANDARD_MASTER_CLOCK;
+  store_default_value(priv);
 
   return OK;
 }

Reply via email to