diff --git a/lib/screens/map_screen.dart b/lib/screens/map_screen.dart index 3ec6e90..82a6e08 100644 --- a/lib/screens/map_screen.dart +++ b/lib/screens/map_screen.dart @@ -2065,7 +2065,7 @@ $placemarks // Show result if (pingSuccess) { - _showSnackBar('✅ Ping heard by ${result.nodeId}'); + _showSnackBar('✅ Ping heard by ${result.nodeId!.length > 8 ? result.nodeId!.substring(0,8) : result.nodeId}'); } else if (result.status == PingStatus.timeout) { _showSnackBar('❌ No response - dead zone'); } else { @@ -3791,7 +3791,7 @@ $placemarks // Fall back to checking LoRa service's contact cache final loraRepeater = _locationService.loraCompanion.getRepeaterLocation(fullId!); - return loraRepeater?.name ?? fullId; // Return full ID if no name + return loraRepeater?.name ?? null; // Return full ID if no name } void _showSampleInfo(Sample sample) { diff --git a/lib/services/aggregation_service.dart b/lib/services/aggregation_service.dart index 0690587..d19352d 100644 --- a/lib/services/aggregation_service.dart +++ b/lib/services/aggregation_service.dart @@ -140,7 +140,8 @@ class AggregationService { for (final coverage in hashToCoverage.values) { // Only create edges for repeaters that actually responded in this coverage area for (final repeaterId in coverage.repeaters) { - final repeaterData = idToRepeaters[repeaterId]; + final shortRepeaterId = repeaterId.length >= 8 ? repeaterId.substring(0, 8) : repeaterId; + final repeaterData = idToRepeaters[shortRepeaterId]; if (repeaterData != null) { final repeater = repeaterData['repeater'] as Repeater; // Skip repeaters with location set to 0,0 (invalid/unknown location) diff --git a/lib/services/lora_companion_service.dart b/lib/services/lora_companion_service.dart index ae9ef41..0c49b05 100644 --- a/lib/services/lora_companion_service.dart +++ b/lib/services/lora_companion_service.dart @@ -930,7 +930,7 @@ class LoRaCompanionService { if (completer != null && !completer.isCompleted) { // Add this response to the list _pingResponses[tag]?.add({ - 'nodeId': pubkeyShort, + 'nodeId': pubkey, 'snr': snr, 'rssi': rssi, 'node_type': nodeType, diff --git a/lib/services/upload_service.dart b/lib/services/upload_service.dart index fa62a48..3e25f7f 100644 --- a/lib/services/upload_service.dart +++ b/lib/services/upload_service.dart @@ -34,15 +34,16 @@ class UploadService { 'id': sample.id, 'nodeId': (sample.path == null || sample.path!.isEmpty) ? 'Unknown' - : (sample.path!.length > 8 ? sample.path!.substring(0, 8).toUpperCase() : sample.path!.toUpperCase()), + : (sample.path!.toUpperCase()), +/// : (sample.path!.length > 8 ? sample.path!.substring(0, 8).toUpperCase() : sample.path!.toUpperCase()), 'repeaterName': (() { final name = (sample.path != null && repeaterNames != null) ? repeaterNames![sample.path] : null; if (name != null && name.isNotEmpty) return name; if (sample.path == null || sample.path!.isEmpty) return 'Unknown'; - final short = sample.path!.length > 8 ? sample.path!.substring(0,8).toUpperCase() : sample.path!.toUpperCase(); - return short; +/// final short = sample.path!.length > 8 ? sample.path!.substring(0,8).toUpperCase() : sample.path!.toUpperCase(); + return sample.path!.toUpperCase(); })(), 'latitude': sample.position.latitude, 'longitude': sample.position.longitude,