Skip to content

Commit ded7019

Browse files
committed
Update Connect button logic to consider external antenna selection in zone checks
1 parent 81ef53f commit ded7019

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎content/wardrive.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,10 +1082,10 @@ async function performAppLaunchZoneCheck() {
10821082
debugWarn(`[GEO AUTH] [INIT] Failed to center map: ${mapErr.message}`);
10831083
}
10841084

1085-
// Enable Connect button only if in valid zone
1085+
// Enable Connect button only if in valid zone AND external antenna selected
10861086
if (result.success && result.in_zone) {
1087-
setConnectButtonDisabled(false);
1088-
debugLog("[GEO AUTH] [INIT] ✅ Connect button enabled (in valid zone)");
1087+
updateConnectButtonState(); // Checks both zone and antenna
1088+
debugLog("[GEO AUTH] [INIT] ✅ Zone check passed, updateConnectButtonState() called");
10891089

10901090
// Start 30s slot refresh timer (disconnected mode)
10911091
if (state.slotRefreshTimerId) {
@@ -5432,7 +5432,7 @@ async function connect() {
54325432
debugError(`[BLE] BLE connection failed: ${e.message}`, e);
54335433
setConnStatus("Disconnected", STATUS_COLORS.error);
54345434
setDynamicStatus("Connection failed", STATUS_COLORS.error);
5435-
setConnectButtonDisabled(false);
5435+
updateConnectButtonState(); // Re-check zone and antenna requirements
54365436
}
54375437
}
54385438
async function disconnect() {

0 commit comments

Comments
 (0)