From 2df937df1372359babd123d1361e702a1a4b8168 Mon Sep 17 00:00:00 2001
From: Ruben Beltran del Rio <ruben@unlimited.pizza>
Date: Tue, 5 Jul 2022 23:34:03 +0200
Subject: Create the sensor, move values to config

---
 src/lib/components/hud.svelte | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src/lib/components/hud.svelte')

diff --git a/src/lib/components/hud.svelte b/src/lib/components/hud.svelte
index ce32e0d..f79658a 100644
--- a/src/lib/components/hud.svelte
+++ b/src/lib/components/hud.svelte
@@ -1,14 +1,15 @@
 <script>
+  import { coordinateLength } from '$lib/config';
+
   export let x;
   export let y;
 
-  const kCoordinateLength = 6;
   const kSeparatorRegex = /([0-9a-z]{2})/g;
 
   const formatCoordinate = function formatCoordinate(coordinate) {
     return coordinate
       .toString(16)
-      .padStart(kCoordinateLength, 0)
+      .padStart(coordinateLength, 0)
       .replace(kSeparatorRegex, '$1 ');
   }
 </script>
-- 
cgit 

