Browse Source

12.16

develop FW_NEWAPP12.16
LIN\54376 4 weeks ago
parent
commit
4225251b2b
  1. 8
      .idea/deploymentTargetSelector.xml
  2. 8
      app/build.gradle
  3. 2
      app/src/main/java/bsp_Error.proto
  4. 9
      app/src/main/java/bsp_IV.proto
  5. 10
      app/src/main/java/bsp_PV.proto
  6. 2
      app/src/main/java/com/example/fivewheel/MainActivity.java
  7. 6
      app/src/main/java/com/example/fivewheel/models/BspError.java
  8. 209
      app/src/main/java/com/example/fivewheel/models/BspPV.java
  9. 2
      app/src/main/java/com/example/fivewheel/services/ttySerialPortHelper.java
  10. 4
      app/src/main/java/generate_java.bat
  11. 1100
      app/src/main/res/layout/activity_main.xml
  12. 8
      app/src/main/res/values/colors.xml
  13. 5
      app/src/main/res/values/strings.xml
  14. 8
      app/src/main/res/values/themes.xml
  15. 4
      build.gradle
  16. 2
      gradle/wrapper/gradle-wrapper.properties
  17. 2
      settings.gradle

8
.idea/deploymentTargetSelector.xml

@ -4,6 +4,14 @@
<selectionStates> <selectionStates>
<SelectionState runConfigName="app"> <SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" /> <option name="selectionMode" value="DROPDOWN" />
<DropdownSelection timestamp="2025-10-20T08:23:09.338881700Z">
<Target type="DEFAULT_BOOT">
<handle>
<DeviceId pluginId="Default" identifier="serial=d;connection=b00b2555" />
</handle>
</Target>
</DropdownSelection>
<DialogSelection />
</SelectionState> </SelectionState>
</selectionStates> </selectionStates>
</component> </component>

8
app/build.gradle

@ -3,11 +3,11 @@ plugins {
} }
android { android {
namespace 'com.example.fivewheel' namespace 'com.example.removemarineanimals'
compileSdk 34 compileSdk 34
defaultConfig { defaultConfig {
applicationId "com.example.fivewheel" applicationId "com.example.removemarineanimals"
minSdk 24 minSdk 24
targetSdk 34 targetSdk 34
versionCode 1 versionCode 1
@ -41,6 +41,7 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0' implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
//implementation project(':app')
// //
testImplementation 'junit:junit:4.13.2' testImplementation 'junit:junit:4.13.2'
@ -59,7 +60,6 @@ dependencies {
def room_version = "2.6.1" def room_version = "2.6.1"
implementation "androidx.room:room-runtime:$room_version" implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version" annotationProcessor "androidx.room:room-compiler:$room_version"
// Kotlin + kapt, kapt
// kapt "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-ktx:$room_version" // /LiveData implementation "androidx.room:room-ktx:$room_version" // /LiveData
} }

2
app/src/main/java/bsp_Error.proto

@ -1,7 +1,7 @@
syntax = "proto3"; syntax = "proto3";
option java_multiple_files = false; option java_multiple_files = false;
option java_package = "com.example.fivewheel.models"; option java_package = "com.example.removemarineanimals.models";
message ErrorData message ErrorData
{ {

9
app/src/main/java/bsp_IV.proto

@ -1,6 +1,6 @@
syntax = "proto3"; syntax = "proto3";
option java_multiple_files = false; option java_multiple_files = false;
option java_package = "com.example.fivewheel.models"; option java_package = "com.example.removemarineanimals.models";
message IV_struct_define{ message IV_struct_define{
@ -17,8 +17,7 @@ message IV_struct_define{
int32 Robot_Current_Right= 10; int32 Robot_Current_Right= 10;
int32 Robot_Error_Left = 11; int32 Robot_Error_Left = 11;
int32 Robot_Error_Right = 12; int32 Robot_Error_Right = 12;
int32 Robot_Compensation_Left = 13;
int32 Robot_Compensation_Left = 13; int32 Robot_Compensation_Right = 14;
int32 Robot_Compensation_Right = 14; int32 Robot_RESET = 15;
}; };

10
app/src/main/java/bsp_PV.proto

@ -1,12 +1,12 @@
syntax = "proto3"; syntax = "proto3";
option java_multiple_files = false; option java_multiple_files = false;
option java_package = "com.example.fivewheel.models"; option java_package = "com.example.removemarineanimals.models";
message PV_struct_define{ message PV_struct_define{
int32 Robot_ChgLength= 1; int32 Robot_ChgLength= 1;
double Robot_LeftCompensation=2; double Robot_AutoSpeedBase=2;
double Robot_RightCompensation=3; double Robot_ManualSpeedBase=3;
double Robot_AutoSpeedBase=4; int32 Robot_LaneChange_Direction = 4;
double Robot_ManualSpeedBase=5; int32 Robot_Force = 5;
}; };

2
app/src/main/java/com/example/fivewheel/MainActivity.java

@ -271,8 +271,6 @@ public class MainActivity extends AppCompatActivity {
_toSendPV = BspPV.PV_struct_define.newBuilder() _toSendPV = BspPV.PV_struct_define.newBuilder()
.setRobotChgLength(getSafeInt(mainBinding.tvRobotChgLength, 0)) .setRobotChgLength(getSafeInt(mainBinding.tvRobotChgLength, 0))
.setRobotLeftCompensation(0)
.setRobotRightCompensation(0)
.setRobotAutoSpeedBase(getSafeDouble(mainBinding.tvRobotAutoSpeed, 0.0)) .setRobotAutoSpeedBase(getSafeDouble(mainBinding.tvRobotAutoSpeed, 0.0))
.setRobotManualSpeedBase(getSafeDouble(mainBinding.tvRobotManualSpeed, 0.0)) .setRobotManualSpeedBase(getSafeDouble(mainBinding.tvRobotManualSpeed, 0.0))
.build(); .build();

6
app/src/main/java/com/example/fivewheel/models/BspError.java

@ -488,7 +488,7 @@ public final class BspError {
com.example.fivewheel.models.BspError.ErrorData.class, com.example.fivewheel.models.BspError.ErrorData.Builder.class); com.example.fivewheel.models.BspError.ErrorData.class, com.example.fivewheel.models.BspError.ErrorData.Builder.class);
} }
// Construct using com.example.removemarineanimals.models.BspError.ErrorData.newBuilder() // Construct using com.example.fivewheel.models.BspError.ErrorData.newBuilder()
private Builder() { private Builder() {
} }
@ -795,8 +795,8 @@ public final class BspError {
"\010ComError\022\r\n\tMK32_SBus\020\000\022\n\n\006TL720D\020\001\022\020\n\014" + "\010ComError\022\r\n\tMK32_SBus\020\000\022\n\n\006TL720D\020\001\022\020\n\014" +
"Force_sensor\020\002\022\020\n\014ZQ_LeftMotor\020\003\022\021\n\rZQ_R" + "Force_sensor\020\002\022\020\n\014ZQ_LeftMotor\020\003\022\021\n\rZQ_R" +
"ightMotor\020\004\022\013\n\007DMAKE_1\020\005\022\017\n\013MK32_Serial\020" + "ightMotor\020\004\022\013\n\007DMAKE_1\020\005\022\017\n\013MK32_Serial\020" +
"\006B*\n&com.example.removemarineanimals.mod" + "\006B \n\034com.example.fivewheel.modelsP\000b\006pro" +
"elsP\000b\006proto3" "to3"
}; };
descriptor = com.google.protobuf.Descriptors.FileDescriptor descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData, .internalBuildGeneratedFileFrom(descriptorData,

209
app/src/main/java/com/example/fivewheel/models/BspPV.java

@ -36,25 +36,13 @@ public final class BspPV {
int getRobotChgLength(); int getRobotChgLength();
/** /**
* <code>double Robot_LeftCompensation = 2;</code> * <code>double Robot_AutoSpeedBase = 2;</code>
* @return The robotLeftCompensation.
*/
double getRobotLeftCompensation();
/**
* <code>double Robot_RightCompensation = 3;</code>
* @return The robotRightCompensation.
*/
double getRobotRightCompensation();
/**
* <code>double Robot_AutoSpeedBase = 4;</code>
* @return The robotAutoSpeedBase. * @return The robotAutoSpeedBase.
*/ */
double getRobotAutoSpeedBase(); double getRobotAutoSpeedBase();
/** /**
* <code>double Robot_ManualSpeedBase = 5;</code> * <code>double Robot_ManualSpeedBase = 3;</code>
* @return The robotManualSpeedBase. * @return The robotManualSpeedBase.
*/ */
double getRobotManualSpeedBase(); double getRobotManualSpeedBase();
@ -107,32 +95,10 @@ public final class BspPV {
return robotChgLength_; return robotChgLength_;
} }
public static final int ROBOT_LEFTCOMPENSATION_FIELD_NUMBER = 2; public static final int ROBOT_AUTOSPEEDBASE_FIELD_NUMBER = 2;
private double robotLeftCompensation_ = 0D;
/**
* <code>double Robot_LeftCompensation = 2;</code>
* @return The robotLeftCompensation.
*/
@java.lang.Override
public double getRobotLeftCompensation() {
return robotLeftCompensation_;
}
public static final int ROBOT_RIGHTCOMPENSATION_FIELD_NUMBER = 3;
private double robotRightCompensation_ = 0D;
/**
* <code>double Robot_RightCompensation = 3;</code>
* @return The robotRightCompensation.
*/
@java.lang.Override
public double getRobotRightCompensation() {
return robotRightCompensation_;
}
public static final int ROBOT_AUTOSPEEDBASE_FIELD_NUMBER = 4;
private double robotAutoSpeedBase_ = 0D; private double robotAutoSpeedBase_ = 0D;
/** /**
* <code>double Robot_AutoSpeedBase = 4;</code> * <code>double Robot_AutoSpeedBase = 2;</code>
* @return The robotAutoSpeedBase. * @return The robotAutoSpeedBase.
*/ */
@java.lang.Override @java.lang.Override
@ -140,10 +106,10 @@ public final class BspPV {
return robotAutoSpeedBase_; return robotAutoSpeedBase_;
} }
public static final int ROBOT_MANUALSPEEDBASE_FIELD_NUMBER = 5; public static final int ROBOT_MANUALSPEEDBASE_FIELD_NUMBER = 3;
private double robotManualSpeedBase_ = 0D; private double robotManualSpeedBase_ = 0D;
/** /**
* <code>double Robot_ManualSpeedBase = 5;</code> * <code>double Robot_ManualSpeedBase = 3;</code>
* @return The robotManualSpeedBase. * @return The robotManualSpeedBase.
*/ */
@java.lang.Override @java.lang.Override
@ -168,17 +134,11 @@ public final class BspPV {
if (robotChgLength_ != 0) { if (robotChgLength_ != 0) {
output.writeInt32(1, robotChgLength_); output.writeInt32(1, robotChgLength_);
} }
if (java.lang.Double.doubleToRawLongBits(robotLeftCompensation_) != 0) {
output.writeDouble(2, robotLeftCompensation_);
}
if (java.lang.Double.doubleToRawLongBits(robotRightCompensation_) != 0) {
output.writeDouble(3, robotRightCompensation_);
}
if (java.lang.Double.doubleToRawLongBits(robotAutoSpeedBase_) != 0) { if (java.lang.Double.doubleToRawLongBits(robotAutoSpeedBase_) != 0) {
output.writeDouble(4, robotAutoSpeedBase_); output.writeDouble(2, robotAutoSpeedBase_);
} }
if (java.lang.Double.doubleToRawLongBits(robotManualSpeedBase_) != 0) { if (java.lang.Double.doubleToRawLongBits(robotManualSpeedBase_) != 0) {
output.writeDouble(5, robotManualSpeedBase_); output.writeDouble(3, robotManualSpeedBase_);
} }
getUnknownFields().writeTo(output); getUnknownFields().writeTo(output);
} }
@ -193,21 +153,13 @@ public final class BspPV {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, robotChgLength_); .computeInt32Size(1, robotChgLength_);
} }
if (java.lang.Double.doubleToRawLongBits(robotLeftCompensation_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, robotLeftCompensation_);
}
if (java.lang.Double.doubleToRawLongBits(robotRightCompensation_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, robotRightCompensation_);
}
if (java.lang.Double.doubleToRawLongBits(robotAutoSpeedBase_) != 0) { if (java.lang.Double.doubleToRawLongBits(robotAutoSpeedBase_) != 0) {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(4, robotAutoSpeedBase_); .computeDoubleSize(2, robotAutoSpeedBase_);
} }
if (java.lang.Double.doubleToRawLongBits(robotManualSpeedBase_) != 0) { if (java.lang.Double.doubleToRawLongBits(robotManualSpeedBase_) != 0) {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(5, robotManualSpeedBase_); .computeDoubleSize(3, robotManualSpeedBase_);
} }
size += getUnknownFields().getSerializedSize(); size += getUnknownFields().getSerializedSize();
memoizedSize = size; memoizedSize = size;
@ -226,12 +178,6 @@ public final class BspPV {
if (getRobotChgLength() if (getRobotChgLength()
!= other.getRobotChgLength()) return false; != other.getRobotChgLength()) return false;
if (java.lang.Double.doubleToLongBits(getRobotLeftCompensation())
!= java.lang.Double.doubleToLongBits(
other.getRobotLeftCompensation())) return false;
if (java.lang.Double.doubleToLongBits(getRobotRightCompensation())
!= java.lang.Double.doubleToLongBits(
other.getRobotRightCompensation())) return false;
if (java.lang.Double.doubleToLongBits(getRobotAutoSpeedBase()) if (java.lang.Double.doubleToLongBits(getRobotAutoSpeedBase())
!= java.lang.Double.doubleToLongBits( != java.lang.Double.doubleToLongBits(
other.getRobotAutoSpeedBase())) return false; other.getRobotAutoSpeedBase())) return false;
@ -251,12 +197,6 @@ public final class BspPV {
hash = (19 * hash) + getDescriptor().hashCode(); hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ROBOT_CHGLENGTH_FIELD_NUMBER; hash = (37 * hash) + ROBOT_CHGLENGTH_FIELD_NUMBER;
hash = (53 * hash) + getRobotChgLength(); hash = (53 * hash) + getRobotChgLength();
hash = (37 * hash) + ROBOT_LEFTCOMPENSATION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getRobotLeftCompensation()));
hash = (37 * hash) + ROBOT_RIGHTCOMPENSATION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getRobotRightCompensation()));
hash = (37 * hash) + ROBOT_AUTOSPEEDBASE_FIELD_NUMBER; hash = (37 * hash) + ROBOT_AUTOSPEEDBASE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong( hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getRobotAutoSpeedBase())); java.lang.Double.doubleToLongBits(getRobotAutoSpeedBase()));
@ -380,7 +320,7 @@ public final class BspPV {
com.example.fivewheel.models.BspPV.PV_struct_define.class, com.example.fivewheel.models.BspPV.PV_struct_define.Builder.class); com.example.fivewheel.models.BspPV.PV_struct_define.class, com.example.fivewheel.models.BspPV.PV_struct_define.Builder.class);
} }
// Construct using com.example.removemarineanimals.models.BspPV.PV_struct_define.newBuilder() // Construct using com.example.fivewheel.models.BspPV.PV_struct_define.newBuilder()
private Builder() { private Builder() {
} }
@ -395,8 +335,6 @@ public final class BspPV {
super.clear(); super.clear();
bitField0_ = 0; bitField0_ = 0;
robotChgLength_ = 0; robotChgLength_ = 0;
robotLeftCompensation_ = 0D;
robotRightCompensation_ = 0D;
robotAutoSpeedBase_ = 0D; robotAutoSpeedBase_ = 0D;
robotManualSpeedBase_ = 0D; robotManualSpeedBase_ = 0D;
return this; return this;
@ -436,15 +374,9 @@ public final class BspPV {
result.robotChgLength_ = robotChgLength_; result.robotChgLength_ = robotChgLength_;
} }
if (((from_bitField0_ & 0x00000002) != 0)) { if (((from_bitField0_ & 0x00000002) != 0)) {
result.robotLeftCompensation_ = robotLeftCompensation_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.robotRightCompensation_ = robotRightCompensation_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.robotAutoSpeedBase_ = robotAutoSpeedBase_; result.robotAutoSpeedBase_ = robotAutoSpeedBase_;
} }
if (((from_bitField0_ & 0x00000010) != 0)) { if (((from_bitField0_ & 0x00000004) != 0)) {
result.robotManualSpeedBase_ = robotManualSpeedBase_; result.robotManualSpeedBase_ = robotManualSpeedBase_;
} }
} }
@ -464,12 +396,6 @@ public final class BspPV {
if (other.getRobotChgLength() != 0) { if (other.getRobotChgLength() != 0) {
setRobotChgLength(other.getRobotChgLength()); setRobotChgLength(other.getRobotChgLength());
} }
if (other.getRobotLeftCompensation() != 0D) {
setRobotLeftCompensation(other.getRobotLeftCompensation());
}
if (other.getRobotRightCompensation() != 0D) {
setRobotRightCompensation(other.getRobotRightCompensation());
}
if (other.getRobotAutoSpeedBase() != 0D) { if (other.getRobotAutoSpeedBase() != 0D) {
setRobotAutoSpeedBase(other.getRobotAutoSpeedBase()); setRobotAutoSpeedBase(other.getRobotAutoSpeedBase());
} }
@ -508,25 +434,15 @@ public final class BspPV {
break; break;
} // case 8 } // case 8
case 17: { case 17: {
robotLeftCompensation_ = input.readDouble(); robotAutoSpeedBase_ = input.readDouble();
bitField0_ |= 0x00000002; bitField0_ |= 0x00000002;
break; break;
} // case 17 } // case 17
case 25: { case 25: {
robotRightCompensation_ = input.readDouble(); robotManualSpeedBase_ = input.readDouble();
bitField0_ |= 0x00000004; bitField0_ |= 0x00000004;
break; break;
} // case 25 } // case 25
case 33: {
robotAutoSpeedBase_ = input.readDouble();
bitField0_ |= 0x00000008;
break;
} // case 33
case 41: {
robotManualSpeedBase_ = input.readDouble();
bitField0_ |= 0x00000010;
break;
} // case 41
default: { default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) { if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag done = true; // was an endgroup tag
@ -576,73 +492,9 @@ public final class BspPV {
return this; return this;
} }
private double robotLeftCompensation_ ;
/**
* <code>double Robot_LeftCompensation = 2;</code>
* @return The robotLeftCompensation.
*/
@java.lang.Override
public double getRobotLeftCompensation() {
return robotLeftCompensation_;
}
/**
* <code>double Robot_LeftCompensation = 2;</code>
* @param value The robotLeftCompensation to set.
* @return This builder for chaining.
*/
public Builder setRobotLeftCompensation(double value) {
robotLeftCompensation_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* <code>double Robot_LeftCompensation = 2;</code>
* @return This builder for chaining.
*/
public Builder clearRobotLeftCompensation() {
bitField0_ = (bitField0_ & ~0x00000002);
robotLeftCompensation_ = 0D;
onChanged();
return this;
}
private double robotRightCompensation_ ;
/**
* <code>double Robot_RightCompensation = 3;</code>
* @return The robotRightCompensation.
*/
@java.lang.Override
public double getRobotRightCompensation() {
return robotRightCompensation_;
}
/**
* <code>double Robot_RightCompensation = 3;</code>
* @param value The robotRightCompensation to set.
* @return This builder for chaining.
*/
public Builder setRobotRightCompensation(double value) {
robotRightCompensation_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* <code>double Robot_RightCompensation = 3;</code>
* @return This builder for chaining.
*/
public Builder clearRobotRightCompensation() {
bitField0_ = (bitField0_ & ~0x00000004);
robotRightCompensation_ = 0D;
onChanged();
return this;
}
private double robotAutoSpeedBase_ ; private double robotAutoSpeedBase_ ;
/** /**
* <code>double Robot_AutoSpeedBase = 4;</code> * <code>double Robot_AutoSpeedBase = 2;</code>
* @return The robotAutoSpeedBase. * @return The robotAutoSpeedBase.
*/ */
@java.lang.Override @java.lang.Override
@ -650,23 +502,23 @@ public final class BspPV {
return robotAutoSpeedBase_; return robotAutoSpeedBase_;
} }
/** /**
* <code>double Robot_AutoSpeedBase = 4;</code> * <code>double Robot_AutoSpeedBase = 2;</code>
* @param value The robotAutoSpeedBase to set. * @param value The robotAutoSpeedBase to set.
* @return This builder for chaining. * @return This builder for chaining.
*/ */
public Builder setRobotAutoSpeedBase(double value) { public Builder setRobotAutoSpeedBase(double value) {
robotAutoSpeedBase_ = value; robotAutoSpeedBase_ = value;
bitField0_ |= 0x00000008; bitField0_ |= 0x00000002;
onChanged(); onChanged();
return this; return this;
} }
/** /**
* <code>double Robot_AutoSpeedBase = 4;</code> * <code>double Robot_AutoSpeedBase = 2;</code>
* @return This builder for chaining. * @return This builder for chaining.
*/ */
public Builder clearRobotAutoSpeedBase() { public Builder clearRobotAutoSpeedBase() {
bitField0_ = (bitField0_ & ~0x00000008); bitField0_ = (bitField0_ & ~0x00000002);
robotAutoSpeedBase_ = 0D; robotAutoSpeedBase_ = 0D;
onChanged(); onChanged();
return this; return this;
@ -674,7 +526,7 @@ public final class BspPV {
private double robotManualSpeedBase_ ; private double robotManualSpeedBase_ ;
/** /**
* <code>double Robot_ManualSpeedBase = 5;</code> * <code>double Robot_ManualSpeedBase = 3;</code>
* @return The robotManualSpeedBase. * @return The robotManualSpeedBase.
*/ */
@java.lang.Override @java.lang.Override
@ -682,23 +534,23 @@ public final class BspPV {
return robotManualSpeedBase_; return robotManualSpeedBase_;
} }
/** /**
* <code>double Robot_ManualSpeedBase = 5;</code> * <code>double Robot_ManualSpeedBase = 3;</code>
* @param value The robotManualSpeedBase to set. * @param value The robotManualSpeedBase to set.
* @return This builder for chaining. * @return This builder for chaining.
*/ */
public Builder setRobotManualSpeedBase(double value) { public Builder setRobotManualSpeedBase(double value) {
robotManualSpeedBase_ = value; robotManualSpeedBase_ = value;
bitField0_ |= 0x00000010; bitField0_ |= 0x00000004;
onChanged(); onChanged();
return this; return this;
} }
/** /**
* <code>double Robot_ManualSpeedBase = 5;</code> * <code>double Robot_ManualSpeedBase = 3;</code>
* @return This builder for chaining. * @return This builder for chaining.
*/ */
public Builder clearRobotManualSpeedBase() { public Builder clearRobotManualSpeedBase() {
bitField0_ = (bitField0_ & ~0x00000010); bitField0_ = (bitField0_ & ~0x00000004);
robotManualSpeedBase_ = 0D; robotManualSpeedBase_ = 0D;
onChanged(); onChanged();
return this; return this;
@ -769,12 +621,11 @@ public final class BspPV {
descriptor; descriptor;
static { static {
java.lang.String[] descriptorData = { java.lang.String[] descriptorData = {
"\n\014bsp_PV.proto\"\250\001\n\020PV_struct_define\022\027\n\017R" + "\n\014bsp_PV.proto\"g\n\020PV_struct_define\022\027\n\017Ro" +
"obot_ChgLength\030\001 \001(\005\022\036\n\026Robot_LeftCompen" + "bot_ChgLength\030\001 \001(\005\022\033\n\023Robot_AutoSpeedBa" +
"sation\030\002 \001(\001\022\037\n\027Robot_RightCompensation\030" + "se\030\002 \001(\001\022\035\n\025Robot_ManualSpeedBase\030\003 \001(\001B" +
"\003 \001(\001\022\033\n\023Robot_AutoSpeedBase\030\004 \001(\001\022\035\n\025Ro" + " \n\034com.example.fivewheel.modelsP\000b\006proto" +
"bot_ManualSpeedBase\030\005 \001(\001B*\n&com.example" + "3"
".removemarineanimals.modelsP\000b\006proto3"
}; };
descriptor = com.google.protobuf.Descriptors.FileDescriptor descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData, .internalBuildGeneratedFileFrom(descriptorData,
@ -785,7 +636,7 @@ public final class BspPV {
internal_static_PV_struct_define_fieldAccessorTable = new internal_static_PV_struct_define_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable( com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_PV_struct_define_descriptor, internal_static_PV_struct_define_descriptor,
new java.lang.String[] { "RobotChgLength", "RobotLeftCompensation", "RobotRightCompensation", "RobotAutoSpeedBase", "RobotManualSpeedBase", }); new java.lang.String[] { "RobotChgLength", "RobotAutoSpeedBase", "RobotManualSpeedBase", });
descriptor.resolveAllFeaturesImmutable(); descriptor.resolveAllFeaturesImmutable();
} }

2
app/src/main/java/com/example/fivewheel/services/ttySerialPortHelper.java

@ -86,7 +86,7 @@ public class ttySerialPortHelper {
MainActivity.mainBinding.tvRobotLeftCompensation.setText(String.valueOf(_toReceiveIV.getRobotCompensationLeft()/100.0)); MainActivity.mainBinding.tvRobotLeftCompensation.setText(String.valueOf(_toReceiveIV.getRobotCompensationLeft()/100.0));
MainActivity.mainBinding.tvForce.setText(String.valueOf(_toReceiveIV.getRobotForceValue())); MainActivity.mainBinding.tvForce.setText(String.valueOf(_toReceiveIV.getRobotForceValue()));
MainActivity.mainBinding.tvRobotCurrent.setText("L"+String.valueOf(_toReceiveIV.getRobotCurrentLeft()/1000) MainActivity.mainBinding.tvRobotCurrent.setText("L"+String.valueOf(_toReceiveIV.getRobotCurrentLeft()/1000)
+ "R"+String.valueOf(_toReceiveIV.getRobotCurrentLeft()/1000)); + "R"+String.valueOf(_toReceiveIV.getRobotCurrentRight()/1000));
int leftError = _toReceiveIV.getRobotErrorLeft(); int leftError = _toReceiveIV.getRobotErrorLeft();
int rightError = _toReceiveIV.getRobotErrorRight(); int rightError = _toReceiveIV.getRobotErrorRight();

4
app/src/main/java/generate_java.bat

@ -1,4 +1,6 @@
cd /d F:\BHBF\cubeide\swj\FiveWheelAPP\app\src\main\java cd /d D:\Android_studio_workspace\RemoveMarineAnimals\app\src\main\java
protoc --proto_path=. --java_out=. bsp_IV.proto protoc --proto_path=. --java_out=. bsp_IV.proto
protoc --proto_path=. --java_out=. bsp_PV.proto
protoc --proto_path=. --java_out=. bsp_Error.proto
pause pause

1100
app/src/main/res/layout/activity_main.xml

File diff suppressed because it is too large

8
app/src/main/res/values/colors.xml

@ -147,5 +147,11 @@
<color name="darkviolet">#9400d3</color><!--暗紫罗兰色 --> <color name="darkviolet">#9400d3</color><!--暗紫罗兰色 -->
<color name="mediumorchid">#ba55d3</color><!--中粉紫色 --> <color name="mediumorchid">#ba55d3</color><!--中粉紫色 -->
<color name="trasnparent">#00000000</color><!--中粉紫色 --> <color name="trasnparent">#00000000</color><!--中粉紫色 -->
<color name="button_normal">#4A4A4A</color>
<color name="button_active">#1E88E5</color>
<color name="button_border">#666666</color>
<!-- <color name="button_active_border">#0D47A1</color>-->
<color name="gray">#CCCCCC</color>
<color name="deep_midnightblue">#0d0d5e</color>
<color name="light_gray">#cccccc</color>
</resources> </resources>

5
app/src/main/res/values/strings.xml

@ -1,4 +1,7 @@
<resources> <resources>
<string name="app_name">五轮</string> <string name="app_name">五轮 2510</string>
<string name="icons">&#xe658;</string> <string name="icons">&#xe658;</string>
<string name="log">查看日志</string>
<string name="change_left">左换道</string>
<string name="change_right">右换道</string>
</resources> </resources>

8
app/src/main/res/values/themes.xml

@ -13,5 +13,13 @@
<!-- Status bar color. --> <!-- Status bar color. -->
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item> <item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. --> <!-- Customize your theme here. -->
<item name="buttonStyle">@style/MyButtonStyle</item>
<item name="materialButtonStyle">@style/MyButtonStyle</item>
</style>
<style name="MyButtonStyle" parent="Widget.MaterialComponents.Button">
<item name="backgroundTint">@null</item> <!-- 禁用背景着色 -->
<item name="android:background">@drawable/blue_rounded_rectangle</item> <!-- 设置默认背景 -->
<item name="android:textColor">@color/white</item> <!-- 设置文本颜色 -->
</style> </style>
</resources> </resources>

4
build.gradle

@ -1,5 +1,5 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins { plugins {
id 'com.android.application' version '8.10.1' apply false id 'com.android.application' version '8.2.2' apply false
id 'com.android.library' version '8.10.1' apply false id 'com.android.library' version '8.2.2' apply false
} }

2
gradle/wrapper/gradle-wrapper.properties

@ -1,6 +1,6 @@
#Wed Feb 05 16:51:00 CST 2025 #Wed Feb 05 16:51:00 CST 2025
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

2
settings.gradle

@ -16,5 +16,5 @@ dependencyResolutionManagement {
} }
} }
rootProject.name = "FiveWheelAPP" rootProject.name = "RemoveMarineAnimals"
include ':app' include ':app'

Loading…
Cancel
Save