물리적 버튼 상태LED제거 웹페이 조작 추가
This commit is contained in:
16
index.h
16
index.h
@@ -241,6 +241,8 @@ const char index_html[] PROGMEM = R"rawliteral(
|
||||
<span id="speed-status" style="color: #11998e; font-size: 0.85em; font-weight: 600;"></span>
|
||||
</div>
|
||||
<div class="control-row">
|
||||
<button onclick="startLogging()" style="background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);">Start Logging</button>
|
||||
<button onclick="stopLogging()" style="background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);">Stop Logging</button>
|
||||
<button onclick="refreshFiles()">Refresh Files</button>
|
||||
<button onclick="clearMessages()">Clear Display</button>
|
||||
</div>
|
||||
@@ -518,6 +520,20 @@ const char index_html[] PROGMEM = R"rawliteral(
|
||||
console.log('CAN speed set to:', speedName);
|
||||
}
|
||||
|
||||
function startLogging() {
|
||||
if (ws && ws.readyState === WebSocket.OPEN) {
|
||||
ws.send(JSON.stringify({cmd: 'startLogging'}));
|
||||
console.log('Start logging command sent');
|
||||
}
|
||||
}
|
||||
|
||||
function stopLogging() {
|
||||
if (ws && ws.readyState === WebSocket.OPEN) {
|
||||
ws.send(JSON.stringify({cmd: 'stopLogging'}));
|
||||
console.log('Stop logging command sent');
|
||||
}
|
||||
}
|
||||
|
||||
function refreshFiles() {
|
||||
if (ws && ws.readyState === WebSocket.OPEN) {
|
||||
ws.send(JSON.stringify({cmd: 'getFiles'}));
|
||||
|
||||
Reference in New Issue
Block a user