Browse Source

1cc decode based on 1.4 dbc file

Your Name 1 năm trước cách đây
mục cha
commit
7228a7d2ee

+ 4 - 2
src/tool/adc_cantool/window/ChassisAnalysisWindow/ChassisAnalysisWindow.cpp

@@ -214,7 +214,8 @@ void ChassisAnalysisWindow::checkChassisSignal()
        setLED(ui->label_angrtresult, 1, 10);
     }
     //langacc
-    if(fabs(ui->doubleSpinBox_lngAcc->value()- lngacc)==0)
+    //if(fabs(ui->doubleSpinBox_lngAcc->value()- lngacc)==0)
+    if(fabs(ui->doubleSpinBox_lngAcc->value()- lngacc)<=0.0001)
     {
       setLED(ui->label_accresult, 2, 10);
     }
@@ -328,7 +329,8 @@ void ChassisAnalysisWindow::shenLanCANFDSignalAnalysis(const CanMessage *msg){
         factor=0.01;
         offset=-32;
         isunsigned=true;
-        rawValue=((msg->getByte(2)&0x07)<<10)+(msg->getByte(3)<<2)+((msg->getByte(4)&0xc0)>>6);
+        //rawValue=((msg->getByte(2)&0x07)<<10)+(msg->getByte(3)<<2)+((msg->getByte(4)&0xc0)>>6);
+        rawValue=((msg->getByte(10)&0x3f)<<7)+((msg->getByte(11)&0xfe)>>1);//20230612,dbc update
         lngacc= static_cast<double>(rawValue*factor+offset);
         break;
     case 0x18a: