Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requesting Mavlink message using experimental API #8

Open
tarazansafak opened this issue May 6, 2016 · 1 comment
Open

Requesting Mavlink message using experimental API #8

tarazansafak opened this issue May 6, 2016 · 1 comment

Comments

@tarazansafak
Copy link

Hello guys,

I have been working on a project using 3dr solo and android drone kit. I got stuck requesting specific mavlink message using experimental API. Whatever I send to the drone, I am getting same mavlink messages in the onMavlinkMessageReceived method. For instance, I am trying to get GPS_STATUS mavlink message from the drone, whose message id is 25, however, I am not getting anything. Addtionaly, I have tried to request all mavlink messages one by one with the following code but again no luck. I would appreciate if you can direct me on this issue.

Thanks!!

 msg_message_interval msgMessageInterval = new msg_message_interval();
                msgMessageInterval.message_id = 25;
                msgMessageInterval.interval_us = 10;

  MavlinkMessageWrapper mavlinkMessageWrapper= new MavlinkMessageWrapper(msgMessageInterval);

 ExperimentalApi.getApi(MainActivity.drone).sendMavlinkMessage(mavlinkMessageWrapper);

    MainActivity.drone.addMavlinkObserver(new MavlinkObserver() {
        @Override
        public void onMavlinkMessageReceived(MavlinkMessageWrapper mavlinkMessageWrapper) {
            Log.d("bla",mavlinkMessageWrapper.getMavLinkMessage().toString());
        }
    });
@seantobe
Copy link

seantobe commented Nov 2, 2016

I am not quite sure, but from your code, looks like you try to send a mavlink msg to your drone. It should be able to receive the message on the drone side. As for the onMavlinkMessageReceived API, maybe it will receive the correct value sent from drone side. This is what I think. If you have drone source code, you should find the values sent from your APP be received on drone source code API something like this "mavlink_msg_message_interval_decode". This is just my opinion, because it works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants