ID 값 ext경우 잘못 ID읽는 부분 수정

This commit is contained in:
2025-10-17 22:51:46 +00:00
parent 6e28b48eaa
commit ce4444df2e
3 changed files with 685 additions and 98 deletions

11
index.h
View File

@@ -579,7 +579,16 @@ const char index_html[] PROGMEM = R"rawliteral(
prevData.dlc !== msg.dlc ||
prevData.timestamp !== msg.timestamp;
// Extended CAN ID 처리 (bit 31 제거)
let displayId = parseInt(canId, 16);
if (displayId & 0x80000000) {
displayId = displayId & 0x1FFFFFFF;
}
const displayIdStr = '0x' + displayId.toString(16).toUpperCase().padStart(8, '0');
if (row) {
// ID 셀 업데이트
row.cells[0].textContent = displayIdStr;
row.cells[1].textContent = msg.dlc;
row.cells[2].textContent = msg.data;
row.cells[3].textContent = msg.updateCount;
@@ -593,7 +602,7 @@ const char index_html[] PROGMEM = R"rawliteral(
row = tbody.insertRow();
row.dataset.canId = canId;
row.innerHTML =
'<td class="mono">0x' + canId + '</td>' +
'<td class="mono">' + displayIdStr + '</td>' +
'<td>' + msg.dlc + '</td>' +
'<td class="mono">' + msg.data + '</td>' +
'<td>' + msg.updateCount + '</td>' +