zhaohe 7 months ago
parent
commit
b5c9ea3024
  1. 5
      .gitignore
  2. 28
      README.md
  3. BIN
      appenv/IFlytopLTC.exe
  4. 0
      appenv/Qt5Core.dll
  5. 0
      appenv/Qt5Gui.dll
  6. 0
      appenv/Qt5SerialPort.dll
  7. 0
      appenv/Qt5Widgets.dll
  8. 0
      appenv/iconengines/qsvgicond.dll
  9. 0
      appenv/imageformats/qgifd.dll
  10. 0
      appenv/imageformats/qicnsd.dll
  11. 0
      appenv/imageformats/qicod.dll
  12. 0
      appenv/imageformats/qsvgd.dll
  13. 0
      appenv/imageformats/qtgad.dll
  14. 0
      appenv/imageformats/qtiffd.dll
  15. 0
      appenv/imageformats/qwbmpd.dll
  16. 0
      appenv/libgcc_s_seh-1.dll
  17. 0
      appenv/libstdc++-6.dll
  18. 0
      appenv/libwinpthread-1.dll
  19. 0
      appenv/platforms/qdirect2d.dll
  20. 0
      appenv/platforms/qminimal.dll
  21. 0
      appenv/platforms/qoffscreen.dll
  22. 0
      appenv/platforms/qwebgl.dll
  23. 0
      appenv/platforms/qwindows.dll
  24. 0
      appenv/styles/qwindowsvistastyled.dll
  25. 6
      build.bat
  26. 1
      init.bat
  27. 3
      mainwindow.cpp
  28. 708
      mainwindow.ui
  29. BIN
      makesfx.exe
  30. BIN
      release/IFlytopLTC_V19.exe
  31. BIN
      release/IFlytopLTC_v20.exe
  32. BIN
      release/RELEASE17/光源和时序控制器V17.exe
  33. 0
      release/RELEASE21/IFlytopLTC_V21.exe
  34. 17
      src/camera_light_src_timing_controller/clst_controler.cpp
  35. 1
      src/camera_light_src_timing_controller/clst_controler.hpp
  36. 2
      src/version.h
  37. BIN
      单文件制作_x64.exe

5
.gitignore

@ -70,4 +70,7 @@ Thumbs.db
# --------
build
build
IFlytopLTC/IFlytopLTC.exe
appenv/app.exe
dist/app.exe

28
README.md

@ -3,8 +3,36 @@
V14:
修正光源亮度每次提交都会递减的BUG
V17:
旧版本硬件稳定版本
V18:
添加信号延迟配置功能
V19,20:
修复信号延迟配置功能的BUG
V22:
基于V17,调整光源亮度计算公式 为duty = 59- 0.58773 * duty;
```
```
编译说明
1. 使用QTCreater可以打开工程后直接编译
2. 命令行编译指令如下
./init.bat
./build.bat
```
```
特殊版本说明:
V17: 旧版本硬件稳定版本
V21: 添加信号延迟配置功能,该功能仅作为一个临时的调试功能,在后续版本中被删除
```

BIN
appenv/IFlytopLTC.exe

0
IFlytopLTC/Qt5Core.dll → appenv/Qt5Core.dll

0
IFlytopLTC/Qt5Gui.dll → appenv/Qt5Gui.dll

0
IFlytopLTC/Qt5SerialPort.dll → appenv/Qt5SerialPort.dll

0
IFlytopLTC/Qt5Widgets.dll → appenv/Qt5Widgets.dll

0
IFlytopLTC/iconengines/qsvgicond.dll → appenv/iconengines/qsvgicond.dll

0
IFlytopLTC/imageformats/qgifd.dll → appenv/imageformats/qgifd.dll

0
IFlytopLTC/imageformats/qicnsd.dll → appenv/imageformats/qicnsd.dll

0
IFlytopLTC/imageformats/qicod.dll → appenv/imageformats/qicod.dll

0
IFlytopLTC/imageformats/qsvgd.dll → appenv/imageformats/qsvgd.dll

0
IFlytopLTC/imageformats/qtgad.dll → appenv/imageformats/qtgad.dll

0
IFlytopLTC/imageformats/qtiffd.dll → appenv/imageformats/qtiffd.dll

0
IFlytopLTC/imageformats/qwbmpd.dll → appenv/imageformats/qwbmpd.dll

0
IFlytopLTC/libgcc_s_seh-1.dll → appenv/libgcc_s_seh-1.dll

0
IFlytopLTC/libstdc++-6.dll → appenv/libstdc++-6.dll

0
IFlytopLTC/libwinpthread-1.dll → appenv/libwinpthread-1.dll

0
IFlytopLTC/platforms/qdirect2d.dll → appenv/platforms/qdirect2d.dll

0
IFlytopLTC/platforms/qminimal.dll → appenv/platforms/qminimal.dll

0
IFlytopLTC/platforms/qoffscreen.dll → appenv/platforms/qoffscreen.dll

0
IFlytopLTC/platforms/qwebgl.dll → appenv/platforms/qwebgl.dll

0
IFlytopLTC/platforms/qwindows.dll → appenv/platforms/qwindows.dll

0
IFlytopLTC/styles/qwindowsvistastyled.dll → appenv/styles/qwindowsvistastyled.dll

6
build.bat

@ -0,0 +1,6 @@
cd build
make -j8
cd ..
copy build\CameraLightingController.exe appenv\app.exe
@REM #打包指令
.\makesfx.exe -ic -mf -ft -we -di -un -oo .\appenv\ .\dist\app.exe .\logo.ico .\appenv\app.exe

1
init.bat

@ -0,0 +1 @@
"C:\Program Files\CMake\bin\cmake.exe" -B "build" "-GMinGW Makefiles" "-DCMAKE_BUILD_TYPE:STRING=Release" "-DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=C:/Qt/Qt5.12.12/Tools/QtCreator/share/qtcreator/package-manager/auto-setup.cmake" "-DQT_QMAKE_EXECUTABLE:STRING=C:/Qt/Qt5.12.12/5.12.12/mingw73_64/bin/qmake.exe" "-DCMAKE_PREFIX_PATH:STRING=C:/Qt/Qt5.12.12/5.12.12/mingw73_64" "-DCMAKE_C_COMPILER:STRING=C:/Qt/Qt5.12.12/Tools/mingw730_64/bin/gcc.exe" "-DCMAKE_CXX_COMPILER:STRING=C:/Qt/Qt5.12.12/Tools/mingw730_64/bin/g++.exe"

3
mainwindow.cpp

@ -166,7 +166,6 @@ 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(); \
@ -174,7 +173,6 @@ 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, delay)); \
DO(m_clstc->LightSrcX_setLightIntensityDuty(index, duty)); \
DO(m_clstc->LightSrcX_setLightDriverFreq(index, freq));
@ -402,7 +400,6 @@ zaf_error_code_t MainWindow::refreshPage() {
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));

708
mainwindow.ui
File diff suppressed because it is too large
View File

BIN
makesfx.exe

BIN
release/IFlytopLTC_V19.exe

BIN
release/IFlytopLTC_v20.exe

BIN
release/RELEASE17/光源和时序控制器V17.exe

0
release/IFlytopLTC_V21.exe → release/RELEASE21/IFlytopLTC_V21.exe

17
src/camera_light_src_timing_controller/clst_controler.cpp

@ -593,18 +593,21 @@ zaf_error_code_t CLSTControler::LightSrcX_setTriggerModePluseWidth(int32_t index
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 delay) { //
if (index < 1 || index > 4) return kaf_ec_param_error;
return reg_write(kreg_light_ctrol_module1_trigger_mode_pluse_delay + (index - 1) * 32, delay); // 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
}
zaf_error_code_t CLSTControler::LightSrcX_setLightIntensityDuty(int32_t index, float duty) { //
if (index < 1 || index > 4) return kaf_ec_param_error;
duty=duty*0.4;
//
// !!!! 占空比预修正 !!!!
//
// duty = duty * 0.4; //旧设备
// duty = (0.767 - duty / 100.0 * 0.25 * 4.13 * 0.74) * 100 / 5 / 0.26; 新设备 ==> duty = 59- 0.58773 * duty
//
duty = 59- 0.58773 * duty;
uint32_t freqcnt = 0;
DO_CMD(reg_read(kreg_light_ctrol_module1_light_driver_freq_cnt + (index - 1) * 32, freqcnt));
@ -669,7 +672,7 @@ zaf_error_code_t CLSTControler::LightSrcX_getLightIntensityDuty(int32_t index, f
DO_CMD(reg_read(kreg_light_ctrol_module1_light_intensity_cnt + (index - 1) * 32, cnt));
duty = (cnt * 100.0 / freqcnt);
duty=duty/0.4;
duty = duty / 0.4;
return kaf_ec_success;
}

1
src/camera_light_src_timing_controller/clst_controler.hpp

@ -143,7 +143,6 @@ class CLSTControler {
* *
*******************************************************************************/
zaf_error_code_t LightSrcX_setTriSrc(int32_t index, InternalSig src);
zaf_error_code_t LightSrcX_setTriggerModePluseDelay(int32_t index, uint32_t delay);
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);

2
src/version.h

@ -1,4 +1,4 @@
#pragma once
#define VERSION 21
#define VERSION 22
#define MAUFACTURER "iflytop"

BIN
单文件制作_x64.exe

Loading…
Cancel
Save