MAVSDK-Java icon indicating copy to clipboard operation
MAVSDK-Java copied to clipboard

ArduPilot Unable to retrieve failsafe action (FS_GCS_ENABLE) using getParamInt on MAVSDK-Java 2.1.0

Open rayw-dronesense opened this issue 5 months ago • 1 comments

Environment

MAVSDK-Java: 2.1.0 MAVSDK-Android-Server: 2.1.1 Drone: Either ArduPilot physical drone or the SITL Sim

Does not occur on version 1.3.1 - the getParamInt on FS_GCS_ENABLE works correctly there. However, 1.3.1 has a separate issue: which is setting FS_GCS_ENABLE does nothing. But 2.1.0 setting FS_GCS_ENABLE works just we cannot read from it.

Repro

        mavLinkSystem.param.getParamInt("FS_GCS_ENABLE").subscribe({
            Log.e("RAWR", "RAWR: SUCCESSFULLY GOT THE GCS ENABLE VALUE $it")
        }) {
            Log.e("RAWR", "RAWR: FAILED TO GET THE VALUE: $it", it)
        }
RAWR: FAILED TO GET THE VALUE: io.mavsdk.param.Param$ParamException: WRONG_TYPE: Wrong Type
    io.mavsdk.param.Param$ParamException: WRONG_TYPE: Wrong Type
        at io.mavsdk.param.Param$1.onNext(Param.java:395)
        at io.mavsdk.param.Param$1.onNext(Param.java:388)
        at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onMessage(ClientCalls.java:468)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInternal(ClientCallImpl.java:667)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInContext(ClientCallImpl.java:654)
        at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
        at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:761)

rayw-dronesense avatar Sep 24 '24 20:09 rayw-dronesense