fix(向导): Windows 第 2 步"已连接"误报——online 不等于设备可用
Pavo 后端的 online 只要枚举到打印机就为 true(与 C# 版语义一致), status 可能同时是 0x80 离线;向导 ready 原判定只看 online,掩盖了 "打印机已断开连接或已关机"的真实状态(管理端如实显示,App 却说已连接, 用户实测被误导)。改为 status 为就绪/打印中才算通过,离线等状态走 badText 如实显示 statusText。
This commit is contained in:
1 parent
9ece6cc294
commit
d1c34cb833
1 file changed
+5
-1
@@ -223,7 +223,11 @@ class _SetupWizardState extends State<SetupWizard> {
|
||||
|
||||
Widget _stepPrinter(ColorScheme scheme) {
|
||||
final s = _printerStatus;
|
||||
final ready = s != null && s.online;
|
||||
// 就绪/打印中才算通过:Windows 后端的 online=只要枚举到打印机就 true,
|
||||
// 不代表设备可用(status 可能是 0x80 离线)——必须看 statusText 如实显示
|
||||
final ready = s != null &&
|
||||
s.online &&
|
||||
(s.status == 0 || s.status == 0x00000002 || s.status == 0x00000005 || s.status == 0x00000006);
|
||||
final driverMissing = _driverInstalled == false;
|
||||
final bundledInstaller = DriverInstall.bundledInstallerPath();
|
||||
return Column(
|
||||
|
||||
Reference in new issue
Block a user