9740bc64c9
Firmware QEMU Tests (ADR-061) / QEMU Test (edge-tier1) (push) Has been skipped
Firmware QEMU Tests (ADR-061) / QEMU Test (full-adr060) (push) Has been skipped
Firmware QEMU Tests (ADR-061) / QEMU Test (tdm-3node) (push) Has been skipped
Firmware QEMU Tests (ADR-061) / Swarm Test (ADR-062) (push) Has been skipped
npm packages / tools/ruview-mcp (node 22) (push) Failing after 1s
nvsim-server → ghcr.io / build-and-publish (push) Failing after 1s
ruview-swarm CI guard / tests (full+train) (push) Failing after 2s
Bench Regression Guard / bench compile-verify (--no-run) (push) Failing after 0s
Bench Regression Guard / bench fast-run (informational, non-gating) (push) Has been skipped
Firmware CI / Verify version.txt matches release tag (push) Has been skipped
Dashboard a11y + cross-browser / a11y (push) Failing after 0s
nvsim Dashboard → GitHub Pages / build-and-deploy (push) Failing after 2s
Firmware CI / Build firmware (esp32s3 / 4mb) (push) Failing after 15s
Firmware QEMU Tests (ADR-061) / Build Espressif QEMU (push) Failing after 1s
Firmware QEMU Tests (ADR-061) / Fuzz Testing (ADR-061 Layer 6) (push) Failing after 1s
Continuous Deployment / Pre-deployment Checks (push) Has been skipped
Firmware CI / Build firmware (esp32c6 / c6-4mb) (push) Failing after 15s
Firmware CI / Build firmware (esp32s3 / 8mb) (push) Failing after 15s
Firmware QEMU Tests (ADR-061) / QEMU Test (boundary-max) (push) Has been skipped
Firmware QEMU Tests (ADR-061) / QEMU Test (boundary-min) (push) Has been skipped
Firmware QEMU Tests (ADR-061) / QEMU Test (default) (push) Has been skipped
Firmware QEMU Tests (ADR-061) / QEMU Test (edge-tier0) (push) Has been skipped
Firmware QEMU Tests (ADR-061) / NVS Matrix Generation (push) Failing after 1s
Security Scanning / Security Policy Compliance (push) Failing after 0s
Security Scanning / Dependency Vulnerability Scan (push) Failing after 0s
Security Scanning / Static Application Security Testing (push) Failing after 1s
Security Scanning / Infrastructure Security Scan (push) Failing after 1s
Security Scanning / Secret Scanning (push) Failing after 1s
npm packages / harness/ruview (node 22) (push) Failing after 17s
Security Scanning / License Compliance Scan (push) Failing after 1s
Security Scanning / Container Security Scan (push) Failing after 4s
three.js demos → GitHub Pages / build-and-deploy (push) Failing after 1s
Verify Pipeline Determinism / Verify Pipeline Determinism (3.11) (push) Failing after 1s
Fix-Marker Regression Guard / Verify fix markers (push) Failing after 1s
ADR-115 MQTT integration tests / mqtt-integration (push) Failing after 1s
npm packages / harness/ruview (node 20) (push) Failing after 1s
npm packages / tools/ruview-mcp (node 20) (push) Failing after 1s
npm packages / tools/ruview-cli (node 20) (push) Failing after 1s
npm packages / tools/ruview-cli (node 22) (push) Failing after 1s
BFLD MQTT Integration / cargo test --features mqtt (live mosquitto) (push) Failing after 29s
ruview-swarm CI guard / build train_marl bin (push) Failing after 2s
ruview-swarm CI guard / clippy (-D warnings, --no-deps) (push) Failing after 3s
ruview-swarm CI guard / tests (ruflo) (push) Failing after 1s
ruview-swarm CI guard / tests (train) (push) Failing after 2s
ruview-swarm CI guard / tests (default) (push) Failing after 2s
Point Cloud Viewer → GitHub Pages / build-and-deploy (push) Failing after 8s
ruview-swarm CI guard / ITAR / publish guard (push) Failing after 0s
wifi-densepose sensing-server → Docker Hub + ghcr.io / build · push · smoke-test (push) Failing after 1s
Continuous Deployment / Deploy to Production (push) Has been cancelled
Continuous Deployment / Rollback Deployment (push) Has been cancelled
Continuous Deployment / Post-deployment Monitoring (push) Has been cancelled
Continuous Deployment / Notify Deployment Status (push) Has been cancelled
Continuous Deployment / Deploy to Staging (push) Has been cancelled
Security Scanning / Security Report (push) Has been cancelled
174 lines
5.3 KiB
JavaScript
174 lines
5.3 KiB
JavaScript
// Hardware Tab Component
|
|
|
|
export class HardwareTab {
|
|
constructor(containerElement) {
|
|
this.container = containerElement;
|
|
this.antennas = [];
|
|
this.csiUpdateInterval = null;
|
|
this.isActive = false;
|
|
}
|
|
|
|
// Initialize component
|
|
init() {
|
|
this.setupAntennas();
|
|
this.startCSISimulation();
|
|
}
|
|
|
|
// Set up antenna interactions
|
|
setupAntennas() {
|
|
this.antennas = Array.from(this.container.querySelectorAll('.antenna'));
|
|
|
|
this.antennas.forEach(antenna => {
|
|
antenna.addEventListener('click', () => {
|
|
antenna.classList.toggle('active');
|
|
this.updateCSIDisplay();
|
|
});
|
|
});
|
|
}
|
|
|
|
// Start CSI simulation
|
|
startCSISimulation() {
|
|
// Initial update
|
|
this.updateCSIDisplay();
|
|
|
|
// Set up periodic updates
|
|
this.csiUpdateInterval = setInterval(() => {
|
|
if (this.hasActiveAntennas()) {
|
|
this.updateCSIDisplay();
|
|
}
|
|
}, 1000);
|
|
}
|
|
|
|
// Check if any antennas are active
|
|
hasActiveAntennas() {
|
|
return this.antennas.some(antenna => antenna.classList.contains('active'));
|
|
}
|
|
|
|
// Update CSI display
|
|
updateCSIDisplay() {
|
|
const activeAntennas = this.antennas.filter(a => a.classList.contains('active'));
|
|
const isActive = activeAntennas.length > 0;
|
|
|
|
// Get display elements
|
|
const amplitudeFill = this.container.querySelector('.csi-fill.amplitude');
|
|
const phaseFill = this.container.querySelector('.csi-fill.phase');
|
|
const amplitudeValue = this.container.querySelector('.csi-row:first-child .csi-value');
|
|
const phaseValue = this.container.querySelector('.csi-row:last-child .csi-value');
|
|
|
|
if (!isActive) {
|
|
// Set to zero when no antennas active
|
|
if (amplitudeFill) amplitudeFill.style.width = '0%';
|
|
if (phaseFill) phaseFill.style.width = '0%';
|
|
if (amplitudeValue) amplitudeValue.textContent = '0.00';
|
|
if (phaseValue) phaseValue.textContent = '0.0π';
|
|
return;
|
|
}
|
|
|
|
// Generate realistic CSI values based on active antennas
|
|
const txCount = activeAntennas.filter(a => a.classList.contains('tx')).length;
|
|
const rxCount = activeAntennas.filter(a => a.classList.contains('rx')).length;
|
|
|
|
// Amplitude increases with more active antennas
|
|
const baseAmplitude = 0.3 + (txCount * 0.1) + (rxCount * 0.05);
|
|
const amplitude = Math.min(0.95, baseAmplitude + (Math.random() * 0.1 - 0.05));
|
|
|
|
// Phase varies more with multiple antennas
|
|
const phaseVariation = 0.5 + (activeAntennas.length * 0.1);
|
|
const phase = 0.5 + Math.random() * phaseVariation;
|
|
|
|
// Update display
|
|
if (amplitudeFill) {
|
|
amplitudeFill.style.width = `${amplitude * 100}%`;
|
|
amplitudeFill.style.transition = 'width 0.5s ease';
|
|
}
|
|
|
|
if (phaseFill) {
|
|
phaseFill.style.width = `${phase * 50}%`;
|
|
phaseFill.style.transition = 'width 0.5s ease';
|
|
}
|
|
|
|
if (amplitudeValue) {
|
|
amplitudeValue.textContent = amplitude.toFixed(2);
|
|
}
|
|
|
|
if (phaseValue) {
|
|
phaseValue.textContent = `${phase.toFixed(1)}π`;
|
|
}
|
|
|
|
// Update antenna array visualization
|
|
this.updateAntennaArray(activeAntennas);
|
|
}
|
|
|
|
// Update antenna array visualization
|
|
updateAntennaArray(activeAntennas) {
|
|
const arrayStatus = this.container.querySelector('.array-status');
|
|
if (!arrayStatus) return;
|
|
|
|
const txActive = activeAntennas.filter(a => a.classList.contains('tx')).length;
|
|
const rxActive = activeAntennas.filter(a => a.classList.contains('rx')).length;
|
|
|
|
// Clear and rebuild using safe DOM methods to prevent XSS
|
|
arrayStatus.innerHTML = '';
|
|
|
|
const createInfoDiv = (label, value) => {
|
|
const div = document.createElement('div');
|
|
div.className = 'array-info';
|
|
|
|
const labelSpan = document.createElement('span');
|
|
labelSpan.className = 'info-label';
|
|
labelSpan.textContent = label;
|
|
|
|
const valueSpan = document.createElement('span');
|
|
valueSpan.className = 'info-value';
|
|
valueSpan.textContent = value;
|
|
|
|
div.appendChild(labelSpan);
|
|
div.appendChild(valueSpan);
|
|
return div;
|
|
};
|
|
|
|
arrayStatus.appendChild(createInfoDiv('Active TX:', `${txActive}/3`));
|
|
arrayStatus.appendChild(createInfoDiv('Active RX:', `${rxActive}/6`));
|
|
arrayStatus.appendChild(createInfoDiv('Signal Quality:', `${this.calculateSignalQuality(txActive, rxActive)}%`));
|
|
}
|
|
|
|
// Calculate signal quality based on active antennas
|
|
calculateSignalQuality(txCount, rxCount) {
|
|
if (txCount === 0 || rxCount === 0) return 0;
|
|
|
|
const txRatio = txCount / 3;
|
|
const rxRatio = rxCount / 6;
|
|
const quality = (txRatio * 0.4 + rxRatio * 0.6) * 100;
|
|
|
|
return Math.round(quality);
|
|
}
|
|
|
|
// Toggle all antennas
|
|
toggleAllAntennas(active) {
|
|
this.antennas.forEach(antenna => {
|
|
antenna.classList.toggle('active', active);
|
|
});
|
|
this.updateCSIDisplay();
|
|
}
|
|
|
|
// Reset antenna configuration
|
|
resetAntennas() {
|
|
// Set default configuration (all active)
|
|
this.antennas.forEach(antenna => {
|
|
antenna.classList.add('active');
|
|
});
|
|
this.updateCSIDisplay();
|
|
}
|
|
|
|
// Clean up
|
|
dispose() {
|
|
if (this.csiUpdateInterval) {
|
|
clearInterval(this.csiUpdateInterval);
|
|
this.csiUpdateInterval = null;
|
|
}
|
|
|
|
this.antennas.forEach(antenna => {
|
|
antenna.removeEventListener('click', this.toggleAntenna);
|
|
});
|
|
}
|
|
} |