diff --git a/src/components/calibration/ConfigModal.vue b/src/components/calibration/ConfigModal.vue
new file mode 100644
index 0000000..bdd5a5c
--- /dev/null
+++ b/src/components/calibration/ConfigModal.vue
@@ -0,0 +1,60 @@
+
+
+
+ recalibrate
+
+ {{ (mockPattern.length != 0) ? `using ${mockPattern.length} selected points` : `no points selected, using
+ all ${pattern.length} points` }}
+
+
+
+ recalib
+ back
+ close
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/calibration/GeneralConfigCard.vue b/src/components/calibration/GeneralConfigCard.vue
index 630b884..1ab3a29 100644
--- a/src/components/calibration/GeneralConfigCard.vue
+++ b/src/components/calibration/GeneralConfigCard.vue
@@ -10,10 +10,10 @@
diff --git a/src/components/calibration/Offset.vue b/src/components/calibration/Offset.vue
index f567ad3..671a85b 100644
--- a/src/components/calibration/Offset.vue
+++ b/src/components/calibration/Offset.vue
@@ -64,16 +64,13 @@ export default {
generatePoints(offsetX, offsetY, width, height, pointNum) {
const possiblePatterns = [
[
- { x: width / 2, y: height / 2 }
- ],
- [
- { x: offsetX, y: height / 2 },
- { x: width - offsetX, y: height / 2 }
+ { x: offsetX, y: height - offsetY },
+ { x: width - offsetX, y: offsetY },
],
[
- { x: offsetX, y: height / 2 },
- { x: width / 2, y: offsetY },
- { x: width - offsetX, y: height / 2 }
+ { x: offsetX, y: height - offsetY },
+ { x: width / 2, y: height / 2 },
+ { x: width - offsetX, y: offsetY },
],
[
{ x: offsetX, y: offsetY },
diff --git a/src/components/calibration/PointModal.vue b/src/components/calibration/PointModal.vue
new file mode 100644
index 0000000..4ad399b
--- /dev/null
+++ b/src/components/calibration/PointModal.vue
@@ -0,0 +1,96 @@
+
+
+
+ Point {{ pointNumber + 1 }}
+
+
+
+ (x, y):
+ ({{ x }}, {{ y }})
+
+
+ Accuracy:
+ {{ accuracy }} px
+
+
+ precision (SD):
+ {{ precision }} px
+
+
+
+
+
+ {{ selected ? 'unselect' : 'select' }}
+ close
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/general/DraggableFloatingButton.vue b/src/components/general/DraggableFloatingButton.vue
new file mode 100644
index 0000000..79f1079
--- /dev/null
+++ b/src/components/general/DraggableFloatingButton.vue
@@ -0,0 +1,81 @@
+
+
+
+ {{ icon }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/store/calibration.js b/src/store/calibration.js
index ea60b34..bda1db4 100644
--- a/src/store/calibration.js
+++ b/src/store/calibration.js
@@ -3,7 +3,7 @@ export default {
state: {
calibName: '',
pointNumber: 5,
- samplePerPoint: 10,
+ samplePerPoint: 20,
radius: 20,
offset: 50,
backgroundColor: '#FFFFFFFF',
@@ -13,7 +13,9 @@ export default {
leftEyeTreshold: 5,
rightEyeTreshold: 5,
index: 0,
- msPerCapture: 10,
+ msPerCapture: 50,
+ pattern: [],
+ mockPattern: []
},
mutations: {
setCalibName(state, newCalibName) {
@@ -34,6 +36,17 @@ export default {
setPattern(state, newPattern) {
state.pattern = newPattern;
},
+ setMockPatternElement(state, newPatternLike) {
+ if (!state.mockPattern.includes(newPatternLike)) {
+ state.mockPattern.push(newPatternLike)
+ } else {
+ const index = state.mockPattern.indexOf(newPatternLike);
+ state.mockPattern.splice(index, 1);
+ }
+ },
+ setMockPattern(state, newMockPattern) {
+ state.mockPattern = newMockPattern
+ },
setBackgroundColor(state, newBackgroundColor) {
state.backgroundColor = newBackgroundColor
},
@@ -55,7 +68,7 @@ export default {
setIndex(state, newIndex) {
state.index = newIndex
},
- setMsPerCapture(state, newMsPerCapture){
+ setMsPerCapture(state, newMsPerCapture) {
state.msPerCapture = newMsPerCapture
}
},
@@ -85,7 +98,8 @@ export default {
"Content-Type": "multipart/form-data",
},
});
- console.log(res);
+ return res.data
+ // console.log(res);
}
}
}
\ No newline at end of file
diff --git a/src/views/CalibrationConfig.vue b/src/views/CalibrationConfig.vue
index 999e5b1..b3919f4 100644
--- a/src/views/CalibrationConfig.vue
+++ b/src/views/CalibrationConfig.vue
@@ -12,12 +12,13 @@
-
+
@@ -25,12 +26,15 @@
import Toolbar from "@/components/general/Toolbar.vue";
import GeneralConfigCard from "@/components/calibration/GeneralConfigCard.vue";
import MiscConfigCard from "@/components/calibration/MiscConfigCard.vue";
+import DraggableFloatingButton from '@/components/general/DraggableFloatingButton.vue';
+
export default {
components: {
Toolbar,
GeneralConfigCard,
MiscConfigCard,
+ DraggableFloatingButton
},
methods: {
changePage() {
diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue
index 32a1579..db73646 100644
--- a/src/views/Dashboard.vue
+++ b/src/views/Dashboard.vue
@@ -8,25 +8,34 @@
-