collect rssi, snr and link quality for announces and add snr to announces ui

This commit is contained in:
liamcottle 2024-12-23 03:36:01 +13:00
parent 7ea306003e
commit 5a1bd889b7
4 changed files with 52 additions and 13 deletions

View file

@ -7,10 +7,10 @@ class AnnounceHandler:
self.received_announce_callback = received_announce_callback
# we will just pass the received announce back to the provided callback
def received_announce(self, destination_hash, announced_identity, app_data):
def received_announce(self, destination_hash, announced_identity, app_data, announce_packet_hash):
try:
# handle received announce
self.received_announce_callback(self.aspect_filter, destination_hash, announced_identity, app_data)
self.received_announce_callback(self.aspect_filter, destination_hash, announced_identity, app_data, announce_packet_hash)
except:
# ignore failure to handle received announce
pass

View file

@ -90,7 +90,20 @@
</div>
<div>
<div class="text-gray-900 dark:text-gray-100">{{ peer.custom_display_name ?? peer.display_name }}</div>
<div class="text-gray-500 dark:text-gray-400 text-sm">{{ formatTimeAgo(peer.updated_at) }}</div>
<div class="flex space-x-1 text-gray-500 dark:text-gray-400 text-sm">
<!-- time ago -->
<span class="flex my-auto space-x-1">
{{ formatTimeAgo(peer.updated_at) }}
</span>
<!-- snr (only shown for peers directly heard on rf) -->
<span v-if="peer.snr != null && (peer.hops === 0 || peer.hops === 1)" class="flex my-auto space-x-1">
<span>•</span>
<span>SNR {{ peer.snr }}dB</span>
</span>
</div>
</div>
</div>
</div>