Просмотр исходного кода

Release 0.8.1.6: remove server-side chamber_temperature_c, keep chamber temp strictly from thermal hood

XJKJ-STL 1 месяц назад
Родитель
Сommit
ad3494e084

+ 1 - 1
VERSION

@@ -1 +1 @@
-0.8.1.5
+0.8.1.6

+ 1 - 1
docs/GRPC_API_ZH.md

@@ -1,4 +1,4 @@
-# XJKJ-STL 0.8.1.5:原生 gRPC 专用接口手册
+# XJKJ-STL 0.8.1.6:原生 gRPC 专用接口手册
 
 **只开发原生 gRPC 客户端,请只看这份;Qt 前端精简纯净版 WebSocket 对接请看 [QT_CLIENT_API_ZH.md](QT_CLIENT_API_ZH.md)。** 直接使用 `stl.v1.BenchService` 和 protobuf 消息;没有 WebSocket 风格的 JSON 请求 id,但控制动作仍需要持久 command_id。
 

Разница между файлами не показана из-за своего большого размера
+ 5 - 4
docs/QT_CLIENT_API_ZH.md


+ 1 - 1
docs/WEBSOCKET_API_ZH.md

@@ -1,4 +1,4 @@
-# XJKJ-STL 0.8.1.5:完整 WebSocket 接口手册
+# XJKJ-STL 0.8.1.6:完整 WebSocket 接口手册
 
 **Qt 前端精简纯净版对接请看 [QT_CLIENT_API_ZH.md](QT_CLIENT_API_ZH.md)(地址:`ws://192.168.2.79:8080/ws?view=qt-clean`)。** 本文是 `/ws`(或 `/ws?view=full`)的全部业务和诊断接口。后端同时支持三个接口:完整 WebSocket(`/ws`)、完整原生 gRPC(`:50051`)、Qt 专用精简纯净 WebSocket(`/ws?view=qt-clean`)。
 

+ 1 - 1
pyproject.toml

@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
 
 [project]
 name = "xjkj-stl-backend"
-version = "0.8.1.5"
+version = "0.8.1.6"
 description = "Four-station memory thermal test backend with WebSocket and gRPC"
 readme = "README.md"
 requires-python = ">=3.11"

+ 1 - 1
qt-client/QT_CLEAN_CLIENT_ZH.md

@@ -1,4 +1,4 @@
-# Qt 纯净版临时客户端 0.8.1.5
+# Qt 纯净版临时客户端 0.8.1.6
 
 本目录基于上传的 XJKJ-STL Qt 工程制作;原始工程另存,界面布局沿用原来的 `.ui`。它只连接独立接口 `/ws?view=qt-clean`。
 

+ 2 - 19
qt-client/src/stationdata.cpp

@@ -179,13 +179,7 @@ void StationStore::applyBackendState(int index, const QJsonObject &state)
     data.canStart = state.value(QStringLiteral("can_start")).toBool(false);
     const qint64 started = state.value(QStringLiteral("started_unix_ms")).toVariant().toLongLong();
     data.startTime = started > 0 ? QDateTime::fromMSecsSinceEpoch(started) : QDateTime();
-    // Missing measurements remain missing; no temperatures/results are invented.
-    if (state.contains(QStringLiteral("chamber_temperature_c"))) {
-        const QJsonValue temperature = state.value(QStringLiteral("chamber_temperature_c"));
-        setCurrentTemp(index, temperature.isDouble() ? temperature.toDouble() : -1.0);
-    }
-    double tempSum = 0.0;
-    int tempCount = 0;
+    // 工位腔体实时温度 (currentTemp) 仅由本地高温罩温控串口 (applyCtTemperatures) 提供,不从服务器后端获取。
     for (const QJsonValue &value : state.value(QStringLiteral("channels")).toArray()) {
         const QJsonObject channel = value.toObject();
         const QString name = channel.value(QStringLiteral("name")).toString();
@@ -195,21 +189,10 @@ void StationStore::applyBackendState(int index, const QJsonObject &state)
             const ChannelInfo::State result = verdict == QStringLiteral("pass") ? ChannelInfo::Pass
                 : verdict == QStringLiteral("fail") ? ChannelInfo::Fail : ChannelInfo::Idle;
             const QJsonValue temperature = channel.value(QStringLiteral("temperature_c"));
-            const double chTemp = temperature.isDouble() ? temperature.toDouble() : -1.0;
-            setChannelState(index, i, result, chTemp);
-            if (chTemp >= 0.0) {
-                tempSum += chTemp;
-                ++tempCount;
-            }
+            setChannelState(index, i, result, temperature.isDouble() ? temperature.toDouble() : -1.0);
             break;
         }
     }
-    if (!state.contains(QStringLiteral("chamber_temperature_c"))) {
-        if (tempCount > 0)
-            setCurrentTemp(index, tempSum / tempCount);
-        else if (data.runState == QStringLiteral("starting"))
-            setCurrentTemp(index, -1.0);
-    }
     emit infoChanged(index);
 }
 

+ 1 - 1
src/stl_backend/__init__.py

@@ -1,3 +1,3 @@
 """XJKJ-STL memory thermal testing backend."""
-__version__ = "0.8.1.5"
+__version__ = "0.8.1.6"
 

+ 0 - 6
src/stl_backend/application/qt_clean.py

@@ -589,11 +589,6 @@ class QtCleanService:
                 pending_item = await self.bench.get_queue_item(self.pending_starts[sid])
                 pending = pending_item["state"] not in ("succeeded", "failed", "interrupted")
             temperatures = self._temperatures(rt, fw, record, started, live)
-            air = (rt.snapshot.get("temperature", {}).get("hood_air", {}) if rt.run else
-                   rt.diagnostic.snapshot().get("temperature", {}).get("hood_air", {}))
-            air_val = air.get("value_c") if air.get("quality") in ("valid", "reported") else None
-            chamber_temp = (float(air_val) if type(air_val) in (int, float) and math.isfinite(air_val) else
-                            round(sum(temperatures.values()) / len(temperatures), 1) if temperatures else None)
             channels = self._channels(rt, fw, rt.firmware if rt.run else rt.diagnostic.firmware,
                                       record, started, temperatures)
             connection = rt.snapshot["sol_state"] if rt.run else rt.diagnostic.state["state"]
@@ -603,7 +598,6 @@ class QtCleanService:
                 "power": rt.snapshot.get("server_power", "unknown"), "phase": phase,
                 "run_state": state, "started_unix_ms": str(started), "boot_id": fw.get("boot_id", ""),
                 "verdict": verdict, "verdict_scope": verdict_scope,
-                "chamber_temperature_c": chamber_temp,
                 "input": input_point, "command": command, "channels": channels,
                 "can_start": bool(not foreign and rt.device.capabilities().get("bmc_power") and rt.device.capabilities().get("console")
                                   and not pending and not rt.run and not rt.finishing