Browse Source

change ui_ads_hmi. add version show.

yuchuli 1 year ago
parent
commit
d2a1dc6108
1 changed files with 26 additions and 0 deletions
  1. 26 0
      src/ui/ui_ads_hmi/ADCIntelligentVehicle.cpp

+ 26 - 0
src/ui/ui_ads_hmi/ADCIntelligentVehicle.cpp

@@ -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()