Browse Source

修改

桌面小炒机
liup 7 months ago
parent
commit
fec046aa1c
3 changed files with 22 additions and 6 deletions
  1. +8
    -0
      .idea/deploymentTargetSelector.xml
  2. +10
    -6
      app/src/main/java/com/bonait/bnframework/common/utils/CookTimeUtils.java
  3. +4
    -0
      app/src/main/java/com/bonait/bnframework/ui/dialog/DeviceControlDialog.java

+ 8
- 0
.idea/deploymentTargetSelector.xml View File

@@ -4,6 +4,14 @@
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
<DropdownSelection timestamp="2024-05-27T07:59:13.622609500Z">
<Target type="DEFAULT_BOOT">
<handle>
<DeviceId pluginId="Default" identifier="serial=127.0.0.1:7555;connection=58cd8fd5" />
</handle>
</Target>
</DropdownSelection>
<DialogSelection />
</SelectionState>
</selectionStates>
</component>

+ 10
- 6
app/src/main/java/com/bonait/bnframework/common/utils/CookTimeUtils.java View File

@@ -47,7 +47,7 @@ public class CookTimeUtils {
if(!silos.isEmpty()){
BPA_SILOS_CALIBRATE bean = (BPA_SILOS_CALIBRATE) QueryDB.GetSilosCalibrateByNum( silos.get(0).num);
int valueDeal = AnalogConvert.Scale( val, bean.inputWightMax, bean.inputWightMin,
bean.outputTimeMax, bean.outputTimeMin);
bean.outputTimeMax, bean.outputTimeMin)/100;
time += valueDeal;
LogUtils.d("measureCookTime name="+name+";重量="+val+";换算时间="+valueDeal);
}
@@ -67,6 +67,8 @@ public class CookTimeUtils {
}
time += val;
}
}else if(value!=null && value.contains("上升")||value.contains("下降")){
time += 10;
}else if(value!=null && value.contains("(克),")){
String[] res = value.split("克");
if(res.length==2){
@@ -76,13 +78,13 @@ public class CookTimeUtils {
if(item.processname.contains("加水")){
BPA_SILOS_CALIBRATE bean = (BPA_SILOS_CALIBRATE) QueryDB.GetSilosCalibrateByNum(10);
int valueDeal = AnalogConvert.Scale( val, bean.inputWightMax, bean.inputWightMin,
bean.outputTimeMax, bean.outputTimeMin);
bean.outputTimeMax, bean.outputTimeMin)/100;
LogUtils.d("measureCookTime 加水重量="+val+";换算加水时间="+valueDeal);
time += valueDeal;
}else if(item.processname.contains("勾芡")){
BPA_SILOS_CALIBRATE bean = (BPA_SILOS_CALIBRATE) QueryDB.GetSilosCalibrateByNum(11);
int valueDeal = AnalogConvert.Scale( val, bean.inputWightMax, bean.inputWightMin,
bean.outputTimeMax, bean.outputTimeMin);
bean.outputTimeMax, bean.outputTimeMin)/100;
LogUtils.d("measureCookTime 加水重量="+val+";换算加水时间="+valueDeal);
time += valueDeal;
}
@@ -128,7 +130,7 @@ public class CookTimeUtils {
if(!silos.isEmpty()){
BPA_SILOS_CALIBRATE bean = (BPA_SILOS_CALIBRATE) QueryDB.GetSilosCalibrateByNum( silos.get(0).num);
int valueDeal = AnalogConvert.Scale( val, bean.inputWightMax, bean.inputWightMin,
bean.outputTimeMax, bean.outputTimeMin);
bean.outputTimeMax, bean.outputTimeMin)/100;
time += valueDeal;
LogUtils.d("measureCookTime name="+name+";重量="+val+";换算时间="+valueDeal);
}
@@ -148,6 +150,8 @@ public class CookTimeUtils {
}
time += val;
}
}else if(value!=null && value.contains("上升")||value.contains("下降")){
time += 10;
}else if(value!=null && value.contains("(克),")){
String[] res = value.split("克");
if(res.length==2){
@@ -157,13 +161,13 @@ public class CookTimeUtils {
if(item.processname.contains("加水")){
BPA_SILOS_CALIBRATE bean = (BPA_SILOS_CALIBRATE) QueryDB.GetSilosCalibrateByNum(10);
int valueDeal = AnalogConvert.Scale( val, bean.inputWightMax, bean.inputWightMin,
bean.outputTimeMax, bean.outputTimeMin);
bean.outputTimeMax, bean.outputTimeMin)/100;
LogUtils.d("measureCookTime 加水重量="+val+";换算加水时间="+valueDeal);
time += valueDeal;
}else if(item.processname.contains("勾芡")){
BPA_SILOS_CALIBRATE bean = (BPA_SILOS_CALIBRATE) QueryDB.GetSilosCalibrateByNum(11);
int valueDeal = AnalogConvert.Scale( val, bean.inputWightMax, bean.inputWightMin,
bean.outputTimeMax, bean.outputTimeMin);
bean.outputTimeMax, bean.outputTimeMin)/100;
LogUtils.d("measureCookTime 加水重量="+val+";换算加水时间="+valueDeal);
time += valueDeal;
}


+ 4
- 0
app/src/main/java/com/bonait/bnframework/ui/dialog/DeviceControlDialog.java View File

@@ -24,6 +24,7 @@ import com.bonait.bnframework.R;
import com.bonait.bnframework.Service.AnalogConvert;
import com.bonait.bnframework.Service.ControlAdress;
import com.bonait.bnframework.Service.ModbusHelper;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL;
import com.bonait.bnframework.common.db.mode.BPA_SILOS;
@@ -186,6 +187,9 @@ public class DeviceControlDialog extends DialogFragment {
*/
private void initSilos(){
viewBinding.layoutSilos.btnClose1.setOnClickListener(v->{
if(ConfigName.getInstance().isFastClick()){
return;
}
dismiss();
});
//加水


Loading…
Cancel
Save