gsd 4 months ago
parent
commit
b8b185b1f4
  1. 6
      service.py

6
service.py

@ -18,6 +18,7 @@ from protobufs_extra.telemetry_proto import *
from protobufs_extra.position_proto import *
from protobufs_extra.routing_proto import *
import pb
from protobuf_decoder.protobuf_decoder import Parser
#fs imports
from fastapi import FastAPI, HTTPException, WebSocket
@ -158,9 +159,6 @@ class MongoDriver(MeshArgsParse):
from tileManager import TileManager
self.tileManager = TileManager(self)
from protobuf_decoder.protobuf_decoder import Parser
self.protoParser = Parser()
async def dbSaveRadio(self, new_from_radio):
from_radio = copy.deepcopy(new_from_radio)
for k, v in from_radio.items():
@ -203,7 +201,7 @@ class MongoDriver(MeshArgsParse):
pass
else:
to_parse = ' '.join(f'{byte:02x}' for byte in v["payload"])
res = self.protoParser.parse(to_parse)
res = Parser().parse(to_parse)
logger.debug(res.to_dict())
except:
pass

Loading…
Cancel
Save