diff --git a/app/src/main/java/bsp_PV.proto b/app/src/main/java/bsp_PV.proto index 9ee959b..fef4af0 100644 --- a/app/src/main/java/bsp_PV.proto +++ b/app/src/main/java/bsp_PV.proto @@ -5,7 +5,8 @@ option java_package = "com.example.fivewheel.models"; message PV_struct_define{ int32 Robot_ChgLength= 1; - - double Robot_AutoSpeedBase=2; - double Robot_ManualSpeedBase=3; + double Robot_LeftCompensation=2; + double Robot_RightCompensation=3; + double Robot_AutoSpeedBase=4; + double Robot_ManualSpeedBase=5; }; diff --git a/app/src/main/java/com/example/fivewheel/MainActivity.java b/app/src/main/java/com/example/fivewheel/MainActivity.java index 1e84b75..895d510 100644 --- a/app/src/main/java/com/example/fivewheel/MainActivity.java +++ b/app/src/main/java/com/example/fivewheel/MainActivity.java @@ -271,12 +271,16 @@ public class MainActivity extends AppCompatActivity { _toSendPV = BspPV.PV_struct_define.newBuilder() .setRobotChgLength(getSafeInt(mainBinding.tvRobotChgLength, 0)) + .setRobotLeftCompensation(0) + .setRobotRightCompensation(0) .setRobotAutoSpeedBase(getSafeDouble(mainBinding.tvRobotAutoSpeed, 0.0)) .setRobotManualSpeedBase(getSafeDouble(mainBinding.tvRobotManualSpeed, 0.0)) .build(); + + byte[] byteArray = _toSendPV.toByteArray(); byte[] sendbyteArray = new byte[byteArray.length + 4]; byte[] sendbyteArray3 = new byte[byteArray.length + 6];