mirror of
https://github.com/pablorevilla-meshtastic/meshview.git
synced 2026-03-04 23:27:46 +01:00
Add traceroute to the portnum dropdown.
This commit is contained in:
@@ -91,7 +91,7 @@ async def process_envelope(topic, env):
|
||||
position = decode_payload.decode_payload(
|
||||
PortNum.POSITION_APP, env.packet.decoded.payload
|
||||
)
|
||||
if position.latitude_i and position.longitude_i:
|
||||
if position and position.latitude_i and position.longitude_i:
|
||||
from_node_id = getattr(env.packet, 'from')
|
||||
node = (await session.execute(select(Node).where(Node.node_id == from_node_id))).scalar_one_or_none()
|
||||
if node:
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
3: "Position",
|
||||
4: "Node Info",
|
||||
67: "Telemetry",
|
||||
70: "Traceroute",
|
||||
71: "Neighbor Info",
|
||||
}
|
||||
%}
|
||||
|
||||
@@ -435,6 +435,8 @@ async def graph_power(request):
|
||||
voltage = []
|
||||
for p in await store.get_packets_from(int(request.match_info['node_id']), PortNum.TELEMETRY_APP):
|
||||
_, payload = decode_payload.decode(p)
|
||||
if not payload:
|
||||
continue
|
||||
if not payload.HasField('device_metrics'):
|
||||
continue
|
||||
timestamp = datetime.datetime.fromtimestamp(payload.time)
|
||||
@@ -485,6 +487,8 @@ async def graph_neighbors(request):
|
||||
dates =[]
|
||||
for p in await store.get_packets_from(int(request.match_info['node_id']), PortNum.NEIGHBORINFO_APP):
|
||||
_, payload = decode_payload.decode(p)
|
||||
if not payload:
|
||||
continue
|
||||
if p.import_time < oldest:
|
||||
break
|
||||
|
||||
|
||||
Reference in New Issue
Block a user