Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/screens/map_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2065,7 +2065,7 @@ $placemarks </Document>

// 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 {
Expand Down Expand Up @@ -3791,7 +3791,7 @@ $placemarks </Document>

// 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) {
Expand Down
3 changes: 2 additions & 1 deletion lib/services/aggregation_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/services/lora_companion_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 4 additions & 3 deletions lib/services/upload_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down