diff --git a/app/src/main/java/com/example/bpa/app/DeviceData.java b/app/src/main/java/com/example/bpa/app/DeviceData.java index 6eca2d6..1747b32 100644 --- a/app/src/main/java/com/example/bpa/app/DeviceData.java +++ b/app/src/main/java/com/example/bpa/app/DeviceData.java @@ -292,8 +292,8 @@ public class DeviceData { /** * 砝码校准模式 */ - public void setWeightCalibrationMode(IWriteCallBack callback) { - ModbusTcpServer.get().WriteBool("M6.5", true, callback); + public void setWeightCalibrationMode(Boolean value ,IWriteCallBack callback) { + ModbusTcpServer.get().WriteBool("M6.5", value, callback); } /** diff --git a/app/src/main/java/com/example/bpa/view/from/dzcjy_activity.java b/app/src/main/java/com/example/bpa/view/from/dzcjy_activity.java index 249435b..8ce62a3 100644 --- a/app/src/main/java/com/example/bpa/view/from/dzcjy_activity.java +++ b/app/src/main/java/com/example/bpa/view/from/dzcjy_activity.java @@ -123,7 +123,7 @@ public class dzcjy_activity extends AppCompatActivity implements View.OnClickLis */ private void Initdata() { marialmode_switch.setChecked(DeviceData.Get().getCalibrationMode()); - //out_switch.setChecked(DeviceData.Get()); + out_switch.setChecked(DeviceData.Get().getWeightCalibrationMode()); materialweight_edit.setText("0"); outweight_edit.setText("0"); }