Browse Source

修复亮度调整的BUG

master
zhaohe 1 year ago
parent
commit
a21ba43d3f
  1. 2
      README.md
  2. 11
      src/camera_light_src_timing_controller/clst_controler.cpp

2
README.md

@ -25,6 +25,4 @@ V4:
2.配置
地址,数值
地址,数值
```

11
src/camera_light_src_timing_controller/clst_controler.cpp

@ -536,7 +536,18 @@ zaf_error_code_t CLSTControler::LightSrcX_setLightIntensityDuty(int32_t index, f
uint32_t freqcnt = 0;
DO_CMD(reg_read(kreg_light_ctrol_module1_light_driver_freq_cnt + (index - 1) * 32, freqcnt));
if (duty >= 99) {
duty = 99;
}
uint32_t cnt = freqcnt * (duty / 100.0);
if (duty < 1) {
cnt = 1;
}
if (cnt >= freqcnt) {
cnt = freqcnt - 1;
}
return reg_write(kreg_light_ctrol_module1_light_intensity_cnt + (index - 1) * 32, cnt);
}
zaf_error_code_t CLSTControler::LightSrcX_setLightDriverFreq(int32_t index, float freq) { //

Loading…
Cancel
Save