-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-oscilloscope.html
108 lines (96 loc) · 3.86 KB
/
setup-oscilloscope.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" sizes="32x32" href="assets/icon.png">
<title>Graph and Grid Settings</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
color: #333;
display: flex;
justify-content: center;
height: 100vh;
margin-top: 0;
padding: 20px; /* Add padding to prevent clipping */
box-sizing: border-box;
align-items: flex-start; /* Align items to the top */
padding-top: 20px; /* Add padding to avoid touching the top */
}
form {
background-color: #ffffff;
border-radius: 8px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
padding: 30px;
max-width: 500px;
width: 100%;
box-sizing: border-box; /* Ensure padding and border are included in the element's total width and height */
position: static; /* Static positioning to align with the document flow */
margin-top: 0; /* Remove top margin */
margin-bottom: 20px; /* Optional: Add bottom margin to avoid clipping */
}
h2 {
color: #007acc;
font-size: 1.5rem;
margin-bottom: 15px;
}
label {
display: block;
margin-top: 10px;
font-weight: bold;
}
input[type="text"], input[type="number"], input[type="checkbox"] {
width: calc(100% - 16px); /* Adjust for padding */
padding: 8px;
margin-top: 5px;
box-sizing: border-box;
}
input[type="submit"] {
margin-top: 20px;
padding: 10px 15px;
background-color: #007BFF;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 1rem;
transition: background-color 0.3s ease;
}
input[type="submit"]:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<form id="settingsForm">
<h2>Graph Settings</h2>
<label for="drawPoints">Draw Points?</label>
<input type="checkbox" id="drawPoints" name="drawPoints">
<label for="drawSubGrid">Draw Sub Grid?</label>
<input type="checkbox" id="drawSubGrid" name="drawSubGrid" checked>
<label for="xAxisTitle">X axis Title</label>
<input type="text" id="xAxisTitle" name="xAxisTitle" value="Reading No." required>
<label for="yAxisTitle">Y axis Title</label>
<input type="text" id="yAxisTitle" name="yAxisTitle" value="Reading" required>
<h2>Grid Settings</h2>
<label for="minY">Minimum Y value</label>
<input type="number" id="minY" name="minY" value="0" required>
<label for="maxY">Maximum Y value</label>
<input type="number" id="maxY" name="maxY" value="1100" required>
<label for="yGap">Gap between main Y grid</label>
<input type="number" id="yGap" name="yGap" step="0.1" value="100" required>
<label for="minX">Minimum X value</label>
<input type="number" id="minX" name="minX" value="0" required>
<label for="maxX">Maximum X value</label>
<input type="number" id="maxX" name="maxX" value="1000" required>
<label for="xGap">Gap between main X grid</label>
<input type="number" id="xGap" name="xGap" step="0.1" value="200" required>
<label for="baudrate">Serial Device Baudrate</label>
<input type="number" id="baudrate" name="baudrate" value="9600" required>
<input type="submit" value="Start Plotting">
</form>
<script src="scripts/oscilloscope-setting.js"></script>
</body>
</html>