Skip to content

Commit 96adc41

Browse files
committed
Skip map refresh during auto mode to optimize performance
1 parent a9c5596 commit 96adc41

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

content/wardrive.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ function scheduleCoverageRefresh(lat, lon, delayMs = 0) {
832832
/**
833833
* Update map and GPS overlay after a zone check
834834
* - Updates GPS coordinates and accuracy on the map overlay
835-
* - Refreshes the map iframe with new coordinates
835+
* - Refreshes the map iframe with new coordinates (unless auto mode is running)
836836
* @param {Object} coords - Coordinates object with lat, lon, accuracy_m properties
837837
*/
838838
function updateMapOnZoneCheck(coords) {
@@ -848,6 +848,12 @@ function updateMapOnZoneCheck(coords) {
848848
gpsAccEl.textContent = ${Math.round(accuracy_m)}m`;
849849
}
850850

851+
// Skip map refresh if auto mode is running (ping completion handles map refresh)
852+
if (state.txRxAutoRunning || state.rxAutoRunning) {
853+
debugLog(`[GEO AUTH] Skipping map refresh - auto mode running`);
854+
return;
855+
}
856+
851857
// Refresh map iframe with new coordinates
852858
scheduleCoverageRefresh(lat, lon);
853859
debugLog(`[GEO AUTH] Map updated: lat=${lat.toFixed(5)}, lon=${lon.toFixed(5)}, accuracy=${accuracy_m ? Math.round(accuracy_m) + 'm' : 'N/A'}`);

0 commit comments

Comments
 (0)