Update ML timeout handling and adjust distance threshold for path hops

This commit is contained in:
Winston Lowe
2026-03-31 18:55:22 -07:00
parent d0e3767db6
commit 817c60a155
3 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -3753,7 +3753,9 @@ class MeshCoreConnector extends ChangeNotifier {
if (mlTimeout != null) {
if (pathLength < 0) {
// Flood: trust ML, only enforce firmware formula as floor
return mlTimeout.clamp(physicsMin, mlTimeout);
if (mlTimeout < physicsMin) {
return physicsMin;
}
}
return mlTimeout.clamp(physicsMin, physicsMax);
}
+1 -1
View File
@@ -879,7 +879,7 @@ List<_PathHop> _buildPathHops(
previousPosition = resolvedPosition;
}
// If the best candidate is much farther than the previous hop, it's likely not the correct match.
if (lastDistance + bestDistance > 70000 &&
if (lastDistance + bestDistance > 50000 &&
candidates != null &&
candidates.isNotEmpty) {
i--;
+1 -1
View File
@@ -142,7 +142,7 @@ class _NeighborsScreenState extends State<NeighborsScreen> {
void _handleNeighborsResponse(MeshCoreConnector connector, Uint8List frame) {
final buffer = BufferReader(frame);
final contacts = connector.allContacts;
final contacts = connector.allContactsUnfiltered;
try {
final neighborCount = buffer.readUInt16LE();
final parsedNeighbors = parseNeighborsData(buffer, buffer.readUInt16LE());