mirror of
https://github.com/tcivie/meshtastic-metrics-exporter.git
synced 2025-03-05 20:52:02 -08:00
```
Handle broadcast IDs in client details retrieval Add a check for broadcast node IDs (4294967295 and 1) in the `_get_client_details` method to return a predefined `ClientDetails` instance. This prevents unnecessary database queries for broadcast IDs and ensures consistent handling of these special cases. ```
This commit is contained in:
parent
1fc4096772
commit
0650382405
|
@ -308,6 +308,8 @@ class MessageProcessor:
|
|||
).set(mesh_packet.rx_rssi)
|
||||
|
||||
def _get_client_details(self, node_id: int) -> ClientDetails:
|
||||
if node_id == 4294967295 or node_id == 1: # FFFFFFFF or 1 (Broadcast)
|
||||
return ClientDetails(node_id=node_id, short_name='Broadcast', long_name='Broadcast')
|
||||
node_id_str = str(node_id) # Convert the integer to a string
|
||||
with self.db_pool.connection() as conn:
|
||||
with conn.cursor() as cur:
|
||||
|
|
Loading…
Reference in a new issue