Compare commits
1 Commits
40
...
061e1f83bd
Author | SHA1 | Date | |
---|---|---|---|
061e1f83bd |
@ -3,7 +3,7 @@
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
std::cout<<"ximeaAirborneSystem 版本:"<< "40." <<std::endl;
|
||||
std::cout<<"ximeaAirborneSystem 版本:"<< "41." <<std::endl;
|
||||
QCoreApplication a(argc, argv);
|
||||
|
||||
//UdpServer* x=new UdpServer();
|
||||
|
@ -940,10 +940,27 @@ void RecordXimeaTemperature::recordTemperature(QString filePath= nullptr)
|
||||
system("/home/300tc/projects/udpClient/udpClient 127.0.0.1 2");
|
||||
}
|
||||
|
||||
// 获取剩余硬盘空间和剩余采集时间
|
||||
FILE *fp;
|
||||
char buffer[128];
|
||||
fp = popen("cat /sys/devices/virtual/thermal/thermal_zone1/temp", "r");
|
||||
if (fp == NULL) {
|
||||
perror("popen");
|
||||
}
|
||||
|
||||
// 读取输出并处理
|
||||
unsigned long long temper;
|
||||
if (fgets(buffer, sizeof(buffer), fp) != NULL)
|
||||
{
|
||||
temper = strtoull(buffer, NULL, 10);
|
||||
// printf("CPU温度: %.2f;\n", (float)temper/1000);
|
||||
}
|
||||
pclose(fp);
|
||||
|
||||
QDateTime curDateTime = QDateTime::currentDateTime();
|
||||
QString currentTime = curDateTime.toString("yyyy/MM/dd hh:mm:ss");
|
||||
|
||||
ximeaTemperatureFile << currentTime.toStdString() << "," << temp << "\n";
|
||||
ximeaTemperatureFile << currentTime.toStdString() << "," << temp << "," << (float)temper/1000 << "\n";
|
||||
|
||||
// std::cout<<"RecordXimeaTemperature::recordTemperature----------------:ximea Temperature is "<< temp <<std::endl;
|
||||
// std::cout<<"RecordXimeaTemperature::recordTemperature----------------:ximea state is "<< m_ximeaImager->getImagerState() <<std::endl;
|
||||
|
Reference in New Issue
Block a user