Skip to content

Commit 213d2ce

Browse files
committed
v2.1.16
bug fix for durations
1 parent 202f2dd commit 213d2ce

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

meshtastic_listener/listener_db/listener_db.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,10 +565,12 @@ def return_traceroute_success_rate(self, from_id: int, lookback_ts: int = 0) ->
565565
if item.txTime is not None and item.rxTime is not None
566566
]
567567

568+
avg = durations[0] if len(durations) == 1 else mean(durations)
569+
568570
return TracerouteStatistics(
569571
total=len(items),
570572
successes=sum(1 for item in items if item.tracerouteDetails is not None),
571-
avgTraceDuration=round(mean(durations), 2) if durations else 0.0
573+
avgTraceDuration=round(avg, 2) if durations else 0.0
572574
)
573575

574576
def select_favorite_nodes(self) -> list[Node]:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "meshtatic_listener"
3-
version = "2.1.15"
3+
version = "2.1.16"
44
description = "A server for connecting to a Meshtastic device and responding to commands."
55
authors = [{ name = "Michael Gillett", email = "51103663+migillett@users.noreply.github.com" }]
66
requires-python = ">=3.10,<3.14"

0 commit comments

Comments
 (0)