Skip to content
Merged
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
16 changes: 13 additions & 3 deletions content/wardrive.js
Original file line number Diff line number Diff line change
Expand Up @@ -2663,7 +2663,7 @@ function queueApiPost(entry) {

// Add aggregated entry to RX log UI
const timestamp = new Date(entry.timestamp_start).toISOString();
addRxLogEntry(entry.repeater_id, entry.snr_avg, entry.rssi_avg, entry.path_length, entry.header, entry.location.lat, entry.location.lng, timestamp);
addRxLogEntry(entry.repeater_id, entry.snr_avg, entry.rssi_avg, entry.path_length, entry.header, entry.location.lat, entry.location.lng, timestamp, entry.sample_count);
}

// ---- Mobile TX Log Bottom Sheet ----
Expand Down Expand Up @@ -3003,6 +3003,14 @@ function createRxLogEntryElement(entry) {
const chip = createChipElement(parsed.repeaterId, parsed.snr);
chipsRow.appendChild(chip);

// Add sample count badge if aggregated (sampleCount > 1)
if (entry.sampleCount && entry.sampleCount > 1) {
const badge = document.createElement('span');
badge.className = 'text-xs text-slate-400 ml-1';
badge.textContent = `x${entry.sampleCount}`;
chipsRow.appendChild(badge);
}

logEntry.appendChild(topRow);
logEntry.appendChild(chipsRow);

Expand Down Expand Up @@ -3161,8 +3169,9 @@ function toggleRxLogBottomSheet() {
* @param {number} lat - Latitude
* @param {number} lon - Longitude
* @param {string} timestamp - ISO timestamp
* @param {number} [sampleCount=1] - Number of samples aggregated in this entry
*/
function addRxLogEntry(repeaterId, snr, rssi, pathLength, header, lat, lon, timestamp) {
function addRxLogEntry(repeaterId, snr, rssi, pathLength, header, lat, lon, timestamp, sampleCount = 1) {
const entry = {
repeaterId,
snr,
Expand All @@ -3171,7 +3180,8 @@ function addRxLogEntry(repeaterId, snr, rssi, pathLength, header, lat, lon, time
header,
lat,
lon,
timestamp
timestamp,
sampleCount
};

rxLogState.entries.push(entry);
Expand Down