feat(factory): add GNSS test and LED status modes

This commit is contained in:
chenjintao
2026-09-24 17:49:04 +08:00
parent c011f5c491
commit a4d6f79838
16 changed files with 361 additions and 76 deletions
+3 -3
View File
@@ -94,7 +94,7 @@ DEFAULT_CONFIG = {
"official": "firmware/EG800AKCN_11LG-official-fac.zip",
},
"serial": {"baudrate": 115200, "encoding": "utf-8", "line_ending": "\\r\\n"},
"protocol": {"prefix": "FT1 ", "version": 1, "auto_save": True},
"protocol": {"prefix": "FT1 ", "version": 2, "auto_save": True},
}
@@ -550,7 +550,7 @@ class FactoryHost(Tk):
number = str(int(number) + 1) if number.isdigit() else f"{number}_new"
station = Station(number=number, flash_port=flash_port, test_port=test_port, firmware_kind=self.firmware_kind.get())
self.stations[number] = station
self.table.insert("", END, iid=number, values=(number, flash_port, test_port, station.status, "", "", "0/6", "产测固件", ""))
self.table.insert("", END, iid=number, values=(number, flash_port, test_port, station.status, "", "", f"0/{len(NODE_NAMES)}", "产测固件", ""))
return station
def remove_station(self) -> None:
@@ -592,7 +592,7 @@ class FactoryHost(Tk):
protocol = station.protocol
self.table.item(station.number, values=(
station.number, station.flash_port, station.test_port, station.status,
protocol.session, protocol.imei, f"{protocol.passed_count}/6",
protocol.session, protocol.imei, f"{protocol.passed_count}/{len(NODE_NAMES)}",
"产测固件" if station.firmware_kind == "production" else "正式固件", station.message,
))
+7 -3
View File
@@ -8,7 +8,7 @@ from typing import Any
PREFIX = "FT1 "
VERSION = 1
VERSION = 2
MESSAGE_TYPES = {
"session_start",
"node_start",
@@ -27,12 +27,13 @@ NODE_NAMES = (
"ESIM",
"DATA_CALL",
"NFC",
"GNSS",
)
ERROR_MESSAGES = {
0: "成功",
1001: "ES8311 初始化或设备 ID 检查失败",
1002: "开机提示音文件不存在",
1003: "开机提示音播放失败或超时",
1002: "当前节点提示音文件不存在",
1003: "当前节点提示音播放失败或超时",
1101: "ADC 初始化或读取失败",
1102: "电压低于 3500mV",
1103: "电压高于 4200mV",
@@ -46,6 +47,9 @@ ERROR_MESSAGES = {
1501: "4G 网络注册超时",
1502: "IPv4 PDP 激活失败",
1503: "未获取有效 IPv4 地址",
1601: "GNSS 打开失败",
1602: "GNSS 未收到 NMEA",
1603: "GNSS 已收到 NMEA,但未发现卫星",
1701: "前置节点未全部通过,NFC 锁定",
1702: "DP1312EA 版本不是 0x82",
1703: "60 秒内未成功刷卡",