更新:发送 bin 状态到遥控器

This commit is contained in:
tangchao0503
2023-06-27 14:01:19 +08:00
parent 6b78db5bc3
commit 5337a40837
4 changed files with 17 additions and 2 deletions

View File

@ -51,6 +51,7 @@ UdpServer::UdpServer()
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(binSignal(int, int)),this, SLOT(sendXimeaBinState(int, int)));
connect(m_imager, SIGNAL(frameRateSignal(double)),this, SLOT(sendXimeaImageFrameRate(double)));
connect(m_copyFile, SIGNAL(copyFileStatus(int)),this, SLOT(sendCopyFileStatus(int)));
@ -63,8 +64,6 @@ UdpServer::UdpServer()
sendCopyFileStatus(0);
std::cout<<"UdpServer::UdpServer--------:System ready!"<<std::endl;
}
@ -309,6 +308,18 @@ void UdpServer::sendXimeaAutoExposeMaxValueOfOneFrame(int autoExposeMaxValueOfOn
m_udpSocket->writeDatagram(datagram2send.data(),datagram2send.size(),m_clientIpAddress, 45455);
}
void UdpServer::sendXimeaBinState(int spatialBin, int spectralBin)
{
// std::cout<<"UdpServer::sendXimeaAutoExposeMaxValueOfOneFrame---------------------:"<< ximeaImageStatus <<std::endl;
QByteArray datagram2send;
QString status = "bin," + QString::number(spatialBin) + "," + QString::number(spectralBin);
datagram2send.operator =(status.toStdString().c_str());
m_udpSocket->writeDatagram(datagram2send.data(),datagram2send.size(),m_clientIpAddress, 45455);
}
void UdpServer::sendXimeaImageFrameRate(double frameRate)
{
// std::cout<<"UdpServer::sendXimeaImageFrameRate---------------------:"<< ximeaImageStatus <<std::endl;

View File

@ -61,6 +61,8 @@ void XimeaImager::openImger()
{
bool haha = m_imager.setSpectralBin(spectralBin);
bool haha2 = m_imager.setSpatialBin(spatialBin);
emit binSignal(spatialBin, spectralBin);
}
float gain, offset;//用于生成头文件中的波长信息