Casper vor 3 Monaten
Ursprung
Commit
aa2c63b411
1 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen
  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):