From 94b6688e57134fe43ec8822e9f1e822d79bf51e4 Mon Sep 17 00:00:00 2001 From: logicog Date: Sun, 30 Nov 2025 22:28:30 +0100 Subject: [PATCH] Correctly use physical port in mirror configuration --- html/mirror.html | 2 +- html/mirror.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/html/mirror.html b/html/mirror.html index 1fba4e9..0b8ea8e 100644 --- a/html/mirror.html +++ b/html/mirror.html @@ -10,7 +10,7 @@

Mirror Configuration

-
+

Mirrored Ports (TX)

diff --git a/html/mirror.js b/html/mirror.js index b536405..b66df15 100644 --- a/html/mirror.js +++ b/html/mirror.js @@ -49,8 +49,10 @@ function fetchMirror() { let m_tx = parseInt(s.mirror_tx, 2); let m_rx = parseInt(s.mirror_rx, 2); for (let i = 1; i <= numPorts; i++) { - setM("mPortsTX"+i, m_tx&1); setM("mPortsRX"+i, m_rx&1); - m_tx = m_tx >> 1; m_rx = m_tx >> 1; + let p = i - 1; + if (numPorts < 9) + p = physToLogPort[p];members & (1<