Browse Source

change adc_cantool. prepare add cherry check. not complete.

yuchuli 2 months ago
parent
commit
11183875ac

+ 2 - 0
src/tool/adc_cantool/adc_cantool.pro

@@ -25,6 +25,8 @@ QMAKE_LFLAGS += -no-pie
 CONFIG += warn_on
 CONFIG += link_pkgconfig
 
+DEFINES += CHECK_FOR_CHERRY
+
 #DESTDIR = ./bin
 #MOC_DIR = ./build/moc
 #RCC_DIR = ./build/rcc

+ 14 - 0
src/tool/adc_cantool/window/RawTxWindow/RawTxWindow.cpp

@@ -723,6 +723,10 @@ void RawTxWindow::sendRawMessage()
         msg.setId(address);
         msg.setLength(dlc);
 
+#ifdef CHECK_FOR_CHERRY
+        setcheck(msg);
+#endif
+
         msg.setExtended(en_extended);
         msg.setRTR(en_rtr);
         msg.setErrorFrame(false);
@@ -1032,3 +1036,13 @@ void RawTxWindow::fileSend(bool enable)
           sendnum=0;
      }
 }
+
+#ifdef CHECK_FOR_CHERRY
+void RawTxWindow::setcheck(CanMessage &xmsg)
+{
+    if(xmsg.getId() == 0x159)
+    {
+
+    }
+}
+#endif

+ 4 - 0
src/tool/adc_cantool/window/RawTxWindow/RawTxWindow.h

@@ -65,4 +65,8 @@ private:
     QVector<CanMessage> filesenddata;
     bool filesend_en;
 
+#ifdef CHECK_FOR_CHERRY
+    void setcheck(CanMessage & xmsg);
+#endif
+
 };