Remove ACARS section from left sidebar menu

ACARS controls are now in the collapsible sidebar next to the map,
so the redundant section in the left settings panel is no longer needed.

- Remove ACARS Messaging section from aircraft mode settings
- Remove unused JS functions (toggleAcarsPanel, setAcarsRegion, etc.)
- Keep addAcarsToOutput helper used by main sidebar

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-01-13 22:48:44 +00:00
parent c94d0a642d
commit 16cd1fef2d

View File

@@ -858,49 +858,6 @@
Stop Tracking
</button>
<!-- ACARS Sub-section -->
<div class="section" style="margin-top: 15px; border-top: 1px solid var(--border-color); padding-top: 15px;">
<h3 style="display: flex; align-items: center; justify-content: space-between; cursor: pointer;" onclick="toggleAcarsPanel()">
<span>ACARS Messaging</span>
<span id="acarsToggleIcon" style="font-size: 10px; color: var(--text-secondary);">&#9660;</span>
</h3>
<div id="acarsPanel">
<div class="info-text" style="margin-bottom: 10px;">
Decode aircraft digital messages (ACARS) on VHF frequencies.
</div>
<div style="background: rgba(255,193,7,0.1); border: 1px solid var(--accent-yellow); border-radius: 4px; padding: 8px; margin-bottom: 10px; font-size: 10px;">
<strong style="color: var(--accent-yellow);">⚠ Two SDRs Required</strong><br>
<span style="color: var(--text-secondary);">ADS-B uses 1090 MHz, ACARS uses VHF (~131 MHz). To receive both simultaneously, you need two separate RTL-SDR devices.</span>
</div>
<div class="form-group">
<label>Frequencies (MHz)</label>
<input type="text" id="acarsFrequencies" value="131.550,130.025,129.125,131.525" placeholder="131.550,130.025,...">
<div class="info-text" style="margin-top: 4px;">Comma-separated VHF ACARS frequencies</div>
</div>
<div class="form-group">
<label>Gain (dB, 0 = auto)</label>
<input type="text" id="acarsGain" value="40" placeholder="40">
</div>
<div class="form-group">
<label>PPM Correction</label>
<input type="text" id="acarsPpm" value="0" placeholder="0">
</div>
<div class="preset-buttons" style="margin-bottom: 10px;">
<button class="preset-btn" onclick="setAcarsRegion('na')">N. America</button>
<button class="preset-btn" onclick="setAcarsRegion('eu')">Europe</button>
<button class="preset-btn" onclick="setAcarsRegion('ap')">Asia-Pacific</button>
</div>
<div class="info-text" style="margin-top: 8px; display: grid; grid-template-columns: auto auto; gap: 4px 8px; align-items: center;" id="acarsToolStatus">
<span>acarsdec:</span><span class="tool-status" id="acarsdecStatus">Checking...</span>
</div>
<button class="run-btn" id="startAcarsBtn" onclick="startAcars()" style="margin-top: 10px;">
Start ACARS
</button>
<button class="stop-btn" id="stopAcarsBtn" onclick="stopAcars()" style="display: none; margin-top: 10px;">
Stop ACARS
</button>
</div>
</div>
</div>
<!-- SATELLITE MODE -->
@@ -7378,113 +7335,8 @@
}
// ============================================
// ACARS Functions
// ACARS Output Helper (used by main sidebar)
// ============================================
let acarsEventSource = null;
let isAcarsRunning = false;
let acarsMessageCount = 0;
function toggleAcarsPanel() {
const panel = document.getElementById('acarsPanel');
const icon = document.getElementById('acarsToggleIcon');
if (panel.style.display === 'none') {
panel.style.display = 'block';
icon.innerHTML = '&#9660;';
} else {
panel.style.display = 'none';
icon.innerHTML = '&#9654;';
}
}
function setAcarsRegion(region) {
const freqInput = document.getElementById('acarsFrequencies');
const regions = {
'na': '129.125,130.025,130.450,131.550',
'eu': '131.525,131.725,131.550',
'ap': '131.550,131.450'
};
freqInput.value = regions[region] || regions['na'];
}
function checkAcarsTools() {
fetch('/acars/tools')
.then(r => r.json())
.then(data => {
const status = document.getElementById('acarsdecStatus');
if (data.acarsdec) {
status.textContent = 'OK';
status.className = 'tool-status ok';
} else {
status.textContent = 'Missing';
status.className = 'tool-status missing';
}
})
.catch(() => {
const status = document.getElementById('acarsdecStatus');
status.textContent = 'Error';
status.className = 'tool-status missing';
});
}
function startAcars() {
const frequencies = document.getElementById('acarsFrequencies').value.split(',').map(f => f.trim());
const gain = document.getElementById('acarsGain').value;
const ppm = document.getElementById('acarsPpm').value;
const device = getSelectedDevice();
fetch('/acars/start', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ frequencies, gain, ppm, device })
})
.then(r => r.json())
.then(data => {
if (data.status === 'started') {
isAcarsRunning = true;
acarsMessageCount = 0;
document.getElementById('startAcarsBtn').style.display = 'none';
document.getElementById('stopAcarsBtn').style.display = 'block';
startAcarsStream();
} else {
alert('ACARS Error: ' + data.message);
}
})
.catch(err => alert('ACARS Error: ' + err));
}
function stopAcars() {
fetch('/acars/stop', { method: 'POST' })
.then(r => r.json())
.then(data => {
isAcarsRunning = false;
document.getElementById('startAcarsBtn').style.display = 'block';
document.getElementById('stopAcarsBtn').style.display = 'none';
if (acarsEventSource) {
acarsEventSource.close();
acarsEventSource = null;
}
});
}
function startAcarsStream() {
if (acarsEventSource) acarsEventSource.close();
acarsEventSource = new EventSource('/acars/stream');
acarsEventSource.onmessage = function(e) {
const data = JSON.parse(e.data);
if (data.type === 'acars') {
acarsMessageCount++;
addAcarsToOutput(data);
} else if (data.type === 'error') {
console.error('ACARS error:', data.message);
}
};
acarsEventSource.onerror = function() {
console.error('ACARS stream error');
};
}
function addAcarsToOutput(data) {
const output = document.getElementById('outputList');
const item = document.createElement('div');