getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.bingoorobot.foreignobjectcuttingapp.models.BspIV.IV_struct_define getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_IV_struct_define_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_IV_struct_define_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+ private static com.google.protobuf.Descriptors.FileDescriptor
+ descriptor;
+ static {
+ java.lang.String[] descriptorData = {
+ "\n\014bsp_IV.proto\"\207\002\n\020IV_struct_define\022\024\n\014C" +
+ "urrentAngle\030\001 \001(\005\022\026\n\016RobotMoveSpeed\030\002 \001(" +
+ "\005\022\022\n\nSBUS_State\030\003 \001(\005\022\023\n\013SystemError\030\004 \001" +
+ "(\005\022\026\n\016Left_Motor_Err\030\005 \001(\005\022\027\n\017Right_Moto" +
+ "r_Err\030\006 \001(\005\022\021\n\tIsWorking\030\007 \001(\005\022\023\n\013blower" +
+ "s_pwm\030\010 \001(\005\022\022\n\nForceValue\030\t \001(\002\022\030\n\020Curre" +
+ "ntDirection\030\n \001(\005\022\025\n\rCurrentHeight\030\013 \001(\005" +
+ "B2\n.com.bingoorobot.foreignobjectcutting" +
+ "app.modelsP\000b\006proto3"
+ };
+ descriptor = com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ });
+ internal_static_IV_struct_define_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_IV_struct_define_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_IV_struct_define_descriptor,
+ new java.lang.String[] { "CurrentAngle", "RobotMoveSpeed", "SBUSState", "SystemError", "LeftMotorErr", "RightMotorErr", "IsWorking", "BlowersPwm", "ForceValue", "CurrentDirection", "CurrentHeight", });
+ descriptor.resolveAllFeaturesImmutable();
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/models/BspPV.java b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/models/BspPV.java
new file mode 100644
index 0000000..7385a74
--- /dev/null
+++ b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/models/BspPV.java
@@ -0,0 +1,983 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// NO CHECKED-IN PROTOBUF GENCODE
+// source: bsp_PV.proto
+// Protobuf Java Version: 4.27.2
+
+package com.bingoorobot.foreignobjectcuttingapp.models;
+
+public final class BspPV {
+ private BspPV() {}
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 27,
+ /* patch= */ 2,
+ /* suffix= */ "",
+ BspPV.class.getName());
+ }
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistryLite registry) {
+ }
+
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions(
+ (com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+ public interface PV_struct_defineOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:PV_struct_define)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ * 1 手动无校准作业 2 手动竖直向左作业 3 手动竖直向右作业
+ *
+ *
+ * int32 RunMode = 1;
+ * @return The runMode.
+ */
+ int getRunMode();
+
+ /**
+ *
+ * 0-30m/min
+ *
+ *
+ * int32 RobotSpeed = 2;
+ * @return The robotSpeed.
+ */
+ int getRobotSpeed();
+
+ /**
+ *
+ * 1-100cm
+ *
+ *
+ * int32 LaneChangeDistance = 3;
+ * @return The laneChangeDistance.
+ */
+ int getLaneChangeDistance();
+
+ /**
+ *
+ * 1°
+ *
+ *
+ * double Vertical_Calibration = 4;
+ * @return The verticalCalibration.
+ */
+ double getVerticalCalibration();
+
+ /**
+ *
+ * 罐高度m
+ *
+ *
+ * double Height_Storage = 5;
+ * @return The heightStorage.
+ */
+ double getHeightStorage();
+
+ /**
+ *
+ * 罐半径m
+ *
+ *
+ * double Radius_Storage = 6;
+ * @return The radiusStorage.
+ */
+ double getRadiusStorage();
+ }
+ /**
+ * Protobuf type {@code PV_struct_define}
+ */
+ public static final class PV_struct_define extends
+ com.google.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:PV_struct_define)
+ PV_struct_defineOrBuilder {
+ private static final long serialVersionUID = 0L;
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 27,
+ /* patch= */ 2,
+ /* suffix= */ "",
+ PV_struct_define.class.getName());
+ }
+ // Use PV_struct_define.newBuilder() to construct.
+ private PV_struct_define(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ }
+ private PV_struct_define() {
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.bingoorobot.foreignobjectcuttingapp.models.BspPV.internal_static_PV_struct_define_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.bingoorobot.foreignobjectcuttingapp.models.BspPV.internal_static_PV_struct_define_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define.class, com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define.Builder.class);
+ }
+
+ public static final int RUNMODE_FIELD_NUMBER = 1;
+ private int runMode_ = 0;
+ /**
+ *
+ * 1 手动无校准作业 2 手动竖直向左作业 3 手动竖直向右作业
+ *
+ *
+ * int32 RunMode = 1;
+ * @return The runMode.
+ */
+ @java.lang.Override
+ public int getRunMode() {
+ return runMode_;
+ }
+
+ public static final int ROBOTSPEED_FIELD_NUMBER = 2;
+ private int robotSpeed_ = 0;
+ /**
+ *
+ * 0-30m/min
+ *
+ *
+ * int32 RobotSpeed = 2;
+ * @return The robotSpeed.
+ */
+ @java.lang.Override
+ public int getRobotSpeed() {
+ return robotSpeed_;
+ }
+
+ public static final int LANECHANGEDISTANCE_FIELD_NUMBER = 3;
+ private int laneChangeDistance_ = 0;
+ /**
+ *
+ * 1-100cm
+ *
+ *
+ * int32 LaneChangeDistance = 3;
+ * @return The laneChangeDistance.
+ */
+ @java.lang.Override
+ public int getLaneChangeDistance() {
+ return laneChangeDistance_;
+ }
+
+ public static final int VERTICAL_CALIBRATION_FIELD_NUMBER = 4;
+ private double verticalCalibration_ = 0D;
+ /**
+ *
+ * 1°
+ *
+ *
+ * double Vertical_Calibration = 4;
+ * @return The verticalCalibration.
+ */
+ @java.lang.Override
+ public double getVerticalCalibration() {
+ return verticalCalibration_;
+ }
+
+ public static final int HEIGHT_STORAGE_FIELD_NUMBER = 5;
+ private double heightStorage_ = 0D;
+ /**
+ *
+ * 罐高度m
+ *
+ *
+ * double Height_Storage = 5;
+ * @return The heightStorage.
+ */
+ @java.lang.Override
+ public double getHeightStorage() {
+ return heightStorage_;
+ }
+
+ public static final int RADIUS_STORAGE_FIELD_NUMBER = 6;
+ private double radiusStorage_ = 0D;
+ /**
+ *
+ * 罐半径m
+ *
+ *
+ * double Radius_Storage = 6;
+ * @return The radiusStorage.
+ */
+ @java.lang.Override
+ public double getRadiusStorage() {
+ return radiusStorage_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (runMode_ != 0) {
+ output.writeInt32(1, runMode_);
+ }
+ if (robotSpeed_ != 0) {
+ output.writeInt32(2, robotSpeed_);
+ }
+ if (laneChangeDistance_ != 0) {
+ output.writeInt32(3, laneChangeDistance_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(verticalCalibration_) != 0) {
+ output.writeDouble(4, verticalCalibration_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(heightStorage_) != 0) {
+ output.writeDouble(5, heightStorage_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(radiusStorage_) != 0) {
+ output.writeDouble(6, radiusStorage_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (runMode_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(1, runMode_);
+ }
+ if (robotSpeed_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(2, robotSpeed_);
+ }
+ if (laneChangeDistance_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(3, laneChangeDistance_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(verticalCalibration_) != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(4, verticalCalibration_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(heightStorage_) != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(5, heightStorage_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(radiusStorage_) != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(6, radiusStorage_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define)) {
+ return super.equals(obj);
+ }
+ com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define other = (com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define) obj;
+
+ if (getRunMode()
+ != other.getRunMode()) return false;
+ if (getRobotSpeed()
+ != other.getRobotSpeed()) return false;
+ if (getLaneChangeDistance()
+ != other.getLaneChangeDistance()) return false;
+ if (java.lang.Double.doubleToLongBits(getVerticalCalibration())
+ != java.lang.Double.doubleToLongBits(
+ other.getVerticalCalibration())) return false;
+ if (java.lang.Double.doubleToLongBits(getHeightStorage())
+ != java.lang.Double.doubleToLongBits(
+ other.getHeightStorage())) return false;
+ if (java.lang.Double.doubleToLongBits(getRadiusStorage())
+ != java.lang.Double.doubleToLongBits(
+ other.getRadiusStorage())) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + RUNMODE_FIELD_NUMBER;
+ hash = (53 * hash) + getRunMode();
+ hash = (37 * hash) + ROBOTSPEED_FIELD_NUMBER;
+ hash = (53 * hash) + getRobotSpeed();
+ hash = (37 * hash) + LANECHANGEDISTANCE_FIELD_NUMBER;
+ hash = (53 * hash) + getLaneChangeDistance();
+ hash = (37 * hash) + VERTICAL_CALIBRATION_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getVerticalCalibration()));
+ hash = (37 * hash) + HEIGHT_STORAGE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getHeightStorage()));
+ hash = (37 * hash) + RADIUS_STORAGE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getRadiusStorage()));
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code PV_struct_define}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder implements
+ // @@protoc_insertion_point(builder_implements:PV_struct_define)
+ com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_defineOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.bingoorobot.foreignobjectcuttingapp.models.BspPV.internal_static_PV_struct_define_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.bingoorobot.foreignobjectcuttingapp.models.BspPV.internal_static_PV_struct_define_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define.class, com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define.Builder.class);
+ }
+
+ // Construct using com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define.newBuilder()
+ private Builder() {
+
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ runMode_ = 0;
+ robotSpeed_ = 0;
+ laneChangeDistance_ = 0;
+ verticalCalibration_ = 0D;
+ heightStorage_ = 0D;
+ radiusStorage_ = 0D;
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.bingoorobot.foreignobjectcuttingapp.models.BspPV.internal_static_PV_struct_define_descriptor;
+ }
+
+ @java.lang.Override
+ public com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define getDefaultInstanceForType() {
+ return com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define build() {
+ com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define buildPartial() {
+ com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define result = new com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define(this);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.runMode_ = runMode_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.robotSpeed_ = robotSpeed_;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.laneChangeDistance_ = laneChangeDistance_;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.verticalCalibration_ = verticalCalibration_;
+ }
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ result.heightStorage_ = heightStorage_;
+ }
+ if (((from_bitField0_ & 0x00000020) != 0)) {
+ result.radiusStorage_ = radiusStorage_;
+ }
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define) {
+ return mergeFrom((com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define other) {
+ if (other == com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define.getDefaultInstance()) return this;
+ if (other.getRunMode() != 0) {
+ setRunMode(other.getRunMode());
+ }
+ if (other.getRobotSpeed() != 0) {
+ setRobotSpeed(other.getRobotSpeed());
+ }
+ if (other.getLaneChangeDistance() != 0) {
+ setLaneChangeDistance(other.getLaneChangeDistance());
+ }
+ if (other.getVerticalCalibration() != 0D) {
+ setVerticalCalibration(other.getVerticalCalibration());
+ }
+ if (other.getHeightStorage() != 0D) {
+ setHeightStorage(other.getHeightStorage());
+ }
+ if (other.getRadiusStorage() != 0D) {
+ setRadiusStorage(other.getRadiusStorage());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 8: {
+ runMode_ = input.readInt32();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 8
+ case 16: {
+ robotSpeed_ = input.readInt32();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 16
+ case 24: {
+ laneChangeDistance_ = input.readInt32();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 24
+ case 33: {
+ verticalCalibration_ = input.readDouble();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 33
+ case 41: {
+ heightStorage_ = input.readDouble();
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 41
+ case 49: {
+ radiusStorage_ = input.readDouble();
+ bitField0_ |= 0x00000020;
+ break;
+ } // case 49
+ default: {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+ private int bitField0_;
+
+ private int runMode_ ;
+ /**
+ *
+ * 1 手动无校准作业 2 手动竖直向左作业 3 手动竖直向右作业
+ *
+ *
+ * int32 RunMode = 1;
+ * @return The runMode.
+ */
+ @java.lang.Override
+ public int getRunMode() {
+ return runMode_;
+ }
+ /**
+ *
+ * 1 手动无校准作业 2 手动竖直向左作业 3 手动竖直向右作业
+ *
+ *
+ * int32 RunMode = 1;
+ * @param value The runMode to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRunMode(int value) {
+
+ runMode_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 1 手动无校准作业 2 手动竖直向左作业 3 手动竖直向右作业
+ *
+ *
+ * int32 RunMode = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearRunMode() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ runMode_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int robotSpeed_ ;
+ /**
+ *
+ * 0-30m/min
+ *
+ *
+ * int32 RobotSpeed = 2;
+ * @return The robotSpeed.
+ */
+ @java.lang.Override
+ public int getRobotSpeed() {
+ return robotSpeed_;
+ }
+ /**
+ *
+ * 0-30m/min
+ *
+ *
+ * int32 RobotSpeed = 2;
+ * @param value The robotSpeed to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRobotSpeed(int value) {
+
+ robotSpeed_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 0-30m/min
+ *
+ *
+ * int32 RobotSpeed = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearRobotSpeed() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ robotSpeed_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int laneChangeDistance_ ;
+ /**
+ *
+ * 1-100cm
+ *
+ *
+ * int32 LaneChangeDistance = 3;
+ * @return The laneChangeDistance.
+ */
+ @java.lang.Override
+ public int getLaneChangeDistance() {
+ return laneChangeDistance_;
+ }
+ /**
+ *
+ * 1-100cm
+ *
+ *
+ * int32 LaneChangeDistance = 3;
+ * @param value The laneChangeDistance to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLaneChangeDistance(int value) {
+
+ laneChangeDistance_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 1-100cm
+ *
+ *
+ * int32 LaneChangeDistance = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearLaneChangeDistance() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ laneChangeDistance_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private double verticalCalibration_ ;
+ /**
+ *
+ * 1°
+ *
+ *
+ * double Vertical_Calibration = 4;
+ * @return The verticalCalibration.
+ */
+ @java.lang.Override
+ public double getVerticalCalibration() {
+ return verticalCalibration_;
+ }
+ /**
+ *
+ * 1°
+ *
+ *
+ * double Vertical_Calibration = 4;
+ * @param value The verticalCalibration to set.
+ * @return This builder for chaining.
+ */
+ public Builder setVerticalCalibration(double value) {
+
+ verticalCalibration_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 1°
+ *
+ *
+ * double Vertical_Calibration = 4;
+ * @return This builder for chaining.
+ */
+ public Builder clearVerticalCalibration() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ verticalCalibration_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double heightStorage_ ;
+ /**
+ *
+ * 罐高度m
+ *
+ *
+ * double Height_Storage = 5;
+ * @return The heightStorage.
+ */
+ @java.lang.Override
+ public double getHeightStorage() {
+ return heightStorage_;
+ }
+ /**
+ *
+ * 罐高度m
+ *
+ *
+ * double Height_Storage = 5;
+ * @param value The heightStorage to set.
+ * @return This builder for chaining.
+ */
+ public Builder setHeightStorage(double value) {
+
+ heightStorage_ = value;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 罐高度m
+ *
+ *
+ * double Height_Storage = 5;
+ * @return This builder for chaining.
+ */
+ public Builder clearHeightStorage() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ heightStorage_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double radiusStorage_ ;
+ /**
+ *
+ * 罐半径m
+ *
+ *
+ * double Radius_Storage = 6;
+ * @return The radiusStorage.
+ */
+ @java.lang.Override
+ public double getRadiusStorage() {
+ return radiusStorage_;
+ }
+ /**
+ *
+ * 罐半径m
+ *
+ *
+ * double Radius_Storage = 6;
+ * @param value The radiusStorage to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRadiusStorage(double value) {
+
+ radiusStorage_ = value;
+ bitField0_ |= 0x00000020;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 罐半径m
+ *
+ *
+ * double Radius_Storage = 6;
+ * @return This builder for chaining.
+ */
+ public Builder clearRadiusStorage() {
+ bitField0_ = (bitField0_ & ~0x00000020);
+ radiusStorage_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:PV_struct_define)
+ }
+
+ // @@protoc_insertion_point(class_scope:PV_struct_define)
+ private static final com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define();
+ }
+
+ public static com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public PV_struct_define parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_PV_struct_define_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_PV_struct_define_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+ private static com.google.protobuf.Descriptors.FileDescriptor
+ descriptor;
+ static {
+ java.lang.String[] descriptorData = {
+ "\n\014bsp_PV.proto\"\241\001\n\020PV_struct_define\022\017\n\007R" +
+ "unMode\030\001 \001(\005\022\022\n\nRobotSpeed\030\002 \001(\005\022\032\n\022Lane" +
+ "ChangeDistance\030\003 \001(\005\022\034\n\024Vertical_Calibra" +
+ "tion\030\004 \001(\001\022\026\n\016Height_Storage\030\005 \001(\001\022\026\n\016Ra" +
+ "dius_Storage\030\006 \001(\001B2\n.com.bingoorobot.fo" +
+ "reignobjectcuttingapp.modelsP\000b\006proto3"
+ };
+ descriptor = com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ });
+ internal_static_PV_struct_define_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_PV_struct_define_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_PV_struct_define_descriptor,
+ new java.lang.String[] { "RunMode", "RobotSpeed", "LaneChangeDistance", "VerticalCalibration", "HeightStorage", "RadiusStorage", });
+ descriptor.resolveAllFeaturesImmutable();
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/models/DCmd.java b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/models/DCmd.java
new file mode 100644
index 0000000..f06dd80
--- /dev/null
+++ b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/models/DCmd.java
@@ -0,0 +1,837 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// NO CHECKED-IN PROTOBUF GENCODE
+// source: D_Cmd.proto
+// Protobuf Java Version: 4.27.2
+
+package com.bingoorobot.foreignobjectcuttingapp.models;
+
+public final class DCmd {
+ private DCmd() {}
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 27,
+ /* patch= */ 2,
+ /* suffix= */ "",
+ DCmd.class.getName());
+ }
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistryLite registry) {
+ }
+
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions(
+ (com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+ public interface D_Cmd_struct_defineOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:D_Cmd_struct_define)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * .SP_MSP_MK32_Button Mk32CMD = 1;
+ * @return Whether the mk32CMD field is set.
+ */
+ boolean hasMk32CMD();
+ /**
+ * .SP_MSP_MK32_Button Mk32CMD = 1;
+ * @return The mk32CMD.
+ */
+ com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button getMk32CMD();
+ /**
+ * .SP_MSP_MK32_Button Mk32CMD = 1;
+ */
+ com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_ButtonOrBuilder getMk32CMDOrBuilder();
+
+ /**
+ * .PV_struct_define _toSendPV = 2;
+ * @return Whether the toSendPV field is set.
+ */
+ boolean hasToSendPV();
+ /**
+ * .PV_struct_define _toSendPV = 2;
+ * @return The toSendPV.
+ */
+ com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define getToSendPV();
+ /**
+ * .PV_struct_define _toSendPV = 2;
+ */
+ com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_defineOrBuilder getToSendPVOrBuilder();
+ }
+ /**
+ * Protobuf type {@code D_Cmd_struct_define}
+ */
+ public static final class D_Cmd_struct_define extends
+ com.google.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:D_Cmd_struct_define)
+ D_Cmd_struct_defineOrBuilder {
+ private static final long serialVersionUID = 0L;
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 27,
+ /* patch= */ 2,
+ /* suffix= */ "",
+ D_Cmd_struct_define.class.getName());
+ }
+ // Use D_Cmd_struct_define.newBuilder() to construct.
+ private D_Cmd_struct_define(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ }
+ private D_Cmd_struct_define() {
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.bingoorobot.foreignobjectcuttingapp.models.DCmd.internal_static_D_Cmd_struct_define_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.bingoorobot.foreignobjectcuttingapp.models.DCmd.internal_static_D_Cmd_struct_define_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define.class, com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int MK32CMD_FIELD_NUMBER = 1;
+ private com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button mk32CMD_;
+ /**
+ * .SP_MSP_MK32_Button Mk32CMD = 1;
+ * @return Whether the mk32CMD field is set.
+ */
+ @java.lang.Override
+ public boolean hasMk32CMD() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * .SP_MSP_MK32_Button Mk32CMD = 1;
+ * @return The mk32CMD.
+ */
+ @java.lang.Override
+ public com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button getMk32CMD() {
+ return mk32CMD_ == null ? com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button.getDefaultInstance() : mk32CMD_;
+ }
+ /**
+ * .SP_MSP_MK32_Button Mk32CMD = 1;
+ */
+ @java.lang.Override
+ public com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_ButtonOrBuilder getMk32CMDOrBuilder() {
+ return mk32CMD_ == null ? com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button.getDefaultInstance() : mk32CMD_;
+ }
+
+ public static final int _TOSENDPV_FIELD_NUMBER = 2;
+ private com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define ToSendPV_;
+ /**
+ * .PV_struct_define _toSendPV = 2;
+ * @return Whether the toSendPV field is set.
+ */
+ @java.lang.Override
+ public boolean hasToSendPV() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * .PV_struct_define _toSendPV = 2;
+ * @return The toSendPV.
+ */
+ @java.lang.Override
+ public com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define getToSendPV() {
+ return ToSendPV_ == null ? com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define.getDefaultInstance() : ToSendPV_;
+ }
+ /**
+ * .PV_struct_define _toSendPV = 2;
+ */
+ @java.lang.Override
+ public com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_defineOrBuilder getToSendPVOrBuilder() {
+ return ToSendPV_ == null ? com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define.getDefaultInstance() : ToSendPV_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(1, getMk32CMD());
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeMessage(2, getToSendPV());
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getMk32CMD());
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, getToSendPV());
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define)) {
+ return super.equals(obj);
+ }
+ com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define other = (com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define) obj;
+
+ if (hasMk32CMD() != other.hasMk32CMD()) return false;
+ if (hasMk32CMD()) {
+ if (!getMk32CMD()
+ .equals(other.getMk32CMD())) return false;
+ }
+ if (hasToSendPV() != other.hasToSendPV()) return false;
+ if (hasToSendPV()) {
+ if (!getToSendPV()
+ .equals(other.getToSendPV())) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasMk32CMD()) {
+ hash = (37 * hash) + MK32CMD_FIELD_NUMBER;
+ hash = (53 * hash) + getMk32CMD().hashCode();
+ }
+ if (hasToSendPV()) {
+ hash = (37 * hash) + _TOSENDPV_FIELD_NUMBER;
+ hash = (53 * hash) + getToSendPV().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code D_Cmd_struct_define}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder implements
+ // @@protoc_insertion_point(builder_implements:D_Cmd_struct_define)
+ com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_defineOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.bingoorobot.foreignobjectcuttingapp.models.DCmd.internal_static_D_Cmd_struct_define_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.bingoorobot.foreignobjectcuttingapp.models.DCmd.internal_static_D_Cmd_struct_define_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define.class, com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define.Builder.class);
+ }
+
+ // Construct using com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage
+ .alwaysUseFieldBuilders) {
+ getMk32CMDFieldBuilder();
+ getToSendPVFieldBuilder();
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ mk32CMD_ = null;
+ if (mk32CMDBuilder_ != null) {
+ mk32CMDBuilder_.dispose();
+ mk32CMDBuilder_ = null;
+ }
+ ToSendPV_ = null;
+ if (ToSendPVBuilder_ != null) {
+ ToSendPVBuilder_.dispose();
+ ToSendPVBuilder_ = null;
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.bingoorobot.foreignobjectcuttingapp.models.DCmd.internal_static_D_Cmd_struct_define_descriptor;
+ }
+
+ @java.lang.Override
+ public com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define getDefaultInstanceForType() {
+ return com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define build() {
+ com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define buildPartial() {
+ com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define result = new com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define(this);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.mk32CMD_ = mk32CMDBuilder_ == null
+ ? mk32CMD_
+ : mk32CMDBuilder_.build();
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.ToSendPV_ = ToSendPVBuilder_ == null
+ ? ToSendPV_
+ : ToSendPVBuilder_.build();
+ to_bitField0_ |= 0x00000002;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define) {
+ return mergeFrom((com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define other) {
+ if (other == com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define.getDefaultInstance()) return this;
+ if (other.hasMk32CMD()) {
+ mergeMk32CMD(other.getMk32CMD());
+ }
+ if (other.hasToSendPV()) {
+ mergeToSendPV(other.getToSendPV());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ input.readMessage(
+ getMk32CMDFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ input.readMessage(
+ getToSendPVFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ default: {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+ private int bitField0_;
+
+ private com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button mk32CMD_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button, com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button.Builder, com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_ButtonOrBuilder> mk32CMDBuilder_;
+ /**
+ * .SP_MSP_MK32_Button Mk32CMD = 1;
+ * @return Whether the mk32CMD field is set.
+ */
+ public boolean hasMk32CMD() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * .SP_MSP_MK32_Button Mk32CMD = 1;
+ * @return The mk32CMD.
+ */
+ public com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button getMk32CMD() {
+ if (mk32CMDBuilder_ == null) {
+ return mk32CMD_ == null ? com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button.getDefaultInstance() : mk32CMD_;
+ } else {
+ return mk32CMDBuilder_.getMessage();
+ }
+ }
+ /**
+ * .SP_MSP_MK32_Button Mk32CMD = 1;
+ */
+ public Builder setMk32CMD(com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button value) {
+ if (mk32CMDBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ mk32CMD_ = value;
+ } else {
+ mk32CMDBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ * .SP_MSP_MK32_Button Mk32CMD = 1;
+ */
+ public Builder setMk32CMD(
+ com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button.Builder builderForValue) {
+ if (mk32CMDBuilder_ == null) {
+ mk32CMD_ = builderForValue.build();
+ } else {
+ mk32CMDBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ * .SP_MSP_MK32_Button Mk32CMD = 1;
+ */
+ public Builder mergeMk32CMD(com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button value) {
+ if (mk32CMDBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0) &&
+ mk32CMD_ != null &&
+ mk32CMD_ != com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button.getDefaultInstance()) {
+ getMk32CMDBuilder().mergeFrom(value);
+ } else {
+ mk32CMD_ = value;
+ }
+ } else {
+ mk32CMDBuilder_.mergeFrom(value);
+ }
+ if (mk32CMD_ != null) {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ * .SP_MSP_MK32_Button Mk32CMD = 1;
+ */
+ public Builder clearMk32CMD() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ mk32CMD_ = null;
+ if (mk32CMDBuilder_ != null) {
+ mk32CMDBuilder_.dispose();
+ mk32CMDBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ * .SP_MSP_MK32_Button Mk32CMD = 1;
+ */
+ public com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button.Builder getMk32CMDBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getMk32CMDFieldBuilder().getBuilder();
+ }
+ /**
+ * .SP_MSP_MK32_Button Mk32CMD = 1;
+ */
+ public com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_ButtonOrBuilder getMk32CMDOrBuilder() {
+ if (mk32CMDBuilder_ != null) {
+ return mk32CMDBuilder_.getMessageOrBuilder();
+ } else {
+ return mk32CMD_ == null ?
+ com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button.getDefaultInstance() : mk32CMD_;
+ }
+ }
+ /**
+ * .SP_MSP_MK32_Button Mk32CMD = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button, com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button.Builder, com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_ButtonOrBuilder>
+ getMk32CMDFieldBuilder() {
+ if (mk32CMDBuilder_ == null) {
+ mk32CMDBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button, com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button.Builder, com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_ButtonOrBuilder>(
+ getMk32CMD(),
+ getParentForChildren(),
+ isClean());
+ mk32CMD_ = null;
+ }
+ return mk32CMDBuilder_;
+ }
+
+ private com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define ToSendPV_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define, com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define.Builder, com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_defineOrBuilder> ToSendPVBuilder_;
+ /**
+ * .PV_struct_define _toSendPV = 2;
+ * @return Whether the toSendPV field is set.
+ */
+ public boolean hasToSendPV() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * .PV_struct_define _toSendPV = 2;
+ * @return The toSendPV.
+ */
+ public com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define getToSendPV() {
+ if (ToSendPVBuilder_ == null) {
+ return ToSendPV_ == null ? com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define.getDefaultInstance() : ToSendPV_;
+ } else {
+ return ToSendPVBuilder_.getMessage();
+ }
+ }
+ /**
+ * .PV_struct_define _toSendPV = 2;
+ */
+ public Builder setToSendPV(com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define value) {
+ if (ToSendPVBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ToSendPV_ = value;
+ } else {
+ ToSendPVBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ * .PV_struct_define _toSendPV = 2;
+ */
+ public Builder setToSendPV(
+ com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define.Builder builderForValue) {
+ if (ToSendPVBuilder_ == null) {
+ ToSendPV_ = builderForValue.build();
+ } else {
+ ToSendPVBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ * .PV_struct_define _toSendPV = 2;
+ */
+ public Builder mergeToSendPV(com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define value) {
+ if (ToSendPVBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0) &&
+ ToSendPV_ != null &&
+ ToSendPV_ != com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define.getDefaultInstance()) {
+ getToSendPVBuilder().mergeFrom(value);
+ } else {
+ ToSendPV_ = value;
+ }
+ } else {
+ ToSendPVBuilder_.mergeFrom(value);
+ }
+ if (ToSendPV_ != null) {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ * .PV_struct_define _toSendPV = 2;
+ */
+ public Builder clearToSendPV() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ ToSendPV_ = null;
+ if (ToSendPVBuilder_ != null) {
+ ToSendPVBuilder_.dispose();
+ ToSendPVBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ * .PV_struct_define _toSendPV = 2;
+ */
+ public com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define.Builder getToSendPVBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return getToSendPVFieldBuilder().getBuilder();
+ }
+ /**
+ * .PV_struct_define _toSendPV = 2;
+ */
+ public com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_defineOrBuilder getToSendPVOrBuilder() {
+ if (ToSendPVBuilder_ != null) {
+ return ToSendPVBuilder_.getMessageOrBuilder();
+ } else {
+ return ToSendPV_ == null ?
+ com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define.getDefaultInstance() : ToSendPV_;
+ }
+ }
+ /**
+ * .PV_struct_define _toSendPV = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define, com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define.Builder, com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_defineOrBuilder>
+ getToSendPVFieldBuilder() {
+ if (ToSendPVBuilder_ == null) {
+ ToSendPVBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define, com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_define.Builder, com.bingoorobot.foreignobjectcuttingapp.models.BspPV.PV_struct_defineOrBuilder>(
+ getToSendPV(),
+ getParentForChildren(),
+ isClean());
+ ToSendPV_ = null;
+ }
+ return ToSendPVBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:D_Cmd_struct_define)
+ }
+
+ // @@protoc_insertion_point(class_scope:D_Cmd_struct_define)
+ private static final com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define();
+ }
+
+ public static com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public D_Cmd_struct_define parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.bingoorobot.foreignobjectcuttingapp.models.DCmd.D_Cmd_struct_define getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_D_Cmd_struct_define_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_D_Cmd_struct_define_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+ private static com.google.protobuf.Descriptors.FileDescriptor
+ descriptor;
+ static {
+ java.lang.String[] descriptorData = {
+ "\n\013D_Cmd.proto\032\016msp_MK32.proto\032\014bsp_PV.pr" +
+ "oto\"a\n\023D_Cmd_struct_define\022$\n\007Mk32CMD\030\001 " +
+ "\001(\0132\023.SP_MSP_MK32_Button\022$\n\t_toSendPV\030\002 " +
+ "\001(\0132\021.PV_struct_defineB2\n.com.bingoorobo" +
+ "t.foreignobjectcuttingapp.modelsP\000b\006prot" +
+ "o3"
+ };
+ descriptor = com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.getDescriptor(),
+ com.bingoorobot.foreignobjectcuttingapp.models.BspPV.getDescriptor(),
+ });
+ internal_static_D_Cmd_struct_define_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_D_Cmd_struct_define_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_D_Cmd_struct_define_descriptor,
+ new java.lang.String[] { "Mk32CMD", "ToSendPV", });
+ descriptor.resolveAllFeaturesImmutable();
+ com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.getDescriptor();
+ com.bingoorobot.foreignobjectcuttingapp.models.BspPV.getDescriptor();
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/models/ErrorModel.java b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/models/ErrorModel.java
new file mode 100644
index 0000000..574100c
--- /dev/null
+++ b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/models/ErrorModel.java
@@ -0,0 +1,44 @@
+package com.bingoorobot.foreignobjectcuttingapp.models;
+
+public class ErrorModel {
+
+ public ErrorModel(long timeID, String errorInfo) {
+ this.timeID = timeID;
+ this.errorInfo = errorInfo;
+ }
+ private long timeID;
+
+
+ public void setDateTimeBJ(String dateTimeUTC) {
+ this.dateTimeBJ = dateTimeUTC;
+ }
+
+ private String errorInfo;
+
+ public String getDateTimeBJ() {
+ return dateTimeBJ;
+ }
+
+ private String dateTimeBJ;
+
+
+ @Override
+ public String toString() {
+ return String.valueOf(dateTimeBJ + errorInfo);
+ }
+ public void setTimeID(long timeID) {
+ this.timeID = timeID;
+ }
+
+ public void setErrorInfo(String errorInfo) {
+ this.errorInfo = errorInfo;
+ }
+
+ public long getTimeID() {
+ return timeID;
+ }
+
+ public String getErrorInfo() {
+ return errorInfo;
+ }
+}
diff --git a/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/models/MspMK32.java b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/models/MspMK32.java
new file mode 100644
index 0000000..91e0a50
--- /dev/null
+++ b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/models/MspMK32.java
@@ -0,0 +1,1726 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// NO CHECKED-IN PROTOBUF GENCODE
+// source: msp_MK32.proto
+// Protobuf Java Version: 4.27.2
+
+package com.bingoorobot.foreignobjectcuttingapp.models;
+
+public final class MspMK32 {
+ private MspMK32() {}
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 27,
+ /* patch= */ 2,
+ /* suffix= */ "",
+ MspMK32.class.getName());
+ }
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistryLite registry) {
+ }
+
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions(
+ (com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+ public interface SP_MSP_MK32_ButtonOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:SP_MSP_MK32_Button)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * int32 RxIndex = 1;
+ * @return The rxIndex.
+ */
+ int getRxIndex();
+
+ /**
+ * int32 CH0_RY_H = 2;
+ * @return The cH0RYH.
+ */
+ int getCH0RYH();
+
+ /**
+ * int32 CH1_RY_V = 3;
+ * @return The cH1RYV.
+ */
+ int getCH1RYV();
+
+ /**
+ * int32 CH2_LY_V = 4;
+ * @return The cH2LYV.
+ */
+ int getCH2LYV();
+
+ /**
+ * int32 CH3_LY_H = 5;
+ * @return The cH3LYH.
+ */
+ int getCH3LYH();
+
+ /**
+ * int32 CH4_SA = 6;
+ * @return The cH4SA.
+ */
+ int getCH4SA();
+
+ /**
+ * int32 CH5_SB = 7;
+ * @return The cH5SB.
+ */
+ int getCH5SB();
+
+ /**
+ * int32 CH6_SC = 8;
+ * @return The cH6SC.
+ */
+ int getCH6SC();
+
+ /**
+ * int32 CH7_SD = 9;
+ * @return The cH7SD.
+ */
+ int getCH7SD();
+
+ /**
+ * int32 CH8_SE = 10;
+ * @return The cH8SE.
+ */
+ int getCH8SE();
+
+ /**
+ * int32 CH9_SF = 11;
+ * @return The cH9SF.
+ */
+ int getCH9SF();
+
+ /**
+ * int32 CH10_LD1 = 12;
+ * @return The cH10LD1.
+ */
+ int getCH10LD1();
+
+ /**
+ * int32 CH11_RD1 = 13;
+ * @return The cH11RD1.
+ */
+ int getCH11RD1();
+
+ /**
+ * int32 CH12_S1 = 14;
+ * @return The cH12S1.
+ */
+ int getCH12S1();
+
+ /**
+ * int32 CH13_S2 = 15;
+ * @return The cH13S2.
+ */
+ int getCH13S2();
+
+ /**
+ * int32 CH14_LT = 16;
+ * @return The cH14LT.
+ */
+ int getCH14LT();
+
+ /**
+ * int32 CH15_RT = 17;
+ * @return The cH15RT.
+ */
+ int getCH15RT();
+
+ /**
+ * int32 IsOnline = 18;
+ * @return The isOnline.
+ */
+ int getIsOnline();
+ }
+ /**
+ * Protobuf type {@code SP_MSP_MK32_Button}
+ */
+ public static final class SP_MSP_MK32_Button extends
+ com.google.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:SP_MSP_MK32_Button)
+ SP_MSP_MK32_ButtonOrBuilder {
+ private static final long serialVersionUID = 0L;
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 27,
+ /* patch= */ 2,
+ /* suffix= */ "",
+ SP_MSP_MK32_Button.class.getName());
+ }
+ // Use SP_MSP_MK32_Button.newBuilder() to construct.
+ private SP_MSP_MK32_Button(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ }
+ private SP_MSP_MK32_Button() {
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.internal_static_SP_MSP_MK32_Button_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.internal_static_SP_MSP_MK32_Button_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button.class, com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button.Builder.class);
+ }
+
+ public static final int RXINDEX_FIELD_NUMBER = 1;
+ private int rxIndex_ = 0;
+ /**
+ * int32 RxIndex = 1;
+ * @return The rxIndex.
+ */
+ @java.lang.Override
+ public int getRxIndex() {
+ return rxIndex_;
+ }
+
+ public static final int CH0_RY_H_FIELD_NUMBER = 2;
+ private int cH0RYH_ = 0;
+ /**
+ * int32 CH0_RY_H = 2;
+ * @return The cH0RYH.
+ */
+ @java.lang.Override
+ public int getCH0RYH() {
+ return cH0RYH_;
+ }
+
+ public static final int CH1_RY_V_FIELD_NUMBER = 3;
+ private int cH1RYV_ = 0;
+ /**
+ * int32 CH1_RY_V = 3;
+ * @return The cH1RYV.
+ */
+ @java.lang.Override
+ public int getCH1RYV() {
+ return cH1RYV_;
+ }
+
+ public static final int CH2_LY_V_FIELD_NUMBER = 4;
+ private int cH2LYV_ = 0;
+ /**
+ * int32 CH2_LY_V = 4;
+ * @return The cH2LYV.
+ */
+ @java.lang.Override
+ public int getCH2LYV() {
+ return cH2LYV_;
+ }
+
+ public static final int CH3_LY_H_FIELD_NUMBER = 5;
+ private int cH3LYH_ = 0;
+ /**
+ * int32 CH3_LY_H = 5;
+ * @return The cH3LYH.
+ */
+ @java.lang.Override
+ public int getCH3LYH() {
+ return cH3LYH_;
+ }
+
+ public static final int CH4_SA_FIELD_NUMBER = 6;
+ private int cH4SA_ = 0;
+ /**
+ * int32 CH4_SA = 6;
+ * @return The cH4SA.
+ */
+ @java.lang.Override
+ public int getCH4SA() {
+ return cH4SA_;
+ }
+
+ public static final int CH5_SB_FIELD_NUMBER = 7;
+ private int cH5SB_ = 0;
+ /**
+ * int32 CH5_SB = 7;
+ * @return The cH5SB.
+ */
+ @java.lang.Override
+ public int getCH5SB() {
+ return cH5SB_;
+ }
+
+ public static final int CH6_SC_FIELD_NUMBER = 8;
+ private int cH6SC_ = 0;
+ /**
+ * int32 CH6_SC = 8;
+ * @return The cH6SC.
+ */
+ @java.lang.Override
+ public int getCH6SC() {
+ return cH6SC_;
+ }
+
+ public static final int CH7_SD_FIELD_NUMBER = 9;
+ private int cH7SD_ = 0;
+ /**
+ * int32 CH7_SD = 9;
+ * @return The cH7SD.
+ */
+ @java.lang.Override
+ public int getCH7SD() {
+ return cH7SD_;
+ }
+
+ public static final int CH8_SE_FIELD_NUMBER = 10;
+ private int cH8SE_ = 0;
+ /**
+ * int32 CH8_SE = 10;
+ * @return The cH8SE.
+ */
+ @java.lang.Override
+ public int getCH8SE() {
+ return cH8SE_;
+ }
+
+ public static final int CH9_SF_FIELD_NUMBER = 11;
+ private int cH9SF_ = 0;
+ /**
+ * int32 CH9_SF = 11;
+ * @return The cH9SF.
+ */
+ @java.lang.Override
+ public int getCH9SF() {
+ return cH9SF_;
+ }
+
+ public static final int CH10_LD1_FIELD_NUMBER = 12;
+ private int cH10LD1_ = 0;
+ /**
+ * int32 CH10_LD1 = 12;
+ * @return The cH10LD1.
+ */
+ @java.lang.Override
+ public int getCH10LD1() {
+ return cH10LD1_;
+ }
+
+ public static final int CH11_RD1_FIELD_NUMBER = 13;
+ private int cH11RD1_ = 0;
+ /**
+ * int32 CH11_RD1 = 13;
+ * @return The cH11RD1.
+ */
+ @java.lang.Override
+ public int getCH11RD1() {
+ return cH11RD1_;
+ }
+
+ public static final int CH12_S1_FIELD_NUMBER = 14;
+ private int cH12S1_ = 0;
+ /**
+ * int32 CH12_S1 = 14;
+ * @return The cH12S1.
+ */
+ @java.lang.Override
+ public int getCH12S1() {
+ return cH12S1_;
+ }
+
+ public static final int CH13_S2_FIELD_NUMBER = 15;
+ private int cH13S2_ = 0;
+ /**
+ * int32 CH13_S2 = 15;
+ * @return The cH13S2.
+ */
+ @java.lang.Override
+ public int getCH13S2() {
+ return cH13S2_;
+ }
+
+ public static final int CH14_LT_FIELD_NUMBER = 16;
+ private int cH14LT_ = 0;
+ /**
+ * int32 CH14_LT = 16;
+ * @return The cH14LT.
+ */
+ @java.lang.Override
+ public int getCH14LT() {
+ return cH14LT_;
+ }
+
+ public static final int CH15_RT_FIELD_NUMBER = 17;
+ private int cH15RT_ = 0;
+ /**
+ * int32 CH15_RT = 17;
+ * @return The cH15RT.
+ */
+ @java.lang.Override
+ public int getCH15RT() {
+ return cH15RT_;
+ }
+
+ public static final int ISONLINE_FIELD_NUMBER = 18;
+ private int isOnline_ = 0;
+ /**
+ * int32 IsOnline = 18;
+ * @return The isOnline.
+ */
+ @java.lang.Override
+ public int getIsOnline() {
+ return isOnline_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (rxIndex_ != 0) {
+ output.writeInt32(1, rxIndex_);
+ }
+ if (cH0RYH_ != 0) {
+ output.writeInt32(2, cH0RYH_);
+ }
+ if (cH1RYV_ != 0) {
+ output.writeInt32(3, cH1RYV_);
+ }
+ if (cH2LYV_ != 0) {
+ output.writeInt32(4, cH2LYV_);
+ }
+ if (cH3LYH_ != 0) {
+ output.writeInt32(5, cH3LYH_);
+ }
+ if (cH4SA_ != 0) {
+ output.writeInt32(6, cH4SA_);
+ }
+ if (cH5SB_ != 0) {
+ output.writeInt32(7, cH5SB_);
+ }
+ if (cH6SC_ != 0) {
+ output.writeInt32(8, cH6SC_);
+ }
+ if (cH7SD_ != 0) {
+ output.writeInt32(9, cH7SD_);
+ }
+ if (cH8SE_ != 0) {
+ output.writeInt32(10, cH8SE_);
+ }
+ if (cH9SF_ != 0) {
+ output.writeInt32(11, cH9SF_);
+ }
+ if (cH10LD1_ != 0) {
+ output.writeInt32(12, cH10LD1_);
+ }
+ if (cH11RD1_ != 0) {
+ output.writeInt32(13, cH11RD1_);
+ }
+ if (cH12S1_ != 0) {
+ output.writeInt32(14, cH12S1_);
+ }
+ if (cH13S2_ != 0) {
+ output.writeInt32(15, cH13S2_);
+ }
+ if (cH14LT_ != 0) {
+ output.writeInt32(16, cH14LT_);
+ }
+ if (cH15RT_ != 0) {
+ output.writeInt32(17, cH15RT_);
+ }
+ if (isOnline_ != 0) {
+ output.writeInt32(18, isOnline_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (rxIndex_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(1, rxIndex_);
+ }
+ if (cH0RYH_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(2, cH0RYH_);
+ }
+ if (cH1RYV_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(3, cH1RYV_);
+ }
+ if (cH2LYV_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(4, cH2LYV_);
+ }
+ if (cH3LYH_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(5, cH3LYH_);
+ }
+ if (cH4SA_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(6, cH4SA_);
+ }
+ if (cH5SB_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(7, cH5SB_);
+ }
+ if (cH6SC_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(8, cH6SC_);
+ }
+ if (cH7SD_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(9, cH7SD_);
+ }
+ if (cH8SE_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(10, cH8SE_);
+ }
+ if (cH9SF_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(11, cH9SF_);
+ }
+ if (cH10LD1_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(12, cH10LD1_);
+ }
+ if (cH11RD1_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(13, cH11RD1_);
+ }
+ if (cH12S1_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(14, cH12S1_);
+ }
+ if (cH13S2_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(15, cH13S2_);
+ }
+ if (cH14LT_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(16, cH14LT_);
+ }
+ if (cH15RT_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(17, cH15RT_);
+ }
+ if (isOnline_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(18, isOnline_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button)) {
+ return super.equals(obj);
+ }
+ com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button other = (com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button) obj;
+
+ if (getRxIndex()
+ != other.getRxIndex()) return false;
+ if (getCH0RYH()
+ != other.getCH0RYH()) return false;
+ if (getCH1RYV()
+ != other.getCH1RYV()) return false;
+ if (getCH2LYV()
+ != other.getCH2LYV()) return false;
+ if (getCH3LYH()
+ != other.getCH3LYH()) return false;
+ if (getCH4SA()
+ != other.getCH4SA()) return false;
+ if (getCH5SB()
+ != other.getCH5SB()) return false;
+ if (getCH6SC()
+ != other.getCH6SC()) return false;
+ if (getCH7SD()
+ != other.getCH7SD()) return false;
+ if (getCH8SE()
+ != other.getCH8SE()) return false;
+ if (getCH9SF()
+ != other.getCH9SF()) return false;
+ if (getCH10LD1()
+ != other.getCH10LD1()) return false;
+ if (getCH11RD1()
+ != other.getCH11RD1()) return false;
+ if (getCH12S1()
+ != other.getCH12S1()) return false;
+ if (getCH13S2()
+ != other.getCH13S2()) return false;
+ if (getCH14LT()
+ != other.getCH14LT()) return false;
+ if (getCH15RT()
+ != other.getCH15RT()) return false;
+ if (getIsOnline()
+ != other.getIsOnline()) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + RXINDEX_FIELD_NUMBER;
+ hash = (53 * hash) + getRxIndex();
+ hash = (37 * hash) + CH0_RY_H_FIELD_NUMBER;
+ hash = (53 * hash) + getCH0RYH();
+ hash = (37 * hash) + CH1_RY_V_FIELD_NUMBER;
+ hash = (53 * hash) + getCH1RYV();
+ hash = (37 * hash) + CH2_LY_V_FIELD_NUMBER;
+ hash = (53 * hash) + getCH2LYV();
+ hash = (37 * hash) + CH3_LY_H_FIELD_NUMBER;
+ hash = (53 * hash) + getCH3LYH();
+ hash = (37 * hash) + CH4_SA_FIELD_NUMBER;
+ hash = (53 * hash) + getCH4SA();
+ hash = (37 * hash) + CH5_SB_FIELD_NUMBER;
+ hash = (53 * hash) + getCH5SB();
+ hash = (37 * hash) + CH6_SC_FIELD_NUMBER;
+ hash = (53 * hash) + getCH6SC();
+ hash = (37 * hash) + CH7_SD_FIELD_NUMBER;
+ hash = (53 * hash) + getCH7SD();
+ hash = (37 * hash) + CH8_SE_FIELD_NUMBER;
+ hash = (53 * hash) + getCH8SE();
+ hash = (37 * hash) + CH9_SF_FIELD_NUMBER;
+ hash = (53 * hash) + getCH9SF();
+ hash = (37 * hash) + CH10_LD1_FIELD_NUMBER;
+ hash = (53 * hash) + getCH10LD1();
+ hash = (37 * hash) + CH11_RD1_FIELD_NUMBER;
+ hash = (53 * hash) + getCH11RD1();
+ hash = (37 * hash) + CH12_S1_FIELD_NUMBER;
+ hash = (53 * hash) + getCH12S1();
+ hash = (37 * hash) + CH13_S2_FIELD_NUMBER;
+ hash = (53 * hash) + getCH13S2();
+ hash = (37 * hash) + CH14_LT_FIELD_NUMBER;
+ hash = (53 * hash) + getCH14LT();
+ hash = (37 * hash) + CH15_RT_FIELD_NUMBER;
+ hash = (53 * hash) + getCH15RT();
+ hash = (37 * hash) + ISONLINE_FIELD_NUMBER;
+ hash = (53 * hash) + getIsOnline();
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code SP_MSP_MK32_Button}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder implements
+ // @@protoc_insertion_point(builder_implements:SP_MSP_MK32_Button)
+ com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_ButtonOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.internal_static_SP_MSP_MK32_Button_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.internal_static_SP_MSP_MK32_Button_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button.class, com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button.Builder.class);
+ }
+
+ // Construct using com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button.newBuilder()
+ private Builder() {
+
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ rxIndex_ = 0;
+ cH0RYH_ = 0;
+ cH1RYV_ = 0;
+ cH2LYV_ = 0;
+ cH3LYH_ = 0;
+ cH4SA_ = 0;
+ cH5SB_ = 0;
+ cH6SC_ = 0;
+ cH7SD_ = 0;
+ cH8SE_ = 0;
+ cH9SF_ = 0;
+ cH10LD1_ = 0;
+ cH11RD1_ = 0;
+ cH12S1_ = 0;
+ cH13S2_ = 0;
+ cH14LT_ = 0;
+ cH15RT_ = 0;
+ isOnline_ = 0;
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.internal_static_SP_MSP_MK32_Button_descriptor;
+ }
+
+ @java.lang.Override
+ public com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button getDefaultInstanceForType() {
+ return com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button build() {
+ com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button buildPartial() {
+ com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button result = new com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button(this);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.rxIndex_ = rxIndex_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.cH0RYH_ = cH0RYH_;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.cH1RYV_ = cH1RYV_;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.cH2LYV_ = cH2LYV_;
+ }
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ result.cH3LYH_ = cH3LYH_;
+ }
+ if (((from_bitField0_ & 0x00000020) != 0)) {
+ result.cH4SA_ = cH4SA_;
+ }
+ if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.cH5SB_ = cH5SB_;
+ }
+ if (((from_bitField0_ & 0x00000080) != 0)) {
+ result.cH6SC_ = cH6SC_;
+ }
+ if (((from_bitField0_ & 0x00000100) != 0)) {
+ result.cH7SD_ = cH7SD_;
+ }
+ if (((from_bitField0_ & 0x00000200) != 0)) {
+ result.cH8SE_ = cH8SE_;
+ }
+ if (((from_bitField0_ & 0x00000400) != 0)) {
+ result.cH9SF_ = cH9SF_;
+ }
+ if (((from_bitField0_ & 0x00000800) != 0)) {
+ result.cH10LD1_ = cH10LD1_;
+ }
+ if (((from_bitField0_ & 0x00001000) != 0)) {
+ result.cH11RD1_ = cH11RD1_;
+ }
+ if (((from_bitField0_ & 0x00002000) != 0)) {
+ result.cH12S1_ = cH12S1_;
+ }
+ if (((from_bitField0_ & 0x00004000) != 0)) {
+ result.cH13S2_ = cH13S2_;
+ }
+ if (((from_bitField0_ & 0x00008000) != 0)) {
+ result.cH14LT_ = cH14LT_;
+ }
+ if (((from_bitField0_ & 0x00010000) != 0)) {
+ result.cH15RT_ = cH15RT_;
+ }
+ if (((from_bitField0_ & 0x00020000) != 0)) {
+ result.isOnline_ = isOnline_;
+ }
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button) {
+ return mergeFrom((com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button other) {
+ if (other == com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button.getDefaultInstance()) return this;
+ if (other.getRxIndex() != 0) {
+ setRxIndex(other.getRxIndex());
+ }
+ if (other.getCH0RYH() != 0) {
+ setCH0RYH(other.getCH0RYH());
+ }
+ if (other.getCH1RYV() != 0) {
+ setCH1RYV(other.getCH1RYV());
+ }
+ if (other.getCH2LYV() != 0) {
+ setCH2LYV(other.getCH2LYV());
+ }
+ if (other.getCH3LYH() != 0) {
+ setCH3LYH(other.getCH3LYH());
+ }
+ if (other.getCH4SA() != 0) {
+ setCH4SA(other.getCH4SA());
+ }
+ if (other.getCH5SB() != 0) {
+ setCH5SB(other.getCH5SB());
+ }
+ if (other.getCH6SC() != 0) {
+ setCH6SC(other.getCH6SC());
+ }
+ if (other.getCH7SD() != 0) {
+ setCH7SD(other.getCH7SD());
+ }
+ if (other.getCH8SE() != 0) {
+ setCH8SE(other.getCH8SE());
+ }
+ if (other.getCH9SF() != 0) {
+ setCH9SF(other.getCH9SF());
+ }
+ if (other.getCH10LD1() != 0) {
+ setCH10LD1(other.getCH10LD1());
+ }
+ if (other.getCH11RD1() != 0) {
+ setCH11RD1(other.getCH11RD1());
+ }
+ if (other.getCH12S1() != 0) {
+ setCH12S1(other.getCH12S1());
+ }
+ if (other.getCH13S2() != 0) {
+ setCH13S2(other.getCH13S2());
+ }
+ if (other.getCH14LT() != 0) {
+ setCH14LT(other.getCH14LT());
+ }
+ if (other.getCH15RT() != 0) {
+ setCH15RT(other.getCH15RT());
+ }
+ if (other.getIsOnline() != 0) {
+ setIsOnline(other.getIsOnline());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 8: {
+ rxIndex_ = input.readInt32();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 8
+ case 16: {
+ cH0RYH_ = input.readInt32();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 16
+ case 24: {
+ cH1RYV_ = input.readInt32();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 24
+ case 32: {
+ cH2LYV_ = input.readInt32();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 32
+ case 40: {
+ cH3LYH_ = input.readInt32();
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 40
+ case 48: {
+ cH4SA_ = input.readInt32();
+ bitField0_ |= 0x00000020;
+ break;
+ } // case 48
+ case 56: {
+ cH5SB_ = input.readInt32();
+ bitField0_ |= 0x00000040;
+ break;
+ } // case 56
+ case 64: {
+ cH6SC_ = input.readInt32();
+ bitField0_ |= 0x00000080;
+ break;
+ } // case 64
+ case 72: {
+ cH7SD_ = input.readInt32();
+ bitField0_ |= 0x00000100;
+ break;
+ } // case 72
+ case 80: {
+ cH8SE_ = input.readInt32();
+ bitField0_ |= 0x00000200;
+ break;
+ } // case 80
+ case 88: {
+ cH9SF_ = input.readInt32();
+ bitField0_ |= 0x00000400;
+ break;
+ } // case 88
+ case 96: {
+ cH10LD1_ = input.readInt32();
+ bitField0_ |= 0x00000800;
+ break;
+ } // case 96
+ case 104: {
+ cH11RD1_ = input.readInt32();
+ bitField0_ |= 0x00001000;
+ break;
+ } // case 104
+ case 112: {
+ cH12S1_ = input.readInt32();
+ bitField0_ |= 0x00002000;
+ break;
+ } // case 112
+ case 120: {
+ cH13S2_ = input.readInt32();
+ bitField0_ |= 0x00004000;
+ break;
+ } // case 120
+ case 128: {
+ cH14LT_ = input.readInt32();
+ bitField0_ |= 0x00008000;
+ break;
+ } // case 128
+ case 136: {
+ cH15RT_ = input.readInt32();
+ bitField0_ |= 0x00010000;
+ break;
+ } // case 136
+ case 144: {
+ isOnline_ = input.readInt32();
+ bitField0_ |= 0x00020000;
+ break;
+ } // case 144
+ default: {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+ private int bitField0_;
+
+ private int rxIndex_ ;
+ /**
+ * int32 RxIndex = 1;
+ * @return The rxIndex.
+ */
+ @java.lang.Override
+ public int getRxIndex() {
+ return rxIndex_;
+ }
+ /**
+ * int32 RxIndex = 1;
+ * @param value The rxIndex to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRxIndex(int value) {
+
+ rxIndex_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 RxIndex = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearRxIndex() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ rxIndex_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int cH0RYH_ ;
+ /**
+ * int32 CH0_RY_H = 2;
+ * @return The cH0RYH.
+ */
+ @java.lang.Override
+ public int getCH0RYH() {
+ return cH0RYH_;
+ }
+ /**
+ * int32 CH0_RY_H = 2;
+ * @param value The cH0RYH to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCH0RYH(int value) {
+
+ cH0RYH_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 CH0_RY_H = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearCH0RYH() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ cH0RYH_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int cH1RYV_ ;
+ /**
+ * int32 CH1_RY_V = 3;
+ * @return The cH1RYV.
+ */
+ @java.lang.Override
+ public int getCH1RYV() {
+ return cH1RYV_;
+ }
+ /**
+ * int32 CH1_RY_V = 3;
+ * @param value The cH1RYV to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCH1RYV(int value) {
+
+ cH1RYV_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 CH1_RY_V = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearCH1RYV() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ cH1RYV_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int cH2LYV_ ;
+ /**
+ * int32 CH2_LY_V = 4;
+ * @return The cH2LYV.
+ */
+ @java.lang.Override
+ public int getCH2LYV() {
+ return cH2LYV_;
+ }
+ /**
+ * int32 CH2_LY_V = 4;
+ * @param value The cH2LYV to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCH2LYV(int value) {
+
+ cH2LYV_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 CH2_LY_V = 4;
+ * @return This builder for chaining.
+ */
+ public Builder clearCH2LYV() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ cH2LYV_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int cH3LYH_ ;
+ /**
+ * int32 CH3_LY_H = 5;
+ * @return The cH3LYH.
+ */
+ @java.lang.Override
+ public int getCH3LYH() {
+ return cH3LYH_;
+ }
+ /**
+ * int32 CH3_LY_H = 5;
+ * @param value The cH3LYH to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCH3LYH(int value) {
+
+ cH3LYH_ = value;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 CH3_LY_H = 5;
+ * @return This builder for chaining.
+ */
+ public Builder clearCH3LYH() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ cH3LYH_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int cH4SA_ ;
+ /**
+ * int32 CH4_SA = 6;
+ * @return The cH4SA.
+ */
+ @java.lang.Override
+ public int getCH4SA() {
+ return cH4SA_;
+ }
+ /**
+ * int32 CH4_SA = 6;
+ * @param value The cH4SA to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCH4SA(int value) {
+
+ cH4SA_ = value;
+ bitField0_ |= 0x00000020;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 CH4_SA = 6;
+ * @return This builder for chaining.
+ */
+ public Builder clearCH4SA() {
+ bitField0_ = (bitField0_ & ~0x00000020);
+ cH4SA_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int cH5SB_ ;
+ /**
+ * int32 CH5_SB = 7;
+ * @return The cH5SB.
+ */
+ @java.lang.Override
+ public int getCH5SB() {
+ return cH5SB_;
+ }
+ /**
+ * int32 CH5_SB = 7;
+ * @param value The cH5SB to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCH5SB(int value) {
+
+ cH5SB_ = value;
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 CH5_SB = 7;
+ * @return This builder for chaining.
+ */
+ public Builder clearCH5SB() {
+ bitField0_ = (bitField0_ & ~0x00000040);
+ cH5SB_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int cH6SC_ ;
+ /**
+ * int32 CH6_SC = 8;
+ * @return The cH6SC.
+ */
+ @java.lang.Override
+ public int getCH6SC() {
+ return cH6SC_;
+ }
+ /**
+ * int32 CH6_SC = 8;
+ * @param value The cH6SC to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCH6SC(int value) {
+
+ cH6SC_ = value;
+ bitField0_ |= 0x00000080;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 CH6_SC = 8;
+ * @return This builder for chaining.
+ */
+ public Builder clearCH6SC() {
+ bitField0_ = (bitField0_ & ~0x00000080);
+ cH6SC_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int cH7SD_ ;
+ /**
+ * int32 CH7_SD = 9;
+ * @return The cH7SD.
+ */
+ @java.lang.Override
+ public int getCH7SD() {
+ return cH7SD_;
+ }
+ /**
+ * int32 CH7_SD = 9;
+ * @param value The cH7SD to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCH7SD(int value) {
+
+ cH7SD_ = value;
+ bitField0_ |= 0x00000100;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 CH7_SD = 9;
+ * @return This builder for chaining.
+ */
+ public Builder clearCH7SD() {
+ bitField0_ = (bitField0_ & ~0x00000100);
+ cH7SD_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int cH8SE_ ;
+ /**
+ * int32 CH8_SE = 10;
+ * @return The cH8SE.
+ */
+ @java.lang.Override
+ public int getCH8SE() {
+ return cH8SE_;
+ }
+ /**
+ * int32 CH8_SE = 10;
+ * @param value The cH8SE to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCH8SE(int value) {
+
+ cH8SE_ = value;
+ bitField0_ |= 0x00000200;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 CH8_SE = 10;
+ * @return This builder for chaining.
+ */
+ public Builder clearCH8SE() {
+ bitField0_ = (bitField0_ & ~0x00000200);
+ cH8SE_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int cH9SF_ ;
+ /**
+ * int32 CH9_SF = 11;
+ * @return The cH9SF.
+ */
+ @java.lang.Override
+ public int getCH9SF() {
+ return cH9SF_;
+ }
+ /**
+ * int32 CH9_SF = 11;
+ * @param value The cH9SF to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCH9SF(int value) {
+
+ cH9SF_ = value;
+ bitField0_ |= 0x00000400;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 CH9_SF = 11;
+ * @return This builder for chaining.
+ */
+ public Builder clearCH9SF() {
+ bitField0_ = (bitField0_ & ~0x00000400);
+ cH9SF_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int cH10LD1_ ;
+ /**
+ * int32 CH10_LD1 = 12;
+ * @return The cH10LD1.
+ */
+ @java.lang.Override
+ public int getCH10LD1() {
+ return cH10LD1_;
+ }
+ /**
+ * int32 CH10_LD1 = 12;
+ * @param value The cH10LD1 to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCH10LD1(int value) {
+
+ cH10LD1_ = value;
+ bitField0_ |= 0x00000800;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 CH10_LD1 = 12;
+ * @return This builder for chaining.
+ */
+ public Builder clearCH10LD1() {
+ bitField0_ = (bitField0_ & ~0x00000800);
+ cH10LD1_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int cH11RD1_ ;
+ /**
+ * int32 CH11_RD1 = 13;
+ * @return The cH11RD1.
+ */
+ @java.lang.Override
+ public int getCH11RD1() {
+ return cH11RD1_;
+ }
+ /**
+ * int32 CH11_RD1 = 13;
+ * @param value The cH11RD1 to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCH11RD1(int value) {
+
+ cH11RD1_ = value;
+ bitField0_ |= 0x00001000;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 CH11_RD1 = 13;
+ * @return This builder for chaining.
+ */
+ public Builder clearCH11RD1() {
+ bitField0_ = (bitField0_ & ~0x00001000);
+ cH11RD1_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int cH12S1_ ;
+ /**
+ * int32 CH12_S1 = 14;
+ * @return The cH12S1.
+ */
+ @java.lang.Override
+ public int getCH12S1() {
+ return cH12S1_;
+ }
+ /**
+ * int32 CH12_S1 = 14;
+ * @param value The cH12S1 to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCH12S1(int value) {
+
+ cH12S1_ = value;
+ bitField0_ |= 0x00002000;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 CH12_S1 = 14;
+ * @return This builder for chaining.
+ */
+ public Builder clearCH12S1() {
+ bitField0_ = (bitField0_ & ~0x00002000);
+ cH12S1_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int cH13S2_ ;
+ /**
+ * int32 CH13_S2 = 15;
+ * @return The cH13S2.
+ */
+ @java.lang.Override
+ public int getCH13S2() {
+ return cH13S2_;
+ }
+ /**
+ * int32 CH13_S2 = 15;
+ * @param value The cH13S2 to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCH13S2(int value) {
+
+ cH13S2_ = value;
+ bitField0_ |= 0x00004000;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 CH13_S2 = 15;
+ * @return This builder for chaining.
+ */
+ public Builder clearCH13S2() {
+ bitField0_ = (bitField0_ & ~0x00004000);
+ cH13S2_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int cH14LT_ ;
+ /**
+ * int32 CH14_LT = 16;
+ * @return The cH14LT.
+ */
+ @java.lang.Override
+ public int getCH14LT() {
+ return cH14LT_;
+ }
+ /**
+ * int32 CH14_LT = 16;
+ * @param value The cH14LT to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCH14LT(int value) {
+
+ cH14LT_ = value;
+ bitField0_ |= 0x00008000;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 CH14_LT = 16;
+ * @return This builder for chaining.
+ */
+ public Builder clearCH14LT() {
+ bitField0_ = (bitField0_ & ~0x00008000);
+ cH14LT_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int cH15RT_ ;
+ /**
+ * int32 CH15_RT = 17;
+ * @return The cH15RT.
+ */
+ @java.lang.Override
+ public int getCH15RT() {
+ return cH15RT_;
+ }
+ /**
+ * int32 CH15_RT = 17;
+ * @param value The cH15RT to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCH15RT(int value) {
+
+ cH15RT_ = value;
+ bitField0_ |= 0x00010000;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 CH15_RT = 17;
+ * @return This builder for chaining.
+ */
+ public Builder clearCH15RT() {
+ bitField0_ = (bitField0_ & ~0x00010000);
+ cH15RT_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int isOnline_ ;
+ /**
+ * int32 IsOnline = 18;
+ * @return The isOnline.
+ */
+ @java.lang.Override
+ public int getIsOnline() {
+ return isOnline_;
+ }
+ /**
+ * int32 IsOnline = 18;
+ * @param value The isOnline to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIsOnline(int value) {
+
+ isOnline_ = value;
+ bitField0_ |= 0x00020000;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 IsOnline = 18;
+ * @return This builder for chaining.
+ */
+ public Builder clearIsOnline() {
+ bitField0_ = (bitField0_ & ~0x00020000);
+ isOnline_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:SP_MSP_MK32_Button)
+ }
+
+ // @@protoc_insertion_point(class_scope:SP_MSP_MK32_Button)
+ private static final com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button();
+ }
+
+ public static com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public SP_MSP_MK32_Button parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.bingoorobot.foreignobjectcuttingapp.models.MspMK32.SP_MSP_MK32_Button getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_SP_MSP_MK32_Button_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_SP_MSP_MK32_Button_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+ private static com.google.protobuf.Descriptors.FileDescriptor
+ descriptor;
+ static {
+ java.lang.String[] descriptorData = {
+ "\n\016msp_MK32.proto\"\307\002\n\022SP_MSP_MK32_Button\022" +
+ "\017\n\007RxIndex\030\001 \001(\005\022\020\n\010CH0_RY_H\030\002 \001(\005\022\020\n\010CH" +
+ "1_RY_V\030\003 \001(\005\022\020\n\010CH2_LY_V\030\004 \001(\005\022\020\n\010CH3_LY" +
+ "_H\030\005 \001(\005\022\016\n\006CH4_SA\030\006 \001(\005\022\016\n\006CH5_SB\030\007 \001(\005" +
+ "\022\016\n\006CH6_SC\030\010 \001(\005\022\016\n\006CH7_SD\030\t \001(\005\022\016\n\006CH8_" +
+ "SE\030\n \001(\005\022\016\n\006CH9_SF\030\013 \001(\005\022\020\n\010CH10_LD1\030\014 \001" +
+ "(\005\022\020\n\010CH11_RD1\030\r \001(\005\022\017\n\007CH12_S1\030\016 \001(\005\022\017\n" +
+ "\007CH13_S2\030\017 \001(\005\022\017\n\007CH14_LT\030\020 \001(\005\022\017\n\007CH15_" +
+ "RT\030\021 \001(\005\022\020\n\010IsOnline\030\022 \001(\005B2\n.com.bingoo" +
+ "robot.foreignobjectcuttingapp.modelsP\000b\006" +
+ "proto3"
+ };
+ descriptor = com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ });
+ internal_static_SP_MSP_MK32_Button_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_SP_MSP_MK32_Button_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_SP_MSP_MK32_Button_descriptor,
+ new java.lang.String[] { "RxIndex", "CH0RYH", "CH1RYV", "CH2LYV", "CH3LYH", "CH4SA", "CH5SB", "CH6SC", "CH7SD", "CH8SE", "CH9SF", "CH10LD1", "CH11RD1", "CH12S1", "CH13S2", "CH14LT", "CH15RT", "IsOnline", });
+ descriptor.resolveAllFeaturesImmutable();
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/models/ScrollBottomScrollView.java b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/models/ScrollBottomScrollView.java
new file mode 100644
index 0000000..fcf68f5
--- /dev/null
+++ b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/models/ScrollBottomScrollView.java
@@ -0,0 +1,43 @@
+package com.bingoorobot.foreignobjectcuttingapp.models;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.ScrollView;
+
+public class ScrollBottomScrollView extends ScrollView {
+
+ private OnScrollBottomListener listener;
+ private int calCount;
+
+ public interface OnScrollBottomListener {
+ void scrollToBottom();
+ }
+
+ public void onScrollViewScrollToBottom(OnScrollBottomListener l) {
+ listener = l;
+ }
+
+ public void unRegisterOnScrollViewScrollToBottom() {
+ listener = null;
+ }
+
+ public ScrollBottomScrollView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ @Override
+ protected void onScrollChanged(int l, int t, int oldl, int oldt) {
+ View view = this.getChildAt(0);
+ if (this.getHeight() + this.getScrollY() == view.getHeight()) {
+ calCount++;
+ if (calCount == 1) {
+ if (listener != null) {
+ listener.scrollToBottom();
+ }
+ }
+ } else {
+ calCount = 0;
+ }
+ }
+}
diff --git a/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/CustomProber.java b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/CustomProber.java
new file mode 100644
index 0000000..651b52b
--- /dev/null
+++ b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/CustomProber.java
@@ -0,0 +1,22 @@
+package com.bingoorobot.foreignobjectcuttingapp.services;
+
+import com.hoho.android.usbserial.driver.FtdiSerialDriver;
+import com.hoho.android.usbserial.driver.ProbeTable;
+import com.hoho.android.usbserial.driver.UsbSerialProber;
+
+/**
+ * add devices here, that are not known to DefaultProber
+ *
+ * if the App should auto start for these devices, also
+ * add IDs to app/src/main/res/xml/device_filter.xml
+ */
+public class CustomProber {
+
+ public static UsbSerialProber getCustomProber() {
+ ProbeTable customTable = new ProbeTable();
+ customTable.addProduct(0x1234, 0x0001, FtdiSerialDriver.class); // e.g. device with custom VID+PID
+ customTable.addProduct(0x1234, 0x0002, FtdiSerialDriver.class); // e.g. device with custom VID+PID
+ return new UsbSerialProber(customTable);
+ }
+
+}
diff --git a/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/DataExchangeHelper.java b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/DataExchangeHelper.java
new file mode 100644
index 0000000..065546d
--- /dev/null
+++ b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/DataExchangeHelper.java
@@ -0,0 +1,95 @@
+package com.bingoorobot.foreignobjectcuttingapp.services;
+
+import com.bingoorobot.foreignobjectcuttingapp.models.BspIV;
+import com.bingoorobot.foreignobjectcuttingapp.models.BspPV;
+import com.bingoorobot.foreignobjectcuttingapp.models.DCmd;
+import com.google.protobuf.InvalidProtocolBufferException;
+
+public class DataExchangeHelper {
+
+ public static int[] decodedCH=new int[17];
+ static double slope = 1000.0 / (1950 - 1500);
+ public static int[] getdecodedCH(byte[] receivedData)
+ {
+ for (int i=0; i<16; i++)
+ {
+ decodedCH[i]= ((receivedData[8+i*2] & 0xFF)|(receivedData[9+i*2] & 0xFF) << 8) ;
+ }
+
+ for (int i = 0; i < 16; i++)
+ {
+ decodedCH[i]= (int) Math.round(slope * (decodedCH[i] - 1500));
+ }
+ return decodedCH;
+ }
+
+ public static byte[] getSendPVBytes(BspPV.PV_struct_define _toSendPV) {
+ byte[] byteArray = _toSendPV.toByteArray();
+ byte[] sendbyteArray = new byte[byteArray.length + 4];
+ byte[] sendbyteArray3 = new byte[byteArray.length + 6];
+ if (byteArray.length != 0) {
+ System.arraycopy(byteArray, 0, sendbyteArray, 4, byteArray.length);
+ }
+ sendbyteArray[0] = (byte) 0x55;
+ sendbyteArray[1] = (byte) 0x55;
+ sendbyteArray[2] = (byte) 0x01;
+ sendbyteArray[3] = (byte) 0x01;
+
+ byte[] byteArray2 = ModbusCRC.calculateCRC(sendbyteArray);
+ System.arraycopy(sendbyteArray, 0, sendbyteArray3, 0, sendbyteArray.length);
+ System.arraycopy(byteArray2, 0, sendbyteArray3, sendbyteArray3.length - 2, 2);
+
+ return sendbyteArray3;
+ }
+ public static byte[] getSendD_CMDBytes(DCmd.D_Cmd_struct_define _d_Cmd ) {
+
+ byte[] byteArray = _d_Cmd.toByteArray();
+ byte[] sendbyteArray = new byte[byteArray.length + 4];
+ byte[] sendbyteArray3 = new byte[byteArray.length + 6];
+ if (byteArray.length != 0) {
+ System.arraycopy(byteArray, 0, sendbyteArray, 4, byteArray.length);
+ }
+ sendbyteArray[0] = (byte) 0x55;
+ sendbyteArray[1] = (byte) 0x55;
+ sendbyteArray[2] = (byte) 0x01;
+ sendbyteArray[3] = (byte) 0x01;
+
+ byte[] byteArray2 = ModbusCRC.calculateCRC(sendbyteArray);
+ System.arraycopy(sendbyteArray, 0, sendbyteArray3, 0, sendbyteArray.length);
+ System.arraycopy(byteArray2, 0, sendbyteArray3, sendbyteArray3.length - 2, 2);
+// ttySerialPortHelper.SendData(sendbyteArray3);//SHI 2026.6.2,负压吸附项目,UDP发送;
+ return sendbyteArray3;
+
+
+ }
+ public static BspIV.IV_struct_define getIVByBytes(byte[] data)
+ {
+ byte[] crcbytes = new byte[data.length - 2];
+ System.arraycopy(data, 0, crcbytes, 0, data.length - 2);
+ byte[] crc = ModbusCRC.calculateCRC(crcbytes);
+ // status(bytesToHex(data));
+
+ if (data[data.length - 2] == (byte) (crc[1] & 0xff) && data[data.length - 1] == (byte) (crc[0] & 0xff))
+ {
+
+ if ((data[0] == 0x55) && (data[1] == 0x55))
+ {
+
+ byte[] bytes = new byte[data.length - 4];
+ System.arraycopy(data, 2, bytes, 0, data.length - 4);
+ try
+ {
+ BspIV.IV_struct_define _toReceiveIV = BspIV.IV_struct_define.parseFrom(bytes);
+ return _toReceiveIV;
+ } catch (InvalidProtocolBufferException ex)
+ {
+ return null;
+ }
+
+ }
+ return null;
+ }
+
+ return null;
+ }
+}
diff --git a/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/ErrorDeocdeHelper.java b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/ErrorDeocdeHelper.java
new file mode 100644
index 0000000..926e22a
--- /dev/null
+++ b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/ErrorDeocdeHelper.java
@@ -0,0 +1,28 @@
+package com.bingoorobot.foreignobjectcuttingapp.services;
+
+
+import com.bingoorobot.foreignobjectcuttingapp.models.BspError;
+
+public class ErrorDeocdeHelper {
+ private static String ErrorResult;
+ private static String addErrorResult;
+ public static String ErrorDeocde(int data)
+ {
+ ErrorResult="";
+ for (BspError.ComError err : BspError.ComError.values()) {
+ int bitPosiiton = err.ordinal();
+ // 使用左移操作生成要检查的标志位
+ int bitToCheck = 1 << bitPosiiton;
+
+ // 判断该位置是否有对应的标志位
+ if ((data & bitToCheck) != 0)
+ {
+ ErrorResult += err.toString()+addErrorResult +"\t";
+ } else
+ {
+
+ }
+ }
+ return ErrorResult;
+ }
+}
diff --git a/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/FilpViewHelper.java b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/FilpViewHelper.java
new file mode 100644
index 0000000..782d72a
--- /dev/null
+++ b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/FilpViewHelper.java
@@ -0,0 +1,99 @@
+package com.bingoorobot.foreignobjectcuttingapp.services;
+
+import android.graphics.Matrix;
+import android.media.MediaPlayer;
+import android.os.Bundle;
+import android.view.Surface;
+import android.view.TextureView;
+import android.view.View;
+import android.widget.Toast;
+import androidx.appcompat.app.AppCompatActivity;
+import java.io.IOException;
+
+public class FilpViewHelper extends AppCompatActivity implements TextureView.SurfaceTextureListener {
+
+ private TextureView mVideoTextureView;
+ private MediaPlayer mMediaPlayer;
+ private String Address;
+ private boolean isVerticalFlipped = false;
+ public void startVedio(TextureView VideoTextureView, String address ){
+
+ // 初始化 TextureView 并设置监听器
+ mVideoTextureView =VideoTextureView;
+ mVideoTextureView.setSurfaceTextureListener(this);
+ Address = address;
+ }
+ /**
+ * TextureView 表面就绪时初始化 MediaPlayer
+ */
+ @Override
+ public void onSurfaceTextureAvailable(android.graphics.SurfaceTexture surface, int width, int height) {
+ // 1. 创建 MediaPlayer 实例
+ mMediaPlayer = new MediaPlayer();
+ try {
+ // 2. 设置视频流数据源(仅支持 HTTP/RTSP 等基础协议)
+ mMediaPlayer.setDataSource(Address);
+ // 3. 绑定 Surface(将 TextureView 作为渲染载体)
+ mMediaPlayer.setSurface(new Surface(surface));
+ // 4. 准备播放(异步准备,避免阻塞主线程)
+ mMediaPlayer.prepareAsync();
+ mMediaPlayer.setOnPreparedListener(mp -> {
+ // 准备完成后开始播放
+ mp.start();
+ // 调整视频显示比例(可选)
+
+ });
+ } catch (IOException e) {
+ e.printStackTrace();
+ Toast.makeText(this, "播放失败:" + e.getMessage(), Toast.LENGTH_SHORT).show();
+ }
+ }
+
+ /**
+ * 切换垂直翻转
+ */
+ public void toggleVerticalFlip() {
+ if (mVideoTextureView == null || mVideoTextureView.getWidth() == 0) {
+ return;
+ }
+
+ Matrix matrix = new Matrix();
+ float centerX = mVideoTextureView.getWidth() / 2f;
+ float centerY = mVideoTextureView.getHeight() / 2f;
+
+ if (!isVerticalFlipped) {
+ matrix.setScale(1, -1, centerX, centerY);
+ isVerticalFlipped = true;
+ } else {
+ matrix.setScale(1, 1, centerX, centerY);
+ isVerticalFlipped = false;
+ }
+
+ mVideoTextureView.setTransform(matrix);
+ mVideoTextureView.invalidate();
+ }
+
+ /**
+ * 生命周期管理(必须实现,避免资源泄漏)
+ */
+ @Override
+ protected void onDestroy() {
+ super.onDestroy();
+ if (mMediaPlayer != null) {
+ mMediaPlayer.stop();
+ mMediaPlayer.release();
+ mMediaPlayer = null;
+ }
+ }
+
+ // TextureView.SurfaceTextureListener 其他空实现(必须重写)
+ @Override
+ public void onSurfaceTextureSizeChanged(android.graphics.SurfaceTexture surface, int width, int height) {}
+ @Override
+ public boolean onSurfaceTextureDestroyed(android.graphics.SurfaceTexture surface) { return false; }
+ @Override
+ public void onSurfaceTextureUpdated(android.graphics.SurfaceTexture surface) {}
+
+
+
+}
diff --git a/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/ModbusCRC.java b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/ModbusCRC.java
new file mode 100644
index 0000000..f74c227
--- /dev/null
+++ b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/ModbusCRC.java
@@ -0,0 +1,80 @@
+package com.bingoorobot.foreignobjectcuttingapp.services;
+
+public class ModbusCRC {
+ /**
+ * 计算 Modbus CRC 校验值
+ * @param data 要计算校验值的字节数组
+ * @return CRC 校验值,以 2 字节的数组形式返回
+ */
+ public static byte[] calculateCRC(byte[] data) {
+ int crc = 0xFFFF;
+ for (byte b : data) {
+ crc ^= (b & 0xFF);
+ for (int i = 0; i < 8; i++) {
+ if ((crc & 0x0001) != 0) {
+ crc >>= 1;
+ crc ^= 0xA001;
+ } else {
+ crc >>= 1;
+ }
+ }
+ }
+ // 将 CRC 结果拆分为两个字节
+ byte[] crcBytes = new byte[2];
+ crcBytes[0] = (byte) (crc & 0xFF);
+ crcBytes[1] = (byte) ((crc >> 8) & 0xFF);
+ return crcBytes;
+ }
+
+ public static byte[] calculateCRC16CCITTFALSE(byte[] data) {
+ int crc = 0xFFFF; // 初始值
+
+ for (byte b : data) {
+ crc ^= (b & 0xFF) << 8; // 处理当前字节
+
+ for (int i = 0; i < 8; i++) {
+ if ((crc & 0x8000) != 0) {
+ crc = (crc << 1) ^ 0x1021; // 多项式
+ } else {
+ crc <<= 1;
+ }
+ crc &= 0xFFFF; // 保持16位
+ }
+ }
+
+ byte[] crcBytes = new byte[2];
+ crcBytes[0] = (byte) (crc & 0xFF);
+ crcBytes[1] = (byte) ((crc >> 8) & 0xFF);
+ return crcBytes;
+
+ }
+
+ /**
+ * CRC-16/XMODEM 算法(常用变体)
+ * 初始值: 0x0000, 多项式: 0x1021, 输入输出不反转
+ *
+ * @param data 输入数据字节数组
+ * @return CRC16 校验值 (2字节)
+ */
+ public static byte[] calculateCRC16XMODEM(byte[] data) {
+ int crc = 0x0000; // 初始值
+
+ for (byte b : data) {
+
+ crc ^= (b & 0xFF) << 8; // 处理当前字节
+
+ for (int i = 0; i < 8; i++) {
+ if ((crc & 0x8000) != 0) {
+ crc = (crc << 1) ^ 0x1021; // 多项式
+ } else {
+ crc <<= 1;
+ }
+ crc &= 0xFFFF; // 保持16位
+ }
+ }
+ byte[] crcBytes = new byte[2];
+ crcBytes[0] = (byte) (crc & 0xFF);
+ crcBytes[1] = (byte) ((crc >> 8) & 0xFF);
+ return crcBytes;
+ }
+}
diff --git a/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/MyDataHelper.java b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/MyDataHelper.java
new file mode 100644
index 0000000..d677e0f
--- /dev/null
+++ b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/MyDataHelper.java
@@ -0,0 +1,70 @@
+package com.bingoorobot.foreignobjectcuttingapp.services;
+
+import android.content.ContentValues;
+import android.content.Context;
+import android.database.Cursor;
+import android.database.sqlite.SQLiteDatabase;
+import android.database.sqlite.SQLiteOpenHelper;
+
+import androidx.annotation.Nullable;
+
+import com.bingoorobot.foreignobjectcuttingapp.models.ErrorModel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class MyDataHelper extends SQLiteOpenHelper {
+ public static final String COLUMN_ID = "id";
+ public static final String COLUMN_THICKNESS = "thickness";
+ public static final String TABLE_NAME = "thickness";
+ public static final String TCOLUMN_IMESTAMP = "timestamp";
+ public static final String TCOLUMN_DATE_TIME = "dateTime";
+ /************************************************************************************************/
+ public static final String Error_TABLE_NAME = "error";
+ public static final String Error_COLUMN_TimeStamp = "timeID";
+ public static final String Error_COLUMN_ERROR_INFO = "errorInfo";
+ public MyDataHelper(@Nullable Context context) {
+ super(context, "bingbot.db", null, 6);
+ }
+
+ @Override
+ public void onCreate(SQLiteDatabase db) {
+ String sql = "CREATE TABLE " + TABLE_NAME + "(" +
+ COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT," +
+ TCOLUMN_IMESTAMP + " INTEGER NOT NULL," +
+ COLUMN_THICKNESS + " INTEGER," +
+ TCOLUMN_DATE_TIME + " TEXT" + ")";
+ db.execSQL(sql);
+ }
+ @Override
+ public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
+ db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
+ onCreate(db);
+ }
+
+ public String AddOrUpdateErrorModel(ErrorModel em)
+ {
+ ContentValues cv = new ContentValues();
+ cv.put(Error_COLUMN_TimeStamp,em.getTimeID());
+ cv.put(Error_COLUMN_ERROR_INFO,em.getErrorInfo());
+
+ SQLiteDatabase sqLiteDatabase = this.getWritableDatabase();
+ long insert = sqLiteDatabase.insertWithOnConflict(Error_TABLE_NAME,null,cv,SQLiteDatabase.CONFLICT_REPLACE);
+ sqLiteDatabase.close();
+ if(-1 == insert) {
+ return "failed";
+ }
+ return "success";
+ }
+ //增 删 改 查
+ public String deleteAllFilmThickness() {
+ SQLiteDatabase sqLiteDatabase = this.getWritableDatabase();
+ int delete = sqLiteDatabase.delete(TABLE_NAME, null,
+ null);
+ sqLiteDatabase.close();
+ if (delete == 0) {
+ return "failed";
+ }
+ return "success";
+ }
+}
diff --git a/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/PopupHelper.java b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/PopupHelper.java
new file mode 100644
index 0000000..be70412
--- /dev/null
+++ b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/PopupHelper.java
@@ -0,0 +1,206 @@
+package com.bingoorobot.foreignobjectcuttingapp.services;
+
+import android.app.Dialog;
+import android.text.method.ScrollingMovementMethod;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
+import android.widget.ScrollView;
+import android.widget.TextView;
+import android.widget.Toast;
+import com.bingoorobot.foreignobjectcuttingapp.MainActivity;
+import com.bingoorobot.foreignobjectcuttingapp.R;
+import com.bingoorobot.foreignobjectcuttingapp.models.BspPV;
+import com.bingoorobot.foreignobjectcuttingapp.models.BspError;
+import com.bingoorobot.foreignobjectcuttingapp.models.ScrollBottomScrollView;
+import java.util.List;
+
+public class PopupHelper {
+
+ private MainActivity mainActivity;
+ String result = "1";
+ private String modeStorageTemp = "";
+ public PopupHelper(MainActivity mainActivity) {
+ this.mainActivity = mainActivity;
+ }
+
+ //模式选择弹窗
+ public void Arm_ManualModePopup(View.OnClickListener context) { //模式选择弹窗
+ Dialog dialog = new Dialog(mainActivity);
+ dialog.setContentView(R.layout.manualmodepopup); // 设置自定义布局
+ dialog.setCancelable(true); // 设置点击外部是否关闭弹窗
+ // 获取布局中的视图
+ Button cancelButton = dialog.findViewById(R.id.manualModeCancel);
+ Button confirmButton = dialog.findViewById(R.id.manualModeApply);
+ //获取按钮组
+ RadioGroup radioGroup = (RadioGroup) dialog.findViewById(R.id.manualModeSelectorGroup);
+ //4种模式
+ radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(RadioGroup group, int checkedId) {
+ RadioButton radioButton = (RadioButton) group.findViewById(checkedId);
+ if (radioButton != null) {
+ modeStorageTemp = radioButton.getText().toString();// 暂存选中的模式文字
+ }
+ }
+ });
+ //下次进来保证是选中状态或者未选中
+ String ii = mainActivity.mainBinding.manualModeDisplay.getText().toString();
+ switch (ii) {
+ case "手动": {
+ radioGroup.check(R.id.rb_one);
+ break;
+ }
+ case "竖直": {
+ radioGroup.check(R.id.rb_two);
+ break;
+ }
+ case "水平": {
+ radioGroup.check(R.id.rb_three);
+ break;
+ }
+
+ default:
+ radioGroup.clearCheck();
+ break;
+ }
+ // 设置确定按钮点击事件
+ confirmButton.setOnClickListener(v -> { //手动模式弹窗确认
+ if (radioGroup.getCheckedRadioButtonId() != -1) { //有按钮选中时按确定 更新值
+ //手动模式显示
+ mainActivity._Manual_Mode_Call_Value = modeStorageTemp;
+ mainActivity.mainBinding.manualModeDisplay.setText(mainActivity._Manual_Mode_Call_Value);
+ //自动模式显示
+// mainActivity._Auto_Mode_Call_Value = "未启用";
+// mainActivity.mainBinding.autoModeDisplay.setText(mainActivity._Auto_Mode_Call_Value);
+ if("无".equals(mainActivity._Manual_Mode_Call_Value) || "手动".equals(mainActivity._Manual_Mode_Call_Value))
+ {
+ mainActivity._Auto_Mode_Call_Value = "未启用";
+ }
+ else if(!"0".equals(mainActivity.automodeHeight) || !"0".equals(mainActivity.automodeRadius))
+ {
+ mainActivity._Auto_Mode_Call_Value = "启用";
+ }
+ mainActivity.mainBinding.autoModeDisplay.setText(mainActivity._Auto_Mode_Call_Value);
+ Toast.makeText(mainActivity, "设置成功", Toast.LENGTH_SHORT).show();
+ }
+ dialog.dismiss(); // 关闭弹窗
+ });
+ // 设置取消按钮点击事件
+ cancelButton.setOnClickListener(v -> {
+ Toast.makeText(mainActivity, "点击了取消", Toast.LENGTH_SHORT).show();
+ dialog.dismiss(); // 关闭弹窗
+ });
+ // 显示弹窗
+ dialog.show();
+ }
+
+ // //自动模式弹窗
+ public void AutoModePopup(View.OnClickListener context) {
+ Dialog dialog = new Dialog(mainActivity);
+ dialog.setContentView(R.layout.automodepopup); // 设置自定义布局
+ dialog.setCancelable(true); // 设置点击外部是否关闭弹窗
+ // 获取布局中的视图
+ Button cancelButton = dialog.findViewById(R.id.autoModeCancel);
+ Button confirmButton = dialog.findViewById(R.id.autoModeApply);
+ EditText workRadius_Edit = dialog.findViewById(R.id.radius_input);
+ EditText workHeight_Edit = dialog.findViewById(R.id.height_input);
+ workRadius_Edit.setText(mainActivity.automodeRadius);
+ workHeight_Edit.setText(mainActivity.automodeHeight);
+ RadioGroup radioGroup = (RadioGroup) dialog.findViewById(R.id.autoModeSelectorGroup);
+
+ radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(RadioGroup group, int checkedId) {
+ RadioButton radioButton = (RadioButton) group.findViewById(checkedId);
+ if (radioButton != null) {
+ modeStorageTemp = radioButton.getText().toString();// 暂存选中的模式文字
+ }
+ }
+ });
+ String ii = mainActivity.mainBinding.autoModeDisplay.getText().toString();
+ switch (ii) {
+// case "竖直向左": { radioGroup.check(R.id.rb_five);
+// break;
+// }
+// case "竖直向右": { radioGroup.check(R.id.rb_six);
+// break;
+// }
+// default:
+// radioGroup.clearCheck();//清除选中
+// break;
+ }
+ // 设置确定按钮点击事件
+ confirmButton.setOnClickListener(v -> { //自动模式弹窗确认
+ if (radioGroup.getCheckedRadioButtonId() != -1) {
+
+// mainActivity._Auto_Mode_Call_Value = modeStorageTemp;
+// mainActivity.mainBinding.autoModeDisplay.setText(mainActivity._Auto_Mode_Call_Value);
+
+// mainActivity._Manual_Mode_Call_Value = "无";
+// mainActivity.mainBinding.manualModeDisplay.setText(mainActivity._Manual_Mode_Call_Value);
+ }
+
+ double value1 = 0;
+ double value2 = 0;
+ try {
+ value1 = Double.parseDouble(String.valueOf(workHeight_Edit.getText()));
+ value2 = Double.parseDouble(String.valueOf(workRadius_Edit.getText()));
+ } catch (Exception e) {
+ Toast.makeText(mainActivity, "输入不能为空", Toast.LENGTH_SHORT).show();
+ return;
+ }
+ if (value1 >= 0 && value1 <= 50) {
+ mainActivity.automodeHeight = String.valueOf(value1);
+ } else {
+ Toast.makeText(mainActivity, "请输入0-50的数字", Toast.LENGTH_SHORT).show();
+ workHeight_Edit.setText("0");
+ return;
+ }
+
+ if (value2 >= 0 && value2 <= 50) {
+ mainActivity.automodeRadius = String.valueOf(value2);
+ } else {
+ Toast.makeText(mainActivity, "请输入0-50的数字", Toast.LENGTH_SHORT).show();
+ workRadius_Edit.setText("0");
+ return;
+ }
+
+// if(!"无".equals(mainActivity._Manual_Mode_Call_Value) && !"手动".equals(mainActivity._Manual_Mode_Call_Value))
+// {
+// if(value1 >= 0 && value2 >= 0)
+// {
+// mainActivity.mainBinding.autoModeDisplay.setText("启用");
+// } else
+// {
+// mainActivity.mainBinding.autoModeDisplay.setText("未启用");
+// }
+// } else
+// {
+// mainActivity.mainBinding.autoModeDisplay.setText("未启用");
+// }
+ Toast.makeText(mainActivity, "设置成功", Toast.LENGTH_SHORT).show();
+ dialog.dismiss(); // 关闭弹窗
+ });
+ // 设置取消按钮点击事件
+ cancelButton.setOnClickListener(v -> {
+ Toast.makeText(mainActivity, "点击了取消", Toast.LENGTH_SHORT).show();
+ dialog.dismiss(); // 关闭弹窗
+ });
+ // 显示弹窗
+ dialog.show();
+ }
+
+ public void RobotErrorListPopUp(View.OnClickListener context)
+ {
+ Dialog dialog = new Dialog(mainActivity);
+ dialog.setContentView(R.layout.log_item); // 设置自定义布局
+ dialog.setCancelable(true); // 设置点击外部是否关闭弹窗
+// TextView LogText = dialog.findViewById(R.id.popUpErrorLogTextView);
+// ScrollBottomScrollView LogScrollView = dialog.findViewById(R.id.popUpErrorLogTextView);
+ dialog.show(); // 显示弹窗
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/ReceiivedDataHandler.java b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/ReceiivedDataHandler.java
new file mode 100644
index 0000000..e333678
--- /dev/null
+++ b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/ReceiivedDataHandler.java
@@ -0,0 +1,180 @@
+package com.bingoorobot.foreignobjectcuttingapp.services;
+
+import static com.bingoorobot.foreignobjectcuttingapp.services.ErrorDeocdeHelper.ErrorDeocde;
+
+import android.graphics.Color;
+import android.view.Gravity;
+import android.widget.TextView;
+import android.widget.Toast;
+
+
+import com.bingoorobot.foreignobjectcuttingapp.models.BspIV;
+import com.bingoorobot.foreignobjectcuttingapp.models.ErrorModel;
+import com.google.protobuf.InvalidProtocolBufferException;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.Objects;
+
+public class ReceiivedDataHandler {
+ static String errorLast = "";
+ private static final int Buttons_Not_Reset = 0;
+ private static final int Not_Intialized = 1;
+ private static final int Move_Halt = 2;
+ private static final int Move_Forward = 3;
+ private static final int Move_Backward = 4;
+ private static final int Move_TurnLeft = 5;
+ private static final int Move_TurnRight = 6;
+ private static final int Emergency_Stop = 7;
+ private static final int Upper_Computer_TakenOver = 8;
+ private static final int Sbus_Not_Online = 9;
+ private static final int Android_Down = 10;
+ private static final int Cruise_Ahead = 11;
+ private static final int Cruise_Back = 12;
+ public static long lastReceiveTime = System.currentTimeMillis(); // 上一次收到数据的时间
+
+ public static void midToast(String str, int showTime, com.bingoorobot.foreignobjectcuttingapp.MainActivity MainActivity) {
+ Toast toast = Toast.makeText(MainActivity, str, showTime);
+ toast.setGravity(Gravity.CENTER_VERTICAL | Gravity.CENTER_HORIZONTAL, 0, 0); //设置显示位置
+ TextView v = (TextView) toast.getView().findViewById(android.R.id.message);
+ v.setTextColor(Color.YELLOW); //设置字体颜色
+ toast.show();
+ }
+
+ public static int thickness = 0;
+
+ public static BspIV.IV_struct_define _toReceiveIV_Temp = BspIV.IV_struct_define.newBuilder().build();
+ ;
+ public static BspIV.IV_struct_define _toReceiveIV = BspIV.IV_struct_define.newBuilder().build();
+ ;
+
+ public static void HandleFilmDepthData(com.bingoorobot.foreignobjectcuttingapp.MainActivity MainActivity, byte[] data) {
+ try {
+
+ byte[] crcbytes = new byte[data.length - 2];
+ System.arraycopy(data, 0, crcbytes, 0, data.length - 2);
+ byte[] crc = ModbusCRC.calculateCRC(crcbytes);
+
+ if (data[data.length - 2] != (byte) (crc[0] & 0xff)) return;
+ if (data[data.length - 1] != (byte) (crc[1] & 0xff)) return; //crc校验
+ if ((data[0] != 0x55) && (data[1] != 0x55)) return;//开头结尾为0x55 表示PV数据
+
+ byte[] bytes = new byte[data.length - 4];
+ System.arraycopy(data, 2, bytes, 0, data.length - 4);
+ try {
+ // 1. 包裹字节数组(从 offset 开始,读取 4 字节)
+ ByteBuffer buffer = ByteBuffer.wrap(bytes, 0, 4);
+ // 2. 设置字节序(必须与字节数组的实际字节序一致,否则结果错误)
+ buffer.order(ByteOrder.LITTLE_ENDIAN);
+ // 3. 读取 int 值
+ thickness = buffer.getInt();
+ } catch (Exception ex) {
+ }
+ MainActivity.runOnUiThread(() -> {
+ });
+ } catch ( Exception e) {
+ }
+ }
+ private static int last_received_file_index = 0;
+
+ public static void HandleIVData(com.bingoorobot.foreignobjectcuttingapp.MainActivity MainActivity, byte[] data) {
+ try {
+ byte[] crcbytes = new byte[data.length - 2];
+ System.arraycopy(data, 0, crcbytes, 0, data.length - 2);
+ byte[] crc = ModbusCRC.calculateCRC(crcbytes);
+ //这里的校验和C#的校验正好反了
+ if (data[data.length - 2] != (byte) (crc[1] & 0xff)) return;
+ if (data[data.length - 1] != (byte) (crc[0] & 0xff)) return; //crc校验
+
+ if ((data[0] != 0x55) && (data[1] != 0x55)) return;//开头结尾为0x55 表示PV数据
+ byte[] bytes = new byte[data.length - 4];
+ System.arraycopy(data, 2, bytes, 0, data.length - 4);
+ try {
+ _toReceiveIV_Temp = BspIV.IV_struct_define.parseFrom(bytes);
+ } catch (InvalidProtocolBufferException ex) {
+ return;
+ }
+
+ if (_toReceiveIV_Temp == null) return;
+ _toReceiveIV = _toReceiveIV_Temp;
+
+ lastReceiveTime = System.currentTimeMillis();//收到数据,更新时间
+
+ MainActivity.runOnUiThread(() -> {
+
+ MainActivity.mainBinding.tvSpeedFrom32.setText(String.valueOf(_toReceiveIV.getRobotMoveSpeed()));
+ MainActivity.mainBinding.tvWindSpeedFrom32.setText(String.valueOf(_toReceiveIV.getBlowersPwm()));
+ MainActivity.mainBinding.tvPressureFrom32.setText(String.format("%.1f", _toReceiveIV.getForceValue()));
+ MainActivity.mainBinding.tvAngleFrom32.setText(String.format("%.1f", _toReceiveIV.getCurrentAngle() / 100.00));
+ MainActivity.mainBinding.tvOrientationFrom32.setText(String.format("%.1f", _toReceiveIV.getCurrentDirection() / 100.00));
+ MainActivity.mainBinding.tvAltitudeFrom32.setText(String.valueOf(_toReceiveIV.getCurrentHeight()));
+// // 只有网线通讯,此处不可用,改为时间判断
+// if(0 == _toReceiveIV.getSBUSState())
+// {
+// MainActivity.mainBinding.tvSignal.setText("断开");
+// }else if(1 ==_toReceiveIV.getSBUSState())
+// {
+// MainActivity.mainBinding.tvSignal.setText("已连接");
+// }
+
+
+ int errorInt = _toReceiveIV.getSystemError();//硬件错误
+ String errorString2 = ErrorDeocde(errorInt);
+ String errorString = " # " + unsignedIntToBinaryWithSeparator(errorInt);
+ errorString += " " + toHex4Digits(_toReceiveIV.getLeftMotorErr());
+ errorString += " " + toHex4Digits(_toReceiveIV.getRightMotorErr());
+ if(0 != errorInt || 0 != _toReceiveIV.getLeftMotorErr() || 0 != _toReceiveIV.getRightMotorErr()){
+ if(!Objects.equals(errorLast,errorString)){
+ ErrorModel em = new ErrorModel(System.currentTimeMillis(),errorString);
+ }
+ }
+ });
+ } catch (Exception e) {
+ }
+ }
+ public static void HandleCHData(com.bingoorobot.foreignobjectcuttingapp.MainActivity MainActivity, int[] decodedCH) {
+ try {
+ MainActivity.runOnUiThread(() -> {
+ });
+ } catch (Exception e) {
+ }
+ }
+
+
+ /*
+ 逐位检查并构建二进制字符串
+ */
+ String unsignedIntToBinary(int value) {
+ StringBuilder sb = new StringBuilder(32);
+ for (int i = 7; i >= 0; i--) {
+ sb.append((value & (1 << i)) == 0 ? '0' : '1');
+ }
+ return sb.toString();
+ }
+ /*
+ 逐位检查并构建二进制字符串 每4位添加一个分隔符
+ */
+ static String unsignedIntToBinaryWithSeparator(int value) {
+ StringBuilder sb = new StringBuilder(35);
+ for (int i = 11; i >= 0; i--) {
+ sb.append((value & (1 << i)) == 0 ? '0' : '1');
+ if (i % 4 == 0 && i != 0) {
+ sb.append(' '); // 每4位添加一个分隔符
+ }
+ }
+ return sb.toString();
+ }
+ static String toHex4Digits(int value) {
+ char[] hexChars = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
+ int low16Bits = value & 0xFFFF;
+
+ char[] result = new char[4];
+ result[0] = hexChars[(low16Bits >> 12) & 0xF];
+ result[1] = hexChars[(low16Bits >> 8) & 0xF];
+ result[2] = hexChars[(low16Bits >> 4) & 0xF];
+ result[3] = hexChars[low16Bits & 0xF];
+
+ return new String(result);
+ }
+
+}
diff --git a/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/UDPHelper.java b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/UDPHelper.java
new file mode 100644
index 0000000..9f0cad9
--- /dev/null
+++ b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/UDPHelper.java
@@ -0,0 +1,97 @@
+package com.bingoorobot.foreignobjectcuttingapp.services;
+
+
+
+import java.io.IOException;
+import java.net.DatagramPacket;
+import java.net.DatagramSocket;
+import java.net.InetAddress;
+import java.util.logging.Handler;
+
+
+public class UDPHelper {
+
+
+ private static com.bingoorobot.foreignobjectcuttingapp.MainActivity MainActivity;
+ private static Thread receiveThread;
+ private static boolean running = false;
+ private static DatagramSocket sendSocket;
+ private static DatagramSocket receiveSocket;
+ private static Handler handler;// = new Handler(Looper.getMainLooper());
+ private static String target_ip;
+ private static int target_port;
+ private static int listening_port;
+
+ public static void Intialize(com.bingoorobot.foreignobjectcuttingapp.MainActivity mainActivity, String targetip, int targetPort, int listentingPort) {
+ try {
+ MainActivity = mainActivity;
+ target_ip = targetip;
+ target_port = targetPort;
+ listening_port = listentingPort;
+ sendSocket = new DatagramSocket(10000);
+ //sendSocket.setBroadcast(true);
+
+ running = true;
+ receiveSocket = new DatagramSocket(listening_port);
+ receiveSocket.setBroadcast(true);
+ running = true;
+
+
+ receiveThread = new Thread(() -> {
+ byte[] buffer = new byte[1024];
+ DatagramPacket packet = new DatagramPacket(buffer, buffer.length);
+
+ while (running) {
+ try {
+ receiveSocket.receive(packet);
+ byte[] receivedArray = new byte[packet.getLength()];
+ System.arraycopy( packet.getData(), 0, receivedArray, 0, receivedArray.length);
+ ReceiivedDataHandler.HandleIVData(MainActivity, receivedArray);
+
+ } catch (IOException e) {
+ if (running) {
+
+ }
+ }
+ }
+ });
+ receiveThread.start();
+ } catch (IOException e) {
+ // tvOutput.setText("Socket error: " + e.getMessage());
+ }
+ }
+
+ public static void SendData(byte[] buffer) {
+ MainActivity.runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+
+ new Thread(() ->
+ {
+ DatagramSocket socket = null;
+ try {
+ InetAddress address = InetAddress.getByName(target_ip);
+ DatagramPacket packet = new DatagramPacket(buffer, buffer.length, address, target_port);
+ sendSocket.send(packet);
+ } catch (Exception e)
+ {
+
+
+ }
+ }).start();
+ }});
+
+
+ }
+
+ public static void Destroy() {
+ running = false;
+ if (receiveSocket != null && !receiveSocket.isClosed()) {
+ receiveSocket.close();
+ }
+ if (sendSocket != null && !sendSocket.isClosed()) {
+ sendSocket.close();
+ }
+ }
+
+}
diff --git a/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/VideoPlayerHelper.java b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/VideoPlayerHelper.java
new file mode 100644
index 0000000..3d7edd8
--- /dev/null
+++ b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/VideoPlayerHelper.java
@@ -0,0 +1,59 @@
+package com.bingoorobot.foreignobjectcuttingapp.services;
+
+import cn.nodemedia.NodePlayer;
+import cn.nodemedia.NodePlayerView;
+
+import android.graphics.Matrix;
+import android.os.Build;
+import android.view.TextureView;
+
+public class VideoPlayerHelper {
+
+ public static void startVedio(NodePlayerView nodePlayerView, NodePlayer nodePlayer,String address ){
+
+ nodePlayerView.setRenderType(NodePlayerView.RenderType.SURFACEVIEW);//设置渲染器类型
+ nodePlayerView.setUIViewContentMode(NodePlayerView.UIViewContentMode.ScaleToFill);//设置视频画面缩放模式
+ nodePlayer.setPlayerView(nodePlayerView);//设置播放视图
+ //设置RTSP流使用的传输协议,支持的模式有:
+ nodePlayer.setRtspTransport(NodePlayer.RTSP_TRANSPORT_TCP);//设置传输
+// nodePlayer.setRtspTransport(NodePlayer.RTSP_TRANSPORT_UDP);//设置UDP传输(花屏)
+ nodePlayer.setInputUrl(address);// 设置视频流地址
+ nodePlayer.setVideoEnable(true);//设置视频启用
+ nodePlayer.setHWEnable(true);// 启用硬件加速
+// nodePlayer.setBufferTime(100);//设置缓冲时间
+// nodePlayer.setMaxBufferTime(200);//设置最大缓冲时间
+ nodePlayer.setBufferTime(0);//设置缓冲时间
+ nodePlayer.setMaxBufferTime(20);//设置最大缓冲时间
+ nodePlayer.start();
+
+ }
+
+ /**
+ * 切换垂直翻转状态(翻转/恢复原始画面)
+ */
+ public static void toggleVerticalFlip(NodePlayerView mNodePlayerView) {
+ // 1. 获取/重置变换矩阵(基于官方 NodePlayerView 的 View 父类方法)
+ Matrix transformMatrix = new Matrix();
+ transformMatrix =mNodePlayerView.getMatrix();
+ //mNodePlayerView.getTransform(transformMatrix);
+ transformMatrix.reset();
+
+ // 2. 获取 NodePlayerView 中心坐标(锚点),避免翻转后画面偏移
+ float centerX = mNodePlayerView.getWidth() / 2f;
+ float centerY = mNodePlayerView.getHeight() / 2f;
+
+ // 3. 执行垂直翻转:Y轴缩放为-1(上下镜像),以中心为锚点
+ transformMatrix.setScale(1, -1, centerX, centerY);
+
+// // 4. 恢复原始画面:重置为单位矩阵(无变换)
+// transformMatrix.setScale(1, 1, centerX, centerY);
+
+ // 5. 应用变换矩阵到官方 NodePlayerView(核心步骤,立即生效)
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
+ mNodePlayerView.setAnimationMatrix(transformMatrix);
+ }
+ // 6. 刷新视图,确保变换无延迟
+ mNodePlayerView.invalidate();
+ }
+}
+
diff --git a/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/WebViewHelper.java b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/WebViewHelper.java
new file mode 100644
index 0000000..5a6ee08
--- /dev/null
+++ b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/WebViewHelper.java
@@ -0,0 +1,25 @@
+package com.bingoorobot.foreignobjectcuttingapp.services;
+
+import android.webkit.WebSettings;
+import android.webkit.WebView;
+import android.webkit.WebViewClient;
+
+public class WebViewHelper {
+ public static void IntializeAndLoadUrl(WebView webView, String Url)
+ {
+// 基础设置
+ WebSettings webSettings = webView.getSettings();
+
+ webSettings.setUseWideViewPort(true); // 支持 viewport meta 标签,对缩放很重要:cite[2]:cite[6]
+ webSettings.setLoadWithOverviewMode(true); // 初始缩放至屏幕宽:cite[8]
+ webSettings.setSupportZoom(true); // 支持缩放:cite[2]:cite[3]:cite[6]
+ webSettings.setBuiltInZoomControls(true); // 启用内置缩放控件:cite[2]:cite[3]:cite[6]
+ webSettings.setDisplayZoomControls(false); // 隐藏默认缩放控件(可选):cite[2]:cite[6]
+// 设置初始缩放比例为 25%
+ webView.setInitialScale(100); // 这将使网页内容初始缩小显示:cite[2]:cite[6]:cite[7]
+ //处理链接跳转(在 WebView 内打开)
+ webView.setWebViewClient(new WebViewClient());
+ // 加载网页
+ webView.loadUrl(Url);
+ }
+}
diff --git a/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/ttySerialPortHelper.java b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/ttySerialPortHelper.java
new file mode 100644
index 0000000..5095fcd
--- /dev/null
+++ b/app/src/main/java/com/bingoorobot/foreignobjectcuttingapp/services/ttySerialPortHelper.java
@@ -0,0 +1,112 @@
+package com.bingoorobot.foreignobjectcuttingapp.services;
+
+import android.util.Log;
+
+
+import com.bingoorobot.foreignobjectcuttingapp.MainActivity;
+import com.bingoorobot.foreignobjectcuttingapp.models.BspPV;
+import com.bingoorobot.foreignobjectcuttingapp.models.DCmd;
+import com.bingoorobot.foreignobjectcuttingapp.models.MspMK32;
+
+import android_serialport_api.SerialPortFinder;
+import tp.xmaihh.serialport.SerialHelper;
+import tp.xmaihh.serialport.bean.ComBean;
+public class ttySerialPortHelper {
+ public static com.bingoorobot.foreignobjectcuttingapp.MainActivity MainActivity;
+ private static final String TAG = "ttySerialPortHelper";
+ public static boolean IsAllDataSendBack = false;
+ public static boolean IsAReadAllData = false;
+ public static SerialHelper serialHelper;
+ private static SerialPortFinder serialPortFinder;
+ public static DCmd.D_Cmd_struct_define _d_Cmd = DCmd.D_Cmd_struct_define.newBuilder().build();
+ private static MspMK32.SP_MSP_MK32_Button _mk32Button = MspMK32.SP_MSP_MK32_Button.newBuilder().build();
+ private static int index_counter = 0;
+ final String[] ports = serialPortFinder.getAllDevicesPath();
+ final String[] botes = new String[]{"0", "50", "75", "110", "134", "150", "200", "300", "600", "1200", "1800", "2400", "4800", "9600", "19200", "38400", "57600", "115200", "230400", "460800", "500000", "576000", "921600", "1000000", "1152000", "1500000", "2000000", "2500000", "3000000", "3500000", "4000000", "CUSTOM"};
+ final String[] databits = new String[]{"8", "7", "6", "5"};
+ final String[] paritys = new String[]{"NONE", "ODD", "EVEN", "SPACE", "MARK"};
+ final String[] stopbits = new String[]{"1", "2"};
+ final String[] flowcons = new String[]{"NONE", "RTS/CTS", "XON/XOFF"};
+
+ public static volatile int CH1RYV;
+
+ public static void Open() {
+ try {
+ serialHelper = new SerialHelper("dev/ttyHS0", 115200)//MK32
+ {
+ @Override
+ protected void onDataReceived(ComBean comBean) {
+
+ MainActivity.runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ IsAllDataSendBack = true;
+
+ index_counter++;
+ // 更新 UI 的代码
+ byte[] receivedData = comBean.bRec;
+
+ //校验???
+ if (receivedData[0] != 0x55 || receivedData[1] != 0x66 || receivedData.length != 42) {
+ return;
+ }
+ // ReceiivedDataHandler.HandleIVData(MainActivity,receivedData);
+ int[] decodedCH = DataExchangeHelper.getdecodedCH(receivedData);
+
+ _mk32Button= _mk32Button.toBuilder().
+ setCH0RYH(decodedCH[0]).
+ setCH1RYV(decodedCH[1]).
+ setCH2LYV(decodedCH[2]).
+ setCH3LYH(decodedCH[3]).
+ setCH4SA(decodedCH[4]).
+ setCH5SB(decodedCH[5]).
+ setCH6SC(decodedCH[6]).
+ setCH7SD(decodedCH[7]).
+ setCH8SE(decodedCH[8]).
+ setCH9SF(decodedCH[9]).
+ setCH10LD1(decodedCH[10]).
+ setCH11RD1(decodedCH[11]).
+ setCH12S1(decodedCH[12]).
+ setCH13S2(decodedCH[13]).
+ setCH14LT(decodedCH[14]).
+ setCH15RT(decodedCH[15]).
+ setIsOnline(1).
+ setRxIndex(index_counter).build();
+
+ _d_Cmd= _d_Cmd.toBuilder().setToSendPV(com.bingoorobot.foreignobjectcuttingapp.MainActivity._toSendPV).
+ setMk32CMD(_mk32Button).
+ build();
+ UDPHelper.SendData(DataExchangeHelper.getSendD_CMDBytes(ttySerialPortHelper._d_Cmd));//直接转发
+
+ CH1RYV = decodedCH[1]; // 卷线电机开关通道,
+
+ }
+ });
+ }
+ };
+ serialHelper.open();
+ } catch (Exception exception) {
+ Log.d(TAG, "Data Received");
+ }
+ }
+ private static int index = 0;
+ public static void SendData(byte[] data) {
+ if (serialHelper != null && serialHelper.isOpen()) { // 先判断串口是否打开
+ serialHelper.send(data); // 发送byte[]
+ }
+ }
+ //55 66 01 01 00 00 00 42 06 31 80
+ public static byte[] getAllChData_4Hz = new byte[]{0x55, 0x66, 0x01, 0x01, 0x00, 0x00, 0x00, 0x42, 0x02, (byte) (0xB5 & 0xff), (byte) (0xC0 & 0xff)};
+ public static byte[] getAllChData_5Hz = new byte[]{0x55, 0x66, 0x01, 0x01, 0x00, 0x00, 0x00, 0x42, 0x03, (byte) (0x94 & 0xff), (byte) (0xD0 & 0xff)};
+ public static byte[] getAllChData_10Hz = new byte[]{0x55, 0x66, 0x01, 0x01, 0x00, 0x00, 0x00, 0x42, 0x04, (byte) (0x73 & 0xff), (byte) (0xA0 & 0xff)};
+ public static byte[] getAllChData_20Hz = new byte[]{0x55, 0x66, 0x01, 0x01, 0x00, 0x00, 0x00, 0x42, 0x05, (byte) (0x52 & 0xff), (byte) (0xb0 & 0xff)};
+ public static byte[] getAllChData_50Hz = new byte[]{0x55, 0x66, 0x01, 0x01, 0x00, 0x00, 0x00, 0x42, 0x06, (byte) (0x31 & 0xff), (byte) (0x80 & 0xff)};
+ public static byte[] stopgetAllChData = new byte[]{0x55, 0x66, 0x01, 0x01, 0x00, 0x00, 0x00, 0x42, 0x00, (byte) (0xf7 & 0xff), (byte) (0xe0 & 0xff)};
+ public static void sendTxt(String sTxt) {
+ serialHelper.sendTxt(sTxt); // 发送byte[]
+ }
+ public static void onDestroy() {
+ serialHelper.close();
+ }
+
+}
diff --git a/app/src/main/java/generate_Csharp.bat b/app/src/main/java/generate_Csharp.bat
new file mode 100644
index 0000000..76f0ecc
--- /dev/null
+++ b/app/src/main/java/generate_Csharp.bat
@@ -0,0 +1 @@
+protoc --csharp_out=. *.proto
\ No newline at end of file
diff --git a/app/src/main/java/generate_java.bat b/app/src/main/java/generate_java.bat
new file mode 100644
index 0000000..59085ae
--- /dev/null
+++ b/app/src/main/java/generate_java.bat
@@ -0,0 +1 @@
+ protoc --java_out . *.proto
diff --git a/app/src/main/java/msp_MK32.proto b/app/src/main/java/msp_MK32.proto
new file mode 100644
index 0000000..f6f6d18
--- /dev/null
+++ b/app/src/main/java/msp_MK32.proto
@@ -0,0 +1,25 @@
+syntax = "proto3";
+option java_multiple_files = false;
+option java_package = "com.bingoorobot.foreignobjectcuttingapp.models";
+
+message SP_MSP_MK32_Button {
+ int32 RxIndex= 1;
+ int32 CH0_RY_H= 2;
+ int32 CH1_RY_V= 3;
+ int32 CH2_LY_V= 4;
+ int32 CH3_LY_H= 5;
+ int32 CH4_SA= 6;
+ int32 CH5_SB= 7;
+ int32 CH6_SC= 8;
+ int32 CH7_SD= 9;
+ int32 CH8_SE= 10;
+ int32 CH9_SF= 11;
+ int32 CH10_LD1= 12;
+ int32 CH11_RD1= 13;
+ int32 CH12_S1= 14;
+ int32 CH13_S2= 15;
+ int32 CH14_LT= 16;
+ int32 CH15_RT= 17;
+ int32 IsOnline= 18;
+ }
+
diff --git a/app/src/main/java/protoc.exe b/app/src/main/java/protoc.exe
new file mode 100644
index 0000000..f1ffb02
Binary files /dev/null and b/app/src/main/java/protoc.exe differ
diff --git a/app/src/main/res/drawable/background.xml b/app/src/main/res/drawable/background.xml
new file mode 100644
index 0000000..9c77c74
--- /dev/null
+++ b/app/src/main/res/drawable/background.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/bgr.png b/app/src/main/res/drawable/bgr.png
new file mode 100644
index 0000000..4d6154f
Binary files /dev/null and b/app/src/main/res/drawable/bgr.png differ
diff --git a/app/src/main/res/drawable/bigackground.png b/app/src/main/res/drawable/bigackground.png
new file mode 100644
index 0000000..8466de6
Binary files /dev/null and b/app/src/main/res/drawable/bigackground.png differ
diff --git a/app/src/main/res/drawable/blue_rounded_rectangle.xml b/app/src/main/res/drawable/blue_rounded_rectangle.xml
new file mode 100644
index 0000000..81841b0
--- /dev/null
+++ b/app/src/main/res/drawable/blue_rounded_rectangle.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/border.xml b/app/src/main/res/drawable/border.xml
new file mode 100644
index 0000000..4f76948
--- /dev/null
+++ b/app/src/main/res/drawable/border.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/borderblue.xml b/app/src/main/res/drawable/borderblue.xml
new file mode 100644
index 0000000..ca7bf05
--- /dev/null
+++ b/app/src/main/res/drawable/borderblue.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/borderbluegreen.xml b/app/src/main/res/drawable/borderbluegreen.xml
new file mode 100644
index 0000000..25d3346
--- /dev/null
+++ b/app/src/main/res/drawable/borderbluegreen.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/bordergreen.xml b/app/src/main/res/drawable/bordergreen.xml
new file mode 100644
index 0000000..ceb3020
--- /dev/null
+++ b/app/src/main/res/drawable/bordergreen.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/borderlog.xml b/app/src/main/res/drawable/borderlog.xml
new file mode 100644
index 0000000..1a1b34c
--- /dev/null
+++ b/app/src/main/res/drawable/borderlog.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/borderorange.xml b/app/src/main/res/drawable/borderorange.xml
new file mode 100644
index 0000000..9451689
--- /dev/null
+++ b/app/src/main/res/drawable/borderorange.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/borderwhite.xml b/app/src/main/res/drawable/borderwhite.xml
new file mode 100644
index 0000000..e013ef8
--- /dev/null
+++ b/app/src/main/res/drawable/borderwhite.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/buttonborderwhite.xml b/app/src/main/res/drawable/buttonborderwhite.xml
new file mode 100644
index 0000000..ec98fab
--- /dev/null
+++ b/app/src/main/res/drawable/buttonborderwhite.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/dash_line.xml b/app/src/main/res/drawable/dash_line.xml
new file mode 100644
index 0000000..c83a8c5
--- /dev/null
+++ b/app/src/main/res/drawable/dash_line.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/divider.xml b/app/src/main/res/drawable/divider.xml
new file mode 100644
index 0000000..f54ce33
--- /dev/null
+++ b/app/src/main/res/drawable/divider.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 0000000..07d5da9
--- /dev/null
+++ b/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml
new file mode 100644
index 0000000..2b068d1
--- /dev/null
+++ b/app/src/main/res/drawable/ic_launcher_foreground.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/orange_rounded_rectangle.xml b/app/src/main/res/drawable/orange_rounded_rectangle.xml
new file mode 100644
index 0000000..6545563
--- /dev/null
+++ b/app/src/main/res/drawable/orange_rounded_rectangle.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/radio_button_selected.xml b/app/src/main/res/drawable/radio_button_selected.xml
new file mode 100644
index 0000000..c745d8c
--- /dev/null
+++ b/app/src/main/res/drawable/radio_button_selected.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/radio_button_textcolor.xml b/app/src/main/res/drawable/radio_button_textcolor.xml
new file mode 100644
index 0000000..9fe93c7
--- /dev/null
+++ b/app/src/main/res/drawable/radio_button_textcolor.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/radio_button_unselected.xml b/app/src/main/res/drawable/radio_button_unselected.xml
new file mode 100644
index 0000000..ccb6bf8
--- /dev/null
+++ b/app/src/main/res/drawable/radio_button_unselected.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/radiobutton_background.xml b/app/src/main/res/drawable/radiobutton_background.xml
new file mode 100644
index 0000000..6eb6a48
--- /dev/null
+++ b/app/src/main/res/drawable/radiobutton_background.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/rounded_edittext.xml b/app/src/main/res/drawable/rounded_edittext.xml
new file mode 100644
index 0000000..9f845ce
--- /dev/null
+++ b/app/src/main/res/drawable/rounded_edittext.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/smallbackground.png b/app/src/main/res/drawable/smallbackground.png
new file mode 100644
index 0000000..1f6f84f
Binary files /dev/null and b/app/src/main/res/drawable/smallbackground.png differ
diff --git a/app/src/main/res/drawable/squrelogo.png b/app/src/main/res/drawable/squrelogo.png
new file mode 100644
index 0000000..f7cafaf
Binary files /dev/null and b/app/src/main/res/drawable/squrelogo.png differ
diff --git a/app/src/main/res/drawable/submenu.xml b/app/src/main/res/drawable/submenu.xml
new file mode 100644
index 0000000..64f9e41
--- /dev/null
+++ b/app/src/main/res/drawable/submenu.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/font/font_you_yuan.ttf b/app/src/main/res/font/font_you_yuan.ttf
new file mode 100644
index 0000000..0d6e9c2
Binary files /dev/null and b/app/src/main/res/font/font_you_yuan.ttf differ
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..4c23489
--- /dev/null
+++ b/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,714 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/automodepopup.xml b/app/src/main/res/layout/automodepopup.xml
new file mode 100644
index 0000000..72e119b
--- /dev/null
+++ b/app/src/main/res/layout/automodepopup.xml
@@ -0,0 +1,214 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/log_item.xml b/app/src/main/res/layout/log_item.xml
new file mode 100644
index 0000000..f6397a4
--- /dev/null
+++ b/app/src/main/res/layout/log_item.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/manualmodepopup.xml b/app/src/main/res/layout/manualmodepopup.xml
new file mode 100644
index 0000000..c2909ca
--- /dev/null
+++ b/app/src/main/res/layout/manualmodepopup.xml
@@ -0,0 +1,143 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..6f3b755
--- /dev/null
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 0000000..6f3b755
--- /dev/null
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp
new file mode 100644
index 0000000..c209e78
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..b2dfe3d
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp
new file mode 100644
index 0000000..4f0f1d6
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..62b611d
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
new file mode 100644
index 0000000..948a307
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..1b9a695
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
new file mode 100644
index 0000000..28d4b77
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..9287f50
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
new file mode 100644
index 0000000..aa7d642
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..9126ae3
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml
new file mode 100644
index 0000000..b228900
--- /dev/null
+++ b/app/src/main/res/values-night/themes.xml
@@ -0,0 +1,16 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..a592923
--- /dev/null
+++ b/app/src/main/res/values/colors.xml
@@ -0,0 +1,165 @@
+
+
+ #FF000000
+ #FFFFFFFF
+ #FFFFFFFF
+
+ #3F51B5
+ #303F9F
+ #FF4081
+
+
+ #FBE5D6
+ #1F4E79
+ #00ACFC
+ #DEEBF7
+ #FBE5D6
+ #FF713D
+ #001E54
+ #00194d
+ #00ADFC
+
+
+ #fffafa
+ #fffaf0
+ #ffebcd
+ #f8f8ff
+ #f5f5f5
+ #faebd7
+ #ffdead
+ #808080
+ #dcdcdc
+ #d3d3d3
+ #a9a9a9
+ #696969
+ #708090
+ #778899
+ #2f4f4f
+ #c0c0c0
+
+ #ff0000
+ #8b0000
+ #dc143c
+ #8b008b
+ #ff00ff
+ #ff6347
+ #f08080
+ #e9967a
+ #ffdab9
+ #dda0dd
+ #ffc0cb
+ #ffb6c1
+ #ff1493
+ #ff69b4
+ #fff0f5
+ #cd5c5c
+ #bc8f8f
+ #b22222
+ #800000
+ #f0fff0
+ #ff4500
+ #ffa500
+ #32cd32
+ #00ff00
+ #ffff00
+ #f5deb3
+ #f0e68c
+ #deb887
+ #ffe4c4
+ #ffffe0
+ #b8860b
+ #ff8c00
+ #fafad2
+ #fffacd
+ #fff8dc
+ #fff5ee
+ #ffefd5
+ #ffe4e1
+ #ffe4b5
+ #fffff0
+ #ffd700
+ #daa520
+ #ffa07a
+ #ff7f50
+ #f5fffa
+ #f5f5dc
+ #f4a460
+ #fdf5e6
+ #faf0e6
+ #fa8072
+ #d8bfd8
+ #d2b48c
+ #d2691e
+ #cd853f
+ #bdb76b
+ #eee8aa
+ #a52a2a
+ #8b4513
+ #a0522d
+ #808000
+ #7fff00
+ #adff2f
+ #008000
+ #006400
+ #556b2f
+ #6b8e23
+ #7cfc00
+ #228b22
+ #7fffd4
+ #afeeee
+ #98fb98
+ #48d1cc
+ #66cdaa
+ #00ffff
+ #00ff7f
+ #00fa9a
+ #00ced1
+ #2e8b57
+ #90ee90
+ #8fbc8f
+ #40e0d0
+ #00ffff
+ #008b8b
+ #e0ffff
+ #008080
+ #4b0082
+ #0000ff
+ #00008b
+ #0000cd
+ #191970
+ #000080
+ #4169e1
+ #f0ffff
+ #87ceeb
+ #00bfff
+ #87cefa
+ #20b2aa
+ #add8e6
+ #b0e0e6
+ #f0f8ff
+ #7b68ee
+ #6a5acd
+ #483d8b
+ #3cb371
+ #4682b4
+ #b0c4de
+ #6495ed
+ #1e90ff
+ #5f9ea0
+ #8a2be2
+ #800080
+ #e6e6fa
+ #da70d6
+ #9370db
+ #9932cc
+ #ee82ee
+ #c71585
+ #db7093
+ #9400d3
+ #ba55d3
+ #00000000
+
+ #6efe00
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..a9f8aab
--- /dev/null
+++ b/app/src/main/res/values/strings.xml
@@ -0,0 +1,12 @@
+
+ 负压吸附1.2
+ 状\u3000态
+ 速\u3000度
+ 风\u3000速
+ 压\u3000力
+ 角\u3000度
+ 方\u3000向
+ 高\u3000度
+ 手动\n模式
+ 20
+
\ No newline at end of file
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
new file mode 100644
index 0000000..38cfb14
--- /dev/null
+++ b/app/src/main/res/values/themes.xml
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/xml/backup_rules.xml b/app/src/main/res/xml/backup_rules.xml
new file mode 100644
index 0000000..fa0f996
--- /dev/null
+++ b/app/src/main/res/xml/backup_rules.xml
@@ -0,0 +1,13 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/xml/data_extraction_rules.xml b/app/src/main/res/xml/data_extraction_rules.xml
new file mode 100644
index 0000000..9ee9997
--- /dev/null
+++ b/app/src/main/res/xml/data_extraction_rules.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/xml/device_filter.xml b/app/src/main/res/xml/device_filter.xml
new file mode 100644
index 0000000..b2a252c
--- /dev/null
+++ b/app/src/main/res/xml/device_filter.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/test/java/com/bingoorobot/foreignobjectcuttingapp/ExampleUnitTest.java b/app/src/test/java/com/bingoorobot/foreignobjectcuttingapp/ExampleUnitTest.java
new file mode 100644
index 0000000..d69e9aa
--- /dev/null
+++ b/app/src/test/java/com/bingoorobot/foreignobjectcuttingapp/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package com.bingoorobot.foreignobjectcuttingapp;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see Testing documentation
+ */
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() {
+ assertEquals(4, 2 + 2);
+ }
+}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..ea2bb78
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,4 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+plugins {
+id 'com.android.application' version '8.2.2' apply false
+}
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..72611fe
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,23 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+# AndroidX package structure to make it clearer which packages are bundled with the
+# Android operating system, and which are packaged with your app's APK
+# https://developer.android.com/topic/libraries/support-library/androidx-rn
+android.useAndroidX=true
+# Enables namespacing of each library's R class so that its R class includes only the
+# resources declared in the library itself and none from the library's dependencies,
+# thereby reducing the size of the R class for that library
+android.nonTransitiveRClass=true
+
+android.enableJetifier=true
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..e708b1c
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..ba4e821
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Sat Aug 23 10:02:51 CST 2025
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
new file mode 100644
index 0000000..4f906e0
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,185 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=`expr $i + 1`
+ done
+ case $i in
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=`save "$@"`
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..107acd3
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,89 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/local.properties b/local.properties
new file mode 100644
index 0000000..1b1a619
--- /dev/null
+++ b/local.properties
@@ -0,0 +1,8 @@
+## This file must *NOT* be checked into Version Control Systems,
+# as it contains information specific to your local configuration.
+#
+# Location of the SDK. This is only used by Gradle.
+# For customization when using a Version Control System, please read the
+# header note.
+#Wed May 27 16:58:43 CST 2026
+sdk.dir=D\:\\Program Files\\Android\\Sdk
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..f1dbb7d
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,18 @@
+pluginManagement {
+ repositories {
+ google()
+ mavenCentral()
+ gradlePluginPortal()
+ }
+}
+dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
+ repositories {
+ google()
+ mavenCentral()
+ maven { url 'https://jitpack.io' }
+ }
+}
+
+rootProject.name = "Negative_Pressure_AppV1.2"
+include ':app'