diff --git a/.gitignore b/.gitignore index 7f96686..cc2bf70 100644 --- a/.gitignore +++ b/.gitignore @@ -68,6 +68,6 @@ Thumbs.db # Binaries # -------- -*.dll + build \ No newline at end of file diff --git a/CMakeLists.txt.user b/CMakeLists.txt.user index 1094a7c..841342e 100644 --- a/CMakeLists.txt.user +++ b/CMakeLists.txt.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -94,56 +94,10 @@ Desktop Qt 5.12.12 MinGW 64-bit Desktop Qt 5.12.12 MinGW 64-bit qt.qt5.51212.win64_mingw73_kit - 2 + 1 0 0 - Debug - -GMinGW Makefiles --DCMAKE_BUILD_TYPE:STRING=Debug --DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake --DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable} --DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX} --DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C} --DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx} - D:/workspace/p_camera_light_source_timing_controller/camera_light_src_timing_controller_pc - D:/workspace/p_camera_light_source_timing_controller/build-camera_light_src_timing_controller_pc-Desktop_Qt_5_12_12_MinGW_64_bit-Debug - - - - all - - true - Build - CMakeProjectManager.MakeStep - - 1 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - - clean - - true - Build - CMakeProjectManager.MakeStep - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - - Debug - CMakeProjectManager.CMakeBuildConfiguration - - MinSizeRel -GMinGW Makefiles -DCMAKE_BUILD_TYPE:STRING=MinSizeRel @@ -188,7 +142,7 @@ Minimum Size Release CMakeProjectManager.CMakeBuildConfiguration - + Release -GMinGW Makefiles -DCMAKE_BUILD_TYPE:STRING=Release @@ -197,7 +151,7 @@ -DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX} -DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C} -DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx} - D:\workspace\p_camera_light_source_timing_controller\build-camera_light_src_timing_controller_pc-Desktop_Qt_5_12_12_MinGW_64_bit-Release + D:/zfpge_workspace/p_camera_light_source_timing_controller/camera_light_src_timing_controller_pc/build @@ -233,7 +187,7 @@ Release CMakeProjectManager.CMakeBuildConfiguration - 3 + 2 0 @@ -262,7 +216,7 @@ true false true - D:/workspace/p_camera_light_source_timing_controller/build-camera_light_src_timing_controller_pc-Desktop_Qt_5_12_12_MinGW_64_bit-Release + D:/zfpge_workspace/p_camera_light_source_timing_controller/camera_light_src_timing_controller_pc/build 1 diff --git a/IFlytopLTC/D3Dcompiler_47.dll b/IFlytopLTC/D3Dcompiler_47.dll new file mode 100644 index 0000000..56512f5 Binary files /dev/null and b/IFlytopLTC/D3Dcompiler_47.dll differ diff --git a/IFlytopLTC/Qt5Core.dll b/IFlytopLTC/Qt5Core.dll new file mode 100644 index 0000000..4712ed1 Binary files /dev/null and b/IFlytopLTC/Qt5Core.dll differ diff --git a/IFlytopLTC/Qt5Gui.dll b/IFlytopLTC/Qt5Gui.dll new file mode 100644 index 0000000..0a557c1 Binary files /dev/null and b/IFlytopLTC/Qt5Gui.dll differ diff --git a/IFlytopLTC/Qt5SerialPort.dll b/IFlytopLTC/Qt5SerialPort.dll new file mode 100644 index 0000000..1c5b2d0 Binary files /dev/null and b/IFlytopLTC/Qt5SerialPort.dll differ diff --git a/IFlytopLTC/Qt5SerialPortd.dll b/IFlytopLTC/Qt5SerialPortd.dll new file mode 100644 index 0000000..ef0874d Binary files /dev/null and b/IFlytopLTC/Qt5SerialPortd.dll differ diff --git a/IFlytopLTC/Qt5Widgets.dll b/IFlytopLTC/Qt5Widgets.dll new file mode 100644 index 0000000..63cd78d Binary files /dev/null and b/IFlytopLTC/Qt5Widgets.dll differ diff --git a/IFlytopLTC/iconengines/qsvgicond.dll b/IFlytopLTC/iconengines/qsvgicond.dll new file mode 100644 index 0000000..0b8f5ad Binary files /dev/null and b/IFlytopLTC/iconengines/qsvgicond.dll differ diff --git a/IFlytopLTC/imageformats/qgifd.dll b/IFlytopLTC/imageformats/qgifd.dll new file mode 100644 index 0000000..c194f92 Binary files /dev/null and b/IFlytopLTC/imageformats/qgifd.dll differ diff --git a/IFlytopLTC/imageformats/qicnsd.dll b/IFlytopLTC/imageformats/qicnsd.dll new file mode 100644 index 0000000..ab08ec6 Binary files /dev/null and b/IFlytopLTC/imageformats/qicnsd.dll differ diff --git a/IFlytopLTC/imageformats/qicod.dll b/IFlytopLTC/imageformats/qicod.dll new file mode 100644 index 0000000..4bf5c3b Binary files /dev/null and b/IFlytopLTC/imageformats/qicod.dll differ diff --git a/IFlytopLTC/imageformats/qjpegd.dll b/IFlytopLTC/imageformats/qjpegd.dll new file mode 100644 index 0000000..0010180 Binary files /dev/null and b/IFlytopLTC/imageformats/qjpegd.dll differ diff --git a/IFlytopLTC/imageformats/qsvgd.dll b/IFlytopLTC/imageformats/qsvgd.dll new file mode 100644 index 0000000..8f2031f Binary files /dev/null and b/IFlytopLTC/imageformats/qsvgd.dll differ diff --git a/IFlytopLTC/imageformats/qtgad.dll b/IFlytopLTC/imageformats/qtgad.dll new file mode 100644 index 0000000..e60b83e Binary files /dev/null and b/IFlytopLTC/imageformats/qtgad.dll differ diff --git a/IFlytopLTC/imageformats/qtiffd.dll b/IFlytopLTC/imageformats/qtiffd.dll new file mode 100644 index 0000000..b210d4b Binary files /dev/null and b/IFlytopLTC/imageformats/qtiffd.dll differ diff --git a/IFlytopLTC/imageformats/qwbmpd.dll b/IFlytopLTC/imageformats/qwbmpd.dll new file mode 100644 index 0000000..5d68aae Binary files /dev/null and b/IFlytopLTC/imageformats/qwbmpd.dll differ diff --git a/IFlytopLTC/imageformats/qwebpd.dll b/IFlytopLTC/imageformats/qwebpd.dll new file mode 100644 index 0000000..9af3e05 Binary files /dev/null and b/IFlytopLTC/imageformats/qwebpd.dll differ diff --git a/IFlytopLTC/libEGLd.dll b/IFlytopLTC/libEGLd.dll new file mode 100644 index 0000000..0d58744 Binary files /dev/null and b/IFlytopLTC/libEGLd.dll differ diff --git a/IFlytopLTC/libgcc_s_seh-1.dll b/IFlytopLTC/libgcc_s_seh-1.dll new file mode 100644 index 0000000..4ec945b Binary files /dev/null and b/IFlytopLTC/libgcc_s_seh-1.dll differ diff --git a/IFlytopLTC/libstdc++-6.dll b/IFlytopLTC/libstdc++-6.dll new file mode 100644 index 0000000..8e55acc Binary files /dev/null and b/IFlytopLTC/libstdc++-6.dll differ diff --git a/IFlytopLTC/libwinpthread-1.dll b/IFlytopLTC/libwinpthread-1.dll new file mode 100644 index 0000000..d9f4e1a Binary files /dev/null and b/IFlytopLTC/libwinpthread-1.dll differ diff --git a/IFlytopLTC/platforms/qdirect2d.dll b/IFlytopLTC/platforms/qdirect2d.dll new file mode 100644 index 0000000..0aa3253 Binary files /dev/null and b/IFlytopLTC/platforms/qdirect2d.dll differ diff --git a/IFlytopLTC/platforms/qminimal.dll b/IFlytopLTC/platforms/qminimal.dll new file mode 100644 index 0000000..6116a86 Binary files /dev/null and b/IFlytopLTC/platforms/qminimal.dll differ diff --git a/IFlytopLTC/platforms/qoffscreen.dll b/IFlytopLTC/platforms/qoffscreen.dll new file mode 100644 index 0000000..c8f5790 Binary files /dev/null and b/IFlytopLTC/platforms/qoffscreen.dll differ diff --git a/IFlytopLTC/platforms/qwebgl.dll b/IFlytopLTC/platforms/qwebgl.dll new file mode 100644 index 0000000..75e55d2 Binary files /dev/null and b/IFlytopLTC/platforms/qwebgl.dll differ diff --git a/IFlytopLTC/platforms/qwindows.dll b/IFlytopLTC/platforms/qwindows.dll new file mode 100644 index 0000000..4227915 Binary files /dev/null and b/IFlytopLTC/platforms/qwindows.dll differ diff --git a/IFlytopLTC/platforms/qwindowsd.dll b/IFlytopLTC/platforms/qwindowsd.dll new file mode 100644 index 0000000..da67acb Binary files /dev/null and b/IFlytopLTC/platforms/qwindowsd.dll differ diff --git a/IFlytopLTC/styles/qwindowsvistastyled.dll b/IFlytopLTC/styles/qwindowsvistastyled.dll new file mode 100644 index 0000000..d46051e Binary files /dev/null and b/IFlytopLTC/styles/qwindowsvistastyled.dll differ diff --git a/README.md b/README.md index f5ae0e8..1995dd2 100644 --- a/README.md +++ b/README.md @@ -3,5 +3,6 @@ V14: 修正光源亮度每次提交都会递减的BUG - +V18: + 添加信号延迟配置功能 ``` \ No newline at end of file diff --git a/mainwindow.cpp b/mainwindow.cpp index 390fa54..a0d32d1 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -158,6 +158,7 @@ zaf_error_code_t MainWindow::updatePage() { { InternalSig src; + uint32_t delay; uint32_t width; uint32_t offset; float duty; @@ -165,6 +166,7 @@ zaf_error_code_t MainWindow::updatePage() { #define UPDATE(index) \ src = InternalSig(ui->LightSrcX_TriSrc_##index->currentText().toStdString()); \ + delay = ui->LightSrcX_TriggerModePluseDelay_##index->text().toUInt(); \ width = ui->LightSrcX_TriggerModePluseWidth_##index->text().toUInt(); \ offset = ui->LightSrcX_TriggerModeFirstPluseOffset_##index->text().toUInt(); \ duty = ui->LightSrcX_LightIntensityDuty_##index->text().toFloat(); \ @@ -172,6 +174,7 @@ zaf_error_code_t MainWindow::updatePage() { DO(m_clstc->LightSrcX_setTriSrc(index, src)); \ DO(m_clstc->LightSrcX_setTriggerModePluseWidth(index, width)); \ DO(m_clstc->LightSrcX_setTriggerModeFirstPluseOffset(index, offset)); \ + DO(m_clstc->LightSrcX_setTriggerModePluseDelay(index, offset)); \ DO(m_clstc->LightSrcX_setLightIntensityDuty(index, duty)); \ DO(m_clstc->LightSrcX_setLightDriverFreq(index, freq)); @@ -384,6 +387,7 @@ zaf_error_code_t MainWindow::refreshPage() { { InternalSig src; uint32_t width; + uint32_t delay; uint32_t offset; float duty; float freq; @@ -392,11 +396,13 @@ zaf_error_code_t MainWindow::refreshPage() { DO(m_clstc->LightSrcX_getTriSrc(index, src)); \ DO(m_clstc->LightSrcX_getTriggerModePluseWidth(index, width)); \ DO(m_clstc->LightSrcX_getTriggerModeFirstPluseOffset(index, offset)); \ + DO(m_clstc->LightSrcX_getTriggerModePluseDelay(index, delay)); \ DO(m_clstc->LightSrcX_getLightIntensityDuty(index, duty)); \ DO(m_clstc->LightSrcX_getLightDriverFreq(index, freq)); \ ui->LightSrcX_TriSrc_##index->setCurrentText(QString::fromStdString(src.toString())); \ ui->LightSrcX_TriggerModePluseWidth_##index->setText(QString::number(width)); \ ui->LightSrcX_TriggerModeFirstPluseOffset_##index->setText(QString::number(offset)); \ + ui->LightSrcX_TriggerModePluseDelay_##index->setText(QString::number(delay)); \ ui->LightSrcX_LightIntensityDuty_##index->setText(QString::number(duty, 'f', 3)); \ ui->LightSrcX_LightDriverFreq_##index->setText(QString::number(freq, 'f', 2)); @@ -917,7 +923,6 @@ void MainWindow::exitProfessionalModel() { LightSrcX_TriSrc_QStringList.append(QString::fromStdString(InternalSig(InternalSig::EXT_TRIGGER_3).toString())); LightSrcX_TriSrc_QStringList.append(QString::fromStdString(InternalSig(InternalSig::EXT_TRIGGER_4).toString())); - ui->LightSrcX_TriSrc_1->clear(); ui->LightSrcX_TriSrc_2->clear(); ui->LightSrcX_TriSrc_3->clear(); @@ -956,6 +961,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi // qInstallMessageHandler(log_output); connect(this, SIGNAL(doinui_signal(QFunction)), this, SLOT(doinui_slot(QFunction))); constructUI(); + ui->UpperVersion->setText(QString::number(VERSION)); exitProfessionalModel(); // setWindowIcon(QIcon(QApplication::applicationDirPath() + "/logo.png")); diff --git a/mainwindow.ui b/mainwindow.ui index a3a1551..0ddb6b1 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -6,8 +6,8 @@ 0 0 - 1106 - 966 + 1125 + 1042 @@ -17,7 +17,7 @@ - 相机光源和时序控制器V17 + 相机光源和时序控制器 /* @@ -1226,7 +1226,7 @@ QGroupBox:title { - 0 + 2 true @@ -3044,7 +3044,7 @@ QGroupBox:title { 光源3 - + @@ -3069,8 +3069,8 @@ QGroupBox:title { - - + + 0 @@ -3079,18 +3079,14 @@ QGroupBox:title { - - - - - 0 - 25 - + + + + + 1 + 0 + - - - - 0 @@ -3099,8 +3095,8 @@ QGroupBox:title { - - + + 0 @@ -3120,40 +3116,25 @@ QGroupBox:title { - 光源驱动器状态 + 输出信号周期探测(us) - - - - - 0 - 0 - - + + 0 25 - - - 16777215 - 25 - - - - 输出信号周期探测(us) - - - + + - 1 + 0 0 @@ -3170,37 +3151,32 @@ QGroupBox:title { - 触发源 + 脉冲偏移(100ns) - - - - - 0 - 0 - - + + 0 25 - + + + + + - 16777215 + 0 25 - - 光源亮度(%) - - - + + 0 @@ -3209,7 +3185,7 @@ QGroupBox:title { - + @@ -3219,8 +3195,15 @@ QGroupBox:title { - - + + + + Qt::Horizontal + + + + + 0 @@ -3229,8 +3212,8 @@ QGroupBox:title { - - + + 0 @@ -3250,11 +3233,11 @@ QGroupBox:title { - 脉冲偏移(100ns) + 光源亮度(%) - + @@ -3279,15 +3262,31 @@ QGroupBox:title { - - - - Qt::Horizontal + + + + + 0 + 25 + - - + + + + Qt::Vertical + + + + 20 + 40 + + + + + + 0 @@ -3307,25 +3306,40 @@ QGroupBox:title { - 脉冲宽度(100ns) + 光源驱动器状态 - - + + + + + 1 + 0 + + 0 25 + + + 16777215 + 25 + + + + 触发源 + - - + + - 1 + 0 0 @@ -3335,20 +3349,41 @@ QGroupBox:title { 25 + + + 16777215 + 25 + + + + 脉冲宽度(100ns) + - - - - Qt::Vertical + + + + + 0 + 0 + - + - 20 - 40 + 0 + 25 - + + + 16777215 + 25 + + + + 脉冲延迟(1ms) + + @@ -3371,7 +3406,7 @@ QGroupBox:title { 光源1 - + @@ -3396,8 +3431,8 @@ QGroupBox:title { - - + + 0 @@ -3417,15 +3452,15 @@ QGroupBox:title { - 脉冲偏移(100ns) + 输出信号周期探测(us) - - + + - 1 + 0 0 @@ -3435,9 +3470,18 @@ QGroupBox:title { 25 + + + 16777215 + 25 + + + + 脉冲宽度(100ns) + - + @@ -3462,8 +3506,18 @@ QGroupBox:title { - - + + + + + 0 + 25 + + + + + + 0 @@ -3483,12 +3537,12 @@ QGroupBox:title { - 脉冲宽度(100ns) + 输入信号周期探测(us) - - + + 0 @@ -3497,28 +3551,33 @@ QGroupBox:title { - - + + + + + 1 + 0 + + 0 25 - - - - - + - 0 + 16777215 25 + + 触发源 + - - + + 0 @@ -3527,8 +3586,21 @@ QGroupBox:title { - - + + + + Qt::Vertical + + + + 20 + 40 + + + + + + 0 @@ -3537,8 +3609,8 @@ QGroupBox:title { - - + + 0 @@ -3547,8 +3619,8 @@ QGroupBox:title { - - + + 0 @@ -3558,7 +3630,7 @@ QGroupBox:title { - + 0 @@ -3578,12 +3650,12 @@ QGroupBox:title { - 光源亮度(%) + 脉冲偏移(100ns) - - + + 0 @@ -3603,22 +3675,15 @@ QGroupBox:title { - 输出信号周期探测(us) - - - - - - - Qt::Horizontal + 光源亮度(%) - - + + - 0 + 1 0 @@ -3628,22 +3693,30 @@ QGroupBox:title { 25 - + + + + + + Qt::Horizontal + + + + + + - 16777215 + 0 25 - - 输入信号周期探测(us) - - - + + - 1 + 0 0 @@ -3660,22 +3733,19 @@ QGroupBox:title { - 触发源 + 脉冲延迟(1ms) - - - - Qt::Vertical - - + + + - 20 - 40 + 0 + 25 - + @@ -3698,14 +3768,17 @@ QGroupBox:title { 光源2 - - - - Qt::Horizontal + + + + + 0 + 25 + - + @@ -3730,8 +3803,8 @@ QGroupBox:title { - - + + 0 @@ -3751,40 +3824,48 @@ QGroupBox:title { - 光源驱动频率(HZ) + 输入信号周期探测(us) - - - - - 1 - 0 - + + + + Qt::Vertical + + + + 20 + 40 + + + + + 0 25 - + + + + + - 16777215 + 0 25 - - 触发源 - - - + + - 0 + 1 0 @@ -3794,19 +3875,10 @@ QGroupBox:title { 25 - - - 16777215 - 25 - - - - 输入信号周期探测(us) - - - + + 0 @@ -3826,12 +3898,12 @@ QGroupBox:title { - 脉冲偏移(100ns) + 光源驱动器状态 - - + + 0 @@ -3851,12 +3923,12 @@ QGroupBox:title { - 光源驱动器状态 + 输出信号周期探测(us) - - + + 0 @@ -3865,18 +3937,40 @@ QGroupBox:title { - - + + + + Qt::Horizontal + + + + + + + + 0 + 0 + + 0 25 + + + 16777215 + 25 + + + + 光源驱动频率(HZ) + - + 0 @@ -3885,11 +3979,11 @@ QGroupBox:title { - - + + - 1 + 0 0 @@ -3899,13 +3993,22 @@ QGroupBox:title { 25 + + + 16777215 + 25 + + + + 脉冲宽度(100ns) + - - + + - 0 + 1 0 @@ -3922,22 +4025,37 @@ QGroupBox:title { - 输出信号周期探测(us) + 触发源 - - + + + + + 0 + 0 + + 0 25 + + + 16777215 + 25 + + + + 脉冲偏移(100ns) + - - + + 0 @@ -3946,8 +4064,8 @@ QGroupBox:title { - - + + 0 @@ -3956,8 +4074,8 @@ QGroupBox:title { - - + + 0 @@ -3967,7 +4085,7 @@ QGroupBox:title { - + 0 @@ -3987,23 +4105,10 @@ QGroupBox:title { - 脉冲宽度(100ns) + 脉冲延迟(1ms) - - - - Qt::Vertical - - - - 20 - 40 - - - - @@ -4025,7 +4130,7 @@ QGroupBox:title { 光源4 - + @@ -4035,8 +4140,8 @@ QGroupBox:title { - - + + 0 @@ -4045,11 +4150,24 @@ QGroupBox:title { - - + + + + Qt::Vertical + + + + 20 + 40 + + + + + + - 0 + 1 0 @@ -4066,35 +4184,40 @@ QGroupBox:title { - 输入信号周期探测(us) + 触发源 - - + + + + + 0 + 0 + + 0 25 - - - - - + - 0 + 16777215 25 + + 脉冲偏移(100ns) + - - + + - 1 + 0 0 @@ -4111,12 +4234,12 @@ QGroupBox:title { - 触发源 + 光源驱动器状态 - - + + 0 @@ -4136,21 +4259,11 @@ QGroupBox:title { - 脉冲偏移(100ns) - - - - - - - - 0 - 25 - + 光源亮度(%) - + @@ -4175,8 +4288,8 @@ QGroupBox:title { - - + + 0 @@ -4196,21 +4309,18 @@ QGroupBox:title { - 光源驱动器状态 + 输入信号周期探测(us) - - - - - 0 - 25 - + + + + Qt::Horizontal - + @@ -4235,14 +4345,8 @@ QGroupBox:title { - - - - - 1 - 0 - - + + 0 @@ -4251,7 +4355,7 @@ QGroupBox:title { - + @@ -4276,15 +4380,64 @@ QGroupBox:title { - - - - Qt::Horizontal + + + + + 0 + 25 + - - + + + + + 0 + 25 + + + + + + + + + 0 + 25 + + + + + + + + + 0 + 25 + + + + + + + + + 1 + 0 + + + + + 0 + 25 + + + + + + 0 @@ -4304,12 +4457,12 @@ QGroupBox:title { - 光源亮度(%) + 脉冲延迟(1ms) - - + + 0 @@ -4318,19 +4471,6 @@ QGroupBox:title { - - - - Qt::Vertical - - - - 20 - 40 - - - - @@ -5425,8 +5565,8 @@ p, li { white-space: pre-wrap; } 0 0 - 1106 - 20 + 1125 + 23 diff --git a/src/camera_light_src_timing_controller/clst_controler.cpp b/src/camera_light_src_timing_controller/clst_controler.cpp index 7eb77b8..dd66a51 100644 --- a/src/camera_light_src_timing_controller/clst_controler.cpp +++ b/src/camera_light_src_timing_controller/clst_controler.cpp @@ -592,6 +592,12 @@ zaf_error_code_t CLSTControler::LightSrcX_setTriggerModePluseWidth(int32_t index if (index < 1 || index > 4) return kaf_ec_param_error; return reg_write(kreg_light_ctrol_module1_trigger_mode_pluse_width + (index - 1) * 32, width * 10); // 0.1us } + +zaf_error_code_t CLSTControler::LightSrcX_setTriggerModePluseDelay(int32_t index, uint32_t width) { // + if (index < 1 || index > 4) return kaf_ec_param_error; + return reg_write(kreg_light_ctrol_module1_trigger_mode_pluse_delay + (index - 1) * 32, width); // 0.1us +} + zaf_error_code_t CLSTControler::LightSrcX_setTriggerModeFirstPluseOffset(int32_t index, uint32_t offset) { // if (index < 1 || index > 4) return kaf_ec_param_error; return reg_write(kreg_light_ctrol_module1_trigger_mode_first_pluse_offset + (index - 1) * 32, offset * 10); // 0.1us @@ -647,6 +653,12 @@ zaf_error_code_t CLSTControler::LightSrcX_getTriggerModeFirstPluseOffset(int32_t offset = val / 10; return kaf_ec_success; } +zaf_error_code_t CLSTControler::LightSrcX_getTriggerModePluseDelay(int32_t index, uint32_t &offset) { // + if (index < 1 || index > 4) return kaf_ec_param_error; + uint32_t val; + DO_CMD(reg_read(kreg_light_ctrol_module1_trigger_mode_pluse_delay + (index - 1) * 32, val)); + return kaf_ec_success; +} zaf_error_code_t CLSTControler::LightSrcX_getLightIntensityDuty(int32_t index, float &duty) { // if (index < 1 || index > 4) return kaf_ec_param_error; uint32_t freqcnt = 0; diff --git a/src/camera_light_src_timing_controller/clst_controler.hpp b/src/camera_light_src_timing_controller/clst_controler.hpp index 80bf15a..88ac01e 100644 --- a/src/camera_light_src_timing_controller/clst_controler.hpp +++ b/src/camera_light_src_timing_controller/clst_controler.hpp @@ -31,7 +31,7 @@ typedef function raw_ class IDataChannel { public: - virtual ~IDataChannel(){}; + virtual ~IDataChannel() {}; virtual bool isOpen() = 0; virtual bool send(const uint8_t *data, size_t len) = 0; virtual void regRxListener(function cb) = 0; @@ -143,12 +143,14 @@ class CLSTControler { * 光源控制 * *******************************************************************************/ zaf_error_code_t LightSrcX_setTriSrc(int32_t index, InternalSig src); + zaf_error_code_t LightSrcX_setTriggerModePluseDelay(int32_t index, uint32_t width); zaf_error_code_t LightSrcX_setTriggerModePluseWidth(int32_t index, uint32_t width); zaf_error_code_t LightSrcX_setTriggerModeFirstPluseOffset(int32_t index, uint32_t offset); zaf_error_code_t LightSrcX_setLightIntensityDuty(int32_t index, float duty); zaf_error_code_t LightSrcX_setLightDriverFreq(int32_t index, float freq); zaf_error_code_t LightSrcX_getTriSrc(int32_t index, InternalSig &src); + zaf_error_code_t LightSrcX_getTriggerModePluseDelay(int32_t index, uint32_t &width); zaf_error_code_t LightSrcX_getTriggerModePluseWidth(int32_t index, uint32_t &width); zaf_error_code_t LightSrcX_getTriggerModeFirstPluseOffset(int32_t index, uint32_t &offset); zaf_error_code_t LightSrcX_getLightIntensityDuty(int32_t index, float &duty); diff --git a/src/camera_light_src_timing_controller/reginfo.cpp b/src/camera_light_src_timing_controller/reginfo.cpp index 043d420..df8ba49 100644 --- a/src/camera_light_src_timing_controller/reginfo.cpp +++ b/src/camera_light_src_timing_controller/reginfo.cpp @@ -153,7 +153,7 @@ using namespace std; // kreg_light_ctrol_module1_trigger_mode_pluse_interval = REGADDOFF__LIGHT_CTROL_MODULE1 + 5, // kreg_light_ctrol_module1_trigger_mode_pluse_width = REGADDOFF__LIGHT_CTROL_MODULE1 + 6, // kreg_light_ctrol_module1_trigger_mode_first_pluse_offset = REGADDOFF__LIGHT_CTROL_MODULE1 + 7, -// kreg_light_ctrol_module1_trigger_mode_output_polarity = REGADDOFF__LIGHT_CTROL_MODULE1 + 8, // 无用 +// kreg_light_ctrol_module1_trigger_mode_pluse_delay = REGADDOFF__LIGHT_CTROL_MODULE1 + 8, // 无用 // kreg_light_ctrol_module1_light_intensity_cnt = REGADDOFF__LIGHT_CTROL_MODULE1 + 9, // kreg_light_ctrol_module1_light_driver_freq_cnt = REGADDOFF__LIGHT_CTROL_MODULE1 + 10, // kreg_light_ctrol_module1_freq_detect_bias = REGADDOFF__LIGHT_CTROL_MODULE1 + 12, @@ -169,7 +169,7 @@ using namespace std; // kreg_light_ctrol_module2_trigger_mode_pluse_interval = REGADDOFF__LIGHT_CTROL_MODULE2 + 5, // kreg_light_ctrol_module2_trigger_mode_pluse_width = REGADDOFF__LIGHT_CTROL_MODULE2 + 6, // kreg_light_ctrol_module2_trigger_mode_first_pluse_offset = REGADDOFF__LIGHT_CTROL_MODULE2 + 7, -// kreg_light_ctrol_module2_trigger_mode_output_polarity = REGADDOFF__LIGHT_CTROL_MODULE2 + 8, +// kreg_light_ctrol_module2_trigger_mode_pluse_delay = REGADDOFF__LIGHT_CTROL_MODULE2 + 8, // kreg_light_ctrol_module2_light_intensity_cnt = REGADDOFF__LIGHT_CTROL_MODULE2 + 9, // kreg_light_ctrol_module2_light_driver_freq_cnt = REGADDOFF__LIGHT_CTROL_MODULE2 + 10, // kreg_light_ctrol_module2_freq_detect_bias = REGADDOFF__LIGHT_CTROL_MODULE2 + 12, @@ -185,7 +185,7 @@ using namespace std; // kreg_light_ctrol_module3_trigger_mode_pluse_interval = REGADDOFF__LIGHT_CTROL_MODULE3 + 5, // kreg_light_ctrol_module3_trigger_mode_pluse_width = REGADDOFF__LIGHT_CTROL_MODULE3 + 6, // kreg_light_ctrol_module3_trigger_mode_first_pluse_offset = REGADDOFF__LIGHT_CTROL_MODULE3 + 7, -// kreg_light_ctrol_module3_trigger_mode_output_polarity = REGADDOFF__LIGHT_CTROL_MODULE3 + 8, +// kreg_light_ctrol_module3_trigger_mode_pluse_delay = REGADDOFF__LIGHT_CTROL_MODULE3 + 8, // kreg_light_ctrol_module3_light_intensity_cnt = REGADDOFF__LIGHT_CTROL_MODULE3 + 9, // kreg_light_ctrol_module3_light_driver_freq_cnt = REGADDOFF__LIGHT_CTROL_MODULE3 + 10, // kreg_light_ctrol_module3_freq_detect_bias = REGADDOFF__LIGHT_CTROL_MODULE3 + 12, @@ -201,7 +201,7 @@ using namespace std; // kreg_light_ctrol_module4_trigger_mode_pluse_interval = REGADDOFF__LIGHT_CTROL_MODULE4 + 5, // kreg_light_ctrol_module4_trigger_mode_pluse_width = REGADDOFF__LIGHT_CTROL_MODULE4 + 6, // kreg_light_ctrol_module4_trigger_mode_first_pluse_offset = REGADDOFF__LIGHT_CTROL_MODULE4 + 7, -// kreg_light_ctrol_module4_trigger_mode_output_polarity = REGADDOFF__LIGHT_CTROL_MODULE4 + 8, +// kreg_light_ctrol_module4_trigger_mode_pluse_delay = REGADDOFF__LIGHT_CTROL_MODULE4 + 8, // kreg_light_ctrol_module4_light_intensity_cnt = REGADDOFF__LIGHT_CTROL_MODULE4 + 9, // kreg_light_ctrol_module4_light_driver_freq_cnt = REGADDOFF__LIGHT_CTROL_MODULE4 + 10, // kreg_light_ctrol_module4_freq_detect_bias = REGADDOFF__LIGHT_CTROL_MODULE4 + 12, @@ -321,7 +321,7 @@ static map reginfo_map = { {kreg_light_ctrol_module1_trigger_mode_pluse_interval, {}}, {kreg_light_ctrol_module1_trigger_mode_pluse_width, {}}, {kreg_light_ctrol_module1_trigger_mode_first_pluse_offset, {}}, - {kreg_light_ctrol_module1_trigger_mode_output_polarity, {}}, + {kreg_light_ctrol_module1_trigger_mode_pluse_delay, {}}, {kreg_light_ctrol_module1_light_intensity_cnt, {}}, {kreg_light_ctrol_module1_light_driver_freq_cnt, {}}, {kreg_light_ctrol_module1_freq_detect_bias, {}}, @@ -336,7 +336,7 @@ static map reginfo_map = { {kreg_light_ctrol_module2_trigger_mode_pluse_interval, {}}, {kreg_light_ctrol_module2_trigger_mode_pluse_width, {}}, {kreg_light_ctrol_module2_trigger_mode_first_pluse_offset, {}}, - {kreg_light_ctrol_module2_trigger_mode_output_polarity, {}}, + {kreg_light_ctrol_module2_trigger_mode_pluse_delay, {}}, {kreg_light_ctrol_module2_light_intensity_cnt, {}}, {kreg_light_ctrol_module2_light_driver_freq_cnt, {}}, {kreg_light_ctrol_module2_freq_detect_bias, {}}, @@ -351,7 +351,7 @@ static map reginfo_map = { {kreg_light_ctrol_module3_trigger_mode_pluse_interval, {}}, {kreg_light_ctrol_module3_trigger_mode_pluse_width, {}}, {kreg_light_ctrol_module3_trigger_mode_first_pluse_offset, {}}, - {kreg_light_ctrol_module3_trigger_mode_output_polarity, {}}, + {kreg_light_ctrol_module3_trigger_mode_pluse_delay, {}}, {kreg_light_ctrol_module3_light_intensity_cnt, {}}, {kreg_light_ctrol_module3_light_driver_freq_cnt, {}}, {kreg_light_ctrol_module3_freq_detect_bias, {}}, @@ -366,7 +366,7 @@ static map reginfo_map = { {kreg_light_ctrol_module4_trigger_mode_pluse_interval, {}}, {kreg_light_ctrol_module4_trigger_mode_pluse_width, {}}, {kreg_light_ctrol_module4_trigger_mode_first_pluse_offset, {}}, - {kreg_light_ctrol_module4_trigger_mode_output_polarity, {}}, + {kreg_light_ctrol_module4_trigger_mode_pluse_delay, {}}, {kreg_light_ctrol_module4_light_intensity_cnt, {}}, {kreg_light_ctrol_module4_light_driver_freq_cnt, {}}, {kreg_light_ctrol_module4_freq_detect_bias, {}}, diff --git a/src/version.h b/src/version.h index 40f364b..88ff3eb 100644 --- a/src/version.h +++ b/src/version.h @@ -1,4 +1,4 @@ #pragma once -#define VERSION 17 +#define VERSION 18 #define MAUFACTURER "iflytop" \ No newline at end of file diff --git a/zaf_protocol b/zaf_protocol index 6f94a41..5452738 160000 --- a/zaf_protocol +++ b/zaf_protocol @@ -1 +1 @@ -Subproject commit 6f94a41f67b7993bde43349268ef71f21d668aab +Subproject commit 54527389fb8f81bb68112c3b09c5e84eb6fe76e8 diff --git a/单文件制作_x64.exe b/单文件制作_x64.exe new file mode 100644 index 0000000..0e66444 Binary files /dev/null and b/单文件制作_x64.exe differ