|
@@ -527,6 +527,32 @@ ADCIntelligentVehicle::ADCIntelligentVehicle(QWidget *parent)
|
|
|
mpthreadota = new std::thread(&ADCIntelligentVehicle::threadotacheck,this);
|
|
|
|
|
|
|
|
|
+
|
|
|
+ QFile xFile;
|
|
|
+ xFile.setFileName("version");
|
|
|
+ if(xFile.open(QIODevice::ReadOnly))
|
|
|
+ {
|
|
|
+ char strversion[256];
|
|
|
+ int nread = 0;
|
|
|
+ if((nread =xFile.readLine(strversion,255)) > 0)
|
|
|
+ {
|
|
|
+ if(strversion[nread-1] == '\n')
|
|
|
+ {
|
|
|
+ strversion[nread-1] = 0;
|
|
|
+ nread = nread - 1;
|
|
|
+ }
|
|
|
+ if(nread > 0)
|
|
|
+ {
|
|
|
+ QString strversioncode = QString("version: ") + QString(strversion);
|
|
|
+ ui->statusBar->addPermanentWidget(new QLabel(strversioncode));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ xFile.close();
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
ADCIntelligentVehicle::~ADCIntelligentVehicle()
|