diff --git a/index.h b/index.h index 53f09e5..63ad288 100644 --- a/index.h +++ b/index.h @@ -590,6 +590,45 @@ const char index_html[] PROGMEM = R"rawliteral( flex: 1; } } + + /* 파일 형식 선택 라디오 버튼 스타일 */ + .format-selector { + display: flex; + align-items: center; + gap: 15px; + background: white; + padding: 8px 15px; + border-radius: 8px; + border: 2px solid #667eea; + } + + .format-selector label { + display: flex; + align-items: center; + gap: 5px; + cursor: pointer; + font-weight: 600; + color: #2c3e50; + font-size: 0.9em; + transition: all 0.3s; + } + + .format-selector label:hover { + color: #667eea; + } + + .format-selector input[type="radio"] { + width: 18px; + height: 18px; + cursor: pointer; + accent-color: #667eea; + } + + .format-info { + font-size: 0.75em; + color: #7f8c8d; + margin-left: 3px; + } @@ -710,6 +749,22 @@ const char index_html[] PROGMEM = R"rawliteral( + +
+ +
+ + +
+
@@ -1207,16 +1262,31 @@ const char index_html[] PROGMEM = R"rawliteral( console.log('MCP2515 mode set to:', modeName); } + function startLogging() { if (ws && ws.readyState === WebSocket.OPEN) { - ws.send(JSON.stringify({cmd: 'startLogging'})); - console.log('Start logging command sent'); + // 선택된 형식 가져오기 + let canFormat = 'bin'; // 기본값 + const formatRadios = document.getElementsByName('can-format'); + for (const radio of formatRadios) { + if (radio.checked) { + canFormat = radio.value; + break; + } + } + + // 로깅 시작 명령 전송 + ws.send(JSON.stringify({ + cmd: 'startLogging', + format: canFormat + })); + + console.log('Start logging: format=' + canFormat); setTimeout(() => { refreshFiles(); }, 1000); } } - function stopLogging() { if (ws && ws.readyState === WebSocket.OPEN) { ws.send(JSON.stringify({cmd: 'stopLogging'}));