#
whycq
2024-08-19 756933610f922ae828bd1df34693463bfad33605
#
2个文件已修改
12 ■■■■ 已修改文件
app/src/main/java/com/example/agvcontroller/MainActivity.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/example/agvcontroller/action/ForwardBackAction.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/example/agvcontroller/MainActivity.java
@@ -125,8 +125,8 @@
//        forceSwitchBtn = findViewById(R.id.btn_force_switch);
        goForwardBtn = findViewById(R.id.btn_go_forward);
        goBackwardBtn = findViewById(R.id.btn_go_backward);
        rotatopnLeftBtn = findViewById(R.id.btn_go_backward);
        rotatopnRightBtn = findViewById(R.id.btn_go_forward);
        rotatopnLeftBtn = findViewById(R.id.btn_rotatopn_left);
        rotatopnRightBtn = findViewById(R.id.btn_rotatopn_right);
        modelSwitchBtn = findViewById(R.id.btn_model_switch);
        Intent intent = getIntent();
@@ -257,6 +257,7 @@
                }
            }
            return false;
        }
    }
app/src/main/java/com/example/agvcontroller/action/ForwardBackAction.java
@@ -1,5 +1,7 @@
package com.example.agvcontroller.action;
import android.util.Log;
import com.example.agvcontroller.protocol.IActionBody;
import com.example.agvcontroller.socket.RadixTools;
@@ -15,6 +17,11 @@
    public byte[] writeToBytes() {
        byte[] bytes = RadixTools.shortToByte(pwd);
//        byte[] bytes = Integer.toHexString(pwd & 0xFFFF).getBytes();
        StringBuilder sb = new StringBuilder();
        for (byte b : bytes) {
            sb.append(String.format("%02x", b));
        }
        Log.i("FF",sb.toString());
        return bytes;
    }