From e8d2206a8394ad25389ba103d3f2b6c9ce63734a Mon Sep 17 00:00:00 2001 From: zhaohe Date: Thu, 25 Apr 2024 20:16:04 +0800 Subject: [PATCH] V11 --- mainwindow.cpp | 2 +- src/camera_light_src_timing_controller/clst_controler.cpp | 8 ++++++++ src/camera_light_src_timing_controller/clst_controler.hpp | 1 + src/version.h | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 142f481..b8d0de9 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -869,7 +869,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi connect(this, SIGNAL(doinui_signal(QFunction)), this, SLOT(doinui_slot(QFunction))); constructUI(); // setWindowIcon(QIcon(QApplication::applicationDirPath() + "/logo.png")); - // 隐藏部分控件 exitProfessionalModel(); @@ -898,6 +897,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi ui->DeviceConnectStateTB->setStyleSheet("color: red"); } if (m_connected) { + m_clstc->initDevice(); m_clstc->setAllShawdowRegDirty(); refreshPage(); } diff --git a/src/camera_light_src_timing_controller/clst_controler.cpp b/src/camera_light_src_timing_controller/clst_controler.cpp index 655fd7d..69f0fed 100644 --- a/src/camera_light_src_timing_controller/clst_controler.cpp +++ b/src/camera_light_src_timing_controller/clst_controler.cpp @@ -363,6 +363,14 @@ zaf_error_code_t CLSTControler::reboot() { return kaf_ec_success; } + +void CLSTControler::initDevice() { + /** + * @brief 初始化一些必要的固定默认参数 + */ + reg_write(kreg_internal_clk_tri_fileter_coefficient, 0); +} + zaf_error_code_t CLSTControler::storageConfigs() { lock_guard lock(m_tx_lock); diff --git a/src/camera_light_src_timing_controller/clst_controler.hpp b/src/camera_light_src_timing_controller/clst_controler.hpp index ec854e7..b904c27 100644 --- a/src/camera_light_src_timing_controller/clst_controler.hpp +++ b/src/camera_light_src_timing_controller/clst_controler.hpp @@ -105,6 +105,7 @@ class CLSTControler { zaf_error_code_t InterClk_setPluseCnt(uint32_t cnt); zaf_error_code_t InterClk_setSeqCtrlPluseCntMax(uint32_t cnt); + zaf_error_code_t InterClk_setFileterCoefficient(int32_t index, uint32_t coefficient); zaf_error_code_t InterClk_getFreq(float &freq); zaf_error_code_t InterClk_getPluseCnt(uint32_t &cnt); zaf_error_code_t InterClk_getSeqCtrlPluseCntMax(uint32_t &cnt); diff --git a/src/version.h b/src/version.h index 15811ea..e778b8a 100644 --- a/src/version.h +++ b/src/version.h @@ -1,4 +1,4 @@ #pragma once -#define VERSION 11 +#define VERSION 12 #define MAUFACTURER "iflytop" \ No newline at end of file