Skip to content

Commit

Permalink
Mark never heard nodes as '-' in connection info
Browse files Browse the repository at this point in the history
Nodes never heard before show hop count of 0, and not via MQTT.
However, reality is we've never connected to them. So, mark them as
'-' in the Connection Info column in the nodes table.
  • Loading branch information
fifieldt committed May 26, 2024
1 parent 35f406c commit cbb3b63
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pages/Nodes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ export const NodesPage = (): JSX.Element => {
{(node.snr + 10) * 5}raw
</Mono>,
<Mono>
{node.viaMqtt === false && node.hopsAway === 0? "Direct": node.hopsAway.toString() + " hops away"}
{node.lastHeard != 0 ?
(node.viaMqtt === false && node.hopsAway === 0
? "Direct": node.hopsAway.toString() + " hops away")
: "-"}
{node.viaMqtt === true? ", via MQTT": ""}
</Mono>
])}
Expand Down

0 comments on commit cbb3b63

Please sign in to comment.