diff --git a/data/index.html b/data/index.html index 5c733df..28d8088 100644 --- a/data/index.html +++ b/data/index.html @@ -28,12 +28,14 @@
- Channel A:+Channel A:+ |
Channel B:+ |
diff --git a/data/script.js b/data/script.js
index 7192c41..c7a8513 100644
--- a/data/script.js
+++ b/data/script.js
@@ -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;