Add documentation and utility modules
- Add API specification documentation - Add system specification document - Add UI mockups and documentation - Add utility modules (wifi)
This commit is contained in:
491
docs/mockups/settings.html
Normal file
491
docs/mockups/settings.html
Normal file
@@ -0,0 +1,491 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>LED Driver - Settings</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
||||
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
|
||||
min-height: 100vh;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.header {
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
padding: 24px;
|
||||
margin-bottom: 24px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
color: #667eea;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.header p {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
padding: 24px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.card h2 {
|
||||
color: #667eea;
|
||||
margin-bottom: 20px;
|
||||
font-size: 1.5rem;
|
||||
border-bottom: 2px solid #e0e0e0;
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.form-group label {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.form-group input[type="text"],
|
||||
.form-group input[type="number"],
|
||||
.form-group input[type="password"],
|
||||
.form-group select {
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
font-size: 1rem;
|
||||
transition: border-color 0.2s;
|
||||
}
|
||||
|
||||
.form-group input:focus,
|
||||
.form-group select:focus {
|
||||
outline: none;
|
||||
border-color: #667eea;
|
||||
}
|
||||
|
||||
.form-group input[type="range"] {
|
||||
width: 100%;
|
||||
height: 8px;
|
||||
border-radius: 4px;
|
||||
background: #e0e0e0;
|
||||
outline: none;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
.form-group input[type="range"]::-webkit-slider-thumb {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
background: #667eea;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.form-group input[type="range"]::-moz-range-thumb {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
background: #667eea;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.value-display {
|
||||
display: inline-block;
|
||||
margin-left: 12px;
|
||||
font-weight: 600;
|
||||
color: #667eea;
|
||||
min-width: 60px;
|
||||
}
|
||||
|
||||
.form-group small {
|
||||
display: block;
|
||||
margin-top: 4px;
|
||||
color: #666;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.checkbox-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.checkbox-group input[type="checkbox"] {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.color-order {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.color-order-option {
|
||||
flex: 1;
|
||||
min-width: 120px;
|
||||
padding: 12px;
|
||||
border: 2px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.color-order-option:hover {
|
||||
border-color: #667eea;
|
||||
}
|
||||
|
||||
.color-order-option.selected {
|
||||
border-color: #667eea;
|
||||
background: #667eea;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.color-order-option .color-boxes {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.color-box {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.color-box.r { background: #ff0000; }
|
||||
.color-box.g { background: #00ff00; }
|
||||
.color-box.b { background: #0000ff; }
|
||||
|
||||
.actions {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
margin-top: 32px;
|
||||
padding-top: 24px;
|
||||
border-top: 2px solid #e0e0e0;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 12px 24px;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: #667eea;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background: #5568d3;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background: #e0e0e0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
background: #d0d0d0;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
background: #f44336;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-danger:hover {
|
||||
background: #d32f2f;
|
||||
}
|
||||
|
||||
.btn-full {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.section-divider {
|
||||
height: 1px;
|
||||
background: #e0e0e0;
|
||||
margin: 24px 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<h1>Device Settings</h1>
|
||||
<p>Configure your LED driver device settings</p>
|
||||
</div>
|
||||
|
||||
<!-- Basic Settings -->
|
||||
<div class="card">
|
||||
<h2>Basic Settings</h2>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Device Name</label>
|
||||
<input type="text" id="device-name" value="led-device1" placeholder="led-device1">
|
||||
<small>Unique identifier for this device</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>LED Pin</label>
|
||||
<input type="number" id="led-pin" value="10" min="0" max="40">
|
||||
<small>GPIO pin number connected to LED data line</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Number of LEDs</label>
|
||||
<input type="number" id="num-leds" value="50" min="1" max="1000">
|
||||
<small>Total number of LEDs in your strip</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Color Order</label>
|
||||
<div class="color-order">
|
||||
<div class="color-order-option selected" data-order="rgb">
|
||||
RGB
|
||||
<div class="color-boxes">
|
||||
<div class="color-box r"></div>
|
||||
<div class="color-box g"></div>
|
||||
<div class="color-box b"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="color-order-option" data-order="rbg">
|
||||
RBG
|
||||
<div class="color-boxes">
|
||||
<div class="color-box r"></div>
|
||||
<div class="color-box b"></div>
|
||||
<div class="color-box g"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="color-order-option" data-order="grb">
|
||||
GRB
|
||||
<div class="color-boxes">
|
||||
<div class="color-box g"></div>
|
||||
<div class="color-box r"></div>
|
||||
<div class="color-box b"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="color-order-option" data-order="gbr">
|
||||
GBR
|
||||
<div class="color-boxes">
|
||||
<div class="color-box g"></div>
|
||||
<div class="color-box b"></div>
|
||||
<div class="color-box r"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="color-order-option" data-order="brg">
|
||||
BRG
|
||||
<div class="color-boxes">
|
||||
<div class="color-box b"></div>
|
||||
<div class="color-box r"></div>
|
||||
<div class="color-box g"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="color-order-option" data-order="bgr">
|
||||
BGR
|
||||
<div class="color-boxes">
|
||||
<div class="color-box b"></div>
|
||||
<div class="color-box g"></div>
|
||||
<div class="color-box r"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Pattern Settings -->
|
||||
<div class="card">
|
||||
<h2>Pattern Settings</h2>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Pattern</label>
|
||||
<select id="pattern">
|
||||
<option value="on">On</option>
|
||||
<option value="off">Off</option>
|
||||
<option value="blink">Blink</option>
|
||||
<option value="chase">Chase</option>
|
||||
<option value="circle">Circle</option>
|
||||
<option value="pulse">Pulse</option>
|
||||
<option value="rainbow">Rainbow</option>
|
||||
<option value="transition">Transition</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>
|
||||
Brightness
|
||||
<span class="value-display" id="brightness-value">100</span>%
|
||||
</label>
|
||||
<input type="range" id="brightness" min="0" max="100" value="100">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>
|
||||
Delay
|
||||
<span class="value-display" id="delay-value">100</span>ms
|
||||
</label>
|
||||
<input type="range" id="delay" min="10" max="1000" value="100" step="10">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Advanced Settings -->
|
||||
<div class="card">
|
||||
<h2>Advanced Settings</h2>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Step Counter</label>
|
||||
<input type="text" id="step-counter" value="0" readonly style="background: #f5f5f5; cursor: not-allowed;">
|
||||
<small>Current step position in pattern (read-only)</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="step-increment">
|
||||
Step Increment
|
||||
</label>
|
||||
<input type="number" id="step-increment" value="1" min="1" max="255">
|
||||
<small>Amount step counter increments per cycle. Controls pattern advancement speed.</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Pattern Parameters</label>
|
||||
<div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;">
|
||||
<div>
|
||||
<label style="font-size: 0.875rem;">N1</label>
|
||||
<input type="number" id="n1" value="0" min="0" max="255">
|
||||
</div>
|
||||
<div>
|
||||
<label style="font-size: 0.875rem;">N2</label>
|
||||
<input type="number" id="n2" value="0" min="0" max="255">
|
||||
</div>
|
||||
<div>
|
||||
<label style="font-size: 0.875rem;">N3</label>
|
||||
<input type="number" id="n3" value="0" min="0" max="255">
|
||||
</div>
|
||||
<div>
|
||||
<label style="font-size: 0.875rem;">N4</label>
|
||||
<input type="number" id="n4" value="0" min="0" max="255">
|
||||
</div>
|
||||
<div>
|
||||
<label style="font-size: 0.875rem;">N5</label>
|
||||
<input type="number" id="n5" value="0" min="0" max="255">
|
||||
</div>
|
||||
<div>
|
||||
<label style="font-size: 0.875rem;">N6</label>
|
||||
<input type="number" id="n6" value="0" min="0" max="255">
|
||||
</div>
|
||||
</div>
|
||||
<small>Pattern-specific parameters (varies by pattern)</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Device ID</label>
|
||||
<input type="number" id="device-id" value="1" min="0">
|
||||
<small>Unique numeric identifier</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="checkbox-group">
|
||||
<input type="checkbox" id="debug" checked>
|
||||
<label for="debug" style="margin: 0;">Debug Mode</label>
|
||||
</div>
|
||||
<small>Enable debug logging</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Network Settings -->
|
||||
<div class="card">
|
||||
<h2>Network Settings</h2>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Access Point Name</label>
|
||||
<input type="text" id="ap-name" value="led-AA:BB:CC:DD:EE:01" placeholder="led-device">
|
||||
<small>WiFi access point name for device configuration</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Access Point Password</label>
|
||||
<input type="password" id="ap-password" placeholder="Leave empty for open network">
|
||||
<small>Password for the access point (optional)</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="checkbox-group">
|
||||
<input type="checkbox" id="ap-enabled" checked>
|
||||
<label for="ap-enabled" style="margin: 0;">Enable Access Point</label>
|
||||
</div>
|
||||
<small>Allow device to create its own WiFi network</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Actions -->
|
||||
<div class="card">
|
||||
<div class="actions">
|
||||
<button class="btn btn-secondary btn-full" onclick="resetSettings()">Reset to Defaults</button>
|
||||
<button class="btn btn-primary btn-full" onclick="saveSettings()">Save Settings</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Brightness slider
|
||||
document.getElementById('brightness').addEventListener('input', function(e) {
|
||||
document.getElementById('brightness-value').textContent = e.target.value;
|
||||
});
|
||||
|
||||
// Delay slider
|
||||
document.getElementById('delay').addEventListener('input', function(e) {
|
||||
document.getElementById('delay-value').textContent = e.target.value;
|
||||
});
|
||||
|
||||
// Color order selection
|
||||
document.querySelectorAll('.color-order-option').forEach(option => {
|
||||
option.addEventListener('click', function() {
|
||||
document.querySelectorAll('.color-order-option').forEach(o => o.classList.remove('selected'));
|
||||
this.classList.add('selected');
|
||||
});
|
||||
});
|
||||
|
||||
function saveSettings() {
|
||||
alert('Settings saved! (This is a mockup)');
|
||||
}
|
||||
|
||||
function resetSettings() {
|
||||
if (confirm('Reset all settings to defaults?')) {
|
||||
alert('Settings reset! (This is a mockup)');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user