From 09d224075a055d04a5e74168de99a318384df6e5 Mon Sep 17 00:00:00 2001 From: tangchao0503 <735056338@qq.com> Date: Wed, 24 May 2023 16:38:10 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E9=80=9A=E8=BF=87sock=E5=8F=91=E9=80=81?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=88=90=E5=8A=9F=E7=9A=84=E5=B8=A7=E7=8E=87?= =?UTF-8?q?=EF=BC=9B=202.=20=E9=80=9A=E8=BF=87sock=E5=8F=91=E9=80=81?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=88=90=E5=8A=9F=E7=9A=84=E6=9B=9D=E5=85=89?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=92=8C=E6=9B=9D=E5=85=89=E6=97=B6=E6=9C=80?= =?UTF-8?q?=E5=A4=A7=E7=9A=84=E5=83=8F=E7=B4=A0=E5=80=BC=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Header_Files/udpserver.h | 2 ++ Header_Files/ximeaimager.h | 5 ++++- Source_Files/udpserver.cpp | 26 ++++++++++++++++++++++++++ Source_Files/ximeaimager.cpp | 21 +++++++++++++++++---- 4 files changed, 49 insertions(+), 5 deletions(-) diff --git a/Header_Files/udpserver.h b/Header_Files/udpserver.h index 4b1f8d2..4b4f06d 100644 --- a/Header_Files/udpserver.h +++ b/Header_Files/udpserver.h @@ -66,6 +66,8 @@ public slots: void sendSbgAccuracyState(int Accuracy,int SatelliteCounter); void sendXimeaImageStatus(int ximeaImageStatus); + void sendXimeaAutoExposeMaxValueOfOneFrame(int autoExposeMaxValueOfOneFrame, double exposeTime); + void sendXimeaImageFrameRate(double frameRate); void sendCopyFileStatus(int fileStatus); }; #endif // UDPSERVER_H diff --git a/Header_Files/ximeaimager.h b/Header_Files/ximeaimager.h index be4fada..30db9cc 100644 --- a/Header_Files/ximeaimager.h +++ b/Header_Files/ximeaimager.h @@ -125,7 +125,7 @@ public: void setFramerate(double framerate); double getFramerate(); double setExposureTime(float exposureTime); - double wrapSetExposureTime(float exposureTime_in_us); + int wrapSetExposureTime(float exposureTime_in_us); double getExposureTime(); double autoExposure(); void setGain(double gain); @@ -205,5 +205,8 @@ signals: void recordXimeaTemperatureSignal(QString); void startWriteDiskSignal(); + + void autoExposeMaxValueOfOneFrame(int, double); + void frameRateSignal(double); }; #endif // XIMEAIMAGER_H diff --git a/Source_Files/udpserver.cpp b/Source_Files/udpserver.cpp index 1b67eea..03f2f21 100644 --- a/Source_Files/udpserver.cpp +++ b/Source_Files/udpserver.cpp @@ -50,6 +50,8 @@ UdpServer::UdpServer() connect(m_sbgRecorder, SIGNAL(sbgAccuracySignal(int,int)),this, SLOT(sendSbgAccuracyState(int,int))); connect(m_imager, SIGNAL(ximeaImageStatus(int)),this, SLOT(sendXimeaImageStatus(int))); + connect(m_imager, SIGNAL(autoExposeMaxValueOfOneFrame(int, double)),this, SLOT(sendXimeaAutoExposeMaxValueOfOneFrame(int, double))); + connect(m_imager, SIGNAL(frameRateSignal(double)),this, SLOT(sendXimeaImageFrameRate(double))); connect(m_copyFile, SIGNAL(copyFileStatus(int)),this, SLOT(sendCopyFileStatus(int))); @@ -295,6 +297,30 @@ void UdpServer::sendXimeaImageStatus(int ximeaImageStatus) m_udpSocket->writeDatagram(datagram2send.data(),datagram2send.size(),m_clientIpAddress, 45455); } +void UdpServer::sendXimeaAutoExposeMaxValueOfOneFrame(int autoExposeMaxValueOfOneFrame, double exposeTime) +{ +// std::cout<<"UdpServer::sendXimeaAutoExposeMaxValueOfOneFrame---------------------:"<< ximeaImageStatus <writeDatagram(datagram2send.data(),datagram2send.size(),m_clientIpAddress, 45455); +} + +void UdpServer::sendXimeaImageFrameRate(double frameRate) +{ +// std::cout<<"UdpServer::sendXimeaImageFrameRate---------------------:"<< ximeaImageStatus <writeDatagram(datagram2send.data(),datagram2send.size(),m_clientIpAddress, 45455); +} + void UdpServer::sendCopyFileStatus(int fileStatus) { // std::cout<<"UdpServer::sendCopyFileStatus---------------------:"<< fileStatus <FillRgbImage(dataBuffer); +// m_rgbImage->FillRgbImage(dataBuffer); // std::cout<<"WriteData2Disk::write2Disk-----------------------正在写磁盘!" << m_pool->max_size() <