Auto-Rotate Statusanzeige stabil mit fester Breite und Nachkommastelle

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-29 10:51:48 +02:00
co-authored by Claude Sonnet 4.6
parent ff58356c23
commit 13af8052da
+4 -2
View File
@@ -196,7 +196,7 @@
<div class="sr" id="rotate_status_row" style="display:none;">
<span class="sr-led led-blue" id="rotate_status_led"></span>
<span class="sr-key">Drehung</span>
<strong id="rotate_status_val" class="sr-val">-</strong>
<strong id="rotate_status_val" class="sr-val" style="font-family:var(--mono);white-space:pre;">-</strong>
</div>
<div class="sr">
<span class="sr-led led-off"></span>
@@ -2931,7 +2931,9 @@
if (val) {
var txt = rotate.message || '-';
if (running && rotate.current_deg !== null && rotate.error_deg !== null) {
txt += ' | Ist: ' + rotate.current_deg + '° | Rest: ' + rotate.error_deg + '°';
var cur = Number(rotate.current_deg).toFixed(1).padStart(6, ' ');
var rest = Number(rotate.error_deg).toFixed(1).padStart(7, ' ');
txt += ' | Ist:' + cur + '° | Rest:' + rest + '°';
}
val.textContent = txt;
}