Add soll temperature marker to thermometer

Orange tick and label on the left side of the tube, dynamically
positioned via plotTempSoll updated from TempCtrl Soll messages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DGKe8JzTM2Gr1fdx9wYXTi
This commit is contained in:
2026-06-26 22:31:20 +02:00
co-authored by Claude Sonnet 4.6
parent bc4a11dcb7
commit 6bcf1fda0a
2 changed files with 26 additions and 1 deletions
+20 -1
View File
@@ -15,7 +15,8 @@ let ws = null;
let connected = false;
// Live Manual-tab readouts (TempCtrl/Heater/Stirrer channels).
let plotTempIst = null;
let plotTempIst = null;
let plotTempSoll = null;
let stirrerSpeedIst = 0;
// Only the very first authoritative read after connecting is used to set
// these particular sliders - thereafter they're purely user-controlled.
@@ -339,6 +340,22 @@ function updatePotVisualization() {
document.getElementById('thermo-temp-label').textContent =
plotTempIst !== null ? plotTempIst.toFixed(1) + ' °C' : '--';
// Soll temperature marker
const sollTick = document.getElementById('thermo-soll-tick');
const sollLabel = document.getElementById('thermo-soll-label');
if (plotTempSoll !== null) {
const sollY = (tubeBottom - Math.max(0, Math.min(100, plotTempSoll)) / 100 * tubeLen).toFixed(1);
sollTick.setAttribute('y1', sollY);
sollTick.setAttribute('y2', sollY);
sollLabel.setAttribute('y', sollY);
sollLabel.textContent = plotTempSoll.toFixed(0) + '°';
sollTick.style.display = '';
sollLabel.style.display = '';
} else {
sollTick.style.display = 'none';
sollLabel.style.display = 'none';
}
// Water fill
const waterFillEl = document.getElementById('water-fill');
const waterWaveEl = document.getElementById('water-wave');
@@ -538,12 +555,14 @@ function onTempCtrlChanged(msg) {
if (key === 'Soll') {
const soll = msg.Soll;
if ('Temp' in soll) {
plotTempSoll = soll.Temp;
document.getElementById('lcd-temp-soll').textContent = soll.Temp.toFixed(1);
if (initialTempSollSync) {
document.getElementById('temp-soll').value = Math.round(soll.Temp);
initialTempSollSync = false;
}
document.getElementById('temp-soll-readout').textContent = document.getElementById('temp-soll').value;
updatePotVisualization();
}
if ('Rate' in soll) {
const rate = soll.Rate;