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

Shell commands

Open nab0y4enko opened this issue 5 years ago • 3 comments

Could you provide example for use shell commands on Shell module?

For example arm/disarm uav using shell. https://mavlink.io/en/messages/common.html#MAV_CMD_COMPONENT_ARM_DISARM

In my test any command success sent without feedback and actions from UAV's side. I've tested next commands: arm, /mavsdk.rpc.action.ActionService/Arm, mavlink arm, commander arm, MAV_CMD_COMPONENT_ARM_DISARM 1 and have no any ideas more.

drone.shell.send(command: "COMMAND").do(
            onError: { error in
                // Newer called
            },
            onCompleted: {
                // Always calls
            }
        )
        .subscribe()
        .disposed(by: disposeBag)

nab0y4enko avatar Aug 11 '20 22:08 nab0y4enko

Are you running against PX4 running on NuttX? Shell doesn't work with SITL...

JonasVautherin avatar Aug 12 '20 12:08 JonasVautherin

@JonasVautherin Thanks for help. Yeah, I known about simulation. jMAVSim 2020-08-12 12-45-26

But we also have been testing on Tarot X6 + Herelink RC.

Our development stopped at this point and no one can provide us description/example of simple command we could use with MAVSDK-Swift.

nab0y4enko avatar Aug 12 '20 16:08 nab0y4enko

We have an example in MAVSDK-C++, it would be nice if you could adapt it to Swift! See here.

JonasVautherin avatar Aug 12 '20 20:08 JonasVautherin