Commit 480572d27c605dd3b90c5e2f6cc92faf20d7ce16

Authored by ww
1 parent ce1d11fc

fix: 修复设备属性下发输入参数为0时,寄存器值为空

... ... @@ -145,7 +145,9 @@
145 145 createMessage.warning(`属性下发值精确到两位小数,缩放因子是${unref(zoomFactorValue)}`);
146 146 return;
147 147 }
148   - const newValue = getArray(SingleToHex(unref(isShowMultiply) ? values : oldValue));
  148 +
  149 + const newValue =
  150 + values == 0 ? [0, 0] : getArray(SingleToHex(unref(isShowMultiply) ? values : oldValue));
149 151 modBUSForm.value.registerValues = newValue;
150 152 modBUSForm.value.registerNumber = 2;
151 153 modBUSForm.value.method = '10';
... ...