Skip to content

Commit 1fbf500

Browse files
committed
override toString() method for key tlv packets.
1 parent b099f49 commit 1fbf500

File tree

8 files changed

+116
-1
lines changed

8 files changed

+116
-1
lines changed

ClientLib/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ext {
44
VERSION_MAJOR = 2
55
VERSION_MINOR = 7
66
VERSION_PATCH = 0
7-
VERSION_SUFFIX = "beta3"
7+
VERSION_SUFFIX = "beta4"
88

99
PUBLISH_ARTIFACT_ID = 'dronekit-android'
1010
PUBLISH_VERSION = generateVersionName("", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH, VERSION_SUFFIX)

ClientLib/src/main/java/com/o3dr/services/android/lib/drone/companion/solo/tlv/ControllerMessageInputReport.java

+10
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,14 @@ public ControllerMessageInputReport[] newArray(int size) {
7272
return new ControllerMessageInputReport[size];
7373
}
7474
};
75+
76+
@Override
77+
public String toString() {
78+
return "ControllerMessageInputReport{" +
79+
"battery=" + battery +
80+
", timestamp=" + timestamp +
81+
", gimbalY=" + gimbalY +
82+
", gimbalRate=" + gimbalRate +
83+
'}';
84+
}
7585
}

ClientLib/src/main/java/com/o3dr/services/android/lib/drone/companion/solo/tlv/SoloGoproSetExtendedRequest.java

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.os.Parcel;
44

55
import java.nio.ByteBuffer;
6+
import java.util.Arrays;
67

78
/**
89
* Created by chavi on 11/16/15.
@@ -53,4 +54,11 @@ public SoloGoproSetExtendedRequest[] newArray(int size) {
5354
}
5455
};
5556

57+
@Override
58+
public String toString() {
59+
return "SoloGoproSetExtendedRequest{" +
60+
"command=" + command +
61+
", values=" + Arrays.toString(values) +
62+
'}';
63+
}
5664
}

ClientLib/src/main/java/com/o3dr/services/android/lib/drone/companion/solo/tlv/SoloGoproSetRequest.java

+8
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,12 @@ public SoloGoproSetRequest[] newArray(int size) {
6666
return new SoloGoproSetRequest[size];
6767
}
6868
};
69+
70+
@Override
71+
public String toString() {
72+
return "SoloGoproSetRequest{" +
73+
"command=" + command +
74+
", value=" + value +
75+
'}';
76+
}
6977
}

ClientLib/src/main/java/com/o3dr/services/android/lib/drone/companion/solo/tlv/SoloGoproState.java

+37
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,43 @@ protected SoloGoproState(Parcel in) {
410410
this.extra5 = (short) in.readInt();
411411
}
412412

413+
@Override
414+
public String toString() {
415+
return "SoloGoproState{" +
416+
"batteryRemaining=" + batteryRemaining +
417+
", version=" + version +
418+
", model=" + model +
419+
", status=" + status +
420+
", recording=" + recording +
421+
", captureMode=" + captureMode +
422+
", fov=" + fov +
423+
", videoResolution=" + videoResolution +
424+
", fps=" + fps +
425+
", whiteBalance=" + whiteBalance +
426+
", proTune=" + proTune +
427+
", videoExposure=" + videoExposure +
428+
", photoResolution=" + photoResolution +
429+
", photoExposure=" + photoExposure +
430+
", ntsc_pal=" + ntsc_pal +
431+
", lowLight=" + lowLight +
432+
", spotMeter=" + spotMeter +
433+
", photoRemaining=" + photoRemaining +
434+
", photoTaken=" + photoTaken +
435+
", videoRemaining=" + videoRemaining +
436+
", videoTaken=" + videoTaken +
437+
", color=" + color +
438+
", sharpness=" + sharpness +
439+
", burstShutterRate=" + burstShutterRate +
440+
", continuousShutterSpeed=" + continuousShutterSpeed +
441+
", timeLapseInterval=" + timeLapseInterval +
442+
", extra1=" + extra1 +
443+
", extra2=" + extra2 +
444+
", extra3=" + extra3 +
445+
", extra4=" + extra4 +
446+
", extra5=" + extra5 +
447+
'}';
448+
}
449+
413450
public static final Creator<SoloGoproState> CREATOR = new Creator<SoloGoproState>() {
414451
public SoloGoproState createFromParcel(Parcel source) {
415452
return new SoloGoproState(source);

ClientLib/src/main/java/com/o3dr/services/android/lib/drone/companion/solo/tlv/SoloGoproStateV2.java

+37
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,43 @@ public SoloGoproStateV2[] newArray(int size) {
263263
}
264264
};
265265

266+
@Override
267+
public String toString() {
268+
return "SoloGoproStateV2{" +
269+
"captureMode=" + captureMode +
270+
", version=" + version +
271+
", model=" + model +
272+
", status=" + status +
273+
", recording=" + recording +
274+
", ntsc_pal=" + ntsc_pal +
275+
", fov=" + fov +
276+
", videoResolution=" + videoResolution +
277+
", fps=" + fps +
278+
", lowLight=" + lowLight +
279+
", photoResolution=" + photoResolution +
280+
", photoBurstRate=" + photoBurstRate +
281+
", videoProtune=" + videoProtune +
282+
", videoWhiteBalance=" + videoWhiteBalance +
283+
", videoColor=" + videoColor +
284+
", videoGain=" + videoGain +
285+
", videoSharpness=" + videoSharpness +
286+
", videoExposure=" + videoExposure +
287+
", gimbalEnabled=" + gimbalEnabled +
288+
", extra1=" + extra1 +
289+
", extra2=" + extra2 +
290+
", extra3=" + extra3 +
291+
", extra4=" + extra4 +
292+
", extra5=" + extra5 +
293+
", extra6=" + extra6 +
294+
", extra7=" + extra7 +
295+
", extra8=" + extra8 +
296+
", extra9=" + extra9 +
297+
", extra10=" + extra10 +
298+
", extra11=" + extra11 +
299+
", extra12=" + extra12 +
300+
'}';
301+
}
302+
266303
public byte getFov() {
267304
return fov;
268305
}

ClientLib/src/main/java/com/o3dr/services/android/lib/drone/companion/solo/tlv/SoloMessageShotManagerError.java

+7
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,11 @@ public SoloMessageShotManagerError[] newArray(int size) {
4545
return new SoloMessageShotManagerError[size];
4646
}
4747
};
48+
49+
@Override
50+
public String toString() {
51+
return "SoloMessageShotManagerError{" +
52+
"exceptionInfo='" + exceptionInfo + '\'' +
53+
'}';
54+
}
4855
}

ClientLib/src/main/java/com/o3dr/services/android/lib/drone/companion/solo/tlv/TLVPacket.java

+8
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ public final byte[] toBytes(){
5050
return bytes;
5151
}
5252

53+
@Override
54+
public String toString() {
55+
return "TLVPacket{" +
56+
"messageLength=" + messageLength +
57+
", messageType=" + messageType +
58+
'}';
59+
}
60+
5361
@Override
5462
public boolean equals(Object o) {
5563
if (this == o) return true;

0 commit comments

Comments
 (0)