Add labels to each channel
This commit is contained in:
parent
688e8f03bb
commit
efd4c76997
|
@ -29,11 +29,13 @@
|
|||
<tr>
|
||||
<td class="chart-container">
|
||||
<h2>Channel A:</h2>
|
||||
<label for="labelA">label: </label><input type="text" value="tempA" id="labelA">
|
||||
<div id="error-tempA"></div>
|
||||
<canvas id="chartA"></canvas>
|
||||
</td>
|
||||
<td class="chart-container">
|
||||
<h2>Channel B:</h2>
|
||||
<label for="labelB">label: </label><input type="text" value="tempB" id="labelB">
|
||||
<div id="error-tempB"></div>
|
||||
<canvas id="chartB"></canvas>
|
||||
</td>
|
||||
|
|
|
@ -5,7 +5,8 @@ document.getElementById("stopRec").disabled = true;
|
|||
let data;
|
||||
let record = 0;
|
||||
let filename;
|
||||
const csvData = ["time, tempA, tempB"];
|
||||
let csvData;
|
||||
let labelA, labelB;
|
||||
const chartAdata = {
|
||||
data: {
|
||||
labels: [],
|
||||
|
@ -250,6 +251,9 @@ function startRecording() {
|
|||
date = new Date();
|
||||
let filedate = date.toISOString().slice(0, -5).replaceAll(":", "");
|
||||
filename = "therminator-" + filedate + ".csv";
|
||||
labelA = document.getElementById("labelA").value;
|
||||
labelB = document.getElementById("labelB").value;
|
||||
csvData = ["time,\"" + labelA + "\",\"" + labelB + "\""]
|
||||
record = 1;
|
||||
document.getElementById("startRec").disabled = true;
|
||||
document.getElementById("stopRec").disabled = false;
|
||||
|
|
Loading…
Reference in a new issue