Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ClientLib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ext {
VERSION_MAJOR = 2
VERSION_MINOR = 7
VERSION_PATCH = 0
VERSION_SUFFIX = "alpha1"
VERSION_SUFFIX = "alpha2"

PUBLISH_ARTIFACT_ID = 'dronekit-android'
PUBLISH_VERSION = generateVersionName("", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH, VERSION_SUFFIX)
Expand Down
1 change: 1 addition & 0 deletions ClientLib/src/main/java/com/o3dr/android/client/Drone.java
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ private <T extends Parcelable> T getAttributeDefaultValue(String attributeType)
case AttributeType.CAMERA:
case SoloAttributes.SOLO_STATE:
case SoloAttributes.SOLO_GOPRO_STATE:
case SoloAttributes.SOLO_GOPRO_STATE_V2:
default:
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,10 @@ private SoloAttributes(){}
* Used to access the sololink gopro state.
*/
public static final String SOLO_GOPRO_STATE = PACKAGE_NAME + ".SOLO_GOPRO_STATE";

/**
* Used to access the updated sololink gopro state.
* @since 2.7.0
*/
public static final String SOLO_GOPRO_STATE_V2 = PACKAGE_NAME + ".SOLO_GOPRO_STATE_V2";
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ private SoloEvents() {
* @see {@link com.o3dr.services.android.lib.drone.companion.solo.tlv.SoloGoproState}
*/
public static final String SOLO_GOPRO_STATE_UPDATED = PACKAGE_NAME + ".GOPRO_STATE_UPDATED";

/**
* Broadcasts updates to the Gopro extended state.
* @see {@link com.o3dr.services.android.lib.drone.companion.solo.tlv.SoloGoproStateV2}
*/
public static final String SOLO_GOPRO_STATE_V2_UPDATED = PACKAGE_NAME + ".GOPRO_STATE_V2_UPDATED";

/**
* Signals update to the sololink wifi settings
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,80 @@ public SoloGoproStateV2[] newArray(int size) {
return new SoloGoproStateV2[size];
}
};

public byte getFov() {
return fov;
}

public byte getFps() {
return fps;
}

public byte getGimbalEnabled() {
return gimbalEnabled;
}

public byte getLowLight() {
return lowLight;
}

public byte getModel() {
return model;
}

public byte getNtsc_pal() {
return ntsc_pal;
}

public byte getPhotoBurstRate() {
return photoBurstRate;
}

public byte getPhotoResolution() {
return photoResolution;
}

public byte getRecording() {
return recording;
}

public byte getStatus() {
return status;
}

public byte getVersion() {
return version;
}

public byte getVideoColor() {
return videoColor;
}

public byte getVideoExposure() {
return videoExposure;
}

public byte getVideoGain() {
return videoGain;
}

public byte getVideoProtune() {
return videoProtune;
}

public byte getVideoResolution() {
return videoResolution;
}

public byte getVideoSharpness() {
return videoSharpness;
}

public byte getVideoWhiteBalance() {
return videoWhiteBalance;
}

public byte getCaptureMode() {
return captureMode;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ public void onTlvPacketReceived(TLVPacket packet) {
notifyAttributeListener(SoloEvents.SOLO_GOPRO_STATE_UPDATED);
break;

case TLVMessageTypes.TYPE_SOLO_GOPRO_STATE_V2:
notifyAttributeListener(SoloEvents.SOLO_GOPRO_STATE_V2_UPDATED);
break;

default:
final Bundle messageInfo = new Bundle();
messageInfo.putParcelable(SoloEventExtras.EXTRA_SOLO_MESSAGE_DATA, packet);
Expand Down Expand Up @@ -194,6 +198,9 @@ public DroneAttribute getAttribute(String attributeType) {
case SoloAttributes.SOLO_GOPRO_STATE:
return soloComp.getGoproState();

case SoloAttributes.SOLO_GOPRO_STATE_V2:
return soloComp.getGoproStateV2();

case AttributeType.STATE:
final State stateAttr = (State) super.getAttribute(attributeType);
stateAttr.addToVehicleUid(SERIAL_NUMBER_LABEL, pixhawkSerialNumber);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.o3dr.services.android.lib.drone.companion.solo.tlv.SoloButtonSetting;
import com.o3dr.services.android.lib.drone.companion.solo.tlv.SoloButtonSettingSetter;
import com.o3dr.services.android.lib.drone.companion.solo.tlv.SoloGoproState;
import com.o3dr.services.android.lib.drone.companion.solo.tlv.SoloGoproStateV2;
import com.o3dr.services.android.lib.drone.companion.solo.tlv.SoloMessageLocation;
import com.o3dr.services.android.lib.drone.companion.solo.tlv.TLVMessageTypes;
import com.o3dr.services.android.lib.drone.companion.solo.tlv.TLVPacket;
Expand Down Expand Up @@ -78,6 +79,7 @@ public interface SoloCompListener {
private SoloCompListener compListener;

private SoloGoproState goproState;
private SoloGoproStateV2 goproStateV2;

/**
* Solo companion computer implementation
Expand All @@ -98,6 +100,10 @@ public SoloGoproState getGoproState() {
return goproState;
}

public SoloGoproStateV2 getGoproStateV2(){
return goproStateV2;
}

public boolean hasStreamingPermission(){
if(BuildConfig.SITL_DEBUG)
return true;
Expand Down Expand Up @@ -159,6 +165,11 @@ public void onTlvPacketReceived(TLVPacket packet) {
goproState = (SoloGoproState) packet;
Timber.d("Updated gopro state.");
break;

case TLVMessageTypes.TYPE_SOLO_GOPRO_STATE_V2:
goproStateV2 = (SoloGoproStateV2) packet;
Timber.i("Updated gopro state.");
break;
}

if (compListener != null)
Expand Down