zhaohe 1 year ago
parent
commit
b658219700
  1. 27
      README.md
  2. 60
      mainwindow.cpp
  3. 173
      mainwindow.ui
  4. 24
      src/camera_light_src_timing_controller/clst_controler.cpp
  5. 9
      src/camera_light_src_timing_controller/clst_controler.hpp

27
README.md

@ -1,30 +1,7 @@
```
QT打包:
参考教程
https://blog.csdn.net/ColinFhz/article/details/107879769
logo
https://www.bitbug.net/
V4:
1.修改样式
2.优化打包体积
V14:
修正光源亮度每次提交都会递减的BUG
modbus
设备地址:
波特率 :
读取配置
写入配置
校验配置
配置中有部分配置是只读的,部分配置不需要校验,
1.协议文件
名称,地址,读写特性,备注信息,是否属于配置(如果该配置项是只读的,则只校验配置)
2.配置
地址,数值
地址,数值
```

60
mainwindow.cpp

@ -240,16 +240,16 @@ void MainWindow::refreshReadonlyPage1() {
}
{
float infreq;
float outfreq;
float inperiodus;
float outperiodus;
#define UPDATE(index) \
DO_NO_RET_AND_NOLOG(m_clstc->TriInX_readInSignalFreq(index, infreq)); \
DO_NO_RET_AND_NOLOG(m_clstc->TriInX_readOutSignalFreq(index, outfreq)); \
DO_NO_RET_AND_NOLOG(m_clstc->TriInX_readInSignalPeriodUs(index, inperiodus)); \
DO_NO_RET_AND_NOLOG(m_clstc->TriInX_readOutSignalPeriodUs(index, outperiodus)); \
{ \
emit doinui_signal(QFunction([this, infreq, outfreq]() { \
ui->TriInX_OutSignalFreq_Val_##index->setText(QString::number(outfreq, 'f', 2)); \
ui->TriInX_InSignalFreq_Val_##index->setText(QString::number(infreq, 'f', 2)); \
emit doinui_signal(QFunction([this, inperiodus, outperiodus]() { \
ui->TriInX_OutSignalPeriodUs_Val_##index->setText(QString::number(outperiodus, 'f', 1)); \
ui->TriInX_InSignalPeriodUs_Val_##index->setText(QString::number(inperiodus, 'f', 1)); \
})); \
}
UPDATE(1);
@ -267,18 +267,18 @@ void MainWindow::refreshReadonlyPage2() {
// 刷新光源时序控制页面
{
float infreq;
float outfreq;
float inperiodus;
float outperiodus;
uint32_t state;
#define UPDATE(index) \
DO_NO_RET_AND_NOLOG(m_clstc->LightSrcX_readInSigFreqDetect(index, infreq)); \
DO_NO_RET_AND_NOLOG(m_clstc->LightSrcX_readOutSigFreqDetect(index, outfreq)); \
DO_NO_RET_AND_NOLOG(m_clstc->LightSrcX_readInSigPeriodUsDetect(index, inperiodus)); \
DO_NO_RET_AND_NOLOG(m_clstc->LightSrcX_readOutSigPeriodUsDetect(index, outperiodus)); \
DO_NO_RET_AND_NOLOG(m_clstc->LightSrcX_readLightSrcErrorState(index, state)); \
{ \
emit doinui_signal(QFunction([this, infreq, outfreq, state]() { \
ui->LightSrcX_InSigFreqDetect_##index->setText(QString::number(infreq, 'f', 2)); \
ui->LightSrcX_OutSigFreqDetect_##index->setText(QString::number(outfreq, 'f', 2)); \
emit doinui_signal(QFunction([this, inperiodus, outperiodus, state]() { \
ui->LightSrcX_InSigPeriodUsDetect_##index->setText(QString::number(inperiodus, 'f', 1)); \
ui->LightSrcX_OutSigPeriodUsDetect_##index->setText(QString::number(outperiodus, 'f', 1)); \
ui->LightSrcX_LightSrcErrorState_##index->setText(QString::number(state)); \
})); \
}
@ -633,15 +633,15 @@ void MainWindow::constructUI() {
ui->TriInX_TriggerModeTriggerEdge_Val_4->addItem(QString::fromStdString(TriggerEdge(TriggerEdge::RISING).toString()));
ui->TriInX_TriggerModeTriggerEdge_Val_4->addItem(QString::fromStdString(TriggerEdge(TriggerEdge::FALLING).toString()));
ui->TriInX_InSignalFreq_Val_1->setDisabled(true);
ui->TriInX_InSignalFreq_Val_2->setDisabled(true);
ui->TriInX_InSignalFreq_Val_3->setDisabled(true);
ui->TriInX_InSignalFreq_Val_4->setDisabled(true);
ui->TriInX_InSignalPeriodUs_Val_1->setDisabled(true);
ui->TriInX_InSignalPeriodUs_Val_2->setDisabled(true);
ui->TriInX_InSignalPeriodUs_Val_3->setDisabled(true);
ui->TriInX_InSignalPeriodUs_Val_4->setDisabled(true);
ui->TriInX_OutSignalFreq_Val_1->setDisabled(true);
ui->TriInX_OutSignalFreq_Val_2->setDisabled(true);
ui->TriInX_OutSignalFreq_Val_3->setDisabled(true);
ui->TriInX_OutSignalFreq_Val_4->setDisabled(true);
ui->TriInX_OutSignalPeriodUs_Val_1->setDisabled(true);
ui->TriInX_OutSignalPeriodUs_Val_2->setDisabled(true);
ui->TriInX_OutSignalPeriodUs_Val_3->setDisabled(true);
ui->TriInX_OutSignalPeriodUs_Val_4->setDisabled(true);
/*******************************************************************************
* *
@ -682,15 +682,15 @@ void MainWindow::constructUI() {
ui->LightSrcX_TriSrc_3->addItems(LightSrcX_TriSrc_QStringList);
ui->LightSrcX_TriSrc_4->addItems(LightSrcX_TriSrc_QStringList);
ui->LightSrcX_InSigFreqDetect_1->setDisabled(true);
ui->LightSrcX_InSigFreqDetect_2->setDisabled(true);
ui->LightSrcX_InSigFreqDetect_3->setDisabled(true);
ui->LightSrcX_InSigFreqDetect_4->setDisabled(true);
ui->LightSrcX_InSigPeriodUsDetect_1->setDisabled(true);
ui->LightSrcX_InSigPeriodUsDetect_2->setDisabled(true);
ui->LightSrcX_InSigPeriodUsDetect_3->setDisabled(true);
ui->LightSrcX_InSigPeriodUsDetect_4->setDisabled(true);
ui->LightSrcX_OutSigFreqDetect_1->setDisabled(true);
ui->LightSrcX_OutSigFreqDetect_2->setDisabled(true);
ui->LightSrcX_OutSigFreqDetect_3->setDisabled(true);
ui->LightSrcX_OutSigFreqDetect_4->setDisabled(true);
ui->LightSrcX_OutSigPeriodUsDetect_1->setDisabled(true);
ui->LightSrcX_OutSigPeriodUsDetect_2->setDisabled(true);
ui->LightSrcX_OutSigPeriodUsDetect_3->setDisabled(true);
ui->LightSrcX_OutSigPeriodUsDetect_4->setDisabled(true);
ui->LightSrcX_LightSrcErrorState_1->setDisabled(true);
ui->LightSrcX_LightSrcErrorState_2->setDisabled(true);

173
mainwindow.ui

@ -17,7 +17,7 @@
</sizepolicy>
</property>
<property name="windowTitle">
<string>相机光源和时序控制器V14</string>
<string>相机光源和时序控制器</string>
</property>
<property name="styleSheet">
<string notr="true">/*
@ -1070,34 +1070,24 @@ QGroupBox:title {
<string>软件信息</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="2" column="0">
<widget class="QLabel" name="label_18">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>ARM-版本</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_16">
<item row="0" column="1">
<widget class="QLineEdit" name="UpperVersion">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>FPGA-版本</string>
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_12">
<item row="2" column="0">
<widget class="QLabel" name="label_18">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>1</horstretch>
@ -1105,12 +1095,12 @@ QGroupBox:title {
</sizepolicy>
</property>
<property name="text">
<string>上位机-版本</string>
<string>ARM-版本</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="UpperVersion">
<item row="2" column="1">
<widget class="QLineEdit" name="ARMVersion">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>1</horstretch>
@ -1125,19 +1115,16 @@ QGroupBox:title {
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="ARMVersion">
<item row="0" column="0">
<widget class="QLabel" name="label_12">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
<property name="text">
<string>上位机-版本</string>
</property>
</widget>
</item>
@ -1157,6 +1144,19 @@ QGroupBox:title {
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_16">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>FPGA-版本</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -1226,7 +1226,7 @@ QGroupBox:title {
</size>
</property>
<property name="currentIndex">
<number>4</number>
<number>0</number>
</property>
<property name="tabBarAutoHide">
<bool>true</bool>
@ -1258,7 +1258,7 @@ QGroupBox:title {
<number>20</number>
</property>
<item row="11" column="1">
<widget class="QLineEdit" name="TriInX_InSignalFreq_Val_3">
<widget class="QLineEdit" name="TriInX_InSignalPeriodUs_Val_3">
<property name="minimumSize">
<size>
<width>0</width>
@ -1358,7 +1358,7 @@ QGroupBox:title {
</size>
</property>
<property name="text">
<string>输入频率探测(HZ)</string>
<string>输入周期探测(us)</string>
</property>
</widget>
</item>
@ -1454,7 +1454,7 @@ QGroupBox:title {
</widget>
</item>
<item row="12" column="1">
<widget class="QLineEdit" name="TriInX_OutSignalFreq_Val_3">
<widget class="QLineEdit" name="TriInX_OutSignalPeriodUs_Val_3">
<property name="minimumSize">
<size>
<width>0</width>
@ -1526,7 +1526,7 @@ QGroupBox:title {
</size>
</property>
<property name="text">
<string>输出频率探测(HZ)</string>
<string>输出周期探测(us)</string>
</property>
</widget>
</item>
@ -1825,7 +1825,7 @@ QGroupBox:title {
</size>
</property>
<property name="text">
<string>输出频率探测(HZ)</string>
<string>输出周期探测(us)</string>
</property>
</widget>
</item>
@ -1862,7 +1862,7 @@ QGroupBox:title {
</widget>
</item>
<item row="11" column="1">
<widget class="QLineEdit" name="TriInX_InSignalFreq_Val_4">
<widget class="QLineEdit" name="TriInX_InSignalPeriodUs_Val_4">
<property name="minimumSize">
<size>
<width>0</width>
@ -1917,7 +1917,7 @@ QGroupBox:title {
</size>
</property>
<property name="text">
<string>输入频率探测(HZ)</string>
<string>输入周期探测(us)</string>
</property>
</widget>
</item>
@ -1932,7 +1932,7 @@ QGroupBox:title {
</widget>
</item>
<item row="12" column="1">
<widget class="QLineEdit" name="TriInX_OutSignalFreq_Val_4">
<widget class="QLineEdit" name="TriInX_OutSignalPeriodUs_Val_4">
<property name="minimumSize">
<size>
<width>0</width>
@ -2147,7 +2147,7 @@ QGroupBox:title {
</widget>
</item>
<item row="12" column="1">
<widget class="QLineEdit" name="TriInX_OutSignalFreq_Val_2">
<widget class="QLineEdit" name="TriInX_OutSignalPeriodUs_Val_2">
<property name="minimumSize">
<size>
<width>0</width>
@ -2237,7 +2237,7 @@ QGroupBox:title {
</size>
</property>
<property name="text">
<string>输入频率探测(HZ)</string>
<string>输入周期探测(us)</string>
</property>
</widget>
</item>
@ -2363,7 +2363,7 @@ QGroupBox:title {
</widget>
</item>
<item row="11" column="1">
<widget class="QLineEdit" name="TriInX_InSignalFreq_Val_2">
<widget class="QLineEdit" name="TriInX_InSignalPeriodUs_Val_2">
<property name="minimumSize">
<size>
<width>0</width>
@ -2393,7 +2393,7 @@ QGroupBox:title {
</size>
</property>
<property name="text">
<string>输出频率探测(HZ)</string>
<string>输出周期探测(us)</string>
</property>
</widget>
</item>
@ -2563,7 +2563,7 @@ QGroupBox:title {
</widget>
</item>
<item row="10" column="1">
<widget class="QLineEdit" name="TriInX_InSignalFreq_Val_1">
<widget class="QLineEdit" name="TriInX_InSignalPeriodUs_Val_1">
<property name="minimumSize">
<size>
<width>0</width>
@ -2650,7 +2650,7 @@ QGroupBox:title {
</size>
</property>
<property name="text">
<string>输出频率探测(HZ)</string>
<string>输出周期探测(us)</string>
</property>
</widget>
</item>
@ -2675,12 +2675,12 @@ QGroupBox:title {
</size>
</property>
<property name="text">
<string>输入频率探测(HZ)</string>
<string>输入周期探测(us)</string>
</property>
</widget>
</item>
<item row="11" column="1">
<widget class="QLineEdit" name="TriInX_OutSignalFreq_Val_1">
<widget class="QLineEdit" name="TriInX_OutSignalPeriodUs_Val_1">
<property name="minimumSize">
<size>
<width>0</width>
@ -3045,7 +3045,7 @@ QGroupBox:title {
</property>
<layout class="QGridLayout" name="gridLayout_17">
<item row="9" column="0">
<widget class="QLabel" name="LightSrcX_InSigFreqDetect_Lable_3">
<widget class="QLabel" name="LightSrcX_InSigPeriodUsDetect_Lable_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -3065,7 +3065,7 @@ QGroupBox:title {
</size>
</property>
<property name="text">
<string>输入触发频率(HZ)</string>
<string>输入信号周期探测(us)</string>
</property>
</widget>
</item>
@ -3080,7 +3080,7 @@ QGroupBox:title {
</widget>
</item>
<item row="10" column="1">
<widget class="QLineEdit" name="LightSrcX_OutSigFreqDetect_3">
<widget class="QLineEdit" name="LightSrcX_OutSigPeriodUsDetect_3">
<property name="minimumSize">
<size>
<width>0</width>
@ -3125,7 +3125,7 @@ QGroupBox:title {
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="LightSrcX_OutSigFreqDetect_Lable_3">
<widget class="QLabel" name="LightSrcX_OutSigPeriodUsDetect_Lable_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -3145,7 +3145,7 @@ QGroupBox:title {
</size>
</property>
<property name="text">
<string>输出频率(HZ)</string>
<string>输出信号周期探测(us)</string>
</property>
</widget>
</item>
@ -3220,7 +3220,7 @@ QGroupBox:title {
</widget>
</item>
<item row="9" column="1">
<widget class="QLineEdit" name="LightSrcX_InSigFreqDetect_3">
<widget class="QLineEdit" name="LightSrcX_InSigPeriodUsDetect_3">
<property name="minimumSize">
<size>
<width>0</width>
@ -3508,7 +3508,7 @@ QGroupBox:title {
</widget>
</item>
<item row="9" column="1">
<widget class="QLineEdit" name="LightSrcX_InSigFreqDetect_1">
<widget class="QLineEdit" name="LightSrcX_InSigPeriodUsDetect_1">
<property name="minimumSize">
<size>
<width>0</width>
@ -3518,7 +3518,7 @@ QGroupBox:title {
</widget>
</item>
<item row="10" column="1">
<widget class="QLineEdit" name="LightSrcX_OutSigFreqDetect_1">
<widget class="QLineEdit" name="LightSrcX_OutSigPeriodUsDetect_1">
<property name="minimumSize">
<size>
<width>0</width>
@ -3583,7 +3583,7 @@ QGroupBox:title {
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="LightSrcX_OutSigFreqDetect_Lable_1">
<widget class="QLabel" name="LightSrcX_OutSigPeriodUsDetect_Lable_1">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -3603,7 +3603,7 @@ QGroupBox:title {
</size>
</property>
<property name="text">
<string>输出频率(HZ)</string>
<string>输出信号周期探测(us)</string>
</property>
</widget>
</item>
@ -3615,7 +3615,7 @@ QGroupBox:title {
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="LightSrcX_InSigFreqDetect_Lable_1">
<widget class="QLabel" name="LightSrcX_InSigPeriodUsDetect_Lable_1">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -3635,7 +3635,7 @@ QGroupBox:title {
</size>
</property>
<property name="text">
<string>输入触发频率(HZ)</string>
<string>输入信号周期探测(us)</string>
</property>
</widget>
</item>
@ -3781,7 +3781,7 @@ QGroupBox:title {
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="LightSrcX_InSigFreqDetect_Lable_2">
<widget class="QLabel" name="LightSrcX_InSigPeriodUsDetect_Lable_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -3801,7 +3801,7 @@ QGroupBox:title {
</size>
</property>
<property name="text">
<string>输入触发频率(HZ)</string>
<string>输入信号周期探测(us)</string>
</property>
</widget>
</item>
@ -3856,7 +3856,7 @@ QGroupBox:title {
</widget>
</item>
<item row="9" column="1">
<widget class="QLineEdit" name="LightSrcX_InSigFreqDetect_2">
<widget class="QLineEdit" name="LightSrcX_InSigPeriodUsDetect_2">
<property name="minimumSize">
<size>
<width>0</width>
@ -3902,7 +3902,7 @@ QGroupBox:title {
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="LightSrcX_OutSigFreqDetect_Lable_2">
<widget class="QLabel" name="LightSrcX_OutSigPeriodUsDetect_Lable_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -3922,7 +3922,7 @@ QGroupBox:title {
</size>
</property>
<property name="text">
<string>输出频率(HZ)</string>
<string>输出信号周期探测(us)</string>
</property>
</widget>
</item>
@ -3957,7 +3957,7 @@ QGroupBox:title {
</widget>
</item>
<item row="10" column="1">
<widget class="QLineEdit" name="LightSrcX_OutSigFreqDetect_2">
<widget class="QLineEdit" name="LightSrcX_OutSigPeriodUsDetect_2">
<property name="minimumSize">
<size>
<width>0</width>
@ -4026,7 +4026,7 @@ QGroupBox:title {
</property>
<layout class="QGridLayout" name="gridLayout_18">
<item row="9" column="1">
<widget class="QLineEdit" name="LightSrcX_InSigFreqDetect_4">
<widget class="QLineEdit" name="LightSrcX_InSigPeriodUsDetect_4">
<property name="minimumSize">
<size>
<width>0</width>
@ -4046,7 +4046,7 @@ QGroupBox:title {
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="LightSrcX_InSigFreqDetect_Lable_4">
<widget class="QLabel" name="LightSrcX_InSigPeriodUsDetect_Lable_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -4066,7 +4066,7 @@ QGroupBox:title {
</size>
</property>
<property name="text">
<string>输入触发频率(HZ)</string>
<string>输入信号周期探测(us)</string>
</property>
</widget>
</item>
@ -4081,7 +4081,7 @@ QGroupBox:title {
</widget>
</item>
<item row="10" column="1">
<widget class="QLineEdit" name="LightSrcX_OutSigFreqDetect_4">
<widget class="QLineEdit" name="LightSrcX_OutSigPeriodUsDetect_4">
<property name="minimumSize">
<size>
<width>0</width>
@ -4151,7 +4151,7 @@ QGroupBox:title {
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="LightSrcX_OutSigFreqDetect_Lable_4">
<widget class="QLabel" name="LightSrcX_OutSigPeriodUsDetect_Lable_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -4171,7 +4171,7 @@ QGroupBox:title {
</size>
</property>
<property name="text">
<string>输出频率(HZ)</string>
<string>输出信号周期探测(us)</string>
</property>
</widget>
</item>
@ -5248,15 +5248,19 @@ QGroupBox:title {
<property name="minimumSize">
<size>
<width>451</width>
<height>511</height>
<height>600</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>451</width>
<height>511</height>
<width>16777215</width>
<height>600</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 255, 255, 60);
border-width:0;border-style:outset</string>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
@ -5265,6 +5269,7 @@ p, li { white-space: pre-wrap; }
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Consolas','Courier New','monospace'; font-size:11pt; font-weight:600; color:#ff0000;&quot;&gt;PC-VERSION&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Consolas','Courier New','monospace'; font-size:11pt; font-weight:600; color:#ff0000;&quot;&gt; V14:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Consolas','Courier New','monospace'; font-size:11pt; font-weight:600; color:#ff0000;&quot;&gt; 1.修正光源亮度每次提交都会递减的BUG&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Consolas','Courier New','monospace'; font-size:11pt; font-weight:600; color:#ff0000;&quot;&gt; 2.频率探测修改成周期探测&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Consolas','Courier New','monospace'; font-size:11pt; font-weight:600; color:#ff0000;&quot;&gt; V13:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Consolas','Courier New','monospace'; font-size:11pt; font-weight:600; color:#ff0000;&quot;&gt; 1.添加版本说明&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Consolas','Courier New','monospace'; font-size:11pt; font-weight:600; color:#ff0000;&quot;&gt;    V12:&lt;/span&gt;&lt;/p&gt;
@ -5272,8 +5277,10 @@ p, li { white-space: pre-wrap; }
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Consolas','Courier New','monospace'; font-size:11pt; font-weight:600; color:#ff0000;&quot;&gt;        2.提交配置后,自动启动内部触发&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Consolas','Courier New','monospace'; font-size:11pt; font-weight:600; color:#ff0000;&quot;&gt;        &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Consolas','Courier New','monospace'; font-size:11pt; font-weight:600; color:#ff0000;&quot;&gt;FPGA-FIRMWARE-VERSION&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Consolas','Courier New','monospace'; font-size:11pt; font-weight:600; color:#ff0000;&quot;&gt; V9:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Consolas','Courier New','monospace'; font-size:11pt; font-weight:600; color:#ff0000;&quot;&gt; 1.修复倍频器2+倍频信号错误的BUG&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Consolas','Courier New','monospace'; font-size:11pt; font-weight:600; color:#ff0000;&quot;&gt;    V7:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Consolas','Courier New','monospace'; font-size:11pt; font-weight:600; color:#ff0000;&quot;&gt;        1.修复倍频器BUG的BUG&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Consolas','Courier New','monospace'; font-size:11pt; font-weight:600; color:#ff0000;&quot;&gt;        1.修复倍频器BUG&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Consolas','Courier New','monospace'; font-size:11pt; font-weight:600; color:#ff0000;&quot;&gt;        2.添加调试信号输出&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Consolas','Courier New','monospace'; font-size:11pt; font-weight:600; color:#ff0000;&quot;&gt;    V6: &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Consolas','Courier New','monospace'; font-size:11pt; font-weight:600; color:#ff0000;&quot;&gt;        1.光耦输入默认反向&lt;/span&gt;&lt;/p&gt;
@ -5317,15 +5324,19 @@ p, li { white-space: pre-wrap; }
<property name="minimumSize">
<size>
<width>451</width>
<height>511</height>
<height>600</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>451</width>
<height>511</height>
<width>16777215</width>
<height>600</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 255, 255, 60);
border-width:0;border-style:outset</string>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
@ -5412,7 +5423,7 @@ p, li { white-space: pre-wrap; }
</property>
<widget class="QMenu" name="menu123">
<property name="title">
<string>IFLYTOP_V13</string>
<string>IFLYTOP_V14</string>
</property>
<addaction name="ProfessionalModel"/>
</widget>

24
src/camera_light_src_timing_controller/clst_controler.cpp

@ -408,7 +408,7 @@ zaf_error_code_t CLSTControler::readFreq(uint32_t reg, float &freqfloat) {
}
if (freq_cnt != 0) {
uint32_t freq_1000x = ((1.0 / (freq_cnt * 1.0 / (100 * 1000 * 1000))) * 1000 + 0.5); //+0.5???c++ ??????????????????
uint32_t freq_1000x = ((1.0 / (freq_cnt * 1.0 / (100 * 1000 * 1000))) * 1000 + 0.5); //
// ZLOGI(TAG, "freq_10x %f", freq_10x);
freqfloat = freq_1000x / 1000.0;
} else {
@ -420,6 +420,12 @@ zaf_error_code_t CLSTControler::readFreq(uint32_t reg, float &freqfloat) {
return kaf_ec_success;
}
zaf_error_code_t CLSTControler::readSigPeriodUs(uint32_t reg, float &us) {
uint32_t freq_cnt = 0;
DO_CMD(reg_read(reg, freq_cnt, 30));
us = freq_cnt * 10 / 1000.0;
return kaf_ec_success;
}
/*******************************************************************************
* ???? *
@ -554,13 +560,13 @@ zaf_error_code_t CLSTControler::TriInX_getTriggerModeFreqMultiplication(int32_t
return reg_read(kreg_trigger_in1_trigger_mode_freq_multiplication + (index - 1) * 32, multiplication);
}
zaf_error_code_t CLSTControler::TriInX_readInSignalFreq(int32_t index, float &freq) { //
zaf_error_code_t CLSTControler::TriInX_readInSignalPeriodUs(int32_t index, float &us) { //
if (index < 1 || index > 4) return kaf_ec_param_error;
return readFreq(kreg_trigger_in1_in_signal_freq + (index - 1) * 32, freq);
return readSigPeriodUs(kreg_trigger_in1_in_signal_freq + (index - 1) * 32, us);
}
zaf_error_code_t CLSTControler::TriInX_readOutSignalFreq(int32_t index, float &freq) { //
zaf_error_code_t CLSTControler::TriInX_readOutSignalPeriodUs(int32_t index, float &us) { //
if (index < 1 || index > 4) return kaf_ec_param_error;
return readFreq(kreg_trigger_in1_out_signal_freq + (index - 1) * 32, freq);
return readSigPeriodUs(kreg_trigger_in1_out_signal_freq + (index - 1) * 32, us);
return kaf_ec_success;
}
zaf_error_code_t CLSTControler::TriInX_getSequentialControlPluseCntMax(int32_t index, uint32_t &cnt) {
@ -656,11 +662,11 @@ zaf_error_code_t CLSTControler::LightSrcX_readLightSrcErrorState(int32_t index,
if (index < 1 || index > 4) return kaf_ec_param_error;
return reg_read(kreg_light_ctrol_module1_light_src_error_state + (index - 1) * 32, state);
}
zaf_error_code_t CLSTControler::LightSrcX_readInSigFreqDetect(int32_t index, float &freq) { //
return readFreq(kreg_light_ctrol_module1_in_sig_freq_detect + (index - 1) * 32, freq);
zaf_error_code_t CLSTControler::LightSrcX_readInSigPeriodUsDetect(int32_t index, float &us) { //
return readSigPeriodUs(kreg_light_ctrol_module1_in_sig_freq_detect + (index - 1) * 32, us);
}
zaf_error_code_t CLSTControler::LightSrcX_readOutSigFreqDetect(int32_t index, float &freq) { //
return readFreq(kreg_light_ctrol_module1_out_sig_freq_detect + (index - 1) * 32, freq);
zaf_error_code_t CLSTControler::LightSrcX_readOutSigPeriodUsDetect(int32_t index, float &us) { //
return readSigPeriodUs(kreg_light_ctrol_module1_out_sig_freq_detect + (index - 1) * 32, us);
}
/*******************************************************************************

9
src/camera_light_src_timing_controller/clst_controler.hpp

@ -136,8 +136,8 @@ class CLSTControler {
zaf_error_code_t TriInX_getTriggerModeFreqMultiplication(int32_t index, uint32_t &multiplication);
zaf_error_code_t TriInX_getSequentialControlPluseCntMax(int32_t index, uint32_t &cnt);
zaf_error_code_t TriInX_readInSignalFreq(int32_t index, float &freq);
zaf_error_code_t TriInX_readOutSignalFreq(int32_t index, float &freq);
zaf_error_code_t TriInX_readInSignalPeriodUs(int32_t index, float &us);
zaf_error_code_t TriInX_readOutSignalPeriodUs(int32_t index, float &us);
/*******************************************************************************
* *
@ -155,8 +155,8 @@ class CLSTControler {
zaf_error_code_t LightSrcX_getLightDriverFreq(int32_t index, float &freq);
zaf_error_code_t LightSrcX_readLightSrcErrorState(int32_t index, uint32_t &state);
zaf_error_code_t LightSrcX_readInSigFreqDetect(int32_t index, float &freq);
zaf_error_code_t LightSrcX_readOutSigFreqDetect(int32_t index, float &freq);
zaf_error_code_t LightSrcX_readInSigPeriodUsDetect(int32_t index, float &us);
zaf_error_code_t LightSrcX_readOutSigPeriodUsDetect(int32_t index, float &us);
/*******************************************************************************
* *
@ -180,6 +180,7 @@ class CLSTControler {
zaf_error_code_t sendPacket(zaf_packet_header_t *packet, uint32_t len, uint32_t overtime);
zaf_error_code_t readFreq(uint32_t reg, float &freq);
zaf_error_code_t readSigPeriodUs(uint32_t reg, float &us);
};
} // namespace clst

Loading…
Cancel
Save