Skip to content

Commit

Permalink
Use mavsdk_server_api.h
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasVautherin committed Jan 5, 2021
1 parent 08263f2 commit 610ce37
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mavsdk_server/src/main/cpp/native-lib.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <android/log.h>
#include <backend_api.h>
#include <mavsdk_server_api.h>
#include <future>
#include <jni.h>
#include <thread>
Expand Down Expand Up @@ -29,21 +29,21 @@ extern "C"
JNIEXPORT jint JNICALL
Java_io_mavsdk_mavsdkserver_MavsdkServer_getPort(JNIEnv* env, jobject thiz, jlong mavsdkServerHandle)
{
auto mavsdk_server = reinterpret_cast<MavsdkBackend*>(mavsdkServerHandle);
auto mavsdk_server = reinterpret_cast<MavsdkServer*>(mavsdkServerHandle);
return mavsdk_server_get_port(mavsdk_server);
}

JNIEXPORT void JNICALL
Java_io_mavsdk_mavsdkserver_MavsdkServer_attach(JNIEnv* env, jobject thiz, jlong mavsdkServerHandle)
{
auto mavsdk_server = reinterpret_cast<MavsdkBackend*>(mavsdkServerHandle);
auto mavsdk_server = reinterpret_cast<MavsdkServer*>(mavsdkServerHandle);
mavsdk_server_attach(mavsdk_server);
}

JNIEXPORT void JNICALL
Java_io_mavsdk_mavsdkserver_MavsdkServer_stop(JNIEnv* env, jobject thiz, jlong mavsdkServerHandle)
{
auto mavsdk_server = reinterpret_cast<MavsdkBackend*>(mavsdkServerHandle);
auto mavsdk_server = reinterpret_cast<MavsdkServer*>(mavsdkServerHandle);
mavsdk_server_stop(mavsdk_server);
}
};

0 comments on commit 610ce37

Please sign in to comment.