Add LPCNet voice mode support

This commit is contained in:
Janez T
2026-03-11 21:16:08 +01:00
parent 1b6ff59af3
commit ca872f2049
15 changed files with 329 additions and 124 deletions

View File

@@ -516,8 +516,8 @@ class ContactsProvider with ChangeNotifier {
return null;
}
final firstHopHex = routeBytes
.sublist(0, routeHashSize)
final lastHopHex = routeBytes
.sublist(routeBytes.length - routeHashSize)
.map((byte) => byte.toRadixString(16).padLeft(2, '0'))
.join();
final repeaterCandidates = _contacts.values.where((candidate) {
@@ -526,7 +526,7 @@ class ContactsProvider with ChangeNotifier {
return false;
}
final location = candidate.displayLocation;
return location != null && candidate.publicKeyHex.startsWith(firstHopHex);
return location != null && candidate.publicKeyHex.startsWith(lastHopHex);
}).toList()..sort((a, b) => b.lastAdvert.compareTo(a.lastAdvert));
if (repeaterCandidates.isEmpty) {
return null;