From 4693e5a08f7321516e17bea744088f1fab5ec0d5 Mon Sep 17 00:00:00 2001 From: Mathias Malmqvist Date: Sat, 22 Nov 2025 01:01:55 +0100 Subject: [PATCH] Show LX, LY, RX, RY in the range calibration modal --- js/modals/calib-range-modal.js | 8 +++++++- templates/range-modal.html | 14 +++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/js/modals/calib-range-modal.js b/js/modals/calib-range-modal.js index fe89080..e535218 100644 --- a/js/modals/calib-range-modal.js +++ b/js/modals/calib-range-modal.js @@ -1,6 +1,6 @@ 'use strict'; -import { sleep } from '../utils.js'; +import { sleep, float_to_str } from '../utils.js'; import { l } from '../translations.js'; import { CIRCULARITY_DATA_SIZE, draw_stick_dial } from '../stick-renderer.js'; @@ -386,6 +386,12 @@ export class CalibRangeModal { draw_stick_dial(this.leftCanvasCtx, centerX, centerY, size, left.x, left.y); draw_stick_dial(this.rightCanvasCtx, centerX, centerY, size, right.x, right.y); + + const precision = 2; + $("#range-lx-lbl").text(float_to_str(left.x, precision)); + $("#range-ly-lbl").text(float_to_str(left.y, precision)); + $("#range-rx-lbl").text(float_to_str(right.x, precision)); + $("#range-ry-lbl").text(float_to_str(right.y, precision)); } } diff --git a/templates/range-modal.html b/templates/range-modal.html index 163d890..cd4612c 100644 --- a/templates/range-modal.html +++ b/templates/range-modal.html @@ -9,13 +9,21 @@

The controller is now sampling data!

Rotate the sticks slowly at least 2 times in one direction and 2 times in the other direction to cover the whole range.

-
-
+
+
+
LX: 0.00
+
LY: 0.00
+
+
-
+
+
+
RX: 0.00
+
RY: 0.00
+