Casper преди 3 месеца
родител
ревизия
aa2c63b411
променени са 1 файла, в които са добавени 6 реда и са изтрити 6 реда
  1. 6 6
      sri-server-bg03/lib/Connection_e1.py

+ 6 - 6
sri-server-bg03/lib/Connection_e1.py

@@ -500,14 +500,14 @@ class SRIConnection(asyncio.Protocol):
                 item.client.write(re_send_data)
 
         # --- get VehicleStatus ---
-        # unique_dict = {'name': 'VehicleStatus'}
-        # item = Global.mdb.get_one('GlobalVariable', unique_dict)
-        # data = item.get('args', {})
+        unique_dict = {'name': 'VehicleStatus'}
+        item = Global.mdb.get_one('GlobalVariable', unique_dict)
+        data = item.get('args', {})
 
         # --- set VehicleStatus ---
-        # data[str(self.connection_id)] = 4
-        # update_dict = {'args': data}
-        # Global.mdb.update_one('GlobalVariable', unique_dict, update_dict)
+        data[str(self.connection_id)] = 4
+        update_dict = {'args': data}
+        Global.mdb.update_one('GlobalVariable', unique_dict, update_dict)
 
     def message2006(self, body_data):