|
@@ -80,7 +80,7 @@ class SRIConnection(asyncio.Protocol):
|
|
|
data = item.get('args', {})
|
|
|
|
|
|
# --- set VehicleStatus ---
|
|
|
- data[self.connection_id] = 1
|
|
|
+ data[str(self.connection_id)] = 1
|
|
|
update_dict = {'args': data}
|
|
|
Global.mdb.update_one('GlobalVariable', unique_dict, update_dict)
|
|
|
|
|
@@ -99,7 +99,7 @@ class SRIConnection(asyncio.Protocol):
|
|
|
re_head_data = struct.pack(self.head_sequence, re_command_id, re_body_length)
|
|
|
re_body_data = o2.SerializeToString()
|
|
|
re_send_data = re_head_data + re_body_data
|
|
|
- methods.debug_log(f"{self.connection_id}|SRIConnection085", f"re_command_id: {re_command_id}")
|
|
|
+ methods.debug_log(f"{self.connection_id}|SRIConnection102", f"re_command_id: {re_command_id}")
|
|
|
for item in clients.values():
|
|
|
if item.client_type == 'cockpit':
|
|
|
item.client.write(re_send_data)
|
|
@@ -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):
|
|
|
|