디자인 다크 모드 수정
This commit is contained in:
502
transmit.h
502
transmit.h
@@ -9,330 +9,224 @@ const char transmit_html[] PROGMEM = R"rawliteral(
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>CAN Transmit - Sequence Editor</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
:root {
|
||||
--bg: #0e1117;
|
||||
--panel: #161b24;
|
||||
--card: #1c2230;
|
||||
--border: #2d3748;
|
||||
--accent: #43cea2;
|
||||
--green: #3fb950;
|
||||
--blue: #58a6ff;
|
||||
--red: #f85149;
|
||||
--yellow: #e3b341;
|
||||
--purple: #bc8cff;
|
||||
--text: #e6edf3;
|
||||
--muted: #8b949e;
|
||||
--r: 8px;
|
||||
}
|
||||
* { margin:0; padding:0; box-sizing:border-box; }
|
||||
html, body { min-height:100%; }
|
||||
body {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
min-height: 100vh;
|
||||
padding: 10px;
|
||||
}
|
||||
.container {
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
background: white;
|
||||
border-radius: 15px;
|
||||
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
|
||||
overflow: hidden;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
||||
background: var(--bg); color: var(--text);
|
||||
overflow-x: hidden; font-size: 14px;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
.header {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
color: white;
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
background: linear-gradient(135deg,#1a2744 0%,#1e1a3a 100%);
|
||||
padding: 11px 16px; border-bottom: 1px solid var(--border);
|
||||
display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
|
||||
}
|
||||
.header h1 { font-size: 1.8em; margin-bottom: 5px; }
|
||||
.header p { opacity: 0.9; font-size: 0.9em; }
|
||||
/* ========== 통일된 네비게이션 ========== */
|
||||
.nav {
|
||||
background: #f8f9fa;
|
||||
padding: 0;
|
||||
border-bottom: 2px solid #e0e0e0;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.header h1 {
|
||||
font-size: 1.0em; font-weight: 700; color: var(--accent);
|
||||
display: flex; align-items: center; gap: 8px;
|
||||
}
|
||||
|
||||
.nav a {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px 20px;
|
||||
text-decoration: none;
|
||||
color: #666;
|
||||
font-weight: 500;
|
||||
font-size: 0.95em;
|
||||
border-bottom: 3px solid transparent;
|
||||
transition: all 0.3s;
|
||||
.header p { font-size: 0.78em; color: var(--muted); margin:0; }
|
||||
.badge {
|
||||
background: rgba(67,206,162,.15); color: var(--accent);
|
||||
padding: 2px 8px; border-radius: 12px; font-size: 0.65em;
|
||||
font-weight: 600; border: 1px solid rgba(67,206,162,.3);
|
||||
white-space: nowrap;
|
||||
min-width: 120px;
|
||||
}
|
||||
|
||||
.nav a:hover {
|
||||
background: #e9ecef;
|
||||
color: #667eea;
|
||||
transform: translateY(-2px);
|
||||
.header-spacer { flex:1; }
|
||||
|
||||
/* Nav */
|
||||
.nav {
|
||||
background: var(--panel); border-bottom: 1px solid var(--border);
|
||||
display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
.nav a.active {
|
||||
color: #764ba2;
|
||||
border-bottom-color: #764ba2;
|
||||
background: white;
|
||||
font-weight: 600;
|
||||
.nav::-webkit-scrollbar { display:none; }
|
||||
.nav a {
|
||||
display: inline-flex; align-items: center;
|
||||
padding: 10px 13px; text-decoration: none; color: var(--muted);
|
||||
font-size: 0.78em; font-weight: 500;
|
||||
border-bottom: 2px solid transparent; white-space: nowrap;
|
||||
transition: color .2s, border-color .2s;
|
||||
}
|
||||
.content { padding: 20px; }
|
||||
|
||||
.section {
|
||||
background: #f8f9fa;
|
||||
border-radius: 10px;
|
||||
padding: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.nav a:hover { color: var(--text); }
|
||||
.nav a.active { color: var(--accent); border-bottom-color: var(--accent); }
|
||||
|
||||
/* Content */
|
||||
.content { padding: 12px; }
|
||||
|
||||
/* Headings */
|
||||
h2 {
|
||||
color: #333;
|
||||
margin-bottom: 15px;
|
||||
font-size: 1.3em;
|
||||
border-bottom: 3px solid #667eea;
|
||||
padding-bottom: 8px;
|
||||
color: var(--accent); margin: 14px 0 10px;
|
||||
font-size: 0.82em; font-weight: 700; text-transform: uppercase;
|
||||
letter-spacing: .5px; padding-bottom: 6px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.form-row {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
gap: 15px;
|
||||
margin-bottom: 15px;
|
||||
h3 {
|
||||
color: var(--text); font-size: 0.85em; font-weight: 600;
|
||||
margin-bottom: 10px; padding-bottom: 6px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.form-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
/* Buttons */
|
||||
.btn, button {
|
||||
padding: 6px 13px; border: 1px solid var(--border);
|
||||
border-radius: var(--r); background: var(--bg); color: var(--muted);
|
||||
font-size: 0.8em; font-weight: 600; cursor: pointer;
|
||||
font-family: inherit; transition: all .15s; white-space: nowrap;
|
||||
-webkit-tap-highlight-color: transparent; touch-action: manipulation;
|
||||
}
|
||||
|
||||
.btn:hover, button:hover { border-color: var(--accent); color: var(--accent); }
|
||||
.btn:active, button:active { transform: scale(.97); }
|
||||
.btn-primary { border-color:var(--blue); color:var(--blue); }
|
||||
.btn-success { border-color:var(--accent); color:var(--accent); }
|
||||
.btn-danger { border-color:var(--red); color:var(--red); }
|
||||
.btn-warning { border-color:var(--yellow); color:var(--yellow); }
|
||||
.btn-secondary{ border-color:var(--muted); color:var(--muted); }
|
||||
.btn-primary:hover { background:rgba(88,166,255,.10); }
|
||||
.btn-success:hover { background:rgba(67,206,162,.10); }
|
||||
.btn-danger:hover { background:rgba(248,81,73,.10); }
|
||||
.btn-warning:hover { background:rgba(227,179,65,.10); }
|
||||
.btn-secondary:hover{ background:rgba(139,148,158,.10); }
|
||||
.btn-small { padding:4px 9px; font-size:.75em; }
|
||||
.button-group, .btn-group { display:flex; gap:6px; flex-wrap:wrap; margin-top:10px; }
|
||||
|
||||
/* Forms */
|
||||
label {
|
||||
font-weight: 600;
|
||||
margin-bottom: 5px;
|
||||
color: #333;
|
||||
font-size: 0.9em;
|
||||
display:block; font-weight:600; color:var(--muted);
|
||||
margin-bottom:4px; font-size:.78em;
|
||||
text-transform:uppercase; letter-spacing:.3px;
|
||||
}
|
||||
|
||||
input, select {
|
||||
padding: 10px;
|
||||
border: 2px solid #ddd;
|
||||
border-radius: 5px;
|
||||
font-size: 1em;
|
||||
transition: all 0.3s;
|
||||
input[type="text"], input[type="password"], input[type="number"],
|
||||
select, textarea {
|
||||
width:100%; padding:7px 10px;
|
||||
border:1px solid var(--border); border-radius:var(--r);
|
||||
font-size:.85em; font-family:inherit;
|
||||
background:var(--bg); color:var(--text);
|
||||
transition:border-color .2s;
|
||||
}
|
||||
|
||||
input:focus, select:focus {
|
||||
outline: none;
|
||||
border-color: #667eea;
|
||||
input:focus, select:focus, textarea:focus {
|
||||
outline:none; border-color:var(--accent);
|
||||
box-shadow:0 0 0 2px rgba(67,206,162,.10);
|
||||
}
|
||||
|
||||
.button-group {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
input[type="checkbox"], input[type="radio"] {
|
||||
width:15px; height:15px; cursor:pointer; accent-color:var(--accent);
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 12px 24px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
font-size: 1em;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
select option { background:var(--panel); color:var(--text); }
|
||||
|
||||
/* Panels */
|
||||
.section, .settings-section, .send-panel, .stats,
|
||||
.control-panel, .auto-trigger-section {
|
||||
background:var(--panel); border:1px solid var(--border);
|
||||
border-radius:var(--r); padding:13px; margin-bottom:10px;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
color: white;
|
||||
.form-group { margin-bottom:12px; }
|
||||
.form-group:last-child { margin-bottom:0; }
|
||||
.help-text { font-size:.76em; color:var(--muted); margin-top:4px; line-height:1.4; }
|
||||
.form-row {
|
||||
display:grid;
|
||||
grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));
|
||||
gap:10px; margin-bottom:10px;
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
|
||||
color: white;
|
||||
.form-row label { text-transform:none; font-size:.78em; }
|
||||
.checkbox-group, .checkbox-row {
|
||||
display:flex; align-items:center; gap:8px;
|
||||
margin-bottom:8px; padding:7px 10px;
|
||||
background:var(--card); border-radius:6px; border:1px solid var(--border);
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
|
||||
color: white;
|
||||
.checkbox-group label, .checkbox-row label {
|
||||
text-transform:none; cursor:pointer; margin-bottom:0;
|
||||
color:var(--text); font-size:.85em; letter-spacing:0;
|
||||
}
|
||||
|
||||
.btn-warning {
|
||||
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
|
||||
color: white;
|
||||
|
||||
/* Alerts */
|
||||
.alert {
|
||||
padding:9px 13px; border-radius:var(--r);
|
||||
margin-bottom:10px; display:none;
|
||||
align-items:center; gap:9px;
|
||||
font-size:.83em; font-weight:600;
|
||||
border:1px solid var(--border); background:var(--panel); color:var(--text);
|
||||
}
|
||||
|
||||
button:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.steps-list {
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: 15px;
|
||||
max-height: 400px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.step-item {
|
||||
background: #f8f9fa;
|
||||
padding: 12px;
|
||||
margin-bottom: 10px;
|
||||
border-radius: 5px;
|
||||
border-left: 4px solid #667eea;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.step-info {
|
||||
flex: 1;
|
||||
font-family: 'Courier New', monospace;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.step-actions {
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.btn-small {
|
||||
padding: 5px 10px;
|
||||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
.sequence-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.sequence-card {
|
||||
background: white;
|
||||
padding: 15px;
|
||||
border-radius: 8px;
|
||||
border: 2px solid #ddd;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.sequence-card:hover {
|
||||
border-color: #667eea;
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.sequence-card h3 {
|
||||
color: #667eea;
|
||||
margin-bottom: 10px;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.sequence-info {
|
||||
font-size: 0.9em;
|
||||
color: white;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.status-badge {
|
||||
display: inline-block;
|
||||
padding: 4px 8px;
|
||||
border-radius: 4px;
|
||||
font-size: 0.8em;
|
||||
font-weight: 600;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.badge-once { background: #e3f2fd; color: #1976d2; }
|
||||
.badge-count { background: #fff3e0; color: #f57c00; }
|
||||
.badge-infinite { background: #f3e5f5; color: #7b1fa2; }
|
||||
.badge-running { background: #c8e6c9; color: #388e3c; }
|
||||
|
||||
.alert.show { display:flex; }
|
||||
.alert-success { border-color:rgba(67,206,162,.4); color:var(--accent); background:rgba(67,206,162,.07); }
|
||||
.alert-info { border-color:rgba(88,166,255,.4); color:var(--blue); background:rgba(88,166,255,.07); }
|
||||
.alert-warning { border-color:rgba(227,179,65,.4); color:var(--yellow); background:rgba(227,179,65,.07); }
|
||||
.alert-icon { font-size:1.15em; }
|
||||
.alert-text { flex:1; }
|
||||
@keyframes slideDown { from{opacity:0;transform:translateY(-6px);}to{opacity:1;transform:translateY(0);} }
|
||||
|
||||
/* Connection status */
|
||||
.connection-status {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
padding: 8px 15px;
|
||||
border-radius: 20px;
|
||||
font-size: 0.85em;
|
||||
font-weight: 600;
|
||||
z-index: 1000;
|
||||
position:fixed; top:10px; right:10px;
|
||||
padding:4px 11px; border-radius:20px;
|
||||
font-size:.75em; font-weight:600; z-index:1000;
|
||||
border:1px solid var(--border); background:var(--panel); color:var(--muted);
|
||||
}
|
||||
.connection-status.connected {
|
||||
background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
|
||||
color: white;
|
||||
.connection-status.connected { border-color:rgba(67,206,162,.5); color:var(--accent); background:rgba(67,206,162,.08); }
|
||||
.connection-status.disconnected { border-color:rgba(248,81,73,.5); color:var(--red); background:rgba(248,81,73,.08); }
|
||||
|
||||
@media (max-width:480px) { .content{padding:8px;} h2{font-size:.78em;} }
|
||||
|
||||
/* transmit.h specific */
|
||||
.steps-list {
|
||||
background:var(--bg); border:1px solid var(--border);
|
||||
border-radius:var(--r); padding:8px; max-height:360px; overflow-y:auto;
|
||||
}
|
||||
.connection-status.disconnected {
|
||||
background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
|
||||
color: white;
|
||||
.steps-list::-webkit-scrollbar { width:5px; }
|
||||
.steps-list::-webkit-scrollbar-track { background:var(--panel); }
|
||||
.steps-list::-webkit-scrollbar-thumb { background:var(--border); border-radius:3px; }
|
||||
.step-item {
|
||||
background:var(--card); padding:9px 11px; margin-bottom:6px;
|
||||
border-radius:6px; border:1px solid var(--border); border-left:3px solid var(--blue);
|
||||
display:flex; justify-content:space-between; align-items:center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ========== 반응형 디자인 ========== */
|
||||
@media (max-width: 768px) {
|
||||
body {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.container {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 15px;
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
font-size: 1.4em;
|
||||
}
|
||||
|
||||
.nav {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.nav a {
|
||||
padding: 12px 15px;
|
||||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 10px 20px;
|
||||
font-size: 13px;
|
||||
}
|
||||
.step-item:hover { border-color:var(--blue); }
|
||||
.step-info { flex:1; font-family:'SF Mono','Fira Code','Courier New',monospace; font-size:.80em; color:var(--text); }
|
||||
.step-actions { display:flex; gap:4px; }
|
||||
.sequence-list {
|
||||
display:grid;
|
||||
grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));
|
||||
gap:8px;
|
||||
}
|
||||
|
||||
@media (min-width: 769px) and (max-width: 1024px) {
|
||||
.header h1 {
|
||||
font-size: 1.6em;
|
||||
}
|
||||
|
||||
.nav a {
|
||||
padding: 13px 18px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1025px) {
|
||||
.content {
|
||||
padding: 30px;
|
||||
}
|
||||
.sequence-card {
|
||||
background:var(--card); padding:12px; border-radius:var(--r);
|
||||
border:1px solid var(--border); transition:border-color .15s;
|
||||
}
|
||||
.sequence-card:hover { border-color:var(--blue); }
|
||||
.sequence-card h3 { color:var(--blue); margin-bottom:7px; font-size:.92em; border-bottom:1px solid var(--border); padding-bottom:5px; }
|
||||
.sequence-info { font-size:.80em; color:var(--muted); margin-bottom:7px; }
|
||||
.status-badge { display:inline-block; padding:2px 7px; border-radius:4px; font-size:.73em; font-weight:600; margin-right:4px; }
|
||||
.badge-once { background:rgba(88,166,255,.12); color:var(--blue); border:1px solid rgba(88,166,255,.2); }
|
||||
.badge-count { background:rgba(227,179,65,.12); color:var(--yellow); border:1px solid rgba(227,179,65,.2); }
|
||||
.badge-infinite { background:rgba(188,140,255,.12);color:var(--purple); border:1px solid rgba(188,140,255,.2);}
|
||||
.badge-running { background:rgba(67,206,162,.12); color:var(--accent); border:1px solid rgba(67,206,162,.2); }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="connection-status" class="connection-status disconnected">🔴 Disconnected</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<div class="header">
|
||||
<h1>🚀 CAN Sequence Transmitter</h1>
|
||||
<p>Create and Execute CAN Message Sequences</p>
|
||||
</div>
|
||||
|
||||
<div class="nav">
|
||||
<div class="nav">
|
||||
<a href="/">📊 Monitor</a>
|
||||
<a href="/transmit" class="active">📤 Transmit</a>
|
||||
<a href="/graph">📈 Graph</a>
|
||||
@@ -342,7 +236,7 @@ const char transmit_html[] PROGMEM = R"rawliteral(
|
||||
<a href="/serial2">📟 Serial2</a>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<div class="content">
|
||||
<div class="section">
|
||||
<h2>Create New Sequence</h2>
|
||||
|
||||
@@ -628,10 +522,23 @@ const char transmit_html[] PROGMEM = R"rawliteral(
|
||||
}))
|
||||
};
|
||||
|
||||
console.log('Saving sequence:', sequence);
|
||||
console.log('✅ Saving sequence:', sequence);
|
||||
console.log('📊 Total steps:', currentSteps.length);
|
||||
|
||||
if (ws && ws.readyState === WebSocket.OPEN) {
|
||||
ws.send(JSON.stringify(sequence));
|
||||
console.log('✅ Sequence save command sent to server');
|
||||
|
||||
// ⭐⭐⭐ 저장 확인 메시지 (3초 후 자동 사라짐)
|
||||
alert('Sequence "' + name + '" saved successfully!\n' +
|
||||
'Steps: ' + currentSteps.length + '\n' +
|
||||
'Repeat: ' + (mode === 0 ? 'Once' : mode === 1 ? count + ' times' : 'Forever'));
|
||||
|
||||
// 입력 필드 초기화 (선택 사항)
|
||||
// document.getElementById('seq-name').value = '';
|
||||
} else {
|
||||
console.error('❌ WebSocket not connected!');
|
||||
alert('Error: Not connected to server');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -685,20 +592,22 @@ const char transmit_html[] PROGMEM = R"rawliteral(
|
||||
|
||||
function loadSequenceDetail(index) {
|
||||
if (ws && ws.readyState === WebSocket.OPEN) {
|
||||
ws.send(JSON.stringify({cmd: 'getSequence', index: index}));
|
||||
ws.send(JSON.stringify({cmd: 'getSequenceDetail', index: index}));
|
||||
console.log('✅ getSequenceDetail 요청:', index);
|
||||
}
|
||||
}
|
||||
|
||||
function handleSequenceDetail(data) {
|
||||
const seq = data.sequence;
|
||||
console.log('✅ Sequence Detail 수신:', data);
|
||||
|
||||
document.getElementById('seq-name').value = seq.name;
|
||||
document.getElementById('repeat-mode').value = seq.mode !== undefined ? seq.mode : seq.repeatMode;
|
||||
document.getElementById('repeat-count').value = seq.count !== undefined ? seq.count : seq.repeatCount;
|
||||
// ESP32에서 보낸 형식에 맞춰 처리
|
||||
document.getElementById('seq-name').value = data.name || '';
|
||||
document.getElementById('repeat-mode').value = data.repeatMode !== undefined ? data.repeatMode : 0;
|
||||
document.getElementById('repeat-count').value = data.repeatCount !== undefined ? data.repeatCount : 1;
|
||||
|
||||
currentSteps = [];
|
||||
if (seq.steps && Array.isArray(seq.steps)) {
|
||||
seq.steps.forEach(step => {
|
||||
if (data.steps && Array.isArray(data.steps)) {
|
||||
data.steps.forEach(step => {
|
||||
let dataBytes = [];
|
||||
if (typeof step.data === 'string') {
|
||||
dataBytes = step.data.split(' ').map(b => parseInt(b, 16));
|
||||
@@ -707,7 +616,7 @@ const char transmit_html[] PROGMEM = R"rawliteral(
|
||||
}
|
||||
|
||||
currentSteps.push({
|
||||
canId: typeof step.id === 'string' ? parseInt(step.id, 16) : step.id,
|
||||
canId: typeof step.id === 'string' ? parseInt(step.id.replace('0x', ''), 16) : step.id,
|
||||
extended: step.ext || step.extended || false,
|
||||
dlc: step.dlc,
|
||||
data: dataBytes,
|
||||
@@ -719,6 +628,7 @@ const char transmit_html[] PROGMEM = R"rawliteral(
|
||||
updateStepsList();
|
||||
document.querySelector('.section').scrollIntoView({ behavior: 'smooth' });
|
||||
alert('Sequence loaded! You can now edit and save it.');
|
||||
console.log('✅ Loaded steps:', currentSteps);
|
||||
}
|
||||
|
||||
function startSequence(index) {
|
||||
|
||||
Reference in New Issue
Block a user