Casper 4 hafta önce
ebeveyn
işleme
7e166f993c
1 değiştirilmiş dosya ile 6 ekleme ve 1 silme
  1. 6 1
      sri-server-bg02/lib/MessageListener.py

+ 6 - 1
sri-server-bg02/lib/MessageListener.py

@@ -7,7 +7,6 @@ import json
 import os
 
 
-
 class MessageListener:
     """
     """
@@ -29,6 +28,9 @@ class MessageListener:
         v4 = TopicListener('Vehicle/ControlVehicle/Veh0537', 'method_v001')
         v5 = TopicListener('Vehicle/ControlVehicle/Veh0538', 'method_v001')
 
+        c1 = TopicListener('Cockpit/CanBus/CanId001/Cop001', 'method_c001')
+        c2 = TopicListener('Cockpit/CanBus/CanId001/Cop002', 'method_c001')
+
         thread_list = [
             threading.Thread(target=t1.subscribe),
             threading.Thread(target=t2.subscribe),
@@ -39,6 +41,9 @@ class MessageListener:
             threading.Thread(target=v4.subscribe),
             threading.Thread(target=v5.subscribe),
 
+            threading.Thread(target=c1.subscribe),
+            threading.Thread(target=c2.subscribe),
+
         ]
         for thread in thread_list:
             thread.setDaemon(True)