diff --git a/.idea/other.xml b/.idea/other.xml
index 104e542e..b45a6e02 100644
--- a/.idea/other.xml
+++ b/.idea/other.xml
@@ -14,6 +14,17 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json
index 61761b93..b271360a 100644
--- a/app/release/output-metadata.json
+++ b/app/release/output-metadata.json
@@ -11,9 +11,9 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
- "versionCode": 122,
- "versionName": "1.2.2",
- "outputFile": "boluo-xiaochao-v122-202412131549-release.apk"
+ "versionCode": 124,
+ "versionName": "1.2.4",
+ "outputFile": "boluo-xiaochao-v124-202412311629-release.apk"
}
],
"elementType": "File"
diff --git a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java
index 826186bb..c5889f01 100644
--- a/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java
+++ b/app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java
@@ -158,6 +158,8 @@ public class Home1Fragment extends BaseFragment {
@BindView(R.id.rl_goods_detail)
RelativeLayout rl_goods_detail;
+ private boolean isOnTouch = false;
+
private Handler handler = new Handler(Looper.getMainLooper()){
@Override
public void handleMessage(@NonNull Message msg) {
@@ -189,6 +191,9 @@ public class Home1Fragment extends BaseFragment {
}
}
handler.sendEmptyMessageDelayed(1,500);
+ }else if(msg.what == 2){
+ ExecuteTheRecipe.WritePLC("翻转反转", false, null);
+ ExecuteTheRecipe.WritePLC("翻转正转", false, null);
}
}
};
@@ -563,25 +568,31 @@ public class Home1Fragment extends BaseFragment {
NewToastUtil.getInstance().showToastError("PLC未准备就绪!!!","PLC not connected");
return false;
}
-
+ if(!isOnTouch){
+ handler.removeMessages(2);
+ isOnTouch = true;
+ }
int jd = (int) nifty_slider3.getValue();
ExecuteTheRecipe.WritePLC("转动速度", jd, new IWriteCallBack() {
@Override
public void onSuccess() {
- if (jd == 0) {
- ExecuteTheRecipe.WritePLC("翻转正转", false, null);
- } else {
- ExecuteTheRecipe.WritePLC("翻转正转", true, null);
- }
- }
+ }
@Override
public void onFailure(String ErrorMsg) {
}
});
+ if (jd == 0) {
+ ExecuteTheRecipe.WritePLC("翻转正转", false, null);
+ } else {
+ ExecuteTheRecipe.WritePLC("翻转正转", true, null);
+ }
} else if (motionEvent.getAction() == MotionEvent.ACTION_UP) {
+ isOnTouch = false;
Log.e("鼠标", "松开: ");
+ ExecuteTheRecipe.WritePLC("翻转反转", false, null);
ExecuteTheRecipe.WritePLC("翻转正转", false, null);
+ handler.sendEmptyMessageDelayed(2,100);
}
return false;
}
@@ -600,24 +611,32 @@ public class Home1Fragment extends BaseFragment {
NewToastUtil.getInstance().showToastError("PLC未准备就绪!!!","PLC not connected");
return false;
}
+ if(!isOnTouch){
+ handler.removeMessages(2);
+ isOnTouch = true;
+ }
int jd = (int) nifty_slider3.getValue();
ExecuteTheRecipe.WritePLC("转动速度", jd, new IWriteCallBack() {
@Override
public void onSuccess() {
- if (jd == 0) {
- ExecuteTheRecipe.WritePLC("翻转反转", false, null);
- } else {
- ExecuteTheRecipe.WritePLC("翻转反转", true, null);
- }
+
}
@Override
public void onFailure(String ErrorMsg) {
}
});
+ if (jd == 0) {
+ ExecuteTheRecipe.WritePLC("翻转反转", false, null);
+ } else {
+ ExecuteTheRecipe.WritePLC("翻转反转", true, null);
+ }
} else if (motionEvent.getAction() == MotionEvent.ACTION_UP) {
+ isOnTouch = false;
Log.e("鼠标", "松开: ");
+ ExecuteTheRecipe.WritePLC("翻转正转", false, null);
ExecuteTheRecipe.WritePLC("翻转反转", false, null);
+ handler.sendEmptyMessageDelayed(2,100);
}
return false;
}
diff --git a/build.gradle b/build.gradle
index cdaf14d9..c726604b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -35,8 +35,8 @@ task clean(type: Delete) {
ext { // 统一版本入口
//App版本号
- versionCode = 122
- versionName = "1.2.2"
+ versionCode = 124
+ versionName = "1.2.4"
// 支持Android版本
buildToolsVersion = "33.0.0"