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
4 changes: 2 additions & 2 deletions mavsdk_server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ allprojects {
// version. Say we set this package to be 3.6.0-2-SNAPSHOT, it means that it
// corresponds to mavsdk_server 3.6.0.
val mavsdk_server_release = if (!project.hasProperty("VERSION")) {
"v3.6.0"
"v3.7.1"
} else {
val versionString = project.property("VERSION").toString()
val regex = Regex("v?(\\d+\\.\\d+\\.\\d+)")
Expand Down Expand Up @@ -103,7 +103,7 @@ android {
// MAVSDK-Java package and "SNAPSHOT" optionally sets it as a SNAPSHOT.
version =
if (project.hasProperty("VERSION")) project.property("VERSION").toString()
else "3.6.0-SNAPSHOT"
else "3.7.1-SNAPSHOT"

ndk {
abiFilters += listOf("arm64-v8a", "armeabi-v7a", "x86", "x86_64")
Expand Down
14 changes: 14 additions & 0 deletions mavsdk_server/src/main/cpp/native-lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,"MAVSDK-Server",__VA_ARGS__)

extern "C" char* mavsdk_temp_path;

extern "C"
{
JNIEXPORT jlong JNICALL
Expand Down Expand Up @@ -77,4 +79,16 @@ extern "C"
auto mavsdk_server = reinterpret_cast<MavsdkServer*>(mavsdkServerHandle);
mavsdk_server_destroy(mavsdk_server);
}

JNIEXPORT void JNICALL
Java_io_mavsdk_mavsdkserver_MavsdkServer_setTempDirectory(JNIEnv *env, jobject thiz, jstring temp_dir)
{
const char* temp_c_str = env->GetStringUTFChars(temp_dir, 0);

static char our_copy[256];
strncpy(our_copy, temp_c_str, sizeof(our_copy));
mavsdk_temp_path = our_copy;

env->ReleaseStringUTFChars(temp_dir, temp_c_str);
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,6 @@ public void destroy() {
}

private native void destroy(long mavsdkServerHandle);

public native void setTempDirectory(String dir);
}
2 changes: 1 addition & 1 deletion sdk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ group = "io.mavsdk"
// version of the proto files as MAVSDK-C++ v3.6.0.
version =
if (project.hasProperty("VERSION")) project.property("VERSION").toString()
else "3.6.0-SNAPSHOT"
else "3.7.1-SNAPSHOT"

val grpcVersion = "1.61.1"

Expand Down