4 Commits
2.0 ... T2.1.2

Author SHA1 Message Date
07f3268efc 1、修复“2轴控制”中,按钮在不同分辨率下显示补全的问题;
2、删掉“2轴控制”中,运行按钮;
2026-01-08 19:10:10 +08:00
2322bf09cf fix:
调焦时曲线显示bug
2025-11-13 15:59:23 +08:00
e14c5da80a 排除图标 2025-10-21 14:32:08 +08:00
c2a3c28cdd 为2轴控制界面添加“移动至”功能; 2025-10-13 14:17:26 +08:00
6 changed files with 283 additions and 58 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@ gdal202.dll
*.rej *.rej
HPPA类图.drawio HPPA类图.drawio
HPPA - 副本.ui HPPA - 副本.ui
icon
## Ignore Visual Studio temporary files, build results, and ## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons. ## files generated by popular Visual Studio add-ons.

View File

@ -1182,12 +1182,15 @@ void HPPA::PlotSpectral(int state)
QLineSeries *series = new QLineSeries(); QLineSeries *series = new QLineSeries();
//series->clear();////////////////////////////// //series->clear();//////////////////////////////
int sampleCount = m_Imager->getSampleCount(); int sampleCount = m_Imager->getSampleCount();
int bandCount = m_Imager->getBandCount();
int tmp = int(bandCount / 2);
//std::cout << tmp << std::endl;
for (size_t i = 0; i < sampleCount; i++) for (size_t i = 0; i < sampleCount; i++)
{ {
//malloc<6F><63><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><DAB4>÷<EFBFBD>1<EFBFBD><31><EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD><D4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> //malloc<6F><63><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><DAB4>÷<EFBFBD>1<EFBFBD><31><EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD><D4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//series->append(i, m_Imager->buffer[i + 5 * 900]); //series->append(i, m_Imager->buffer[i + 5 * 900]);
//series->append(i, m_Imager->buffer[900 * 150 + i]); //series->append(i, m_Imager->buffer[900 * 150 + i]);
series->append(i, m_Imager->buffer[1368 * 150 + i]); series->append(i, m_Imager->buffer[sampleCount * tmp + i]);
} }
QChart *chart = new QChart(); QChart *chart = new QChart();

View File

@ -20,9 +20,6 @@ TwoMotorControl::TwoMotorControl(QWidget* parent) : QDialog(parent)
connect(ui.deleteRecordLine_btn, SIGNAL(clicked()), this, SLOT(onDeleteRecordLine_btn())); connect(ui.deleteRecordLine_btn, SIGNAL(clicked()), this, SLOT(onDeleteRecordLine_btn()));
connect(ui.saveRecordLine2File_btn, SIGNAL(clicked()), this, SLOT(onSaveRecordLine2File_btn())); connect(ui.saveRecordLine2File_btn, SIGNAL(clicked()), this, SLOT(onSaveRecordLine2File_btn()));
connect(ui.readRecordLineFile_btn, SIGNAL(clicked()), this, SLOT(onReadRecordLineFile_btn())); connect(ui.readRecordLineFile_btn, SIGNAL(clicked()), this, SLOT(onReadRecordLineFile_btn()));
connect(ui.run_btn, SIGNAL(clicked()), this, SLOT(run()));
connect(ui.stop_btn, SIGNAL(clicked()), this, SLOT(stop()));
} }
void TwoMotorControl::setImager(ImagerOperationBase* imager) void TwoMotorControl::setImager(ImagerOperationBase* imager)
@ -184,12 +181,13 @@ void TwoMotorControl::onConnectMotor()
connect(this->ui.ymotor_backward_btn, SIGNAL(pressed()), this, SLOT(onyMotorbackward())); connect(this->ui.ymotor_backward_btn, SIGNAL(pressed()), this, SLOT(onyMotorbackward()));
connect(this->ui.ymotor_backward_btn, SIGNAL(released()), this, SLOT(onyMotorStop())); connect(this->ui.ymotor_backward_btn, SIGNAL(released()), this, SLOT(onyMotorStop()));
//connect(this->ui.move2loc_pushButton, SIGNAL(pressed()), this, SLOT(onxMove2Loc())); connect(this->ui.move2loc_x_pushButton, SIGNAL(pressed()), this, SLOT(onxMove2Loc()));
connect(this->ui.move2loc_y_pushButton, SIGNAL(pressed()), this, SLOT(onyMove2Loc()));
connect(m_multiAxisController, SIGNAL(broadcastLocationSignal(std::vector<double>)), this, SLOT(displayRealTimeLoc(std::vector<double>))); connect(m_multiAxisController, SIGNAL(broadcastLocationSignal(std::vector<double>)), this, SLOT(displayRealTimeLoc(std::vector<double>)));
connect(this, SIGNAL(moveSignal(int, bool, double, int)), m_multiAxisController, SLOT(move(int, bool, double, int))); connect(this, SIGNAL(moveSignal(int, bool, double, int)), m_multiAxisController, SLOT(move(int, bool, double, int)));
//connect(this, SIGNAL(move2LocSignal(int, double, double, int)), m_multiAxisController, SLOT(moveTo(int, double, double, int))); connect(this, SIGNAL(move2LocSignal(int, double, double, int)), m_multiAxisController, SLOT(moveTo(int, double, double, int)));
connect(this, SIGNAL(stopSignal(int)), m_multiAxisController, SLOT(stop(int))); connect(this, SIGNAL(stopSignal(int)), m_multiAxisController, SLOT(stop(int)));
connect(this->ui.zero_start_btn, SIGNAL(released()), this, SLOT(zeroStart())); connect(this->ui.zero_start_btn, SIGNAL(released()), this, SLOT(zeroStart()));
@ -291,6 +289,22 @@ void TwoMotorControl::onyMotorStop()
emit stopSignal(1); emit stopSignal(1);
} }
void TwoMotorControl::onxMove2Loc()
{
double s = ui.xmotor_move_speed_lineEdit->text().toDouble();
double l = ui.move2loc_x_lineEdit->text().toDouble();
emit move2LocSignal(0, l, s, 1000);
}
void TwoMotorControl::onyMove2Loc()
{
double s = ui.ymotor_move_speed_lineEdit->text().toDouble();
double l = ui.move2loc_y_lineEdit->text().toDouble();
emit move2LocSignal(1, l, s, 1000);
}
void TwoMotorControl::displayRealTimeLoc(std::vector<double> loc) void TwoMotorControl::displayRealTimeLoc(std::vector<double> loc)
{ {
double tmp = round(loc[0] * 100) / 100; double tmp = round(loc[0] * 100) / 100;

View File

@ -48,10 +48,12 @@ public Q_SLOTS:
void onxMotorRight(); void onxMotorRight();
void onxMotorLeft(); void onxMotorLeft();
void onxMotorStop(); void onxMotorStop();
void onxMove2Loc();
void onyMotorforward(); void onyMotorforward();
void onyMotorbackward(); void onyMotorbackward();
void onyMotorStop(); void onyMotorStop();
void onyMove2Loc();
void onAddRecordLine_btn(); void onAddRecordLine_btn();
void onRemoveRecordLine_btn(); void onRemoveRecordLine_btn();

View File

@ -70,7 +70,7 @@
</rect> </rect>
</property> </property>
<property name="text"> <property name="text">
<string>版本2.0</string> <string>版本:T2.1.2</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_4">

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>684</width> <width>1062</width>
<height>674</height> <height>1356</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -42,19 +42,25 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>684</width> <width>1062</width>
<height>674</height> <height>1356</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout_6"> <layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QGroupBox" name="groupBox_2"> <widget class="QGroupBox" name="groupBox_2">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"/> <string notr="true"/>
</property> </property>
@ -62,11 +68,29 @@
<string>控制</string> <string>控制</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_5"> <layout class="QGridLayout" name="gridLayout_5">
<item row="1" column="0"> <property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<item row="2" column="0">
<spacer name="verticalSpacer_3"> <spacer name="verticalSpacer_3">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
@ -75,16 +99,27 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="2" column="0">
<widget class="QPushButton" name="run_btn">
<property name="text">
<string>运行</string>
</property>
</widget>
</item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QWidget" name="widget" native="true"> <widget class="QWidget" name="widget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
@ -104,7 +139,7 @@
<item row="0" column="1"> <item row="0" column="1">
<widget class="QPushButton" name="ymotor_forward_btn"> <widget class="QPushButton" name="ymotor_forward_btn">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -169,7 +204,7 @@
<item row="1" column="2"> <item row="1" column="2">
<widget class="QPushButton" name="xmotor_right_btn"> <widget class="QPushButton" name="xmotor_right_btn">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -234,7 +269,7 @@
<item row="2" column="3"> <item row="2" column="3">
<widget class="QPushButton" name="rangeMeasurement_btn"> <widget class="QPushButton" name="rangeMeasurement_btn">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -247,24 +282,23 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="3" column="0">
<widget class="QPushButton" name="stop_btn">
<property name="text">
<string>停止</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QGroupBox" name="groupBox_3"> <widget class="QGroupBox" name="groupBox_3">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">#QGroupBox{border:none}</string> <string notr="true">#QGroupBox{border:none}</string>
</property> </property>
@ -272,6 +306,37 @@
<string>x马达</string> <string>x马达</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="gridLayout_3">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<item row="4" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0"> <item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>
@ -399,19 +464,6 @@
</layout> </layout>
</item> </item>
<item row="3" column="0"> <item row="3" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>112</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_6"> <layout class="QHBoxLayout" name="horizontalLayout_6">
<item> <item>
<spacer name="horizontalSpacer_6"> <spacer name="horizontalSpacer_6">
@ -444,6 +496,66 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QPushButton" name="move2loc_x_pushButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>78</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>移动至</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="move2loc_x_lineEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@ -455,6 +567,12 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"/> <string notr="true"/>
</property> </property>
@ -462,6 +580,18 @@
<string>y马达</string> <string>y马达</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0"> <item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_5"> <layout class="QHBoxLayout" name="horizontalLayout_5">
<item> <item>
@ -543,7 +673,7 @@
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>50</width> <width>78</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
@ -588,7 +718,23 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="2" column="0"> <item row="4" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_7"> <layout class="QHBoxLayout" name="horizontalLayout_7">
<item> <item>
<spacer name="horizontalSpacer_7"> <spacer name="horizontalSpacer_7">
@ -621,18 +767,65 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="3" column="0"> <item row="2" column="0">
<spacer name="verticalSpacer_2"> <layout class="QHBoxLayout" name="horizontalLayout_8">
<property name="orientation"> <item>
<enum>Qt::Vertical</enum> <widget class="QPushButton" name="move2loc_y_pushButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="minimumSize">
<size> <size>
<width>20</width> <width>0</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
</spacer> <property name="maximumSize">
<size>
<width>78</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>移动至</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="move2loc_y_lineEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>
@ -643,6 +836,18 @@
<string>采集线</string> <string>采集线</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="gridLayout_4">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0"> <item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_23"> <layout class="QHBoxLayout" name="horizontalLayout_23">
<item> <item>