mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-11 16:30:28 +00:00
Add nearestrelay fallback settings
This commit is contained in:
@@ -113,15 +113,16 @@ class PathHistoryService {
|
||||
await initialize();
|
||||
await recordLearnedPath(contact);
|
||||
|
||||
if (contact.routeHasPath && contact.routeHopCount > 0) {
|
||||
return PathSelection(
|
||||
mode: PathSelectionMode.directCurrent,
|
||||
pathBytes: Uint8List.fromList(contact.routePathBytes),
|
||||
hopCount: contact.routeHopCount,
|
||||
hashSize: contact.routeHashSize,
|
||||
);
|
||||
}
|
||||
|
||||
if (!autoRouteRotationEnabled) {
|
||||
if (contact.routeHasPath && contact.routeHopCount > 0) {
|
||||
return PathSelection(
|
||||
mode: PathSelectionMode.directCurrent,
|
||||
pathBytes: Uint8List.fromList(contact.routePathBytes),
|
||||
hopCount: contact.routeHopCount,
|
||||
hashSize: contact.routeHashSize,
|
||||
);
|
||||
}
|
||||
return PathSelection.flood();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user