diff --git a/index.h b/index.h index d444905..19a001d 100644 --- a/index.h +++ b/index.h @@ -173,6 +173,10 @@ const char index_html[] PROGMEM = R"rawliteral(

SPEED

0 msg/s
+
+

CURRENT FILE

+
-
+
@@ -266,6 +270,7 @@ const char index_html[] PROGMEM = R"rawliteral( function updateStatus(data) { const loggingCard = document.getElementById('logging-status'); const sdCard = document.getElementById('sd-status'); + const fileCard = document.getElementById('file-status'); if (data.logging) { loggingCard.classList.add('status-on'); @@ -287,6 +292,16 @@ const char index_html[] PROGMEM = R"rawliteral( sdCard.querySelector('.value').textContent = 'NOT READY'; } + // 현재 파일명 표시 + if (data.currentFile && data.currentFile !== '') { + fileCard.classList.add('status-on'); + fileCard.classList.remove('status-off'); + document.getElementById('current-file').textContent = data.currentFile; + } else { + fileCard.classList.remove('status-on', 'status-off'); + document.getElementById('current-file').textContent = '-'; + } + document.getElementById('msg-count').textContent = data.msgCount.toLocaleString(); document.getElementById('msg-speed').textContent = data.msgSpeed + ' msg/s'; } @@ -317,11 +332,12 @@ const char index_html[] PROGMEM = R"rawliteral( messageOrder.push(canId); } + // ESP32에서 받은 실제 count 값 사용 canMessages[canId] = { timestamp: msg.timestamp, dlc: msg.dlc, data: msg.data, - updateCount: (canMessages[canId]?.updateCount || 0) + 1 + updateCount: msg.count // 실제 수신 횟수 }; });