diff --git a/frontend/bun.lockb b/frontend/bun.lockb
deleted file mode 100755
index c2e3a1f..0000000
Binary files a/frontend/bun.lockb and /dev/null differ
diff --git a/frontend/src/assets/main.scss b/frontend/src/assets/main.scss
index a697381..e349e28 100644
--- a/frontend/src/assets/main.scss
+++ b/frontend/src/assets/main.scss
@@ -1,12 +1,8 @@
-$light-gray: #d0d1d0;
-$dark-gray: #303031;
-
-$text-color: $light-gray;
-$background-color: $dark-gray;
+@use '@/assets/variables';
body {
- color: $text-color;
- background-color: $background-color;
+ color: variables.$text-color;
+ background-color: variables.$background-color;
display: flex;
flex-direction: column;
justify-content: center;
@@ -14,3 +10,11 @@ body {
align-content: center;
min-height: 100vh;
}
+
+* {
+ stroke-width: 0;
+}
+
+polyline {
+ stroke-width: 1px;
+}
diff --git a/frontend/src/assets/variables.scss b/frontend/src/assets/variables.scss
new file mode 100644
index 0000000..d3af187
--- /dev/null
+++ b/frontend/src/assets/variables.scss
@@ -0,0 +1,19 @@
+$white-1: oklch(90% 0 0);
+$white-2: oklch(80% 0 0);
+$gray-1: oklch(70% 0 0);
+$gray-2: oklch(60% 0 0);
+$gray-3: oklch(50% 0 0);
+$gray-4: oklch(40% 0 0);
+$gray-5: oklch(30% 0 0);
+$black-1: oklch(20% 0 0);
+$black-2: oklch(10% 0 0);
+
+$text-color: $white-1;
+$background-color: $gray-5;
+
+$time-tick: $white-1;
+$grid-line: $white-1;
+$major-tick: $gray-2;
+$minor-tick: $gray-3;
+
+$text-font: Helvetica, sans-serif;
diff --git a/frontend/src/components/GraphAxis.vue b/frontend/src/components/GraphAxis.vue
index d0f8f65..6d0ef8e 100644
--- a/frontend/src/components/GraphAxis.vue
+++ b/frontend/src/components/GraphAxis.vue
@@ -1,7 +1,6 @@
-
diff --git a/frontend/src/components/TelemetryLine.vue b/frontend/src/components/TelemetryLine.vue
index adb1f4d..9dfbea9 100644
--- a/frontend/src/components/TelemetryLine.vue
+++ b/frontend/src/components/TelemetryLine.vue
@@ -7,6 +7,7 @@ import {
shallowRef,
type ShallowRef,
toValue,
+ useTemplateRef,
watch,
} from 'vue';
import {
@@ -24,6 +25,9 @@ const props = defineProps<{
const smoothing_distance = 0.15 * 1000;
+const text_offset = computed(() => 10);
+const background_offset = computed(() => 5);
+
const { data } = useTelemetry(() => props.data);
const websocket = inject>(WEBSOCKET_SYMBOL)!;
const value = websocket.value.listen_to_telemetry(data);
@@ -106,6 +110,27 @@ const points = computed(() => {
}
return points;
});
+
+const labelRef = useTemplateRef('label-ref');
+const current_value = computed(() => {
+ const val = value.value;
+ if (val) {
+ return val.value[data.value!.data_type] as number;
+ }
+ return undefined;
+});
+
+const test = computed(() => {
+ if (labelRef.value) {
+ const boundingBox = labelRef.value.getBBox();
+ return boundingBox.top;
+ }
+ return undefined;
+});
+
+watch([test], (x) => {
+ console.log(x);
+});
@@ -116,6 +141,42 @@ const points = computed(() => {
stroke-width="1"
:points="points"
>
+
+
+
+ {{ current_value.toFixed(2) }}
+
+
-
+
diff --git a/frontend/src/views/HomeView.vue b/frontend/src/views/HomeView.vue
index 813bded..e231b91 100644
--- a/frontend/src/views/HomeView.vue
+++ b/frontend/src/views/HomeView.vue
@@ -15,7 +15,7 @@ provide(WEBSOCKET_SYMBOL, websocket);
:width="1500"
:height="800"
:border_top_bottom="24"
- :border_left_right="64"
+ :border_left_right="128"
>