This commit is contained in:
wait
2025-05-03 12:07:33 +08:00
parent 9360401174
commit d22b5dcfe7
5 changed files with 118 additions and 98 deletions

View File

@@ -241,41 +241,66 @@ public class KCCommandDemo {
// }
// }
// {
//
// System.out.println("00000");
// Thread.sleep(100);
// ActImmediately.reset();
//
// //todo 读取动作执行状态
// int execStatus = 2;
// while (execStatus == 2) {
// Thread.sleep(200);
// byte[] value = ReadValue.command();
// execStatus = value[0];
// }
//
// System.out.println("111111111");
// Thread.sleep(100);
// ActImmediately.reset();
//
// //todo 读取动作执行状态
// int execStatus2 = 2;
// while (execStatus2 == 2) {
// Thread.sleep(200);
// byte[] value = ReadValue.command();
// execStatus2 = value[0];
// }
//
// float height = 1.1f;
// byte modeOfMovement = 0x01;
//
// Thread.sleep(100);
// //抬升叉齿指令
// ActImmediately.command(height, modeOfMovement);
//
// Thread.sleep(100);
// ActImmediately.reset();
// }
{
System.out.println("00000");
Thread.sleep(100);
ActImmediately.reset();
//todo 读取动作执行状态
int execStatus = 2;
while (execStatus == 2) {
Thread.sleep(200);
byte[] value = ReadValue.command();
execStatus = value[0];
}
System.out.println("111111111");
Thread.sleep(100);
ActImmediately.reset();
//todo 读取动作执行状态
int execStatus2 = 2;
while (execStatus2 == 2) {
Thread.sleep(200);
byte[] value = ReadValue.command();
execStatus2 = value[0];
}
float height = 1.1f;
float height = 1.3f;
byte modeOfMovement = 0x01;
ActImmediately.allotsOperation(height, modeOfMovement);
Thread.sleep(100);
//抬升叉齿指令
ActImmediately.command(height, modeOfMovement);
Thread.sleep(100);
ActImmediately.reset();
// //读取动作执行状态
// ActImmediately.readActionState();
// //重置
// ActImmediately.reset();
// //读取动作执行状态
// ActImmediately.readActionState();
// float height = 0.1f;
// byte modeOfMovement = 0x02;
// //执行叉齿指令
// ActImmediately.command(height, modeOfMovement);
// //读取动作执行状态
// ActImmediately.readActionState();
// //重置
// ActImmediately.reset();
// //读取重置状态
// ActImmediately.readActionState();
//
// ActImmediately.ACTION_EXECUTE_STATE = false;
}
// {

View File

@@ -94,10 +94,10 @@ public class ActImmediately extends BaseCommand{
/**
* 读取动作状态
*/
private static void readActionState() {
public static void readActionState() {
try {
Thread.sleep(200);
Thread.sleep(100);
//todo 读取动作执行状态
byte[] value = ReadValue.command();
@@ -107,7 +107,7 @@ public class ActImmediately extends BaseCommand{
System.out.println("-execStatus:" + execStatus);
while (execStatus == 2) {
Thread.sleep(200);
Thread.sleep(500);
byte[] value1 = ReadValue.command();
execStatus = value1[0];
}
@@ -118,7 +118,7 @@ public class ActImmediately extends BaseCommand{
}
}
public static void allotsOperation(float height, byte modeOfMovement) {
public static void allotsOperation(float height, byte modeOfMovement) {
//读取动作执行状态
readActionState();
@@ -135,6 +135,6 @@ public class ActImmediately extends BaseCommand{
//读取重置状态
readActionState();
ACTION_EXECUTE_STATE = false;
// ACTION_EXECUTE_STATE = false;
}
}

View File

@@ -49,7 +49,7 @@ public class HybridNavigation
/**
* 订单映射最大订单ID.
*/
private static int currentMaxiOrderId = 1;
private static int currentMaxiOrderId = 50;
/**

View File

@@ -17,11 +17,11 @@ public class SubRobotStatue
/**
* 上报时间间隔
*/
public static final int intervalTime = 1000;
public static final int intervalTime = 500;
/**
* 订阅时长
*/
public static int subDuration = intervalTime * 3;
public static int subDuration = intervalTime * 5;
/**
* decs: 下发订阅信息