From a3603ba9e8c54f99cc627dc27d9b8fc3e1585794 Mon Sep 17 00:00:00 2001 From: Natanco Date: Wed, 29 Nov 2023 10:14:22 -0300 Subject: [PATCH 1/2] fix: custom color is now a control variable, remove non-controlled calibraiton --- src/components/calibration/MiscConfigCard.vue | 31 ++++++++++--------- src/store/calibration.js | 6 ++-- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/components/calibration/MiscConfigCard.vue b/src/components/calibration/MiscConfigCard.vue index ec292a3..62c3460 100644 --- a/src/components/calibration/MiscConfigCard.vue +++ b/src/components/calibration/MiscConfigCard.vue @@ -7,15 +7,18 @@
Control: - + +
-
- Background Color: - -
-
- Point Color: - +
+
+ Background Color: + +
+
+ Point Color: + +
@@ -28,7 +31,7 @@ export default { return { backgroundColor: '#FFFFFFFF', pointColor: '#000000FF', - isControlled: true, + customColors: false, } }, watch: { @@ -38,8 +41,8 @@ export default { pointColor(value) { this.updatePointColor(value) }, - isControlled(value) { - this.updateControlled(value) + customColors(value) { + this.updateCustomColors(value) }, }, methods: { @@ -49,9 +52,9 @@ export default { updatePointColor(value) { this.$store.commit('setPointColor', value); }, - updateControlled(value) { - this.$store.commit('setControlled', value) - }, + updateCustomColors(value) { + this.$store.commit('setCustomColors', value); + } } } diff --git a/src/store/calibration.js b/src/store/calibration.js index 92c3475..1b65647 100644 --- a/src/store/calibration.js +++ b/src/store/calibration.js @@ -8,7 +8,7 @@ export default { offset: 50, backgroundColor: '#FFFFFFFF', pointColor: '#000000FF', - isControlled: true, + customColors: false, blinkFilter: true, leftEyeTreshold: 5, rightEyeTreshold: 5, @@ -39,8 +39,8 @@ export default { setPointColor(state, newPointColor) { state.pointColor = newPointColor }, - setControlled(state, newControlled) { - state.isControlled = newControlled + setCustomColors(state, newCustomColors) { + state.customColors = newCustomColors }, setBlinkFilter(state, newBlinkFilter) { state.blinkFilter = newBlinkFilter From 646c24dd14438f145de673678a33a8b3a3b5845e Mon Sep 17 00:00:00 2001 From: Natanco Date: Wed, 29 Nov 2023 10:25:15 -0300 Subject: [PATCH 2/2] chore: remove unnecessary console logs --- src/components/calibration/MiscConfigCard.vue | 1 - src/store/calibration.js | 1 - src/views/DoubleCalibrationRecord.vue | 1 - 3 files changed, 3 deletions(-) diff --git a/src/components/calibration/MiscConfigCard.vue b/src/components/calibration/MiscConfigCard.vue index 62c3460..d21f1d6 100644 --- a/src/components/calibration/MiscConfigCard.vue +++ b/src/components/calibration/MiscConfigCard.vue @@ -7,7 +7,6 @@
Control: -
diff --git a/src/store/calibration.js b/src/store/calibration.js index 1b65647..8915e61 100644 --- a/src/store/calibration.js +++ b/src/store/calibration.js @@ -53,7 +53,6 @@ export default { }, setIndex(state, newIndex) { state.index = newIndex - console.log(`index: ${state.index}`) }, }, actions: { diff --git a/src/views/DoubleCalibrationRecord.vue b/src/views/DoubleCalibrationRecord.vue index bec40e9..b526066 100644 --- a/src/views/DoubleCalibrationRecord.vue +++ b/src/views/DoubleCalibrationRecord.vue @@ -158,7 +158,6 @@ export default { } else { const prediction = { leftIris: leftIris[0], rightIris: rightIris[0] } point.data.push(prediction) - console.log(point.data.length) a++ } }